Search Results

Search found 4252 results on 171 pages for 'david 85'.

Page 101/171 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • Why does CGPDFPageGetDrawingTransform() crash with SIGABRT when specifying a rotation?

    - by David
    When I call CGPDFPageGetDrawingTransform() with a rotation argument, the application crashes. If I specify no rotation, there is no crash. Here is my drawLayer:inContext: method: - (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context { CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); CGRect boundingBox = CGContextGetClipBoundingBox(context); CGContextFillRect(context, boundingBox); //convert to UIKit native coodinate system CGContextTranslateCTM(context, 0.0, self.bounds.size.height); CGContextScaleCTM(context, 1.0, -1.0); //Rotate the pdf_page CGAffineTransform pfd_transform = CGPDFPageGetDrawingTransform(self.page, kCGPDFCropBox, self.frame, 58.46f, true); CGContextSaveGState (context); CGContextConcatCTM (context, pfd_transform); CGContextClipToRect (context, self.frame); CGContextDrawPDFPage (context, self.page); CGContextRestoreGState (context); } In the long run, I would like to rotate the pdf dynamically to follow a users heading. Maybe I am going at this all wrong... Thank you for your time.

    Read the article

  • Concatenate CLOB-rows with PL/SQL

    - by david K
    Hi, I've got a table which has an id and a clob content like: Create Table v_example_l ( nip number, xmlcontent clob ); We insert our data: Insert into V_EXAMPLE_L (NIP,XMLCONTENT) Values (17852,'<section><block><name>delta</name><content>548484646846484</content></block></section>'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT) Values (17852,'<section><block><name>omega</name><content>545648468484</content></block></section>'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT) Values (17852,'<section><block><name>gamma</name><content>54564846qsdqsdqsdqsd8484</content></block></section>'); I'm trying to do a function that concatenates the rows of the clob that gone be the result of a select, i mean without having to give multiple parameter about the name of table or such, i should only give here the column that contain the clobs, and it should handle the rest. CREATE OR REPLACE function assemble_clob(q varchar2) return clob is v_clob clob; tmp_lob clob; hold VARCHAR2(4000); --cursor c2 is select xmlcontent from V_EXAMPLE_L where id=17852 cur sys_refcursor; begin OPEN cur FOR q; LOOP FETCH cur INTO tmp_lob; EXIT WHEN cur%NOTFOUND; --v_clob := v_clob || XMLTYPE.getClobVal(tmp_lob.xmlcontent); v_clob := v_clob || tmp_lob; END LOOP; return (v_clob); --return (dbms_xmlquery.getXml( dbms_xmlquery.set_context("Select 1 from dual")) ) end assemble_clob; The function is broken... (if anybody could give me a help, thanks a lot, and i'm noob in sql so ....). Thanks!

    Read the article

  • Enums, Constructor overloads with similar conversions.

    - by David Thornley
    Why does VisualC++ (2008) get confused 'C2666: 2 overloads have similar conversions' when I specify an enum as the second parameter, but not when I define a bool type? Shouldn't type matching already rule out the second constructor because it is of a 'basic_string' type? #include <string> using namespace std; enum EMyEnum { mbOne, mbTwo }; class test { public: #if 1 // 0 = COMPILE_OK, 1 = COMPILE_FAIL test(basic_string<char> myString, EMyEnum myBool2) { } test(bool myBool, bool myBool2) { } #else test(basic_string<char> myString, bool myBool2) { } test(bool myBool, bool myBool2) { } #endif }; void testme() { test("test", mbOne); } I can work around this by specifying a reference 'ie. basic_string &myString' but not if it is 'const basic_string &myString'. Also calling explicitly via "test((basic_string)"test", mbOne);" also works. I suspect this has something to do with every expression/type being resolved to a bool via an inherent '!=0'. Curious for comments all the same :)

    Read the article

  • ColdFusion CFC implementation of C# Partial Class?

    - by Brian David Berman
    Does ColdFusion offer a mechanism for splitting CFCs into multiple files? I am NOT talking about extension, I am talking about splitting the SAME CFC into multiple files; the same way C# allows for "partial" classes. The reason for this is because I am using T4 to generate a bunch of CFCs and I want to be able to tag functionality onto the generated CFC by doing so in another file. I want to do this in a way that doesn't violate the Open-Closed Principle.

    Read the article

  • WCF Multiple Services

    - by David
    Hi, im brand spanking new to WCF and Im trying to understand how to correctly expose my BLL to it. I created my first Resource.svc and IResource.svc Resource.svc [ServiceBehavior] public class Resources : IResources { #region IResources Members public List<Model.Resource> GetAll() { return Repository.Inventory.Resource.GetAll(true); } public List<Model.Resource> GetAllEnabled() { return Repository.Inventory.Resource.GetAllEnabled(true); } #endregion } IResource.cs [ServiceContract] public interface IResources { [OperationContract] List<Model.Resource> GetAll(); [OperationContract] List<Model.Resource> GetAllEnabled(); } So this all works, My windows app can talk to the service and all is great. So I now need to access some information, I have created another .svc file called Project.svc and IProject.cs, this contains the same info as resource (apart from the type is Project) But this now means I have another webservice, surley this is not right!?

    Read the article

  • Is there a way to change the maximum width of a window without using the WM_GETMINMAXINFO message?

    - by David
    I want to change the imposed Windows maximum width that a window can be resized to, for an external application's window (not my C#/WinForms program's window). The documentation of GetSystemMetrics for SM_CXMAXTRACK says: "The default maximum width of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message." Is there a way to modify this SM_CXMAXTRACK value (either system wide or for one particular window), without processing the WM_GETMINMAXINFO message? Maybe an undocumented function, a registry setting, etc.? (Or: The documentation for MINMAXINFO.ptMaxTrackSize says: "This value is based on the size of the virtual screen and can be obtained programmatically from the system metrics SM_CXMAXTRACK and SM_CYMAXTRACK." Maybe there is a way to change the size of the virtual screen?) Thank you

    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

  • Single HTML Table from multiple MySQL tables

    - by David Chouinard
    Hi! I've been struggling for a while with this one; I'll try to explain it here as simply as possible. Consider this MySQL table: +----------+-----------+---------+--------+ |status_id |session_id |pilot_id |present | +----------+-----------+---------+--------+ |1 |61 |901 |1 | |2 |63 |901 |1 | |3 |62 |901 |0 | |4 |62 |902 |1 | |5 |63 |903 |1 | +----------+-----------+---------+--------+ Both session_id and pilot_id are foreign keys making reference to a primary key in another table. The same pilot_id can be associated with different session_id, but every pilot_id-session_id combination is unique. I need to make an HTML table (in PHP) that would display the data like this: +----------+---------+---------+---------+ | |61 |62 |63 | +----------+---------+---------+---------+ |901 |X | |X | |902 | |X | | |903 | | |X | +----------+---------+---------+---------+ Hence, rows are pilot_id and columns are session_id. When a pilot_id-session_id combination has a present value of 1, the corresponding cell should be checked. (ie. when the row-combination is zero or the combination does not exist in the MySQL table, nothing should appear in the HTML table) Phew. Any ideas? Thanks!

    Read the article

  • Windows Azure SDK - ASPProviders example

    - by David
    Hi, since the new SDK 1.1 is missing the tutorial for "ASPProviders", i am currently asking myself how i would implement a "azure session state provider" ( this is the path in the "old" SDK: C:\Program Files\Windows Azure SDK\v1.0\Samples\AspProviders ) Related threads: http://stackoverflow.com/questions/1023108/how-does-microsoft-azure-handle-session-state http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/2d1340ed-0ad0-456a-b069-aa6b85672102/ Has anyone an idea or even the old example project and could post some snippets of the config here?

    Read the article

  • Execute Oracle RAC cluster commands via Solaris RBAC?

    - by David Citron
    Executing Oracle RAC cluster management commands such as $ORA_CRS_HOME/bin/crs_start requires root permissions. Using Solaris RBAC (Role-Based Access Control), one can give a non-root user permissions to execute those commands, but the commands still fail internally. Example: $pfexec /opt/11.1.0/crs/bin/crs_stop SomeArg CRS-0259: Owner of the resource does not belong to the group. Is there a complete RBAC solution for Oracle RAC or does the executor need to be root? EDIT: Note that my original /etc/security/exec_attr contained: MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start:uid=0 MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start.bin:uid=0 As Martin suggests below, this needed to be changed to add gid=0 as: MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start:uid=0;gid=0 MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start.bin:uid=0;gid=0

    Read the article

  • SQLAlchemy custom sorting algorithms when using SQL indexes

    - by David M
    Is it possible to write custom collation functions with indexes in SQLAlchemy? SQLite for example allows specifying the sorting function at a C level as sqlite3_create_collation(). An implementation of some of the Unicode collation algorithm has been provided by James Tauber here, which for example sorts all the "a"'s close together whether they have accents on them or not. Other examples of why this might be useful is for different alphabet orders (languages other than English) and sorting numeric values (sorting 10 after 9 rather than codepoint order.) Is this possible in SQLAlchemy? If not, is it supported by the pysqlite3 or MySQLdb modules, or for any other SQL database modules supported by python for that matter? Any information would be greatly appreciated.

    Read the article

  • CodeCharge : is it any good?

    - by David Burrows
    Hi, A job came in to me that's built with CodeCharge - had a look at it and seems to be a pretty basic point-and-click site builder tool. Has anyone got any in-depth experience with it? My first reaction is one of horror and to just rebuild the code in Rails or PHP but I thought I'd ask the question first, maybe i'm missing something...

    Read the article

  • Improve my php image resizer to support alpha png and transparent GIFs

    - by David
    Hi, I use this function to resize images but i end up with ugly creepy image with a black background if it's a transparent GIF or PNG with alpha, however it works perfectly for jpg and normal png. function cropImage($nw, $nh, $source, $stype, $dest) { $size = getimagesize($source); $w = $size[0]; $h = $size[1]; switch($stype) { case 'gif': $simg = imagecreatefromgif($source); break; case 'jpg': $simg = imagecreatefromjpeg($source); break; case 'png': $simg = imagecreatefrompng($source); break; } $dimg = imagecreatetruecolor($nw, $nh); switch ($stype) { case "png": imagealphablending( $dimg, false ); imagesavealpha( $dimg, true ); $transparent = imagecolorallocatealpha($dimg, 255, 255, 255, 127); imagefilledrectangle($dimg, 0, 0, $nw, $nh, $transparent); break; case "gif": // integer representation of the color black (rgb: 0,0,0) $background = imagecolorallocate($simg, 0, 0, 0); // removing the black from the placeholder imagecolortransparent($simg, $background); break; } $wm = $w/$nw; $hm = $h/$nh; $h_height = $nh/2; $w_height = $nw/2; if($w> $h) { $adjusted_width = $w / $hm; $half_width = $adjusted_width / 2; $int_width = $half_width - $w_height; imagecopyresampled($dimg,$simg,-$int_width,0,0,0,$adjusted_width,$nh,$w,$h); } elseif(($w <$h) || ($w == $h)) { $adjusted_height = $h / $wm; $half_height = $adjusted_height / 2; $int_height = $half_height - $h_height; imagecopyresampled($dimg,$simg,0,-$int_height,0,0,$nw,$adjusted_height,$w,$h); } else { imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h); } imagejpeg($dimg,$dest,100); } I use php 5.3.2 and the GD library bundled (2.0.34 compatible) Thanks

    Read the article

  • How to present the same modalView after dismissing it once

    - by David Casillas
    I'm having some problem trying to present a modal view controller after it has been presented the first time, so I just start a little test method, it presents, dismisses and presents again the same controller modally. // This is just test Code. MYViewController *vc = [[MYViewController alloc] init]; [self presentModalViewController:vc animated:YES]; [self dismissModalViewControllerAnimated:YES]; [self presentModalViewController:vc animated:YES]; I get the error: 2011-11-15 09:50:42.678 Proyecto3[1260:11603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <RootViewController: 0x6d9d090>.' The documentation does not add any clue here.

    Read the article

  • javascript change innerhtml

    - by David
    ok im new at javascript, but im trying to change the innerhtml of a div tag, heres my script and its not working: <head> <script type="text/javascript"> function var1() { document.getElementById('test').innerHTML = 'hi'; } window.onLoad = var1(); </script> </head> <body> <div id="test">change</div> </body> it should work but for some reason its not, any help?

    Read the article

  • Casting Generic Types

    - by David Rutten
    Public Function CastToT(Of T)(ByVal GenericType(Of Object) data) As GenericType(Of T) Return DirectCast(data, GenericType(Of T)) End Function The above clearly does not work. Is there any way to perform this cast if I know that all objects inside data are in fact of Type T?

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >