Search Results

Search found 212 results on 9 pages for 'conform'.

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

  • pysqlite2: ProgrammingError - You must not use 8-bit bytestrings

    - by rfkrocktk
    I'm currently persisting filenames in a sqlite database for my own purposes. Whenever I try to insert a file that has a special character (like é etc.), it throws the following error: pysqlite2.dbapi2.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. When I do "switch my application over to Unicode strings" by wrapping the value sent to pysqlite with the unicode method like: unicode(filename), it throws this error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 66: ordinal not in range(128) Is there something I can do to get rid of this? Modifying all of my files to conform isn't an option.

    Read the article

  • Trying to resize an NSImage which turns into NSData

    - by Ricky
    I have an NSImage which I am trying to resize like so; NSImage *capturePreviewFill = [[NSImage alloc] initWithData:previewData]; NSSize newSize; newSize.height = 160; newSize.width = 120; [capturePreviewFill setScalesWhenResized:YES]; [capturePreviewFill setSize:newSize]; NSData *resizedPreviewData = [capturePreviewFill TIFFRepresentation]; resizedCaptureImageBitmapRep = [[NSBitmapImageRep alloc] initWithData:resizedPreviewData]; [saveData writeToFile:@"/Users/ricky/Desktop/Photo.jpg" atomically:YES]; My first issue is that my image gets squashed when I try to resize it and don't conform to the aspect ratio. I read that using -setScalesWhenResized would resolve this problem but it didn't. My second issue is that when I try to write the image to a file, the image isn't actually resized at all. Thanks in advance, Ricky.

    Read the article

  • Available iPhone Web Application JavaScript UI Library/Frameworks

    - by methym
    I'm starting a web application that will target Mobile Safari on iPhone/iPod Touch. I'm evaluating the available client-side JavaScript/CSS libraries/frameworks that are currently out there. These are the ones I'm currenlty aware of: iUI CiUI UiUIKit WebApp.Net iWebKit Apple's Dashcode Application - not really a standalone library/framework, but it provides/generates JavaScript, CSS, and images that conform to the native iPhone UI metaphors. Are there any others out there? I want to make sure I'm not missing any before I make a decision. I'm only looking for client-side JavaScript/CSS solutions and building one from scratch isn't an option because of time constraints. No server-side PHP, Ruby, Python, Java, etc. solutions. I am aware of the iPhone web applications, templates, frameworks? question that was asked, but this only mentioned iUI and UiUIKit. Thank you

    Read the article

  • UITextInput setMarkedText:selectedRange not working? (Can't be!)

    - by nacho4d
    I want to set the marked text programmatically and since iOS5 UITextView and UITextField conform to UITextInput this should be possible but for some reason I always get the markedText to be nil. :( What am I missing here? This is what I've tried without success: (While the textview is firstResponder) 1.- When the text view contains no text: text: "", selectedRange : {0,0}, markedText: nil. [_textView setMarkedText:@"?" selectedRange:NSMakeRange(0, 1)]; Result: text : "", selectedRange: {0,0}, markedText: nil. (Nothing changed) 2.- When the text view contains text + some marked text: text : "AAA", selectedRange = {0,3}, marked text at the end : "??" then I do: [_textView setMarkedText:@"?" selectedRangeNSMakeRange(0,3)]; Result : text :"AAA", selectedRange: {0,3}, markedText: nil; (the marked text became nil) In both cases is like setMarkedText:selectedRange: would be setting the current marked text (if some) to nil. Any help would be highly appreciated :)

    Read the article

  • UIImagepickerController strange bug

    - by Rahul Vyas
    Hi, I'm doing something with UIImagePickerController. It works fine and the Picture browser does open, however, I get this message. "Failed to save the videos metadata to the filesystem. Maybe the information did not conform to a plist." What could be causing that? That is caused by this line [self presentModalViewController:self.imgPicker animated:YES]; which is activated on a button click Snippets of the code that I have below. - (void)viewDidLoad { self.imgPicker = [[UIImagePickerController alloc] init]; self.imgPicker.allowsImageEditing = YES; self.imgPicker.delegate = self; } - (IBAction)grabImage { [self presentModalViewController:self.imgPicker animated:YES]; } it's also removing images from documents directory and from resources folder. I can not understand why? does someone found the solution to this?

    Read the article

  • How do I size a UITextView to it's content?

    - by drewh
    Is there a good way to adjust the size of a UITextView to conform to it's content? Say for instance I have a UITextView that contains one line of text: "Hello world" I then add another line of text: "Goodbye world" Is there a good way in Cocoa Touch to get the rect that will hold all of the lines in the text view so that I can adjust the parent view accordingly? As another example, look at the Notes field for events in the Calendar application--note how the cell (and the UITextView it contains) expands to hold all lines of text in the notes string.

    Read the article

  • Teradata equivalent of persisted computed column (in SQL Server)

    - by Cade Roux
    We have a few tables with persisted computed columns in SQL Server. Is there an equivalent of this in Teradata? And, if so, what is the syntax and are there any limitations? The particular computed columns I am looking at conform some account numbers by removing leading zeros - an index is also created on this conformed account number: ACCT_NUM_std AS ISNULL(CONVERT(varchar(39), SUBSTRING(LTRIM(RTRIM([ACCT_NUM])), PATINDEX('%[^0]%', LTRIM(RTRIM([ACCT_NUM])) + '.' ), LEN(LTRIM(RTRIM([ACCT_NUM]))) ) ), '' ) PERSISTED With the Teradata TRIM function, the trimming part would be a little simpler: ACCT_NUM_std AS COALESCE(CAST(TRIM(LEADING '0' FROM TRIM(BOTH FROM ACCT_NUM))) AS varchar(39)), '' ) I guess I could just make this a normal column and put the code to standardize the account numbers in all the processes which insert into the table. We did this to put the standardization code in one place.

    Read the article

  • .NET Lambda Pass Method Parameter

    - by RM
    Hi All, I hope i'm missing something obvious, but I'm having some troubles defining a method that takes a parameter of a method to fetch the method information for the passed method. I do NOT want actually execute the method. I want to be able to do: busObject.SetResolverMethod<ISomeInterface>(x=>x.GetNameById); Where GetNameById is a method defined on the interface ISomeInterface. In this case, an example of the method being passed in's signature would be: MyVarA GetNameById(int id){ .... } In the above example, the SetResolverMethod's body should be able to return / store the string "GetNameById". There is no standard signature the method being passed in will conform to (except that it will always return an object of some kind). Currently I'm setting the method as a string (i.e. "GetNameById"), but I want it to be compile time checked, hence this question.

    Read the article

  • xsd-based code generator to build xml?

    - by Tim
    I have a schema (xsd), and I want to create xml files that conform to it. I've found code generators that generate classes which can be loaded from an xml file (CodeSynthesis). But I'm looking to go the other direction. I want to generate code that will let me build an object which can easily be written out as an xml file. In C++. I might be able to use Java for this, but C++ would be preferable. I'm on solaris, so a VisualStudio plugin won't help me (such as xsd2code). Is there a code generator that lets me do this?

    Read the article

  • What kind of icon should I deploy with my Android 1.x and 2.x application?

    - by licorna
    The thing is this, in Android 1.5 and 1.6 we had the Icon Design Guidelines. In this guide there are specifications for application icons. Every application should conform to this. However, in recent Android versions (2.0 and 2.1) icons have changed from the old to this new flat 2D style. Every icon in Nexus One has this style, so not even Google is conforming to the guideline. To see the differences between high and low density icons see this image and compare Evernote icon with the rest. I've been able to use different icons by using two directories with different icons: drawables-hdpi/icon.png and drawables/icon.png, BUT not every Android 2.x is going to be HDPI and not every 1.x Android device is going to be low pixel density. So the question is: Should I deploy different icons for different Android platform version within my apk file? and if I should, How do I do it?

    Read the article

  • Consuming an RPC/encoded Web Service in .NET

    - by Timmy O' Tool
    I'm trying to build the proxy class for a web service using the wsdl Executing this command: wsdl [http://WSDL_URL] I'm getting Warning: This web reference does not conform to WS-I Basic Profile v1.1. R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the use attribute in all soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault elements. ... Error: Cannot find definition for http://schemas.xmlsoap.org/wsdl/:BouBinding. Service Description with namespace http://schemas.xmlsoap.org/wsdl/ is missing. Parameter name: name The author of the web service told me that the SOAP protocol is RPC/encoded. Is there is any way to generate a proxy class for this?

    Read the article

  • Web Service in c# - "This web service is using http://tempuri.org/ as its default namespace."

    - by glenatron
    I've created a web service using Visual Studio ( 2005 - I know I'm old school ) and it all compiles fine but when it opens I get warned thus: This web service does not conform to WS-I Basic Profile v1.1. And furthermore: This web service is using http://tempuri.org/ as its default namespace. Which would be fine except my service begins thus: [WebService(Namespace = "http://totally-not-default-uri.com/servicename")] Searching the entire solution folder for "tempuri" returns nothing. I can't find it mentioned in any configuration page acessible from Visual Studio. And yet it's right there in the wsdl:definitions list for the xmlns:tns attribute on the web service descriptor page when I view it through the browser and as targetNamespace in the same tag. I'm viewing it using Visual Studio's "debug" mode with the built in server from that. Seems like something has got cached somewhere but I can't work out what and where- I've tried stopping and restarting the server, cleaning and rebuilding the service and going through the associated text config files with a text editor but no dice. Any idea what is going on?

    Read the article

  • DataSetProvider - DataSet to ClientDataSet

    - by nomad311
    I am trying to take data from a TMSQuery which is connected to my DB and populate a ClientDataSet with some of that data using a DataSetProvider. My problem is that I will need to modify some of this data before it can go into my ClientDataSet. The ClientDataSet has persistent fields that will not match up with the raw DB data. I can't even get a string from the DB into a memo field in ClientDataSet. The ClientDataSet is a part of my data tier so I will need to conform the data from the DB to the ClientDataSet field by field (well most will be able to go right through, but many will require routing and/or conversion). Does anyone have experience with this?

    Read the article

  • How To Get A Field Value Based On The Max Of Another Field In VFP v8.0

    - by DaveB
    So, I have a table and I want to get the value from one field in the record with the greatest DateTime() value in another field and where still another field is equal to a certain value. Example data: Balance Created MeterNumber 7924.252 02/02/2010 10:31:48 AM 2743800 7924.243 02/02/2010 11:01:37 AM 2743876 7924.227 02/02/2010 03:55:50 PM 2743876 I want to get the balance for a record with the greatest created datetime for a specific meter number. In VFP 7 I can use: SELECT a.balance ,MAX(a.created) FROM MyTable a WHERE a.meternumber = '2743876' But, in the VFP v8.0 OleDb driver I am using in my ASP.NET page I must conform to VFP 8 which says you must have a GROUP BY listing each non aggregate field listed in the SELECT. This would return a record for each balance if I added GROUP BY a.balance to my query. Yes, I could issue a SET ENGINEBEHAVIOR 70 but I wanted to know if this could be done without having to revert to a previous version?

    Read the article

  • Cast an instance of a class to a @protocol in Objective-C

    - by Ford
    I have an object (a UIViewController) which may or may not conform to a protocol I've defined. I know I can determine if the object conforms to the protocol, then safely call the method: if([self.myViewController conformsToProtocol:@protocol(MyProtocol)]) { [self.myViewController protocolMethod]; // <-- warning here } However, XCode shows a warning: warning 'UIViewController' may not respond to '-protocolMethod' What's the right way to prevent this warning? I can't seem to cast self.myViewController as a MyProtocol class. Update Andy's answer below is close, but includes an unneccesary '*'. The following works: [(id<MyProtocol>)self.myViewController protocolMethod];

    Read the article

  • Ignore Hibernate @Where annotation

    - by Zecrates
    I have an Entity which has an association to another Entity annotated with @Where, like so public class EntityA { @OneToMany @Where(...) private List<EntityB> entityBList; } Recently the inevitable has happened, I need to load EntityB's that don't conform to the @Where clause. I could remove the @Where annotation, but it is used a lot, so ideally I don't want to do that. Apart from loading the list of EntityB's manually, with another query, what are my options? Can I tell Hibernate to ignore the @Where annotation?

    Read the article

  • What adapter to use for ExpandableListView with non-TextView views?

    - by David
    I have an ExpandableListView in which I'd like to have controls other than TextView. Apparently, SimpleExandableListViewAdapter assumes all the controls are TextViews. A cast exception is generated if they are not. What is the recommended solution? Options I can think of include: - Use some other included adapter. But I can't tell if they all have the same assumption. - Create my own adapter. Is there a doc which describes the contract, ie the sequence of method calls an adapter will encounter? I expected the existing adapters to require the views to conform to some interface to allow any conforming view to be used, rather than hardcode to textview and limit where they can be used.

    Read the article

  • Working with iPhone OS 3.2 only classes

    - by user324881
    How would you write a universal app that uses classes introduced in iPhone OS 3.2, such as UIPopoverController and UISplitViewController? On Jeff LaMarche's blog about this, Ole provides a method for instantiating these objects; you would instantiate a UIPopoverController like so: [NSClassFromString(@"UIPopoverController") alloc]. This is fine for instantiating these classes in code but what about protocols and their methods? My iPad app uses a UISplitViewController and has a class that needs to conform to the UISplitViewControllerDelegate and UIPopoverControllerDelegate. How would you declare this? And how would you work with a method such as the following? - (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc where the method call requires UISplitViewController to be passed in?

    Read the article

  • Microsoft _stprintf warning

    - by mnh
    Why I get the following warning for the following code :) Code: _stprintf(m_szFileNamePath,_T("%s"),strFileName); warning C4996: '_swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS. I know _strprintf is a macro which if _UNICODE is defined will evaluate to _swprintf else it will be sprintf. Now what is this _swprintf. There is a function swprintf, but why is _stprintf evaluating to _swprintf instead of swprintf. What is the difference b/w the _xxx and xxx functions? EDIT: Okay there are two definitions for the UNICODE version of _stprintf, which one is included? The one in tchar.h or strsafe.h?

    Read the article

  • Element Positioning affected by Browser Screen Resolution Change

    - by Ed
    Hello, newbie developer here. There's this small problem I always encounter. Every time I try to change browser resolution (or what do you call the event when you scroll the mouse wheel while pressing ctrl), some elements (Mostly form elements) get to be shifted down or somewhere else, which does not conform with the original positioning. Im not sure if the problem is with the CSS or the markup itself and Im not really sure if this is much of a problem. Should I ignore it? (It doesn't feel very comfortable though, thinking that it might become problematic in the near future) Otherwise, any solution on how to avoid this? Simple explanations are very much appreciated, Thanks. (Perhaps the used term newbie should be replaced with noob?. Haha.)

    Read the article

  • Need help configuring SQL Server CE connections string in Fluent NHibernate

    - by Yoav
    Hi, I'm trying to return a session factory using this code: return Fluently.Configure() .Database(MsSqlCeConfiguration.Standard.ShowSql().ConnectionString(path)) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<Project>()) .BuildSessionFactory(); Path is the full path to an .sdf file. And get this exception: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0. at System.Data.SqlServerCe.ConStringUtil.GetKeyValuePair(Char[] connectionString, Int32 currentPosition, String& key, Char[] valuebuf, Int32& vallength, Boolean& isempty) What am I doing wrong?

    Read the article

  • ASMX Web Service - "This web service is using http://tempuri.org/ as its default namespace." message

    - by glenatron
    I've created a web service using Visual Studio ( 2005 - I know I'm old school ) and it all compiles fine but when it opens I get warned thus: This web service does not conform to WS-I Basic Profile v1.1. And furthermore: This web service is using http://tempuri.org/ as its default namespace. Which would be fine except my service begins thus: [WebService(Namespace = "http://totally-not-default-uri.com/servicename")] Searching the entire solution folder for "tempuri" returns nothing. I can't find it mentioned in any configuration page acessible from Visual Studio. And yet it's right there in the wsdl:definitions list for the xmlns:tns attribute on the web service descriptor page when I view it through the browser and as targetNamespace in the same tag. I'm viewing it using Visual Studio's "debug" mode with the built in server from that. Seems like something has got cached somewhere but I can't work out what and where- I've tried stopping and restarting the server, cleaning and rebuilding the service and going through the associated text config files with a text editor but no dice. Any idea what is going on?

    Read the article

  • Will Apple reject my app if I do not do this?

    - by mystify
    From the documentation of UITableView / UITableViewController: If you decide to use a UIViewController subclass rather than a subclass of UITableViewController to manage a table view, you should perform a couple of the tasks mentioned above to conform to the human-interface guidelines. To clear any selection in the table view before it’s displayed, implement the viewWillAppear: method to clear the selected row (if any) by calling deselectRowAtIndexPath:animated:. After the table view has been displayed, you should flash the scroll view’s scroll indicators by sending a flashScrollIndicators message to the table view; you can do this in an override of the viewDidAppear: method of UIViewController. So lets say I do my custom stuff here and I do not flash the scroll indicator, and I do not reset the selection (which I think is wrong anyways, the user wants to know from where he came from). Will they reject it?

    Read the article

  • Strange error: cannot convert from 'int' to 'ios_base::openmode'

    - by Dylan Klomparens
    I am using g++ to compile some code. I wrote the following snippet: bool WriteAccess = true; string Name = "my_file.txt"; ofstream File; ios_base::open_mode Mode = std::ios_base::in | std::ios_base::binary; if(WriteAccess) Mode |= std::ios_base::out | std::ios_base::trunc; File.open(Name.data(), Mode); And I receive these errors... any idea why? Error 1: invalid conversion from ‘int’ to ‘std::_Ios_Openmode’ Error 2: initializing argument 2 of ‘std::basic_filebuf<_CharT, _Traits* std::basic_filebuf<_CharT, _Traits::open(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits]’ As far as I could tell from a Google search, g++ is actually breaking the C++ standard here. Which I find quite astonishing, since they generally conform very strictly to the standard. Is this the case? Or am I doing something wrong. My reference for the standard: http://www.cplusplus.com/reference/iostream/ofstream/open/

    Read the article

  • How can I get my setup.py to use a relative path to my files?

    - by Chris B.
    I'm trying to build a Python distribution with distutils. Unfortunately, my directory structure looks like this: /code /mypackage __init__.py file1.py file2.py /subpackage __init__.py /build setup.py Here's my setup.py file: from distutils.core import setup setup( name = 'MyPackage', description = 'This is my package', packages = ['mypackage', 'mypackage.subpackage'], package_dir = { 'mypackage' : '../mypackage' }, version = '1', url = 'http://www.mypackage.org/', author = 'Me', author_email = '[email protected]', ) When I run python setup.py sdist it correctly generates the manifest file, but doesn't include my source files in the distribution. Apparently, it creates a directory to contain the source files (i.e. mypackage1) then copies each of the source files to mypackage1/../mypackage which puts them outside of the distribution. How can I correct this, without forcing my directory structure to conform to what distutils expects?

    Read the article

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