Search Results

Search found 2001 results on 81 pages for 'wrap'.

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

  • MySQL grouping by a previously declared alias, what do I wrap it in? ' OR `

    - by cgmojoco
    I have an SQL query that has an alias in the SELECT statement SELECT CONCAT(YEAR(r.Date),_utf8'-',_utf8'Q',QUARTER(r.Date)) AS 'QuarterYear' Later, I want to refer to this in my group by statement. I'm a little confused...should I wrap this with backticks, single quote or just leave it unwrapped int he group by GROUP BY `QuarterYear ` or should I do this?: GROUP BY 'QuarterYear' or just this?: GROUP BY QuarterYear

    Read the article

  • What's the best replacement for timeGetTime to avoid wrap-around?

    - by phjr
    timeGetTime seems to be quite good to query for system time. However, its return value is 32-bit only, so it wraps around every 49 days approx. It's not too hard to detect the rollover in calling code, but it adds some complexity, and (worse) requires keeping a state. Is there some replacement for timeGetTime that would not have this wrap-around problem (probably by returning a 64-bit value), and have roughly the same precision and cost?

    Read the article

  • i want to wrap the image as well text around the products like mug, t Shirt, crystals

    - by Sachin jain
    I am working on shopping cart. pls follow the link www.photohaat.com In the mug section whenever the user upload the image i want to wrap the complete image onto the mug so that he/she will saw the final output immediately. we develop this shopping cart on PHP language. I am trying to resolve this problem but unfortunately can't get a success. If you have any solutions regarding this than please let me know. Thanks & Regards Sachin Jain

    Read the article

  • How can I force my checkbox's text to not wrap?

    - by B. Clay Shannon
    This is what my LinearLayout (horizontal) row looks like: I want the text of the checkbox to be on one line; The buttons don't have to be that wide - they'll still have plenty of space with the checkbox text lengthened a bit. What in my XML: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <CheckBox android:id="@+id/ckbxAllow_New_Items" android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1" android:checked="true" android:text="@string/checkbox_Allow_New_Items" /> <Button android:id="@+id/btnOK" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/button_OK" /> <Button android:id="@+id/btnCancel" android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/button_Cancel" /> </LinearLayout> ...needs to change in order to force my checkbox text not to wrap? UPDATE Following Der Golem's suggestion by adding this: android:lines="1" ...and also changing layout_weight for the checkbox from 1 to 2 (set to 1 for the buttons) gave me what I wanted:

    Read the article

  • Does a Collection<T> wrap an IList<T> or enumerate over the IList<T>?

    - by Brian Triplett
    If I am exposing a internal member via a Collection property via: public Collection<T> Entries { get { return new Collection<T>(this.fieldImplimentingIList<T>); } } When this property is called what happens? For example what happens when the following lines of code are called: T test = instanceOfAbove.Entries[i]; instanceOfAbove[i] = valueOfTypeT; It's clear that each time this property is called a new reference type is created but what acctually happens? Does it simply wrap the IList<T> underneath, does it enumerate over the IList<T> and to create a new Collection<T> instance? I'm concerned about performance if this property is used in a for loop.

    Read the article

  • How do I wrap a selection with an HTML tag in Visual Studio?

    - by dansays
    This seems like the most basic question in the world, but damned if I can find an answer. Is there a keyboard shortcut, either native to Visual Studio or through Code Rush or other third-party plug-in, to wrap the current selection with an HTML tag? I'm tired of typing the opening tag, cutting the misplaced closing tag to the clipboard, moving the cursor, and pasting it at the end where it belongs. Update: This is how TextMate handles surrounding a selection with a tag. Frankly, I'm stunned that Visual Studio doesn't seem to have a similar feature. Creating a macro or snippet for every conceivable tag I might want to use seems absurd.

    Read the article

  • How can I allow text to wrap inside a word if necessary?

    - by OrbMan
    I am looking for the best solution to allow text to wrap in the middle of a word if necessary. By best, I mean most browser-compatible, and will favor word breaks before it breaks inside a word. It would also help if the markup looked nicer than mine (see my answer). Edit: Note this is specifically for user-generated content. Edit 2: About 25% of Firefox users on the site in question are still using v3.0 or below, so it is critical to support them. This is based on the last month worth of data (about 121,000 visits).

    Read the article

  • Regex in Flex 3: How to Wrap Quotations Around a Dynamic String?

    - by Laxmidi
    Hi, I need some Regex help. I need to find beacon_ followed by an alphanumeric code and then wrap it in quotation marks. For something static, like the example, below it's straight forward. myReturn = myReturn.replace( 'id=beacon_80291ee9b3', 'id="beacon_80291ee9b3"'); But, my problem is that the part after beacon is a random alphanumeric code. (However, it is always the same length). For example, the beacon part could be: beacon_c8ac873136 beacon_dc83b5953e beacon_7a910d03d8 etc. The haystack that I'll search will look like: myReturn = "blah blah id=beacon_80291ee9b3 blah blah"; Thanks. -Laxmidi

    Read the article

  • Does a System.Collection.Collection<T> wrap a IList<T> or enumerate over the IList<T> or simply wra

    - by Brian Triplett
    If I am exposing a internal member via a Collection property via: public Collection<T> Entries { get { return new Collection<T>(this.fieldImplimentingIList<T>); } } When this property is called what happens? For example what happens when the following lines of code are called: T test = instanceOfAbove.Entries[i]; instanceOfAbove[i] = valueOfTypeT; It's clear that each time this property is called a new reference type is created but what acctually happens? Does it simply wrap the IList<T> underneath, does it enumerate over the IList<T> and to create a new Collection<T> instance? I'm concerned about performance if this property is used in a for loop.

    Read the article

  • How to wrap Plone authentication around a third-party servlet?

    - by smocking
    We're using Plone to serve up some third-party middle-ware. Unfortunately the middle-ware has a particular servlet that gets invoked from a Java applet and doesn't do any kind of authentication. I would like to firewall this off and somehow wrap authentication around it, preferably using the existing session that users will have on Plone. My first idea was to configure nginx (which we're using as the reverse proxy) to check the cookie and only proxy if the user has a valid session (along the lines of this example). However, how to check the session ID against Plone, since it's all stored in the Zope database? Alternatively we could have a Plone python script that basically passes everything along to the back-end after authenticating, but I'm not sure how to do that. Any suggestions? Or alternative ideas?

    Read the article

  • how to word wrap, align text like the output of man?

    - by cody
    what is the command that word wraps and justifies a text file so that the output looks like that of a man page: All of these system calls are used to wait for state changes in a child of the calling process, and obtain information about the child whose state has changed. A state change is considered to be: the child terminated; the child was stopped by a signal; or the child was resumed by a signal. In the case of a terminated child, performing a wait allows the system to release the resources associated with the child; if a wait is not performed, then the termi- nated child remains in a "zombie" state (see NOTES below). Thanks.

    Read the article

  • Insufferable word wrap in Visual Studio XAML editor - is there any relief for 2010?

    - by DanM
    Just curious if the XAML editor is any better at auto-formatting and wrapping attributes in Visual Studio 2010. Here's how the editor auto wraps attributes in VS 2008: <StackPanel Grid.Row="0" Grid.ColumnSpan="3"> <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="Current User:" /> <ComboBox x:Name="_usersComboBox" Margin="5,0,0,0" Width="200" ItemsSource="{Binding Users}" SelectedValuePath="Name" SelectedValue="System Administration"> <ComboBox.ItemTemplate> <DataTemplate> Here's how I'd like the editor to auto wrap attributes: <StackPanel Grid.Row="0" Grid.ColumnSpan="3"> <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="Current User:" /> <ComboBox x:Name="_usersComboBox" Margin="5,0,0,0" Width="200" ItemsSource="{Binding Users}" SelectedValuePath="Name" SelectedValue="System Administration"> <ComboBox.ItemTemplate> <DataTemplate> Does VS 2010 grant my wish?

    Read the article

  • How can I get swig to wrap a linked list-type structure?

    - by bk
    Here's what I take to be a pretty standard header for a list. Because the struct points to itself, we need this two-part declaration. Call it listicle.h: typedef struct _listicle listicle; struct _listicle{ int i; listicle *next; }; I'm trying to get swig to wrap this, so that the Python user can make use of the listicle struct. Here's what I have in listicle.i right now: %module listicle %{ #include "listicle.h" %} %include listicle.h %rename(listicle) _listicle; %extend listicle { listicle() {return malloc (sizeof(listicle));} } As you can tell by my being here asking, it doesn't work. All the various combinations I've tried each fail in their own special way. [This one: %extend defined for an undeclared class listicle. Change it to %extend _listicle (and fix the constructor) and loading in Python gives type object '_listicle' has no attribute '_listicle_swigregister'. And so on.] Suggestions?

    Read the article

  • Localisable Resources: how can (should one?!) wrap a UI layer source as a BL layer service?

    - by Ciel
    A service that returns localised strings could be wrapped in a service, so that it could be used both locally (eg in an MVC app) and remotely (eg possibly Silverlight). But...if sticking with the standard practice of creating resources in the UI assembly, that would in effect make a lower layer (BL/Services) have to have a ref on a higher layer (UI)...a definite no-no. And whereas a lot of AppWide resources (eg: AppName, OK, Cancel, etc.) could be defined in a Common cross-cutting assembly, and the BL/ResourceSerouce could ref and wrap those, that doesn't work in a a Modular App, where the Core app should have no binding to/knowledge of any Module. One solution could be to have each module, once mounted in mem, 'register' their Resource files with the service, who would then return it to the service (rather a long round trip, but at least consistent as a service, and potentially resources/images could be shared with other resources). Secondly, that may work in a web app...but not sure how that pattern could be extended to a Silverlight modular app (the round tripping becomes prohibitive). ie...what are best practices for allowing Resources to be to be defined by the UI designer, in a higher level, but served from the lower BL layer, as a Service? Or is there a better way of understanding/solving the problem?

    Read the article

  • Is it acceptable to wrap PHP library functions solely to change the names?

    - by Carson Myers
    I'm going to be starting a fairly large PHP application this summer, on which I'll be the sole developer (so I don't have any coding conventions to conform to aside from my own). PHP 5.3 is a decent language IMO, despite the stupid namespace token. But one thing that has always bothered me about it is the standard library and its lack of a naming convention. So I'm curious, would it be seriously bad practice to wrap some of the most common standard library functions in my own functions/classes to make the names a little better? I suppose it could also add or modify some functionality in some cases, although at the moment I don't have any examples (I figure I will find ways to make them OO or make them work a little differently while I am working). If you saw a PHP developer do this, would you think "Man, this is one shoddy developer?" Additionally, I don't know much (or anything) about if/how PHP is optimized, and I know that usually PHP performace doesn't matter. But would doing something like this have a noticeable impact on the performance of my application?

    Read the article

  • How can I make Swig correctly wrap a char* buffer that is modified in C as a Java Something-or-other

    - by Ukko
    I am trying to wrap some legacy code for use in Java and I was quite happy to see that Swig was able to handle the header file and it generate a great wrapper that almost works. Now I am looking for the deep magic that will make it really work. In C I have a function that looks like this DLL_IMPORT int DustyVoodoo(char *buff, int len, char *curse); This integer returned by this function is an error code in case it fails. The arguments are buff is a character buffer len is the length of the data in the buffer curse the another character buffer that contains the result of calling DustyVoodoo So, you can see where this is going, the result is actually coming back via the third argument. Also len is confusing since it may be the length of both buffers, they are always allocated as being the same size in calling code but given what DustyVoodoo does I don't think that they need be the same. To be safe both buffers should be the same size in practice, say 512 chars. The C code generated for the binding is as follows: SWIGEXPORT jint JNICALL Java_pemapiJNI_DustyVoodoo(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jstring jarg3) { jint jresult = 0 ; char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; int result; (void)jenv; (void)jcls; arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } arg2 = (int)jarg2; arg3 = 0; if (jarg3) { arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); if (!arg3) return 0; } result = (int)PemnEncrypt(arg1,arg2,arg3); jresult = (jint)result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); return jresult; } It is correct for what it does; however, it misses the fact that cursed is not just an input, it is altered by the function and should be returned as an output. It also does not know that the java Strings are really buffers and should be backed by a suitably sized array. I think that Swig can do the right thing here, I just can't figure out from the documentation how to tell Swig what it needs to know. Any typemap masers in the house?

    Read the article

  • Using IoC and Dependency Injection, how do I wrap an existing implementation with a new layer of imp

    - by Dividnedium
    I'm trying to figure out how this would be done in practice, so as not to violate the Open Closed principle. Say I have a class called HttpFileDownloader that has one function that takes a url and downloads a file returning the html as a string. This class implements an IFileDownloader interface which just has the one function. So all over my code I have references to the IFileDownloader interface and I have my IoC container returning an instance of HttpFileDownloader whenever an IFileDownloader is Resolved. Then after some use, it becomes clear that occasionally the server is too busy at the time and an exception is thrown. I decide that to get around this, I'm going to auto-retry 3 times if I get an exception, and wait 5 seconds in between each retry. So I create HttpFileDownloaderRetrier which has one function that uses HttpFileDownloader in a for loop with max 3 loops, and a 5 second wait between each loop. So that I can test the "retry" and "wait" abilities of the HttpFileDownloadRetrier I have the HttpFileDownloader dependency injected by having the HttpFileDownloaderRetrier constructor take an IFileDownloader. So now I want all Resolving of IFileDownloader to return the HttpFileDownloaderRetrier. But if I do that, then HttpFileDownloadRetrier's IFileDownloader dependency will get an instance of itself and not of HttpFileDownloader. So I can see that I could create a new interface for HttpFileDownloader called IFileDownloaderNoRetry, and change HttpFileDownloader to implement that. But that means I'm changing HttpFileDownloader, which violates Open Closed. Or I could implement a new interface for HttpFileDownloaderRetrier called IFileDownloaderRetrier, and then change all my other code to refer to that instead of IFileDownloader. But again, I'm now violating Open Closed in all my other code. So what am I missing here? How do I wrap an existing implementation (downloading) with a new layer of implementation (retrying and waiting) without changing existing code? Here's some code if it helps: public interface IFileDownloader { string Download(string url); } public class HttpFileDownloader : IFileDownloader { public string Download(string url) { //Cut for brevity - downloads file here returns as string return html; } } public class HttpFileDownloaderRetrier : IFileDownloader { IFileDownloader fileDownloader; public HttpFileDownloaderRetrier(IFileDownloader fileDownloader) { this.fileDownloader = fileDownloader; } public string Download(string url) { Exception lastException = null; //try 3 shots of pulling a bad URL. And wait 5 seconds after each failed attempt. for (int i = 0; i < 3; i++) { try { fileDownloader.Download(url); } catch (Exception ex) { lastException = ex; } Utilities.WaitForXSeconds(5); } throw lastException; } }

    Read the article

  • How to submit ideas for the Ubuntu Apps Showdown to reddit?

    - by wik
    I submitted 4 app ideas, but only one pass through to the list on reddit, the others 3 even not searchable: Medication Tracker TrelloChat TwilioPhone I also submitted the blog post, firstly it went through to the list, but disappeared the next day. Am I missed anything? UPDATE: At least I'm not alone with this issue, see comments on the following wrap-up's: Ubuntu App Showdown Week 1 Wrap-Up Ubuntu App Showdown Week 2 Wrap-Up

    Read the article

  • Silverlight: how to use a scroll viewer to wrap a list view without specifying height?

    - by John Nicholas
    I have a control that has a list that varies in length greatly. This control appears in various places meaning that i cannot calculate its position and desired height easily. Moreover all I want is for the scrollviewer to simply size itself according to its parent. currently it insists on sizing itself according to the content. currently when i have a list that exceeds the height of the screen the whole control extends off the bottom and the scrollviewer shows no bar (because it has stretched to the heigth of the contents and so thinks it is not required). I've not included code as the object graph is fairly deep. What i am looking for is a set of conditions that would cause the scrollviewer to resize itself according to its content rather than its parent. I have it working in a similar situation involving grids and datagrids, the unique part of this control is that there is a list containing controls. Any ideas? I would prefer solutions that don't require use of code behind - but im really not in a position to be choosey.

    Read the article

  • [C#] how do I get the height of a rich text content after word wrap?

    - by Led
    Question A. Given 1. A string in rich text format that may have paragraph, tabs, space, line break, indentation, (or even image?) 2. A width for the word wrapping rich text control/editor How do I know the height of the content after it have performed all the word wrapping? Is there something like int MeasureRichTextHeightAfterWordWrap(string aRichTextContent, int aWidth)? Otherwise how does those rich text control know how much to autosize? Do I have to actually place the content on a dummy rich text control and get its height afterwards? Question B. Similar to question A but in plain text onto a plain text memo/control/editor. And manually draw string with manually calculated indentations, breaks, word wrappings. Is it easier or harder?

    Read the article

  • how do I get the height of a rich text content after word wrap?

    - by Led
    Question A. Given 1. A string in rich text format that may have paragraph, tabs, space, line break, indentation, (or even image?) 2. A width for the word wrapping rich text control/editor How do I know the height of the content after it have performed all the word wrapping? Is there something like int MeasureRichTextHeightAfterWordWrap(string aRichTextContent, int aWidth)? Otherwise how does those rich text control know how much to autosize? Do I have to actually place the content on a dummy rich text control and get its height afterwards? Question B. Similar to question A but in plain text onto a plain text memo/control/editor. And manually draw string with manually calculated indentations, breaks, word wrappings. Is it easier or harder?

    Read the article

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