Search Results

Search found 302 results on 13 pages for 'lorem ipsum'.

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

  • can't implement jquery jScrollPane to replace browser's scrollbars

    - by Zack
    I am trying to replace browser's scrollbars with jScrollPane (jQuery), it won't work. Here are two attempts to implement it: a basic attempt, and an attempt to imitate the full page demo for jScrollPane. I've been trying everything I could think of to figure out what didn't work, but couldn't. here is my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <!-- styles needed by jScrollPane --> <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /> <style type="text/css" id="page-css"> /* Styles specific to this particular page */ html { overflow: auto; } #full-page-container { overflow: auto; } .scroll-pane { width: 100%; height: 200px; overflow: auto; } .horizontal-only { height: auto; max-height: 200px; } </style> <!-- latest jQuery direct from google's CDN --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> <script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script> <script type="text/javascript" id="sourcecode"> $(function () { var win = $(window); // Full body scroll var isResizing = false; win.bind( 'resize', function () { if (!isResizing) { isResizing = true; var container = $('#full-page-container'); // Temporarily make the container tiny so it doesn't influence the // calculation of the size of the document container.css( { 'width': 1, 'height': 1 } ); // Now make it the size of the window... container.css( { 'width': win.width(), 'height': win.height() } ); isResizing = false; container.jScrollPane( { 'showArrows': true } ); } } ).trigger('resize'); // Workaround for known Opera issue which breaks demo (see // http://jscrollpane.kelvinluck.com/known_issues.html#opera-scrollbar ) $('body').css('overflow', 'hidden'); // IE calculates the width incorrectly first time round (it // doesn't count the space used by the native scrollbar) so // we re-trigger if necessary. if ($('#full-page-container').width() != win.width()) { win.trigger('resize'); } }); </script> </head> <body> <div id="full-page-container"> This is the most basic implementation of jScrollPane I could create, if I am not wrong this has all it should take, yet it doesn't work. a little lorem ipsum to make the scrollbars show up: [here come's lot's of lorem ipsum text in the actual page...] </div> </body> </html> The other option is the same, with a link to demo.css and demo.js.

    Read the article

  • Error while validating HTML "document type does not allow element "li" here; missing one of "ul", "o

    - by brumila
    Hey! So I'm trying to code something on wordpress for the first time but the validator doesn't seem to like me. Look at the error I got while validating: Line 87, Column 33: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag I've searched everywhere, I'm not aware of any missing or misplaced li or ul tags can someone help me out on this one? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> <title> Blog</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="generator" content="WordPress 2.9.2" /> <!-- leave this for stats please --> <link rel="stylesheet" href="http://localhost/wordpress/wp-content/themes/cmc-milagro/style.css" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://localhost/wordpress/?feed=rss2" /> <link rel="alternate" type="text/xml" title="RSS .92" href="http://localhost/wordpress/?feed=rss" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://localhost/wordpress/?feed=atom" /> <link rel="pingback" href="http://localhost/wordpress/xmlrpc.php" /> <link rel='archives' title='March 2010' href='http://localhost/wordpress/?m=201003' /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://localhost/wordpress/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://localhost/wordpress/wp-includes/wlwmanifest.xml" /> <link rel='index' title='Blog' href='http://localhost/wordpress' /> <meta name="generator" content="WordPress 2.9.2" /> </head> <body> <div> <h1><a href="http://localhost/wordpress"> Blog</a> </h1> Just another WordPress weblog</div> <div id="container"> <h2><a href="http://localhost/wordpress/?p=8"> Teste Post 3 </a></h2> <div class="post" id="post-8"> <div class="entry"> <p>Aliquam erat volutpat. Fusce in nibh elit. Morbi lorem urna, viverra sed blandit eget, mattis venenatis felis. Maecenas viverra pellentesque justo, vel tincidunt massa semper sit amet. Vestibulum rhoncus purus in mauris fermentum ut aliquet augue semper.</p> <p class="postmetadata"> Filed under&#58; <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a> by admin <br /> <a href="http://localhost/wordpress/?p=8#respond" title="Comment on Teste Post 3">No Comments &#187;</a> &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=8" title="Edit post">Edit</a> </p> </div> </div> <h2><a href="http://localhost/wordpress/?p=5"> Teste Post 2 </a></h2> <div class="post" id="post-5"> <div class="entry"> <p>Aliquam erat volutpat. Fusce in nibh elit. Morbi lorem urna, viverra sed blandit eget, mattis venenatis felis. Maecenas viverra pellentesque justo, vel tincidunt massa semper sit amet. Vestibulum rhoncus purus in mauris fermentum ut aliquet augue semper. Duis orci metus, cursus ac tempor eget, faucibus vel elit. Sed rutrum mollis posuere. Maecenas luctus commodo augue vel fringilla. Nunc enim lacus, varius nec tempor sed, congue vel elit. Suspendisse urna ligula, pharetra ac malesuada quis, scelerisque eget justo.</p> <p class="postmetadata"> Filed under&#58; <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a> by admin <br /> <a href="http://localhost/wordpress/?p=5#respond" title="Comment on Teste Post 2">No Comments &#187;</a> &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=5" title="Edit post">Edit</a> </p> </div> </div> <h2><a href="http://localhost/wordpress/?p=3"> Teste Post 1 </a></h2> <div class="post" id="post-3"> <div class="entry"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ut mattis elit. In sed nulla lobortis dolor pellentesque fringilla at eget ipsum. Proin pellentesque vehicula ultricies. Phasellus velit nunc, tempus nec scelerisque vel, euismod pellentesque diam. Vivamus consectetur, sapien sit amet rhoncus porta, sapien nisl imperdiet diam, dapibus placerat sem ante condimentum nisl. Nulla facilisi. Mauris eu turpis mauris. Nunc at turpis elit, et mattis purus. Proin varius, nunc rhoncus consectetur dignissim, lacus augue accumsan sem, nec pretium magna est a massa. Duis eu justo arcu. Curabitur diam ligula, semper non blandit ut, sodales ac dui.</p> <p class="postmetadata"> Filed under&#58; <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a> by admin <br /> <a href="http://localhost/wordpress/?p=3#respond" title="Comment on Teste Post 1">No Comments &#187;</a> &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=3" title="Edit post">Edit</a> </p> </div> </div> <h2><a href="http://localhost/wordpress/?p=1"> Hello world! </a></h2> <div class="post" id="post-1"> <div class="entry"> <p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p> <p class="postmetadata"> Filed under&#58; <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a> by admin <br /> <a href="http://localhost/wordpress/?p=1#comments" title="Comment on Hello world!">1 Comment &#187;</a> &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=1" title="Edit post">Edit</a> </p> </div> </div> <div class="navigation"> </div> </div> <div class="sidebar"> <ul> <li id="search"> <form method="get" id="searchform" action="http://localhost/wordpress/"> <div> <input type="text" value="" name="s" id="s" size="15" /><br /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form> <li class="pagenav"><h2>Pages</h2><ul><li class="page_item page-item-2"><a href="http://localhost/wordpress/?page_id=2" title="About">About</a></li> </ul></li> </li> <li> <h2> Categories </h2> <ul> <li class="cat-item cat-item-1"><a href="http://localhost/wordpress/?cat=1" title="View all posts filed under Uncategorized">Uncategorized</a> (4) </li> </ul> </li> <li> <h2> Archives </h2> <ul> <li><a href='http://localhost/wordpress/?m=201003' title='March 2010'>March 2010</a></li> </ul> </li> <li id="linkcat-2" class="linkcat"><h2>Blogroll</h2> <ul> <li><a href="http://wordpress.org/development/">Development Blog</a></li> <li><a href="http://codex.wordpress.org/">Documentation</a></li> <li><a href="http://wordpress.org/extend/plugins/">Plugins</a></li> <li><a href="http://wordpress.org/extend/ideas/">Suggest Ideas</a></li> <li><a href="http://wordpress.org/support/">Support Forum</a></li> <li><a href="http://wordpress.org/extend/themes/">Themes</a></li> <li><a href="http://planet.wordpress.org/">WordPress Planet</a></li> </ul> </li> <li> <h2> Meta </h2> <ul> <li><a href="http://localhost/wordpress/wp-admin/">Site Admin</a></li> <li> <a href="http://localhost/wordpress/wp-login.php?action=logout&amp;_wpnonce=ee45c3c988">Log out</a> </li> </ul> </li> </ul> </div> <div id="footer"> <p> Copyright &#169; 2010 Blog</p> </div> </body> </html>

    Read the article

  • CodePlex Daily Summary for Wednesday, June 02, 2010

    CodePlex Daily Summary for Wednesday, June 02, 2010New ProjectsBackupCleaner.Net: A C#.Net-based tool for automatically removing old backups selectively. It can be used when you already make daily backups on disk, and want to cle...C# Dotnetnuke Module development Template for Visual Studio 2010: C# DNN Module Development template for Visual Studio 2010 Get a head-start on DNN Module development. Whether you're a pro or just starting with D...Christoc's DotNetNuke C# Module Development Template: A quick and easy to use C# Module development template for DotNetNuke 5, Visual Studio 2008.Client per la digitalizzazione di documenti integrato con DotNetNuke: Questo applicativo in ambiente windows 32bit consente di digitalizzare documenti con piu scanner contemporaneamente, processare OCR in 17 Lingue (p...ContainerOne - C# application server: An application server completely written in c# (.net 4.0).Drop7 Silverlight: It's a clone of the original Drop7 written in Silverlight (C#). Echo.Net: Echo.Net is an embedded task manager for web and windows apps. It allows for simple management of background tasks at specific times. It's develope...energy: Smartgrid Demand Response ImplementationGenerate Twitter Message for Live Writer: This is a plug-in for Windows Live Writer that generates a twitter message with your blog post name and a TinyUrl link to the blog post. It will d...HomingCMS.Net: A lightweight cms.Information Système & Shell à distance: Un web service qui permet d'avoir des informations sur le système et de lancer de commande (terminal) à distance.Javascript And Jquery: gqq's javascript and jquery examplesMemory++: "Tweak the memory to speed up your computer" Memory ++ is basically an application that will speed up your computer ensuring comfort in their norma...Microformat Parsers for .NET: Microformat's Parsers for .NET helps you to collect information you run into on the web, that is stored by means of microformats. It's written in C...MoneyManager: Trying to make Personal Finances management System for my needs. Microsoft stopped to support MSMoney - it makes me so sad, so I wanna to make my ...Open source software for running a financial markets trading business: The core conceptual model will support running a business in the financial markets, for example running a trading exchange business.Ovik: Open Video Converter with simple and intuitive interface for converting video files to the open formats.Oxygen Smil Player: The <project name> is a open a-smil player implementation that is meaned to be connected to a Digital Signage CMS like Oxygen media platform ( www....Protect The Carrot: Protect The Carrot is a small fastpaced XNA game. You are a farmer whose single carrot is under attack by ravenous rabbits. You have to shoot the r...Race Day Commander: The core project is designed to support coaches of "long distance" or "endurance" sporting events coach their athletes during a race. The idea bein...Raygun Diplomacy: Raygun Diplomacy is an action shooter sandbox game set in a futuristic world. It will use procedural generation for the world, weapons, and vehicle...Resx-Translator-Bot: Resx-Translator-Bot uses Google Tanslate to automatically translate the .resx-files in your .NET and ASP.NET applications.Sistema de Expedición del Permiso Único de Siembra: Sistema de Expedición del Permiso Único de Siembra.SiteOA: 一个基于asp.net mvc2的OAStraighce: This is a low-featured, cyclic (log files reside in appname\1.txt to at mose 31.txt), thread-safe and non-blocking TraceListener with some extensio...Touch Mice: Touch Mice turns multiple mice on a computer into individual touch devices. This allows you to create multi-touch applications using the new touch...TStringValidator: A project helper to validate strings. Use this class to hold your regex strings for use with any project's string validation.Ultimate Dotnetnuke Skin Object: Ultimate Skin Object is a Dotnetnuke 5.4.2+ extension that will allow you to easily change your skins doc type, remove unneeded css files, inject e...Ventosus: Ventosus is an upcoming partially text-based game. No further information is available at this time.vit: vit based on asp.net mvcW7 Auto Playlist Generator: Purpose: This application is designed to create W7MC playlist automatically whenever you want. You can select if you want the playlist sorted Alpha...W7 Video Playlist Creator: Purpose: This program allows you to quickly create wvx video play list for Windows Media Center. This functionality is not included in WMC and is u...New ReleasesBCryptTool: BCryptTool v0.2.1: The Microsoft .NET Framework 4.0 is needed to run this program.BFBC2 PRoCon: PRoCon 0.5.2.0: Notes available on phogue.netC# Dotnetnuke Module development Template for Visual Studio 2010: DNNModule 1.0: This is the initial release of DNNModule as was available for download from http://www.subodh.com/Projects/DNNModule In this release: Contains one...Client per la digitalizzazione di documenti integrato con DotNetNuke: Versione 3.0.1: Versione 3.0.1CommonLibrary.NET: CommonLibrary.NET 0.9.4 - Final Release: A collection of very reusable code and components in C# 3.5 ranging from ActiveRecord, Csv, Command Line Parsing, Configuration, Holiday Calendars,...Community Forums NNTP bridge: Community Forums NNTP Bridge V20: Release of the Community Forums NNTP Bridge to access the social and anwsers MS forums with a single, open source NNTP bridge. This release has ad...Community Forums NNTP bridge: Community Forums NNTP Bridge V21: Release of the Community Forums NNTP Bridge to access the social and anwsers MS forums with a single, open source NNTP bridge. This release has ad...DirectQ: Release 1.8.4: Significant bug fixes and improvments over 1.8.3c; there may be some bugs that I haven't caught here as development became a little disjointed towa...DotNetNuke 5 Thai Language Pack: 1.0.1: Fixed Installation Problem. Version 1.0 -> 1.0.1 Type : Character encoding. Change : ().dnn description file to "ไทย (ไทย)".dnnEcho.Net: Echo.Net 1.0: Initial release of Echo.Net.Extend SmallBasic: Teaching Extensions v.018: ShapeMaker, Program Window, Timer, and many threading errors fixedExtend SmallBasic: Teaching Extensions v.019: Added Rectangles to shapemaker, and the bubble quizGenerate Twitter Message for Live Writer: Final Source Code Plus Binaries: Compete C# source code available below. I have also included the binary for those that just want to run it.GoogleMap Control: GoogleMap Control 4.5: Map and map events are only functional. New state, persistence and event implementation in progress. Javascript classes are implemented as MS AJAX ...Industrial Dashboard: ID 3.1: -Added new widget IndustrialSlickGrid. -Added example with IndustrialChart.LongBar: LongBar 2.1 Build 310: - Library: Double-clicking on tile will install it - Feedback: Now you can type your e-mail and comment for errorMavention: Mavention Insert Lorem ipsum: A Sandbox Solution for SharePoint 2010 that allows you to easily insert Lorem ipsum text into RTE. More information and screenshots available @ htt...Memory++: Memory ++: Tweak the memory to speed up your computer Memory is basically an application that will speed up your computer ensuring comfort in their normal ac...MyVocabulary: Version 2.0: Improvements over version 1.0: Several bug fixes New shortcuts added to increase usability A new section for testing verbs was addednopCommerce. Open Source online shop e-commerce solution.: nopCommerce 1.60: You can also install nopCommerce using the Microsoft Web Platform Installer. Simply click the button below: nopCommerce To see the full list of f...Nuntio Content: Nuntio Content 4.2.1: Patch release that fixes a couple of minor issues with version numbers and priority settings for role content. The release one package for DNN 4 an...Ovik: Ovik v0.0.1 (Preview Release): This is a very early preview release of Ovik. It contains only the pure processes of selecting files and launching a conversion process. Preview r...PHPExcel: PHPExcel 1.7.3c Production: This is a patch release for 26477. Want to contribute?Please refer the Contribute page. DonationsDonate via PayPal. If you want to, we can also a...PowerShell Admin Modules: PAM 0.2: Version 0.2 contains the PAMShare module with Get-Share Get-ShareAccessMask Get-ShareSecurity New-Share Remove-Share Set-Share and the PAMath modu...Professional MRDS: RDS 2008 R3 Release: This is an updated version of the code to work with RDS 2008 R3 (version 2.2.76.0). IMPORTANT NOTE These samples are supplied as a ZIP file. Unzip...Protect The Carrot: First release: We provide two ways to install the game. The first is PTC 1.0.0.0 Zip which contains a Click-Once installer (the DVD type since codeplex does not...PST File Format SDK: PST File Format SDK v0.2.0: Updated version of pstsdk with several bug fixes, including: Improved compiler support (several changes, including two patches from hub) Fixed Do...Race Day Commander: Race Day Commander v1: First release. The exact code that was written on the day in 6 hours.Resx-Translator-Bot: Release 1.0: Initial releaseSalient.StackApps: JavaScript API Wrapper beta 2: This is the first draft of the generated JS wrapper. Added basic test coverage for each route that can also serve as basic usage examples. More i...SharePoint 2010 PowerShell Scripts & Utilities: PSSP2010 Utils 0.2: Added Install-SPIFilter script cmdlet More information can be found at http://www.ravichaganti.com/blog/?p=1439SharePoint Tools from China Community: ECB菜单控制器: ECB菜单控制器Shopping Cart .NET: 1.5: Shopping Cart .NET 1.5 has received an upgrade to .NET 4.0 along with SQL Server 2005/8. There is a new AJAX Based inventory system that helps you ...sMODfix: sMODfix v1.0b: Added: provisional support for ecm_v54 Added: provisional support for gfx_v88SNCFT Gadget: SNCFT gadget v1: cette version est la version 1 de ma gadgetSnippet Designer: Snippet Designer 1.3: Change logChanges for Visual Studio 2010Fixed bug where "Export as Snippet" was failing in a website project Changed Snippet Explorer search to u...sNPCedit: sNPCedit v0.9b: + Fixed: structure of resources + Changed: some labels in GUISoftware Is Hardwork: Sw. Is Hw. Lib. 3.0.0.x+05: Sw. Is Hw. Lib. 3.0.0.x+05SQL Server PowerShell Extensions: 2.2.3 Beta: Release 2.2 re-implements SQLPSX as PowersShell version 2.0 modules. SQLPSX consists of 9 modules with 133 advanced functions, 2 cmdlets and 7 scri...StackOverflow.Net: Preview Beta: Goes with the Stack Apps API version 0.8Ultimate Dotnetnuke Skin Object: Ultimate Skin Object V1.00.00: Ultimate Skin Object is a Dotnetnuke 5.4.2+ extension that will allow you to easily change your skins doc type, remove unneeded css files, inject e...VCC: Latest build, v2.1.30601.0: Automatic drop of latest buildVelocity Shop: JUNE 2010: Source code aligned to .NET Framework 4.0, ASP.NET 4.0 and Windows Server AppFabric Caching RC.ViperWorks Ignition: ViperWorks_5.0.1005.31: ViperWorks Ignition Source, version 5.0.1005.31.Visual Studio 2010 and Team Foundation Server 2010 VM Factory: Session Recordings: This release contains the "raw" and undedited session recordings and slides delivered by the team. 2010-06-01 Create package and add two session r...W7 Auto Playlist Generator: Source Code plus Binaries: Compete C# and WinForm source code available below. I have also included the binary for those that just want to run it.W7 Video Playlist Creator: Source Code plus Binaries: Compete C# and WPF source code available below. I have also included the binary for those that just want to run it.Most Popular ProjectsRawrWBFS ManagerAJAX Control ToolkitMicrosoft SQL Server Product Samples: DatabaseSilverlight ToolkitWindows Presentation Foundation (WPF)patterns & practices – Enterprise LibraryPHPExcelMicrosoft SQL Server Community & SamplesASP.NETMost Active ProjectsCommunity Forums NNTP bridgepatterns & practices – Enterprise LibraryGMap.NET - Great Maps for Windows Forms & PresentationBlogEngine.NETIonics Isapi Rewrite FilterMirror Testing SystemRawrCaliburn: An Application Framework for WPF and SilverlightPHPExcelCustomer Portal Accelerator for Microsoft Dynamics CRM

    Read the article

  • Metro: Understanding CSS Media Queries

    - by Stephen.Walther
    If you are building a Metro style application then your application needs to look great when used on a wide variety of devices. Your application needs to work on tiny little phones, slates, desktop monitors, and the super high resolution displays of the future. Your application also must support portable devices used with different orientations. If someone tilts their phone from portrait to landscape mode then your application must still be usable. Finally, your Metro style application must look great in different states. For example, your Metro application can be in a “snapped state” when it is shrunk so it can share screen real estate with another application. In this blog post, you learn how to use Cascading Style Sheet media queries to support different devices, different device orientations, and different application states. First, you are provided with an overview of the W3C Media Query recommendation and you learn how to detect standard media features. Next, you learn about the Microsoft extensions to media queries which are supported in Metro style applications. For example, you learn how to use the –ms-view-state feature to detect whether an application is in a “snapped state” or “fill state”. Finally, you learn how to programmatically detect the features of a device and the state of an application. You learn how to use the msMatchMedia() method to execute a media query with JavaScript. Using CSS Media Queries Media queries enable you to apply different styles depending on the features of a device. Media queries are not only supported by Metro style applications, most modern web browsers now support media queries including Google Chrome 4+, Mozilla Firefox 3.5+, Apple Safari 4+, and Microsoft Internet Explorer 9+. Loading Different Style Sheets with Media Queries Imagine, for example, that you want to display different content depending on the horizontal resolution of a device. In that case, you can load different style sheets optimized for different sized devices. Consider the following HTML page: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>U.S. Robotics and Mechanical Men</title> <link href="main.css" rel="stylesheet" type="text/css" /> <!-- Less than 1100px --> <link href="medium.css" rel="stylesheet" type="text/css" media="(max-width:1100px)" /> <!-- Less than 800px --> <link href="small.css" rel="stylesheet" type="text/css" media="(max-width:800px)" /> </head> <body> <div id="header"> <h1>U.S. Robotics and Mechanical Men</h1> </div> <!-- Advertisement Column --> <div id="leftColumn"> <img src="advertisement1.gif" alt="advertisement" /> <img src="advertisement2.jpg" alt="advertisement" /> </div> <!-- Product Search Form --> <div id="mainContentColumn"> <label>Search Products</label> <input id="search" /><button>Search</button> </div> <!-- Deal of the Day Column --> <div id="rightColumn"> <h1>Deal of the Day!</h1> <p> Buy two cameras and get a third camera for free! Offer is good for today only. </p> </div> </body> </html> The HTML page above contains three columns: a leftColumn, mainContentColumn, and rightColumn. When the page is displayed on a low resolution device, such as a phone, only the mainContentColumn appears: When the page is displayed in a medium resolution device, such as a slate, both the leftColumn and the mainContentColumns are displayed: Finally, when the page is displayed in a high-resolution device, such as a computer monitor, all three columns are displayed: Different content is displayed with the help of media queries. The page above contains three style sheet links. Two of the style links include a media attribute: <link href="main.css" rel="stylesheet" type="text/css" /> <!-- Less than 1100px --> <link href="medium.css" rel="stylesheet" type="text/css" media="(max-width:1100px)" /> <!-- Less than 800px --> <link href="small.css" rel="stylesheet" type="text/css" media="(max-width:800px)" /> The main.css style sheet contains default styles for the elements in the page. The medium.css style sheet is applied when the page width is less than 1100px. This style sheet hides the rightColumn and changes the page background color to lime: html { background-color: lime; } #rightColumn { display:none; } Finally, the small.css style sheet is loaded when the page width is less than 800px. This style sheet hides the leftColumn and changes the page background color to red: html { background-color: red; } #leftColumn { display:none; } The different style sheets are applied as you stretch and contract your browser window. You don’t need to refresh the page after changing the size of the page for a media query to be applied: Using the @media Rule You don’t need to divide your styles into separate files to take advantage of media queries. You can group styles by using the @media rule. For example, the following HTML page contains one set of styles which are applied when a device’s orientation is portrait and another set of styles when a device’s orientation is landscape: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Application1</title> <style type="text/css"> html { font-family:'Segoe UI Semilight'; font-size: xx-large; } @media screen and (orientation:landscape) { html { background-color: lime; } p.content { width: 50%; margin: auto; } } @media screen and (orientation:portrait) { html { background-color: red; } p.content { width: 90%; margin: auto; } } </style> </head> <body> <p class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. </p> </body> </html> When a device has a landscape orientation then the background color is set to the color lime and the text only takes up 50% of the available horizontal space: When the device has a portrait orientation then the background color is red and the text takes up 90% of the available horizontal space: Using Standard CSS Media Features The official list of standard media features is contained in the W3C CSS Media Query recommendation located here: http://www.w3.org/TR/css3-mediaqueries/ Here is the official list of the 13 media features described in the standard: · width – The current width of the viewport · height – The current height of the viewport · device-width – The width of the device · device-height – The height of the device · orientation – The value portrait or landscape · aspect-ratio – The ratio of width to height · device-aspect-ratio – The ratio of device width to device height · color – The number of bits per color supported by the device · color-index – The number of colors in the color lookup table of the device · monochrome – The number of bits in the monochrome frame buffer · resolution – The density of the pixels supported by the device · scan – The values progressive or interlace (used for TVs) · grid – The values 0 or 1 which indicate whether the device supports a grid or a bitmap Many of the media features in the list above support the min- and max- prefix. For example, you can test for the min-width using a query like this: (min-width:800px) You can use the logical and operator with media queries when you need to check whether a device supports more than one feature. For example, the following query returns true only when the width of the device is between 800 and 1,200 pixels: (min-width:800px) and (max-width:1200px) Finally, you can use the different media types – all, braille, embossed, handheld, print, projection, screen, speech, tty, tv — with a media query. For example, the following media query only applies to a page when a page is being printed in color: print and (color) If you don’t specify a media type then media type all is assumed. Using Metro Style Media Features Microsoft has extended the standard list of media features which you can include in a media query with two custom media features: · -ms-high-contrast – The values any, black-white, white-black · -ms-view-state – The values full-screen, fill, snapped, device-portrait You can take advantage of the –ms-high-contrast media feature to make your web application more accessible to individuals with disabilities. In high contrast mode, you should make your application easier to use for individuals with vision disabilities. The –ms-view-state media feature enables you to detect the state of an application. For example, when an application is snapped, the application only occupies part of the available screen real estate. The snapped application appears on the left or right side of the screen and the rest of the screen real estate is dominated by the fill application (Metro style applications can only be snapped on devices with a horizontal resolution of greater than 1,366 pixels). Here is a page which contains style rules for an application in both a snap and fill application state: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>MyWinWebApp</title> <style type="text/css"> html { font-family:'Segoe UI Semilight'; font-size: xx-large; } @media screen and (-ms-view-state:snapped) { html { background-color: lime; } } @media screen and (-ms-view-state:fill) { html { background-color: red; } } </style> </head> <body> <p class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. </p> </body> </html> When the application is snapped, the application appears with a lime background color: When the application state is fill then the background color changes to red: When the application takes up the entire screen real estate – it is not in snapped or fill state – then no special style rules apply and the application appears with a white background color. Querying Media Features with JavaScript You can perform media queries using JavaScript by taking advantage of the window.msMatchMedia() method. This method returns a MSMediaQueryList which has a matches method that represents success or failure. For example, the following code checks whether the current device is in portrait mode: if (window.msMatchMedia("(orientation:portrait)").matches) { console.log("portrait"); } else { console.log("landscape"); } If the matches property returns true, then the device is in portrait mode and the message “portrait” is written to the Visual Studio JavaScript Console window. Otherwise, the message “landscape” is written to the JavaScript Console window. You can create an event listener which triggers code whenever the results of a media query changes. For example, the following code writes a message to the JavaScript Console whenever the current device is switched into or out of Portrait mode: window.msMatchMedia("(orientation:portrait)").addListener(function (mql) { if (mql.matches) { console.log("Switched to portrait"); } }); Be aware that the event listener is triggered whenever the result of the media query changes. So the event listener is triggered both when you switch from landscape to portrait and when you switch from portrait to landscape. For this reason, you need to verify that the matches property has the value true before writing the message. Summary The goal of this blog entry was to explain how CSS media queries work in the context of a Metro style application written with JavaScript. First, you were provided with an overview of the W3C CSS Media Query recommendation. You learned about the standard media features which you can query such as width and orientation. Next, we focused on the Microsoft extensions to media queries. You learned how to use –ms-view-state to detect whether a Metro style application is in “snapped” or “fill” state. You also learned how to use the msMatchMedia() method to perform a media query from JavaScript.

    Read the article

  • Change the default Icon on your jQuery UI Accordion

    - by hajan
    I've got this question in one of my previous blogs posted here (the same blog is posted on codeasp.net too), dealing with jQuery UI Accordion and I thought it's nice to recap this in a blog post so that I will have it documented for further reference. In the previous blog, I'm creating tabs content navigation using jQuery UI Accordion. So, it's quite simple code and all I do there is calling accordion() function. <script language="javascript" type="text/javascript">     $(function() {         $("#products").accordion();     }); </script> The default image icons for each item is the arrow. The accordion uses the right arrow and down arrow images. So, what we should do in order to change them? JQuery UI Accordion contains option with name icons that has header and headerSelected properties. We can override them with either the existing classes from jQuery UI themes or with our own. 1. Using existing jQuery UI Theme classes - Open the follownig link: http://jqueryui.com/themeroller/#icons You will see the icons available in the jQuery UI theme. Mouse over on each icon and you will see the class name for each icon. As you can see, each icon has class name constructed in the following way: ui-icon-<name> All icons in one image - In our example, I will use ui-icon-circle-plus  and ui-icon-circle-minus (plus and minus icons). - Lets set the icons <script language="javascript" type="text/javascript">     $(function() {         //initialize accordion                 $("#products").accordion();         //set accordion header options         $("#products").accordion("option", "icons",         { 'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus' });     }); </script> From the code above, you can see that I first intialize the accordion plugin, and after I override the default icons with the ui-icon-circle-plyus for header and ui-icon-circle-minus for headerSelected. Here is the end result: So, now you see we have the plus/minus circle icons for the default header state and the selected header state.   2. Add my own icons - If you want to add your own icons, you can do that by creating your own custom css classes. - Lets create classes for both, the header default state and header selected state <style type="text/css">     .defaultIcon     {         background-image: url(images/icons/defaultIcon.png) !important;         width: 25px;         height: 25px;     }     .selectedIcon     {         background-image: url(images/icons/selectedIcon.png) !important;         width: 25px;         height: 25px;     } </style> As you can see, I use my own images placed in images/icons/ folder - default icon - selected icon One very important thing to note here is the !important key added on each background-image property. It's like that in order to give highest importancy to our image so that the default jQuery UI theme icon images will have less importancy and won't be used. And the jQuery code is: <script language="javascript" type="text/javascript">     $(function() {         //initialize accordion                 $("#products").accordion();         //set accordion header options         $("#products").accordion("option", "icons",         { 'header': 'defaultIcon', 'headerSelected': 'selectedIcon' });     }); </script> Note: For both #1 and #2 cases, we use the class names without adding . (dot) at the beginning of the name (as we do with selectors). That's because the the header and headerSelected properties accept classes only as a value, so the rest is done by the plugin itself. The complete code with my own custom images is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server">     <title>jQuery Accordion</title>     <link type="text/css" href="http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/themes/blitzer/jquery-ui.css"         rel="Stylesheet" />     <style type="text/css">         .defaultIcon         {             background-image: url(images/icons/defaultIcon.png) !important;             width: 25px;             height: 25px;         }         .selectedIcon         {             background-image: url(images/icons/selectedIcon.png) !important;             width: 25px;             height: 25px;         }     </style>     <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.js"></script>     <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.6/jquery-ui.js"></script>     <script language="javascript" type="text/javascript">         $(function() {             //initialize accordion                         $("#products").accordion();             //set accordion header options             $("#products").accordion("option", "icons",             { 'header': 'defaultIcon', 'headerSelected': 'selectedIcon' });         });             </script> </head> <body>     <form id="form1" runat="server">     <div id="products" style="width: 500px;">         <h3>             <a href="#">                 Product 1</a></h3>         <div>             <p>                 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus in tortor metus,                 a aliquam dui. Mauris euismod lorem eget nulla semper semper. Vestibulum pretium                 rhoncus cursus. Vestibulum rhoncus, magna sit amet fermentum fringilla, nunc nisl                 pellentesque libero, nec commodo libero ipsum a tellus. Maecenas sed varius est.                 Sed vel risus at nisi imperdiet sollicitudin eget ac orci. Duis ac tristique sem.             </p>         </div>         <h3>             <a href="#">                 Product 2</a></h3>         <div>             <p>                 Aliquam pretium scelerisque nisl in malesuada. Proin dictum elementum rutrum. Etiam                 eleifend massa id dui porta tincidunt. Integer sodales nisi nec ligula lacinia tincidunt                 vel in purus. Mauris ultrices velit quis massa dignissim rhoncus. Proin posuere                 convallis euismod. Vestibulum convallis sagittis arcu id faucibus.             </p>         </div>         <h3>             <a href="#">                 Product 3</a></h3>         <div>             <p>                 Quisque quis magna id nibh laoreet condimentum a sed nisl. In hac habitasse platea                 dictumst. Proin sem eros, dignissim sed consequat sit amet, interdum id ante. Ut                 id nisi in ante fermentum accumsan vitae ut est. Morbi tellus enim, convallis ac                 rutrum a, condimentum ut turpis. Proin sit amet pretium felis.             </p>             <ul>                 <li>List item one</li>                 <li>List item two</li>                 <li>List item three</li>             </ul>         </div>     </div>     </form> </body> </html> The end result is: Hope this was helpful. Regards,Hajan

    Read the article

  • CodePlex Daily Summary for Friday, June 15, 2012

    CodePlex Daily Summary for Friday, June 15, 2012Popular ReleasesStackBuilder: StackBuilder 1.0.8.0: + Corrected a few bugs in batch processor + Corrected a bug in layer thumbnail generatorAutoUpdaterdotNET : Autoupdate for VB.NET and C# Developer: AutoUpdater.NET 1.1: Release Notes *New feature added that allows user to select remind later interval.SharePoint KnowledgeBase (ISC 2012): ISC.KBase.Advanced: A full-trust version of the Base application. This version uses a Managed Metadata column for categories and contains other enhancements.Microsoft SQL Server Product Samples: Database: AdventureWorks 2008 OLTP Script: Install AdventureWorks2008 OLTP database from script The AdventureWorks database can be created by running the instawdb.sql DDL script contained in the AdventureWorks 2008 OLTP Script.zip file. The instawdb.sql script depends on two path environment variables: SqlSamplesDatabasePath and SqlSamplesSourceDataPath. The SqlSamplesDatabasePath environment variable is set to the default Microsoft ® SQL Server 2008 path. You will need to change the SqlSamplesSourceDataPath environment variable to th...HigLabo: HigLabo_20120613: Bug fix HigLabo.Mail Decode header encoded by CP1252WipeTouch, a jQuery touch plugin: 1.2.0: Changes since 1.1.0: New: wipeMove event, triggered while moving the mouse/finger. New: added "source" to the result object. Bug fix: sometimes vertical wipe events would not trigger correctly. Bug fix: improved tapToClick handler. General code refactoring. Windows Phone 7 is not supported, yet! Its behaviour is completely broken and would require some special tricks to make it work. Maybe in the future...Phalanger - The PHP Language Compiler for the .NET Framework: 3.0.0.3026 (June 2012): Fixes: round( 0.0 ) local TimeZone name TimeZone search compiling multi-script-assemblies PhpString serialization DocDocument::loadHTMLFile() token_get_all() parse_url()BlackJumboDog: Ver5.6.4: 2012.06.13 Ver5.6.4  (1) Web???????、???POST??????????????????Yahoo! UI Library: YUI Compressor for .Net: Version 2.0.0.0 - Ferret: - Merging both 3.5 and 2.0 codebases to a single .NET 2.0 assembly. - MSBuild Task. - NAnt Task.ExcelFileEditor: .CS File: nothingBizTalk Scheduled Task Adapter: Release 4.0: Works with BizTalk Server 2010. Compiled in .NET Framework 4.0. In this new version are available small improvements compared to the current version (3.0). We can highlight the following improvements or changes: 24 hours support in “start time” property. Previous versions had an issue with setting the start time, as it shown 12 hours watch but no AM/PM. Daily scheduler review. Solved a small bug on Daily Properties: unable to switch between “Every day” and “on these days” Installation e...Weapsy - ASP.NET MVC CMS: 1.0.0 RC: - Upgrade to Entity Framework 4.3.1 - Added AutoMapper custom version (by nopCommerce Team) - Added missed model properties and localization resources of Plugin Definitions - Minor changes - Fixed some bugsWebSocket4Net: WebSocket4Net 0.7: Changes included in this release: updated ClientEngine added proper exception handling code added state support for callback added property AllowUnstrustedCertificate for JsonWebSocket added properties for sending ping automatically improved JsBridge fixed a uri compatibility issueXenta Framework - extensible enterprise n-tier application framework: Xenta Framework 1.8.0 Beta: Catalog and Publication reviews and ratings Store language packs in data base Improve reporting system Improve Import/Export system A lot of WebAdmin app UI improvements Initial implementation of the WebForum app DB indexes Improve and simplify architecture Less abstractions Modernize architecture Improve, simplify and unify API Simplify and improve testing A lot of new unit tests Codebase refactoring and ReSharpering Utilize Castle Windsor Utilize NHibernate ORM ...Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.55: Properly handle IE extension to CSS3 grammar that allows for multiple parameters to functional pseudo-class selectors. add new switch -braces:(new|same) that affects where opening braces are placed in multi-line output. The default, "new" puts them on their own new line; "same" outputs them at the end of the previous line. add new optional values to the -inline switch: -inline:(force|noforce), which can be combined with the existing boolean value via comma-separators; value "force" (which...Microsoft Media Platform: Player Framework: MMP Player Framework 2.7 (Silverlight and WP7): Additional DownloadsSMFv2.7 Full Installer (MSI) - This will install everything you need in order to develop your own SMF player application, including the IIS Smooth Streaming Client. It only includes the assemblies. If you want the source code please follow the link above. Smooth Streaming Sample Player - This is a pre-built player that includes support for IIS Smooth Streaming. You can configure the player to playback your content by simplying editing a configuration file - no need to co...Liberty: v3.2.1.0 Release 10th June 2012: Change Log -Added -Liberty is now digitally signed! If the certificate on Liberty.exe is missing, invalid, or does not state that it was developed by "Xbox Chaos, Open Source Developer," your copy of Liberty may have been altered in some (possibly malicious) way. -Reach Mass biped max health and shield changer -Fixed -H3/ODST Fixed all of the glitches that users kept reporting (also reverted the changes made in 3.2.0.2) -Reach Made some tag names clearer and more consistent between m...Media Companion: Media Companion 3.503b: It has been a while, so it's about time we release another build! Major effort has been for fixing trailer downloads, plus a little bit of work for episode guide tag in TV show NFOs.Json.NET: Json.NET 4.5 Release 7: Fix - Fixed Metro build to pass Windows Application Certification Kit on Windows 8 Release Preview Fix - Fixed Metro build error caused by an anonymous type Fix - Fixed ItemConverter not being used when serializing dictionaries Fix - Fixed an incorrect object being passed to the Error event when serializing dictionaries Fix - Fixed decimal properties not being correctly ignored with DefaultValueHandlingSP Sticky Notes: SPSticky Solution Package: Install steps:Install the sandbox solution to the site collection Activate the solution Add a SPSticky web part (from a 'Custom' group) to a page that resides on the same web as the StickyList list Initial version, supported functionality: Moving a sticky around (position is saved in list) Resizing of the sticky (size is not saved) Changing the text of the sticky (saved in list) Saving occurs when you click away from the sticky being edited Stickys are filtered based on the curre...New ProjectsAdvanced Utility Libs: This project provides many basic and advanced utility libs for developer.ATopSearchEngine: ATopSearchEngine, a class projectAudio Player 3D: A WPF 3D Audio Player.beginABC: day la project test :)BookmarkSave For VB6: An addin, written in VB.net, for VB6 that preserves Bookmarks and Breakpoints between runs of the IDE.Centos 5 & 6 Managements Packs For System Center Operations Manager 2012: Centos 5 & 6 Managements Packs For System Center Operations Manager 2012ChildProcesses - Child Process Management for .NET: ChildProcesses.NET is a child process management library for the .NET framework. It allows to create child processes, and provides bidirectional extendable interprocess communication based on WCF and NamedPipes out of the box Child and parent processes monitor each other and notify about termination or other events. Child processes are an alternative to AppDomains when parent must continue if the child crashes. It is also poossible to mix 32Bit and 64 Bit processes. Cookie Free Analytics: Cookie Free Analytics (CFA) is a free server side Google Analytics tracking solution for Windows based websites running IIS & ASP.NET. 100% javascript & cookie free - with CFA you can track your visitors & file downloads in Google Analytics without cookies or JavaScript. Ideal for mobile websites or those affected by the EU Cookie law.F# (FSharp) based Windows Phone 7.5 software to answer: Where am I?: Location Finder F# (FSharp) based Windows Phone 7.5 software to answer the simple question: - Where am I? Henyo Word: The summary is required.Houma-Thibodaux .NET User Group: The CodePlex home of the Houma-Thibodaux .NET user group.JqGridHelper: some code for using jqgrid 1. javacsript function for customer mutil-search 2. C# function for parse querystring and build sql query command 3. a sql procedure templete for searching NetFluid.IRC: Mibbit clone in NetFluid with the possibilities to use permanent eggdrop in C# nGo: nGo frameworkNinja Client-Server Game: Naruto based online client-server game.NoLinEq: NoLinEq is a mathematical tool for solving nonlinear equations using different methods.Oculus: Oculus is a real-time ETW listening service that is plugin-basedPinoy Henyo: Response.Redirect (https://henyoword.codeplex.com)Razorblade: Razorblade is intended to be a template for WebDesign/WebDevelopment. It is based on HTML5Boilerplate and uses ASP.NET wtih the Razor Syntax (C#). Original HTML5Boilerplate comments are intact with some added comments to explain some of the Razor Syntax.ServiceFramework: The ServiceFramework project is a framework built using Microsoft WCF to address architectural governance issues by tracking the activity of services.Sharp Console: Sharp Console is a Windows Command Line (WCL)alternative written in C#. It targets those who lack access to the WCL or simply wish to use the NET framework instead. It aims to provide the same (and more!) functionality as the WCL. Contribute anything you feel will make it better!SharpKit.on{X}: This project allows you to write on{x} rules using C#shequ01: shequ01 websiteSilena: Porta lectus ac sed scelerisque, pellentesque, cras a et urna enim ultricies, tristique magnis nec proin. Velit tristique, aliquet quis ut mid lorem eros? Dolor magna. Aliquet. Et? Sociis pellentesque, tincidunt aenean cursus, pulvinar! Placerat etiam! Mid eu? Vut a. Placerat duis, risus adipiscing lacus, sagittis magna vut etiam, sed. Et ridiculus! Et sit, enim scelerisque velit tristique vel? Adipiscing vel adipiscing eu. Enim proin egestas lorem, aenean lectus enim vel nisi, augue duis pla...Silverlight 5 Chat: Full-duplex Publish/Subscribe -pattern on TCP/IP: F-Sharp (F#) WCF "PollingDuplex" WebService with SL5 FSharp clientSimple CQRS implemented with F#: Simple CQRS on F# (F-Sharp) 3.0 SOD: sustainable office designerSolvis Control II Viewer: SolvisSC2Viewer kann die Logdaten der Solvis Heizung Steuerung SolvisControl 2 auslesen und grafisch darstellen. testdd061412012tfs01: bvtestddgit061420123: eswrtestddgit061420124: fgtestddhg061420121: sdtestgit061420121: xctesthg06142012hg3: dfsTurismo Digital: Turismo DigitlUmbraco 5 File Picker: ????Umbraco 5 ???????。????????????????????。WeatherFrame: Windows Phone weather app.

    Read the article

  • how to set listviewadapter in android custom dialog?

    - by UMMA
    hi, i am using following code to setlistview adapter but giving me error at last line public class MyCustomDialog extends Dialog { String[] items= {"lorem", "ipsum", "dolor", "sit", "amet", "consectetuer", "adipiscing", "elit", "morbi", "vel", "ligula", "vitae", "arcu", "aliquet", "mollis", "etiam", "vel", "erat", "placerat", "ante", "porttitor", "sodales", "pellentesque", "augue", "purus"}; TextView selection; public MyCustomDialog(Context context) { super(context); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylistviewdialog); ListView lst=(ListView)findViewById(R.id.mylist); lst.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, items)); // error here The constructor ArrayAdapter<String>(MyCustomDialog, int, String[]) is undefined } } please guide what mistake am i doing? any help would be appreciated.

    Read the article

  • Core Text's CTFramesetterSuggestFrameSizeWithConstraints() returns incorrect size everytime

    - by nsapplication
    According to the docs, CTFramesetterSuggestFrameSizeWithConstraints () "determines the frame size needed for a string range". Unfortunately the size returned by this function is never accurate. Here is what I am doing: NSAttributedString *string = [[[NSAttributedString alloc] initWithString:@"lorem ipsum" attributes:nil] autorelease]; CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef) string); CGSize textSize = CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRangeMake(0,0), NULL, CGSizeMake(rect.size.width, CGFLOAT_MAX), NULL); The returned size always has the correct width calculated, however the height is always slightly shorter than what is expected. Is this the correct way to use this method? Is there any other way to layout Core Text? Seems I am not the only one to run into problems with this method. See https://devforums.apple.com/message/181450.

    Read the article

  • Underline ie6-bug. Inline element in <a> tag.

    - by kalininew
    There is a markup: <a href="#"> lorem ipsum<span>15</span> </a> There are styles: a{ text-decoration: underline; } a span{ background: #fff; //To clean the bottom underlining under <span> } Works in all interesting me browsers. Except IE6. The bottom underlining under <span> remains. How to solve this problem without changing a markup.

    Read the article

  • jquery: how to find an element which is comming 2 elements before current element

    - by erkan
    Hi guys... i have a markup which look like this: <h3>Paragraf3-dummytext</h3> <p> <a name="paragraf3"> Quisque id odio. Praesent venenatis metus at tortor pulvinar varius. Lorem ipsum dolor sit </a> </p> what i want to do is to find all 'a' tags with 'name' attribute and find the 'h3' tag for that anchor; im trying to do it like this: var paragraf = []; var paragrafheading = []; $('a[name]').each(function() { paragraf.push($(this).attr('name')); paragrafheading.push($(this).prev().text()); but it does not work becouse there is a 'p' tag around the text. Any suggestions would be appreciated. Thanks

    Read the article

  • Mysql query problem....

    - by Avinash
    I have below values in my database. been Lorem Ipsum and scrambled ever scrambledtexttextofandtooktooktypetexthastheunknownspecimenstandardsincetypesett Here is my query: SELECT nBusinessAdID, MATCH (`sHeadline`) AGAINST ("text" IN BOOLEAN MODE) AS score FROM wiki_businessads WHERE MATCH (`sHeadline`) AGAINST ("text" IN BOOLEAN MODE) AND bDeleted ="0" AND nAdStatus ="1" ORDER BY score DESC, bPrimeListing DESC, dDateCreated DESC It's not fetching first result, why? It should fetch first result because its contain text word in it. I have disabled the stopword filtering. This one is also not working SELECT nBusinessAdID, MATCH (`sHeadline`) AGAINST ('"text"' IN BOOLEAN MODE) AS score FROM wiki_businessads WHERE MATCH (`sHeadline`) AGAINST ('"text"' IN BOOLEAN MODE) AND bDeleted ="0" AND nAdStatus ="1" ORDER BY score DESC, bPrimeListing DESC, dDateCreated DESC Thanks Avinash

    Read the article

  • Ruby on Rails: How to verify haml files syntax within rails project?

    - by Acidburn2k
    I've installed HAML into my project and it is working like a charm - the templates are beeing rendered without a problem. My question is how can I do the rendering on the command line, by using HAML program. That would be super for debugging purposes, meantime while I try to compile HAML file I get the error on first Rails related Ruby code to be found: % cat app/views/dashboard/index.html.haml - title "Home" %p Lorem ipsum dolor sit amet... % haml app/views/dashboard/index.html.haml Exception on line 1: undefined method `title' for #<Object:0xb73283b0> Use --trace for backtrace. Page is rendered fine returned correctly through the webserver.

    Read the article

  • Regex Problem in PHP

    - by Chris
    I'm attempting to utilize the following Regex pattern: $regex = '/Name: [a-zA-Z ]*] [0-9]/'; When testing it in Rubular, it works fine, but when using PHP the expression never returns true, even when it should. Incidentally, if I remove the "[0-9]" part, it works fine. Is there some difference in PHP's regex syntax that I'm overlooking? Edit: I'm looking for the characters "Name:" then a name containing any number of letters or spaces, then a "]", then a space, then a single number. So "Name: Chris] 5" would return true and "Name: Chris] [lorem ipsum]" should return false. I also tried escaping the second bracket "\[" but this did not fix the problem.

    Read the article

  • Divide a large amount of text on an arbitrary number of equal parts.

    - by kalininew
    I probably already fed up with their stupid questions, but I have one more question. I have a large piece of text <p> Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, </p> <p> aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? </p> <p> Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum </p> <p> soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. </p> <p> Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, </p> <p> Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, </p> <p> aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? </p> <p> Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum </p> <p> soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. </p> <p> Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum </p> <p> Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, </p> <p> soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. </p> <p> Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, </p> At the exit I need to divide the text on the "n" equal parts, so that in these parts was about the same amount of text. Then I these part are arranged in columns and the need for these columns look about the same height. Another condition: Tags you can break (I mean that if the tag "p" contains a lot of text, it can be divided into two parts, to bring in another column). I think this is a monumental task, I shall be grateful for any help.

    Read the article

  • Editing Div Text At Click Position

    - by sonofdelphi
    I have a DIV which contains some text. When a user clicks on some content in the DIV, I want to enable him to edit the content at that position. <div id='Note'> Lorem ipsum dolor sit amet, consectetur adipisicing elit, <br /> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br /> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip <br /> ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse <br /> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, <br /> sunt in culpa qui officia deserunt mollit anim id est laborum.<br /> </div>

    Read the article

  • multiline perl search and replace (one-liner)

    - by yaya3
    I want to perform the following vim substitution as a one-liner in the terminal with perl. I would prefer to allow for any occurences of white space and/or new lines, rather than explicitly catering for them as I am below. %s/blockDontForget">\n*\s*<p><span><a\(.*\)<\/span>/blockDontForget"><p><a\1/g I've tried this: perl -pi -e 's/blockDontForget"><p><span><a(.*)<\/span>/blockDontForget"><p><a$1/msg' I presume I am misinterpreting the flags. Where am I going wrong? Thanks. EDIT: The above example is to strip the spans out of the following html: <div class="block blockDontForget"> <p><span><a href="../../../foo/bar/x/x.html">Lorem Ipsum</a></span></p> </div>

    Read the article

  • How to add <li> using javascript?

    - by metal-gear-solid
    I want to add one more li at last but using JavaScript/jQuery for example i want to add this li at last <li><a href="#header" >Back to top</a></li> <ul id="nav"> <li><a href="#nowhere" >Lorem</a></li> <li><a href="#nowhere" >Aliquam</a></li> <li><a href="#nowhere" >Morbi</a></li> <li><a href="#nowhere" >Praesent</a></li> <li><a href="#nowhere" >Pellentesque</a></li> Here i want to add one more li using javascript </ul>

    Read the article

  • Visual Studio 2008 Automatic line breaks in comments

    - by Pete Michaud
    When I write a comment, it's often a paragraph or a few lines that explains clearly what a bit of code is doing and why it's doing that. What I'd like is if I could start a comment, and have the editor automatically insert a line break and continue the comment to the nest line when I reach, say, 80 characters long. So I'd type: // Lorem ipsum dolor sit amet, consectetur adipiscing elit. < here the editor breaks automatically and continues onto the next line: // Etiam congue quam eget leo dignissim tincidunt.

    Read the article

  • jQuery fadeIn leaves text not anti-aliased in IE7

    - by cdillon
    Why does this happen? Any workarounds? Example: http://chrisdillon.us/jquery_fadein_problem1.html jQuery: $(function() { $('p.quote').fadeIn(2000); }); HTML: <p>someone said:</p> <p class="quote">&ldquo;lorem ipsum&rdquo;</p> <p>someone else said:</p> <p class="quote" style="display: none;">&ldquo;magna carta&rdquo;</p>

    Read the article

  • in pure css way with IE 6 supprt how to remove margin from last li?

    - by metal-gear-solid
    in this condition is it possible to not to apply margin-right to last li I need pure css way and support in IE6 and 7 also. is there any way to achieve this. ul li {display:inline;margin-right:10px} <ul id="nav"> <li><a href="#nowhere" >Lorem</a></li> <li><a href="#nowhere" >Aliquam</a></li> <li><a href="#nowhere" >Morbi</a></li> <li><a href="#nowhere" >Praesent</a></li> <li><a href="#nowhere" >Pellentesque</a></li> </ul>

    Read the article

  • SQLAlchemy automatically converts str to unicode on commit

    - by Victor Stanciu
    Hello, When inserting an object into a database with SQLAlchemy, all it's properties that correspond to String() columns are automatically transformed from <type 'str'> to <type 'unicode'>. Is there a way to prevent this behavior? Here is the code: from sqlalchemy import create_engine, Table, Column, Integer, String, MetaData from sqlalchemy.orm import mapper, sessionmaker engine = create_engine('sqlite:///:memory:', echo=False) metadata = MetaData() table = Table('projects', metadata, Column('id', Integer, primary_key=True), Column('name', String(50)) ) class Project(object): def __init__(self, name): self.name = name mapper(Project, table) metadata.create_all(engine) session = sessionmaker(bind=engine)() project = Project("Lorem ipsum") print(type(project.name)) session.add(project) session.commit() print(type(project.name)) And here is the output: <type 'str'> <type 'unicode'> I know I should probably just work with unicode, but this would involve digging through some third-party code and I don't have the Python skills for that yet :)

    Read the article

  • Using summary data from dataprovider to populate chart.

    - by arunp
    In Flex, how do i create a summary(say total of various domains) from the data provider and display in chart? Say this is my dataprovider.. I want to display the total estimate of each territory as a slice in piechart private var dpFlat:ArrayCollection = new ArrayCollection([ {Region:"Southwest", Territory:"Arizona", Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000}, {Region:"Southwest", Territory:"Arizona", Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}, {Region:"Southwest", Territory:"Central California", Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000}, {Region:"Southwest", Territory:"Nevada", Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000}, {Region:"Southwest", Territory:"Northern California", Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000}, {Region:"Southwest", Territory:"Northern California", Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000}, {Region:"Southwest", Territory:"Southern California", Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000}, {Region:"Southwest", Territory:"Southern California", Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000} ]);

    Read the article

  • Container fix width. Center div dynamic width. want left right divs to fill out remaining width equally

    - by james
    Have Three columns..Combine width of all three is fixed.. 2nd ( center ) column will have dynamic content.. I need left and right column to fill out remaining space ( container width - center column dynamic width )equally. Example: http://jsfiddle.net/htKje/ <div class="container"> <div class="bg"></div> <div>Lorem Ipsum</div> <div class="bg"></div> </div> CSS : .container { width:500px; } .bg {backgrould:#CCC; }

    Read the article

  • How to force a node inside tiny mce ?

    - by KutePHP
    Hi All, I'm using tiny mce for my project and want to validate the node inside the tiny mce. On click of a text element, let's say a paragraph with some id, I load editor for the element. But, sometimes if user replaces the whole content, the node and its HTML is lost. I want to retain this node and only the content is removed. The node can be a paragraph or heading or ul or ol. EDIT : I'm providing dummy text such as "Lorem epsum .....". User will be removing this dummy text and add his content. How can I accomplish this ?

    Read the article

  • Append a parent element to arrays in PHP for a foreach loop

    - by Erik Berger
    print_r of $data = json_decode($src, true); returns data that looks like this: Array ( [0] => Array ( [var1] => blah [var2] => foo ) [1] => Array ( [var1] => lorem [var2] => ipsum ) // goes down to [1936] ) I want to build an html table that shows var1 and var2 next to each other in the same row. I know do to this I need a foreach statement like foreach($data['items'] as $item) but the problem I think I am having is that my many arrays aren't the child of one thing like 'items', right? I looked into array_push but couldn't figure it out. Can someone help my orphaned parentless arrays?

    Read the article

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