Search Results

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

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

  • Why is my input textbox extending outside margins in BlackBerry and Android, but not iOS?

    - by Dallas
    I have an input field that is extending well beyond the rest of the page, but as the question alludes to, it appears fine in iOS. I am wondering if anyone has run into this issue. My search button, which in iOS is on the right of the search textbox, actually wraps to the next "line" on the other two platforms. I am not using a table, just inside a div, and the CSS isn't doing anything fancy. Any ideas?

    Read the article

  • Is wrapping a third party code the only solution to unit test its consumers? [closed]

    - by Songo
    I'm doing unit testing and in one of my classes I need to send a mail from one of the methods, so using constructor injection I inject an instance of Zend_Mail class which is in Zend framework. Now some people argue that if a library is stable enough and won't change often then there is no need to wrap it. So assuming that Zend_Mail is stable and won't change and it fits my needs entirely, then I won't need a wrapper for it. Now take a look at my class Logger that depends on Zend_Mail: class Logger{ private $mailer; function __construct(Zend_Mail $mail){ $this->mail=$mail; } function toBeTestedFunction(){ //Some code $this->mail->setTo('some value'); $this->mail->setSubject('some value'); $this->mail->setBody('some value'); $this->mail->send(); //Some } } However, Unit testing demands that I test one component at a time, so I need to mock the Zend_Mail class. In addition I'm violating the Dependency Inversion principle as my Logger class now depends on concretion not abstraction. Now is wrapping Zend_Mail the only solution or is there a better approach to this problem? The code is in PHP, but answers doesn't have to be. This is more of a design issue than a language specific feature

    Read the article

  • Can I use the browser's word-wrapping from JavaScript?

    - by Max
    I have some text in a div. It can be any Unicode text under the sun, including Chinese, Japanese, and Korean. Now, I need to take this text and word-wrap it in JavaScript in some efficient but correct manner. (Because I need to make each line start with "" in a textarea.) Browsers have an implementation of the Unicode Word Wrap algorithm, as is evidenced by word-wrapping Unicode text in a with CSS. (At least, Firefox has such an algorithm, and I suspect other browsers do as well.) What I need is some way for JavaScript to use the same word-wrapping algorithm, so that I can properly wrap and then "quote" Unicode text. Is there any way for JavaScript to use the browser's word-wrapping algorithm, or to know where text has been line-broken in a div or any other element?

    Read the article

  • New ZFS Encryption features in Solaris 11.1

    - by darrenm
    Solaris 11.1 brings a few small but significant improvements to ZFS dataset encryption.  There is a new readonly property 'keychangedate' that shows that date and time of the last wrapping key change (basically the last time 'zfs key -c' was run on the dataset), this is similar to the 'rekeydate' property that shows the last time we added a new data encryption key. $ zfs get creation,keychangedate,rekeydate rpool/export/home/bob NAME PROPERTY VALUE SOURCE rpool/export/home/bob creation Mon Mar 21 11:05 2011 - rpool/export/home/bob keychangedate Fri Oct 26 11:50 2012 local rpool/export/home/bob rekeydate Tue Oct 30 9:53 2012 local The above example shows that we have changed both the wrapping key and added new data encryption keys since the filesystem was initially created.  If we haven't changed a wrapping key then it will be the same as the creation date.  It should be obvious but for filesystems that were created prior to Solaris 11.1 we don't have this data so it will be displayed as '-' instead. Another change that I made was to relax the restriction that the size of the wrapping key needed to match the size of the data encryption key (ie the size given in the encryption property).  In Solaris 11 Express and Solaris 11 if you set encryption=aes-256-ccm we required that the wrapping key be 256 bits in length.  This restriction was unnecessary and made it impossible to select encryption property values with key lengths 128 and 192 when the wrapping key was stored in the Oracle Key Manager.  This is because currently the Oracle Key Manager stores AES 256 bit keys only.  Now with Solaris 11.1 this restriciton has been removed. There is still one case were the wrapping key size and data encryption key size will always match and that is where they keysource property sets the format to be 'passphrase', since this is a key generated internally to libzfs and to preseve compatibility on upgrade from older releases the code will always generate a wrapping key (using PKCS#5 PBKDF2 as before) that matches the key length size of the encryption property. The pam_zfs_key module has been updated so that it allows you to specify encryption=off. There were also some bugs fixed including not attempting to load keys for datasets that are delegated to zones and some other fixes to error paths to ensure that we could support Zones On Shared Storage where all the datasets in the ZFS pool were encrypted that I discussed in my previous blog entry. If there are features you would like to see for ZFS encryption please let me know (direct email or comments on this blog are fine, or if you have a support contract having your support rep log an enhancement request).

    Read the article

  • How should I pass an object wrapping an API to a class using that API?

    - by Billy ONeal
    Hello everyone :) This is a revised/better written version of the question I asked earlier today -- that question is deleted now. I have a project where I'm getting started with Google Mock. I have created a class, and that class calls functions whithin the Windows API. I've also created a wrapper class with virtual functions wrapping the Windows API, as described in the Google Mock CheatSheet. I'm confused however at how I should pass the wrapper into my class that uses that object. Obviously that object needs to be polymorphic, so I can't pass it by value, forcing me to pass a pointer. That in and of itself is not a problem, but I'm confused as to who should own the pointer to the class wrapping the API. So... how should I pass the wrapper class into the real class to facilitate mocking?

    Read the article

  • Approaches to wrapping access to functionality in .NET MVC?

    - by Kevin
    What are some different solutions to wrapping access to functionality within a .NET MVC application? For example, I have six tabs that represent different areas of the application and within area 1, there is the ability to add, edit, upload, whatever. I need a central way to say: Build some dictionary of what the user can do Wrap tabs, buttons, links, etc, validate the user can access this piece of functionality and show/hide appropriately. I know I can restrict access to actions via action filters and roles, but what about from the UI? Any help would be appreciated. I am sure I am not the only one who has needed to do this, thanks!

    Read the article

  • What is the benefit to wrapping every sql/stored proc invocation in a transaction?

    - by MatthewMartin
    The following code executes one stored procedure. The stored procedure has only one command in it. Is there any benefit to wrapping everything in a transaction, even it only has one SQL statement in it (or one stored proc that has only one sql statement)? In the sample code below, if the delete fails, it fails. There is nothing else to be rolled back (it seems). So why is everything wrapped in a transaction anyhow? using (ITransactionManager transMan = repository.TransactionManager()) using (IController controller = repository.Controller()) { transMan.BeginTransaction(); try { //DELETE FROM myTable where Id=@id controller.Delete(id); transMan.CommitTransaction(); } catch { transMan.RollbackTransaction(); throw; } }

    Read the article

  • OBIEE 11.1.1 - Disable Wrap Data Types in WebLogic Server 10.3.x

    - by Ahmed Awan
    By default, JDBC data type’s objects are wrapped with a WebLogic wrapper. This allows for features like debugging output and track connection usage to be done by the server. The wrapping can be turned off by setting this value to false. This improves performance, in some cases significantly, and allows for the application to use the native driver objects directly. Tip: How to Disable Wrapping in WLS Administration Console You can use the Administration Console to disable data type wrapping for following JDBC data sources in bifoundation_domain domain: Data Source Name bip_datasource mds-owsm EPMSystemRegistry   To disable wrapping for each JDBC data source (as stated in above table): 1.     If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit. 2.     In the Domain Structure tree, expand Services, then select Data Sources. 3.     On the Summary of Data Sources page, click the data source name for example “mds-owsm”. 4.     Select the Configuration: Connection Pool tab. 5.     Scroll down and click Advanced to show the advanced connection pool options. 6.     In Wrap Data Types, deselect the checkbox to disable wrapping. 7.     Click Save. 8.     To activate these changes, in the Change Center of the Administration Console, click Activate Changes. Important Note: This change does not take effect immediately—it requires the server be restarted.

    Read the article

  • Wrapping unmanaged C++ with C++/CLI - a proper approach.

    - by Jamie
    Hi there, as stated in the title, I want to have my old C++ library working in managed .NET. I think of two possibilities: 1) I might try to compile the library with /clr and try "It Just Works" approach. 2) I might write a managed wrapper to the unmanaged library. First of all, I want to have my library working FAST, as it was in unmanaged environment. Thus, I am not sure if the first approach will not cause a large decrease in performance. However, it seems to be faster to implement (not a right word :-)) (assuming it will work for me). On the other hand, I think of some problems that might appear while writing a wrapper (e.g. how to wrap some STL collection (vector for instance)?) I think of writing a wrapper residing in the same project as the unmanaged C++ resides - is that a reasonable approach (e.g. MyUnmanagedClass and MyManagedClass in the same project, the second wrapping the other)? What would you suggest in that problem? Which solution is going to give me better performance of the resulting code? Thank you in advance for any suggestions and clues! Cheers

    Read the article

  • Is this text wrapping technique possible in CSS and jQuery?

    - by alex
    I have built a sliding text thing for a website. http://www.solomonadventures.com/~new/adventure-tours/seafari-tours/ The background contains the menu (on the right hand side), and when it originally loads, I have placed an element to make the text look like it is wrapping around the menu. Now, I have a sliding text thing I was asked to implement. The buttons to use it are currently in the top left corner. My question is, when I slide the content down, am I able to somehow make the text still wrap around it? This is all I have thought of so far (all with trade offs) Make the text appear beneath the menu - no need to wrap Make the text as narrow to the beginning of the menu - no need to wrap Manually place placeholders in the text that make it line break so it appears to wrap - not elegant (site uses a CMS too) Is there any jQuery selector I could write that would allow me to select the paragraph from top (once slid to the top) or the top most text node (so I could do an after() to place a new placeholder element to force it to wrap?) Any other solutions? Many thanks.

    Read the article

  • What to throw in a C++ class wrapping a C library ?

    - by ereOn
    I have to create a set of wrapping C++ classes around an existing C library. For many objects of the C library, the construction is done by calling something like britney_spears* create_britney_spears() and the opposite function void free_britney_spears(britney_spears* brit). If the allocation of a britney_spears fails, create_britney_spears() returns NULL. This is, as far as I know, a very common pattern. Now I want to wrap this inside a C++ class. //britney_spears.hpp class BritneySpears { public: BritneySpears(); private: boost::shared_ptr<britney_spears> m_britney_spears; }; And here is the implementation: // britney_spears.cpp BritneySpears::BritneySpears() : m_britney_spears(create_britney_spears(), free_britney_spears) { if (!m_britney_spears) { // Here I should throw something to abort the construction, but what ??! } } So the question is in the code sample: What should I throw to abort the constructor ? I know I can throw almost anything, but I want to know what is usually done. I have no other information about why the allocation failed. Should I create my own exception class ? Is there a std exception for such cases ? Many thanks.

    Read the article

  • How come my red border is not wrapping around my text div and my side bar div

    - by Clay
    How come my red border is not wrapping around my text div and my side bar div. Here's my code: CSS: body{ background-color: #d7d7d7; color: #666666; font-family: arial, sans-serif; font-size: x-small; } div#header { background-color: #323232; height: 140px; width: 950px; } div#maincontainer { background-color: #d7d7d7; width: 950px; height: auto; margin-top: 5px; border: 1px solid red; } div#maintextcontainer{ //background-color: #333333; width: 640px; //margin-right: 10px; margin: 1px; float: left; color: black; } div#maintextcontainer h2{ color: #4f4f4f; } div#sidebarcontainer { //background-color: #333333; width: 300px; float: left; color: black; margin: 1px; } div#footer{ background-color: #323232; width: 950px; margin-top: 5px; clear: left; } div#global{ width: 950px; margin: auto; } HTML: <div id="global"> <div id="header"> This is the header div</div> <div id="maincontainer"> <div id="maintextcontainer">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam neque eu turpis euismod eget suscipit nulla ultrices. Donec sagittis mi non sem vestibulum elementum dapibus risus auctor. Praesent tristique laoreet dapibus. Integer vel ligula lorem, et pharetra lorem. </div> <div id="sidebarcontainer">Nam at lectus vitae est tempor lacinia sed et ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent interdum mi id nisi aliquet pulvinar. </div> </div> <div id="footer">This is Footer Text</div> </div>

    Read the article

  • Wrapping a C# service in a console app to debug it.

    - by Jack Smit
    I want to debug a service written in C# and the old fashioned way is just too long. I have to stop the service, start my application that uses the service in debug mode (Visual studio 2008), start the service, attach to the service process and then navigate in my Asp.Net application to trigger the service. I basically have the service running in the background, waiting for a task. The web application will trigger a task to be picked up by the service. What I would like to do is to have a console application that fires the service in an effort for me to debug. Is there any simple demo that anybody knows about? Thank you Jack

    Read the article

  • "Wrapping" a BindingList<T> propertry with a List<T> property for serialization.

    - by Eric
    I'm writing an app that allows users search and browse catalogs of widgets. My WidgetCatalog class is serialized and deserialized to and from XML files using DataContractSerializer. My app is working now but I think I can make the code a lot more efficient if I started taking advantage of data binding rather then doing everything manually. Here's a stripped down version of my current WidgetCatalog class. [DataContract(Name = "WidgetCatalog")] class WidgetCatalog { [DataContract(Name = "Name")] public string Name { get; set; } [DataContract(Name = "Widgets")] public List<Widget> Widgets { get; set; } } I had to write a lot of extra code to keep my UI in sync when widgets are added or removed from a catalog, or their internal properties change. I'm pretty inexperienced with data-binding, but I think I want a BindingList<Widget> rather than a plain old List<Widget>. Is this right? In the past when I had similar needs I found that BindingList<T> does not serialize very well. Or at least the Event Handers between the items and the list are not serialized. I was using XmlSerializer though, and DataContractSerializer may work better. So I'm thinking of doing something like the code below. [DataContract(Name = "WidgetCatalog")] class WidgetCatalog { [DataMember(Name = "Name")] public string Name { get; set; } [DataMember(Name = "Widgets")] private List<Widget> WidgetSerializationList { get { return this._widgetBindingList.ToList<Widget>(); } set { this._widgetBindingList = new BindingList<Widget>(value); } } //these do not get serialized private BindingList<Widget> _widgetBindingList; public BindingList<Widget> WidgetBindingList { get { return this._widgetBindingList; } } public WidgetCatalog() { this.WidgetSerializationList = new List<Widget>(); } } So I'm serializing a private List<Widget> property, but the GET and SET accessors of the property are reading from, and writing to theBindingList<Widget> property. Will this even work? It seems like there should be a better way to do this.

    Read the article

  • Stop images from wrapping when div width is to small.

    - by razass
    I have a div that contains a ul and in each li there is a picture. I have floated the pictures left to get them to line up in a straight line however once it reaches the end of the div, it wraps. I would like the pictures to continue on to the right, hidden, so that I am able to create a carousel. My code is below. The HTML <div id="container"> <div class="lfbtn"></div> <ul id="image_container"> <li class="the_image"> <img src="" /> </li> </ul> <div class="rtbtn"></div> </div> The CSS #container { width: 900px; height: 150px; margin: 10px auto; } #image_container { position: relative; left: 50px; list-style-type: none; width: 700px; height: 110px; overflow: hidden; } #image_container li { display: inline-block; padding: 7px 5px 7px 5px; float: left; } .lfbtn { background-image: url(../../img/left.gif); background-repeat: no-repeat; margin: 10px; position: relative; float: left; top: -12px; left: 50px; height: 90px; width: 25px; } .rtbtn { background-image: url(../../img/right.gif); background-repeat: no-repeat; height: 90px; width: 25px; margin: 10px; position: relative; top: -101px; left: 795px; } Thanks in advance!

    Read the article

  • Tripple-wrapping fails: \colorbox ? \NewEnviron ? \newenvironment fails

    - by o_O Tync
    Hello! I am trying to wrap an environment created with \NewEnviron (package 'environ') into an old good \newenvironment: \NewEnviron{test}{\colorbox[gray]{0.7}{\BODY}} \newenvironment{wrapper}{\begin{test}}{\end{test}} \begin{wrapper} debug me \end{wrapper} However, this gives me a strange error: LaTeX Error: \begin{test} on input line 15 ended by \end{wrapper}. LaTeX Error: \begin{wrapper} on input line 15 ended by \end{document}. If I replace \NewEnviron{test}{aaa(\BODY)bbb} with \newenvironment{test}{aaa(}{)bbb} — everything works as expected! It seems like \NewEnviron fails to find its end for some reason. I'm trying to do some magic with 'floatfig' wrapped into a \colorbox so I need a way to convert \colorbox to an environment and wrap it into another one. I can define a new command but it's not a very good idea. Thanks in advance!

    Read the article

  • Collection wrapping a array is read-only. Possible to make it writeable without casting?

    - by Brian Triplett
    I have a Collection<T> property that wraps a array like T[] array; public Collection<T> Items { get { return new Collection<T>(array); } } When I attempt to assign to the collection via: T variable; Items[i] = variable; I get a NotSupportedException because the colleciton's IsReadOnly property is true. Turns out that this is a design choice by Microsoft. Does anyone know a workaround that does NOT involve enumeration? It could be done if the underlying data is not an array but I enjoy the performance gains because the data is fixed length.

    Read the article

  • Is wrapping new within the constructor good or bad?

    - by Timothy
    I watched John Resig's Best Practices in JavaScript Library Design presentation; one slide suggested "tweaking" the object constructor so it instantiates itself. function jQuery(str, con) { if (window === this) { return new jQuery(str, con); } // ... } With that, new jQuery("#foo") becomes jQuery("# foo"). I thought it was rather interesting, but I haven't written a constructor like that in my own code. A little later I read a post here on SO. (Sorry, I don't remember which or I'd supply a link. I will update the question if I can find it again.) One of the comments said it was bad practice to hide new from the programmer like that, but didn't go into details. My question is, it the above generally considered good, bad, or indifferent, and why?

    Read the article

  • Workaround for Outlook 2007 for wrapping text around image with margin?

    - by DavidW
    As we all know, Outlook 2007 uses the Word 2007 rendering engine, causing endless grief when designing HTML email message. [Insert rant here] In particular, float, margin, and padding are - shall we say? - poorly supported. To simulate float so that text wraps around an image, apparently we can simply use: <img src="foo.png" align="right"> The issue is padding/margin. Without padding/margin, the wrapped text butts up against the image which looks goofy. One workaround is to edit the image and add transparent framing that simulates margin. Does anyone know any other workarounds?

    Read the article

  • Best Ruby ORM for Wrapping around Legacy SQL Server Database?

    - by Technocrat
    Hi. I found this answer and it sounds like almost exactly what I'm doing. I have heard mixed answers about whether or not datamapper can support SQL Server through dataobjects. Basically, we have an app that uses a consistently structured database, consistently named tables, etc in SQL Server. We're making all kinds of tools and stuff that have to interact with it, some of them remotely and so I decided that we need to create some common, simple access point to do read/write operations on the SQL Server app since it's API is all C# and other things I despise. Now my question is if anyone has any examples or projects they know of where a ruby ORM can essentially create models for another application's legacy database by defining the conventions of each model's pkeys, fkeys, table names, etc. Sequel is the only ORM I've used with SQL Server but never to do anything quite like this. Any suggestions?

    Read the article

  • How do I create an exception-wrapping fubumvc behaviour?

    - by Jon M
    How can I create a fubumvc behaviour that wraps actions with a particular return type, and if an exception occurs while executing the action, then the behaviour logs the exception and populates some fields on the return object? I have tried the following: public class JsonExceptionHandlingBehaviour : IActionBehavior { private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private readonly IActionBehavior _innerBehavior; private readonly IFubuRequest _request; public JsonExceptionHandlingBehaviour(IActionBehavior innerBehavior, IFubuRequest request) { _innerBehavior = innerBehavior; _request = request; } public void Invoke() { try { _innerBehavior.Invoke(); var response = _request.Get<AjaxResponse>(); response.Success = true; } catch(Exception ex) { logger.ErrorException("Error processing JSON request", ex); var response = _request.Get<AjaxResponse>(); response.Success = false; response.Exception = ex.ToString(); } } public void InvokePartial() { _innerBehavior.InvokePartial(); } } But, although I get the AjaxResponse object from the request, any changes I make don't get sent back to the client. Also, any exceptions thrown by the action don't make it as far as this, the request is terminated before execution gets to the catch block. What am I doing wrong? For completeness, the behaviour is wired up with the following in my WebRegistry: Policies .EnrichCallsWith<JsonExceptionHandlingBehaviour>(action => typeof(AjaxResponse).IsAssignableFrom(action.Method.ReturnType)); And AjaxResponse looks like: public class AjaxResponse { public bool Success { get; set; } public object Data { get; set; } public string Exception { get; set; } }

    Read the article

  • What CSS should I use to create a series of horizontal, non-wrapping blocks?

    - by JOhnC
    I have a set of dynamically generated content - anywhere between 1 and about 25 blocks (each of which I want to be about 250px wide. Clearly, this can run off-screen, but that's fine since my design allows for horizontal scrolling (using jQuery - I don't want the browser to do it with its own scroll bars). So what CSS - cross-browser - is the best approach? Floats seem to wrap unreliably, and the dynamic nature of the content which changes frequently through ajax calls - means that recalculating the container width is not very practical. Other CSS-based option?

    Read the article

  • Best Ruby ORM for Wrapping around Legacy MSSQL Database?

    - by Technocrat
    Hi. I found this answer and it sounds like almost exactly what I'm doing. I have heard mixed answers about whether or not datamapper can support mssql through dataobjects. Basically, we have an app that uses a consistently structured database, consistently named tables, etc in MSSQL. We're making all kinds of tools and stuff that have to interact with it, some of them remotely and so I decided that we need to create some common, simple access point to do read/write operations on the MSSQL app since it's API is all C# and other things I despise. Now my question is if anyone has any examples or projects they know of where a ruby ORM can essentially create models for another application's legacy database by defining the conventions of each model's pkeys, fkeys, table names, etc. Sequel is the only ORM I've used with MSSQL but never to do anything quite like this. Any suggestions?

    Read the article

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