Search Results

Search found 861 results on 35 pages for 'wrapping'.

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

  • CSS line wrapping

    - by Mic
    Given a block container <div> this is a very long string which contains a bunch of characters that I want to break at container edges. </div> are there any css properties I can set to force it to break when it reaches the container width, regardless of the contents of the string, for example a break like: this is a ve ry long stri ng which ... is pretty much what I want. Right now, it seems to always prefer to break at whitespace characters or other special characters (such as /).

    Read the article

  • wrapping user controls in a transaction

    - by Hans Gruber
    I'm working on heavily dynamic and configurable CMS system. Therefore, many pages are composed of a dynamically loaded set of user controls. To enable loose coupling between containers (pages) and children (user controls), all user controls are responsible for their own persistence. Each User Control is wired up to its data/service layer dependencies via IoC. They also implement an IPersistable interface, which allows the container .aspx page to issue a Save command to its children without knowledge of the number or exact nature of these user controls. Note: what follows is only pseudo-code: public class MyUserControl : IPersistable, IValidatable { public void Save() { throw new NotImplementedException(); } public bool IsValid() { throw new NotImplementedException(); } } public partial class MyPage { public void btnSave_Click(object sender, EventArgs e) { foreach (IValidatable control in Controls) { if (!control.IsValid) { throw new Exception("error"); } } foreach (IPersistable control in Controls) { if (!control.Save) { throw new Exception("error"); } } } } I'm thinking of using declarative transactions from the System.EnterpriseService namespace to wrap the btnSave_Click in a transaction in case of an exception, but I'm not sure how this might be achieved or any pitfalls to such an approach.

    Read the article

  • Java SWT: wrapping syncExec and asyncExec to clean up code

    - by jonescb
    I have a Java Application using SWT as the toolkit, and I'm getting tired of all the ugly boiler plate code it takes to update a GUI element. Just to set a disabled button to be enabled I have to go through something like this: shell.getDisplay().asyncExec(new Runnable() { public void run() { buttonOk.setEnabled(true); } }); I prefer keeping my source code as flat as I possibly can, but I need a whopping 3 indentation levels just to do something simple. Is there some way I can wrap it? I would like a class like: public class UIUpdater { public static void updateUI(Shell shell, *function_ptr*) { shell.getDisplay().asyncExec(new Runnable() { public void run() { //Execute function_ptr } }); } } And can be used like so: UIUpdater.updateUI(shell, buttonOk.setEnabled(true)); Something like this would be great for hiding that horrible mess SWT seems to think is necessary to do anything. As I understand it, Java cannot do functions pointers. But Java 7 will have something called Closures which should be what I want. But in the meantime is there anything at all I can do to pass a function pointer or callback to another function to be executed? As an aside, I'm starting to think it'd be worth the effort to redo this application in Swing, and I don't have to put up with this ugly crap and non-cross-platformyness of SWT.

    Read the article

  • IE7 contentEditable word wrapping

    - by Iker Jimenez
    I have the following code: <html> <style type="text/css"> DIV { display:inline; border: solid red 1px; } .editable { background:yellow; } </style> <div class="editable" contentEditable="true"> This is test text. This is test text.This is test text.This is test text.This is test text.Thihis is test text.This is test text.</div> <div class="editable" contentEditable="true"> short </div> <div class="editable" contentEditable="true"> This is test text.This is test text.This is test text.his is test text.Thihis is test text.Thihis is test text.Thihis is test text.Thi </div> And I need IE7 (IE6 not needed and FF3.x works fine) to wrap the text correctly, which it does if I remove the contentEditable="true" from the divs. Just try this code with and without contentEditable and you'll see what I mean. Make the browser window small enough so you see how the text wraps. Thanks.

    Read the article

  • wrapping the content of a span inside an li so it stays in its own column

    - by codergeek
    hello, I have a list, each li in it has this structure: <li> <img class="yes" src="..."> <img class="no" src="..."> <span class="a">...</span> <span class="b">...</span> </li> now if the content of class b is long, it will wrap around the image. I don't want it to wrap under the image, I want it to stay in its own column. If there is anyway to do this, please let me know as using tables to do it will be just wrong. Thanks! Nima

    Read the article

  • wrapping aspx user controls commands in a transaction

    - by Hans Gruber
    I'm working on heavily dynamic and configurable CMS system. Therefore, many pages are composed of a dynamically loaded set of user controls. To enable loose coupling between containers (pages) and children (user controls), all user controls are responsible for their own persistence. Each User Control is wired up to its data/service layer dependencies via IoC. They also implement an IPersistable interface, which allows the container .aspx page to issue a Save command to its children without knowledge of the number or exact nature of these user controls. Note: what follows is only pseudo-code: public class MyUserControl : IPersistable, IValidatable { public void Save() { throw new NotImplementedException(); } public bool IsValid() { throw new NotImplementedException(); } } public partial class MyPage { public void btnSave_Click(object sender, EventArgs e) { foreach (IValidatable control in Controls) { if (!control.IsValid) { throw new Exception("error"); } } foreach (IPersistable control in Controls) { if (!control.Save) { throw new Exception("error"); } } } } I'm thinking of using declarative transactions from the System.EnterpriseService namespace to wrap the btnSave_Click in a transaction in case of an exception, but I'm not sure how this might be achieved or any pitfalls to such an approach.

    Read the article

  • Wrapping a paragraph inside a div?

    - by LOD121
    How do I make my paragraph wrap inside my div? It is currently overflowing outside of the div and I have no idea how to stop the paragraph from overflowing over the edge. I do not want a scroll bar with: overflow: scroll; and the other overflow options don't seem to help here either... I have the following code: div { width: 1200px; margin: 0 auto; } .container { overflow: hidden; } .content { width: 1000px; float: left; margin-left: 0; text-align: left; } .rightpanel { width: 190px; float: right; margin-right: 0; } <div class="container"> <div class="content"> <p>Some content flowing over more than one line</p> </div> <div class="rightpanel"> <!-- content --> </div> </div> Edit: <div class="container"> <div class="content"> <div class="leftcontent"> </div> <div class="newsfeed"> <div class="newsitem"> <p>Full age sex set feel her told. Tastes giving in passed direct me valley as supply. End great stood boy noisy often way taken short. Rent the size our more door. Years no place abode in no child my. Man pianoforte too solicitude friendship devonshire ten ask. Course sooner its silent but formal she led. Extensive he assurance extremity at breakfast. Dear sure ye sold fine sell on. Projection at up connection literature insensible motionless projecting.<br><br>Be at miss or each good play home they. It leave taste mr in it fancy. She son lose does fond bred gave lady get. Sir her company conduct expense bed any. Sister depend change off piqued one. Contented continued any happiness instantly objection yet her allowance. Use correct day new brought tedious. By come this been in. Kept easy or sons my it done.</p> </div> </div> </div> <div class="rightpanel"> </div>

    Read the article

  • SUDS rendering a duplicate node and wrapping everything in it

    - by PylonsN00b
    Here is my code: #Make the SOAP connection url = "https://api.channeladvisor.com/ChannelAdvisorAPI/v1/InventoryService.asmx?WSDL" headers = {'Content-Type': 'text/xml; charset=utf-8'} ca_client_inventory = Client(url, location="https://api.channeladvisor.com/ChannelAdvisorAPI/v1/InventoryService.asmx", headers=headers) #Make the SOAP headers login = ca_client_inventory.factory.create('APICredentials') login.DeveloperKey = 'REMOVED' login.Password = 'REMOVED' #Attach the headers ca_client_inventory.set_options(soapheaders=login) synch_inventory_item_list = ca_client_inventory.factory.create('SynchInventoryItemList') synch_inventory_item_list.accountID = "REMOVED" array_of_inventory_item_submit = ca_client_inventory.factory.create('ArrayOfInventoryItemSubmit') for product in products: inventory_item_submit = ca_client_inventory.factory.create('InventoryItemSubmit') inventory_item_list = get_item_list(product) inventory_item_submit = [inventory_item_list] array_of_inventory_item_submit.InventoryItemSubmit.append(inventory_item_submit) synch_inventory_item_list.itemList = array_of_inventory_item_submit #Call that service baby! ca_client_inventory.service.SynchInventoryItemList(synch_inventory_item_list) Here is what it outputs: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://api.channeladvisor.com/webservices/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://api.channeladvisor.com/webservices/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <tns:APICredentials> <tns:DeveloperKey>REMOVED</tns:DeveloperKey> <tns:Password>REMOVED</tns:Password> </tns:APICredentials> </SOAP-ENV:Header> <ns1:Body> <ns0:SynchInventoryItemList> <ns0:accountID> <ns0:accountID>REMOVED</ns0:accountID> <ns0:itemList> <ns0:InventoryItemSubmit> <ns0:Sku>1872</ns0:Sku> <ns0:Title>The Big Book Of Crazy Quilt Stitches</ns0:Title> <ns0:Subtitle></ns0:Subtitle> <ns0:Description>Embellish the seams and patches of crazy quilt projects with over 75 embroidery stitches and floral motifs. You&apos;ll use this handy reference book again and again to dress up wall hangings, pillows, sachets, clothing, and other nostalgic creations.</ns0:Description> <ns0:Weight>4</ns0:Weight> <ns0:FlagStyle/> <ns0:IsBlocked xsi:nil="true"/> <ns0:ISBN></ns0:ISBN> <ns0:UPC>028906018721</ns0:UPC> <ns0:EAN></ns0:EAN> <ns0:QuantityInfo> <ns0:UpdateType>UnShipped</ns0:UpdateType> <ns0:Total>0</ns0:Total> </ns0:QuantityInfo> <ns0:PriceInfo> <ns0:Cost>0.575</ns0:Cost> <ns0:RetailPrice xsi:nil="true"/> <ns0:StartingPrice xsi:nil="true"/> <ns0:ReservePrice xsi:nil="true"/> <ns0:TakeItPrice>6.95</ns0:TakeItPrice> <ns0:SecondChanceOfferPrice xsi:nil="true"/> <ns0:StorePrice>6.95</ns0:StorePrice> </ns0:PriceInfo> <ns0:ClassificationInfo> <ns0:Name>Books</ns0:Name> <ns0:AttributeList> <ns0:ClassificationAttributeInfo> <ns0:Name>Designer/Author</ns0:Name> <ns0:Value>Patricia Eaton</ns0:Value> </ns0:ClassificationAttributeInfo> <ns0:ClassificationAttributeInfo> <ns0:Name>Trim Size</ns0:Name> <ns0:Value></ns0:Value> </ns0:ClassificationAttributeInfo> <ns0:ClassificationAttributeInfo> <ns0:Name>Binding</ns0:Name> <ns0:Value>Leaflet</ns0:Value> </ns0:ClassificationAttributeInfo> <ns0:ClassificationAttributeInfo> <ns0:Name>Release Date</ns0:Name> <ns0:Value>11/1/1999 0:00:00</ns0:Value> </ns0:ClassificationAttributeInfo> <ns0:ClassificationAttributeInfo> <ns0:Name>Skill Level</ns0:Name> <ns0:Value></ns0:Value> </ns0:ClassificationAttributeInfo> <ns0:ClassificationAttributeInfo> <ns0:Name>Pages</ns0:Name> <ns0:Value>20</ns0:Value> </ns0:ClassificationAttributeInfo> <ns0:ClassificationAttributeInfo> <ns0:Name>Projects</ns0:Name> <ns0:Value></ns0:Value> </ns0:ClassificationAttributeInfo> </ns0:AttributeList> </ns0:ClassificationInfo> <ns0:ImageList> <ns0:ImageInfoSubmit> <ns0:PlacementName>ITEMIMAGEURL1</ns0:PlacementName> <ns0:FilenameOrUrl>1872.jpg</ns0:FilenameOrUrl> </ns0:ImageInfoSubmit> </ns0:ImageList> </ns0:InventoryItemSubmit> </ns0:itemList> </ns0:accountID> </ns0:SynchInventoryItemList> </ns1:Body> </SOAP-ENV:Envelope> See how it creates the accountID node twice and wraps the whole thing in it? WHY? How do I make it stop that?!

    Read the article

  • Avoid multiple autocomplete calls by wrapping it with SetTimeOut

    - by pixelboy
    Here's my issue : using an autocomplete jQuery plugin, I'd like to avoid multiple ajax requests when user strikes his keynoard by surrounding the $('#query1').autocomplete({ serviceUrl:'/actions/autocomplete?population=salon', minChars:3, maxHeight:300, width:200, clearCache:true, onSelect: function(suggestions,data){ $(".btn1").attr("href", "${pageContext.request.contextPath}/actions/espaceClients?participantId=" + data) } }); with something like var search = false; $('#query1, #query2, #query3').keyup(function(){ if (!search){ search = true; } if (search) { search = false; autocompleteThem(); } }); A you can see, above code is stupid, but it kinda shows what i'm trying to do. In simple words, if user dosen't type anything else in a certain period of time, then you can call autocomplete. I hope i'm being clear, as my brains are a mess...

    Read the article

  • Android - LinearLayout Horizontal with wrapping children

    - by kape123
    Is there a property to set for Android's LinearLayout that will enable it to properly wrap child controls? Meaning - I have changeable number of children and would like to lay out them horizontally like: Example: Control1, Control2, Control3, ... I do that by setting: ll.setOrientation(LinearLayout.HORIZONTAL); foreach (Child c in children) ll.addView(c); However, if I have large number of children, last one gets cuts off, instead of going to next line. Any idea how this can be fixed?

    Read the article

  • Automatically Word-Wrapping Text To A Print Page?

    - by sooprise
    I have some code that prints a string, but if the string is say: "Blah blah blah"... and there are no line breaks, the text occupies a single line. I would like to be able to shape the string so it word wraps to the dimensions of the paper. private void PrintIt(){ PrintDocument document = new PrintDocument(); document.PrintPage += (sender, e) => Document_PrintText(e, inputString); document.Print(); } static private void Document_PrintText(PrintPageEventArgs e, string inputString) { e.Graphics.DrawString(inputString, new Font("Courier New", 12), Brushes.Black, 0, 0); } I suppose I could figure out the length of a character, and wrap the text manually, but if there is a built in way to do this, I'd rather do that. Thanks!

    Read the article

  • P/Invoke or C++/CLI for wrapping a C library

    - by Ian G
    Have a moderate size (40-odd function) C API that needs to be called from a C# project. The functions logically break up to form a few classes that will be API presented to the rest of the project. Are there any objective reasons to prefer P/Invoke or C++/CLI for the interoperability underneath that API, in terms of robustness, maintainability, deployment, ...? The issues I could think of that might be, but aren't problematic are: C++/CLI will require an separate assembly, the P/Invoke classes can be in the main assembly. (We've already got multiple assemblies and there'll be the C dlls anyway so not a major issue). Performance doesn't seem differ noticeable between the two methods. Issues that I'm not sure about are: My feeling is C++/CLI will be easier to debug if there's inter-op problem, is this true? Language familiarity enough people know C# and C++ but knowledge of details of C++/CLI are rarer here. Anything else?

    Read the article

  • Wrapping quotes around a php id in XML

    - by Simon Hume
    I've got this line of code: $xml_output .= "\t<Event=" . $x . ">\n"; And it will output: <Event=0> <Event=1> <Event=2> etc etc through my loop. I need it to output as this (with the quotes around the number): <Event="0"> <Event="1"> <Event="2"> Any help, and I'm sure it's simple would be greatly appreciated!

    Read the article

  • Wrapping an additional element around an existing XDocument

    - by user1382827
    Let's say I have a converted HTML document, and I wanted to wrap an extra tag around the parent, so that I could read the head and body. How would I do that with C#? The file is used as an XDocument. change <html> <head> <!-- data --> </head> <body> <!-- data --> </body> </html> to <open> <html> <head> <!-- data --> </head> <body> <!-- data --> </body> </html> </open>

    Read the article

  • Wrapping Multiple Elements (jQuery)

    - by Nimbuz
    I've this piece of HTML: div.content div.one content div.two content div.three content I want to add two divs on top and bottom and wrap one div around it so it becomes: div.top div.wrapper div.content div.one content div.two content div.three content div.bottom I'm aware of the several wrap selectors (innerWrap, wrapAll etc..) but I'm not sure how to wrap 2 divs. The following jQuery might work, but is there a better way to write it? $('content').wrap('<div class="wrapper"></div'); $('.wrapper').before('<div class="top"></div>'); $('.wrapper').after('<div class="bottom"></div>');

    Read the article

  • Balanced text wrapping in HTML

    - by Jen
    In HTML, is there a way to evenly distribute text that is broken across multiple lines? E.g., I don't want: Here is some really long label that ends up on two lines. I'd prefer: Here is some really long label that ends up on two lines.

    Read the article

  • How to do word wrapping.

    - by Talha Bin Shakir
    Hi, I have created a table in PHP but the cells size is not fixed it expends when the input is long. Here is the Code. echo "<div style=\"overflow-y: scroll; white-space: nowrap; height: 190px;\">\n"; echo "<table cellspacing=\"1\" cellpadding=\"1\" align=\"center\" width=\"100%\" id=\"clients\">\n"; echo "<tr bgcolor=\"2b2d5d\">\n"; echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">&nbsp;</th>\n"; echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Name</th>\n"; echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Address</th>\n"; echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Phone</th>\n"; echo "<th align=\"left\" style=\"color: FFFFFF; font-size: 12px; font-weight: normal; font-family: Arial; padding: 5\">Fax</th>\n"; I want to fixed the cells width please need help. Thanks

    Read the article

  • Wrapping text around a figure in LaTeX

    - by manapo
    When I wrap my text around a figure I cannot get it to wrap around the correct text. Basically, I want to have the text in the section the figure is in wrap around it, but when I compile it my figure ends up being farther down the page next to text in another section. 1. How do I change this? 2. (kind of a minor point) How do I make the label for the caption, such as "Figure 1.", bold? \usepackage{graphicx} \usepackage{wrapfig} ... \begin{wrapfigure}{r}{40mm} \begin{center} \includegraphics[scale=0.5]{image} \end{center} \caption{This is the image.} \end{wrapfigure}

    Read the article

  • Having trouble wrapping functions in the linux kernel

    - by Corey Henderson
    I've written a LKM that implements Trusted Path Execution (TPE) into your kernel: https://github.com/cormander/tpe-lkm I run into an occasional kernel OOPS (describe at the end of this question) when I define WRAP_SYSCALLS to 1, and am at my wit's end trying to track it down. A little background: Since the LSM framework doesn't export its symbols, I had to get creative with how I insert the TPE checking into the running kernel. I wrote a find_symbol_address() function that gives me the address of any function I need, and it works very well. I can call functions like this: int (*my_printk)(const char *fmt, ...); my_printk = find_symbol_address("printk"); (*my_printk)("Hello, world!\n"); And it works fine. I use this method to locate the security_file_mmap, security_file_mprotect, and security_bprm_check functions. I then overwrite those functions with an asm jump to my function to do the TPE check. The problem is, the currently loaded LSM will no longer execute the code for it's hook to that function, because it's been totally hijacked. Here is an example of what I do: int tpe_security_bprm_check(struct linux_binprm *bprm) { int ret = 0; if (bprm->file) { ret = tpe_allow_file(bprm->file); if (IS_ERR(ret)) goto out; } #if WRAP_SYSCALLS stop_my_code(&cs_security_bprm_check); ret = cs_security_bprm_check.ptr(bprm); start_my_code(&cs_security_bprm_check); #endif out: return ret; } Notice the section between the #if WRAP_SYSCALLS section (it's defined as 0 by default). If set to 1, the LSM's hook is called because I write the original code back over the asm jump and call that function, but I run into an occasional kernel OOPS with an "invalid opcode": invalid opcode: 0000 [#1] SMP RIP: 0010:[<ffffffff8117b006>] [<ffffffff8117b006>] security_bprm_check+0x6/0x310 I don't know what the issue is. I've tried several different types of locking methods (see the inside of start/stop_my_code for details) to no avail. To trigger the kernel OOPS, write a simple bash while loop that endlessly starts a backgrounded "ls" command. After a minute or so, it'll happen. I'm testing this on a RHEL6 kernel, also works on Ubuntu 10.04 LTS (2.6.32 x86_64). While this method has been the most successful so far, I have tried another method of simply copying the kernel function to a pointer I created with kmalloc but when I try to execute it, I get: kernel tried to execute NX-protected page - exploit attempt? (uid: 0). If anyone can tell me how to kmalloc space and have it marked as executable, that would also help me solve the above problem. Any help is appreciated!

    Read the article

  • html - problem with word wrapping

    - by pakita883
    Hello! I have some text in div, and I want it to wrap to fit document width (without any scrolls!). I don't want to have word-break, like div {word-wrap: break-word;} For example (this is what I want to get): hello world! today is a good day. But not: hello world! today is a good day. or: hello world! today is a go od day.

    Read the article

  • Wrapping a Delphi TFrame descendant as an ActiveX control

    - by Mmarquee
    I am trying to wrap up a TFrame descendant as an ActiveX control, but don't seem to be able to get the control to show up in the ActiveX Control wizard. Is this approach possible, and if so, are there any working examples that I can be pointed at. I have tried to follow the instructions here, but as I said the control show in the list of available controls. Thanks in advance.

    Read the article

  • Wrapping pre-made elements using GWT?

    - by user246114
    Hi, I've been working with GWT for awhile, I can't find a way to integrate it with a preexisting website which is a real downer. My page content is already generated for me using jsp, like: <div id='A'></div> <div id='B'></div> etc. there is no way for me to do something like this though: public void onModuleLoad() { SimplePanel spA = new SimplePanel( Document.getElementById("A")); spA.add(new Label("hello")); SimplePanel spB = new SimplePanel( Document.getElementById("B")); spB.setWidth("200px"); etc .. } seems like there's no way to just wrap a pre-existing element. Is this true, or am I missing how to do this? I need be able to wrap a bunch of elements like this, to manipulate them later on. I see TextBox, Button, a few other classes have wrap() methods, however nothing like that exists for elements, Thanks

    Read the article

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