Daily Archives

Articles indexed Wednesday March 17 2010

Page 12/128 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • iPhone - Setting background on UITableView

    - by Hans Espen
    Is there any way to set a background view on a UITableViewController? I try with the code I am using on a UIViewController, but the view comes over all the contents of the table view, and if I add the background view in the cellForRowAtIndexPath-method, it is not showing at all. Anyone done this before or have an idea on how it can be done? Here is the code I am using: UIImage *image = [UIImage imageNamed: @"background.jpg"]; UIImageView *backImage = [[UIImageView alloc] initWithImage: image]; [self.view addSubview: backImage]; [self.view sendSubviewToBack: backImage]; Thanks

    Read the article

  • Posting a textarea form with cURL

    - by Joey
    How would I go about posting a textarea form? <form method="post" action="/user/test/shoutbox/add" id="shoutPost" class="clearit"> <input name="formtoken" type="hidden" value="852f8fde54190fa5f9aa47172d492f829c1b"/> <input type="hidden" name="backto" value="/user/text/shoutbox" /> <textarea id="shoutmsg" name="message"></textarea> <input type="submit" name="submit" class="confirmButton" value="Post" id="sbPost" /> This should work right? curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, 1); $postfields .= "&message=".$msg; $postfields .= "&submit=sbPost"; curl_setopt($ch, CURLOPT_POSTFIELDS,$postfields); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); $page = curl_exec($ch); but it's not posting for some reason...

    Read the article

  • Drawing a PDF Right-Side-Up in CGContext

    - by Carter Allen
    I'm overriding the drawRect: method in a custom UIView, and I'm doing some custom drawing. All was going well, until I needed to draw a PDF resource (a vector glyph, to be precise) into the context. First I retrieve the PDF from a file: NSURL *pdfURL = [NSURL fileURLWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"CardKit.bundle/A.pdf"]]; CGPDFDocumentRef pdfDoc = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CGPDFPageRef pdfPage = CGPDFDocumentGetPage(pdfDoc, 1); Then I create a box with the same dimensions as the loaded PDF: CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFArtBox); Then I save my graphics state, so that I don't screw anything up: CGContextSaveGState(context); And then I perform a scale+translate of the CTM, theoretically flipping the whole context: CGContextScaleCTM(context, 1.0, -1.0); CGContextTranslateCTM(context, 0.0, rect.size.height); I then scale the PDF so that it fits into the view properly: CGContextScaleCTM(context, rect.size.width/box.size.width, rect.size.height/box.size.height); And finally, I draw the PDF and restore the graphics state: CGContextDrawPDFPage(context, pdfPage); CGContextRestoreGState(context); The issue is that there is nothing visible drawn. All this code should theoretically draw the PDF glyph into the view, right? If I remove the scale+translate used to flip the context, it draws perfectly: it just draws upside-down. Any ideas?

    Read the article

  • SQL Server 2005 Error 701 - out of memory

    - by Tufo
    I'm currently having following error message when executing a .sql file with about 26MB on SQL Server 2005: Msg 701, Level 17, State 123 There is insufficient system memory to run this query. I'm working with 4GB RAM, 64Bit Windows 7 Ultimate, Core2Duo T6400(2GHz)... Is there a way to execute it without receiving this message (maybe force SQL Server to use swap file?) or a way to execute it in parts (like 100 queries a time)... The file is basically a CREATE TABLE followed by thousads of INSERT queries and I have a lot of those (converted .DBF files to SQL queries using ABC DBF Converter) Any idea will be very appreciated!

    Read the article

  • Blend "Window is not supported in a WPF Project"

    - by Andy Dent
    I am having a frustrating time with Blend reporting "Window is not supported in a Windows Presentation Foundation (WPF) project." due to unbuildable configurations but can't quite work out how to mangle my way out of it. I've worked out it is probably due to my trying to have a single solution with x86 and x64 configurations. There is no way to tell Blend 2 which is the active Solution Configuration and active Solution Platform. I think it's a bit of a weakness in the configuration system, or maybe the way I've set things up, but I have Debug64 and Debug solution configurations one of each is used with the platform x86 and x64. I also think it's a simple sorting problem - x64 comes before x86 and Debug comes before Debug64 so Blend ends up with an unbuildable config of Debug with x64. When I choose the combination of Debug and x64 in VS, its XAML editor can't load either. The solution is a moderately complex one - there's a pure Win32 DLL, C++/CLI Model project and two other WPF assemblies used by the main WPF project. UPDATE I have ripped all the x64 config out of my solution and rebuilt everything with no effect. I then uninstalled Blend 2 and installed Blend 3 - it doesn't like things either. The Visual Studio XAML editor is still very happy as is the program building and running. (echoes of strangled scream of frustration from oz)

    Read the article

  • Embedded C++, any tips to avoid a local thats only used to return a value on the stack?

    - by lisarc
    I have a local that's only used for the purposes of checking the result from another function and passing it on if it meets certain criteria. Most of the time, that criteria will never be met. Is there any way I can avoid this "extra" local? I only have about 1MB of storage for my binary, and I have several thousand function calls that follow this pattern. I know it's a minor thing, but if there's a better pattern I'd love to know! SomeDataType myclass::myFunction() { SomeDataType result; // do I really need this local??? // i need to check the result and pass it on if it meets a certain condition result = doSomething(); if ( ! result ) { return result; } // do other things here ... // normal result of processing return SomeDataType(whatever); }

    Read the article

  • Generating code -- is there an easy way to get a proper string representation of nullable type?

    - by Cory Larson
    So I'm building an application that is going to do a ton of code generation with both C# and VB output (depending on project settings). I've got a CodeTemplateEngine, with two derived classes VBTemplateEngine and CSharpTemplateEngine. This question regards creating the property signatures based on columns in a database table. Using the IDataReader's GetSchemaTable method I gather the CLR type of the column, such as "System.Int32", and whether it IsNullable. However, I'd like to keep the code simple, and instead of having a property that looks like: public System.Int32? SomeIntegerColumn { get; set; } or public Nullable<System.Int32> SomeIntegerColumn { get; set; }, where the property type would be resolved with this function (from my VBTemplateEngine), public override string ResolveCLRType(bool? isNullable, string runtimeType) { Type type = TypeUtils.ResolveType(runtimeType); if (isNullable.HasValue && isNullable.Value == true && type.IsValueType) { return "System.Nullable(Of " + type.FullName + ")"; // or, for example... return type.FullName + "?"; } else { return type.FullName; } }, I would like to generate a simpler property. I hate the idea of building a Type string from nothing, and I would rather have something like: public int? SomeIntegerColumn { get; set; } Is there anything built-in anywhere, such as in the VBCodeProvider or CSharpCodeProvider classes that would somehow take care of this for me? Or is there a way to get a type alias of int? from a type string like System.Nullable'1[System.Int32]? Thanks!

    Read the article

  • Computer science advances in the past 5 years

    - by Doug Stanhope
    I don't have a computer science background and only have a rudimentary knowledge of what CS is all about. However, I wonder, what are the most significant CS advances of the last five years? To give you an idea of how clueless I am, I couldn't name one of these advances. But, please don't spare me all the gory details. I'm not looking for an education in CS or a story about the history of CS. As far as this question is concerned only the past five years matter! :-)

    Read the article

  • Getting Started With nServiceBus on VAN Mar 31

    - by van
    Topic: nServiceBus is mature and powerful open source framework that enables to design robust, scalable, message-based, service-oriented architectures. Latest improvements in the configuration API enables developers to quickly get started and build a working simple system that uses messaging infrastructure. The goal of this session is to give a jump start with the framework, introduce basic concepts such as message handlers, Sagas, Pub/Sub, Generic Host and also create a working demo application that uses publish/subscribe messaging. The content of the session is addressed to developers that are interested in learning how to get started using nServiceBus in order to design and build distributed systems. Bio: Bernard Kowalski is currently a Software Developer at Microdesk, one of Autodesk's leading partners in providing variety of Geospatial and Computer-Aided Design solutions. Bernard has experience developing .NET framework-based applications utilizing Windows Forms, Windows Services, ASP.NET MVC, and Web services. In a recent project, Bernard architected and implemented a distributed system based on SOA principles using an open source implementation of an Enterprise Service Bus. Bernard develops software with Agile patterns and practices using Domain Driven Design combined with TDD (Test Driven Development). He is familiar with all of the following APIs: Autodesk Vault/Product Stream API, AutoCAD ActiveX/VBA/.NET API, AutoCAD Mechanical API, Autodesk Inventor API, Autodesk MapGuide Enterprise. Prior to joining Microdesk, Bernard worked as a researcher and teacher at the University of Science and Technology in Krakow, Poland where he was awarded with a PhD in Computer Methods in Materials Science. He also participated in research projects where he developed applications for analysis of hot compression test results using advanced optimization techniques. He also developed Finite Element Method-based programs for thermal and stress analysis using C++ and FORTRAN. Bernard is a member of the Domain Driven Design and ALT.NET user groups in NYC. Virtual ALT.NET (VAN) is the online gathering place of the ALT.NET community. Through conversations, presentations, pair programming and dojos, we strive to improve, explore, and challenge the way we create software. Using net conferencing technology such as Skype and LiveMeeting, we hold regular meetings, open to anyone, usually taking the form of a presentation or an Open Space Technology-style conversation. Please see the Calendar(http://www.virtualaltnet.com/Home/Calendar) to find a VAN group that meets at a time convenient to you, and feel welcome to join a meeting. Past sessions can be found on the Recording page. To stay informed about VAN activities, you can subscribe to the Virtual ALT.NET Google Group and follow the Virtual ALT.NET blog. Times below are Central Standard Time Start Time: Wed, Mar 31, 2010 8:00 PM UTC/GMT -5 hours End Time: Wed, Mar 31, 2010 10:00 PM UTC/GMT -5 hours Attendee URL: http://www.virtualaltnet.com/van Zach Young http://www.virtualaltnet.com

    Read the article

  • Cannot assign a letter to a FAT32 partition

    - by Toc
    I have an external hard disk where I have created many partitions to use also in Linux. First two partitions are FAT32. The third is a Truecrypt partition. I cannot assign a letter to the second partition. When I go to Manage disk and right-click on the unassigned partition, most of the options are not enabled. What have I to do to see this partition on my XP PC?

    Read the article

  • Dell PowerEdge 1600SC Server won't boot from Fedora 12 DVD because of CD only drive.

    - by studiohack23
    Dell PowerEdge 1600SC Server won't boot from Fedora 12 DVD in the drive because it only supports CDs as I found out after the fact. I'm a complete novice @ servers, so if you need more detail, let me know, and I'll try to provide it. This server is around 4-6 years old. it has "PXE" boot, not sure what that means? This particular server has 3 RAID hard drives. As far as I know, they have all been wiped. I looked up the service tag on Dell, and it has: Compact Disk Drive, 650M, I Internal, Half Height, 48X, BlackHitachi LG Data Storage as its CD drive. Thus, the CD drive does not support DVDs, so installation will have to be via a live CD. However, I'm trying to put Amahi Home Server (http://www.amahi.org/), and Live CD/USB stick installs are not recommended unless one is an expert Linux user. any suggestions as to how to get around this? PROBLEM SOLVED! THANKS for all the help!

    Read the article

  • Link Building - Is it Still King?

    Link Building is one of those things every webmaster or internet marketer needs to do. It's an on going task but as the article will explain not all links are equal and the search engine much prefer Quality over Quantity. So before you continue building back links to your sites have a read of these points and save more time, effort and cash.

    Read the article

  • Major Steps of SEO

    In modern world, we find that web marketing is gaining an increased foothold potential. Every organization aims at increasing the number of customers through online promotion and advertising. It can be achieved through higher ranking of the websites in the search engine. The websites which rank high in the search engine will definitely get a good number of visits by the searchers than the other sources.

    Read the article

  • Search Engine Tips

    Its every small business's dream to be on the first page of Google or any other search engine for their keywords, services they offer or products. So to give some friendly advice to help you get those kind of results we have put together a quick top 10 tips to help you.

    Read the article

  • Fluent interface design and code smell

    - by Jiho Han
    public class StepClause { public NamedStepClause Action1() {} public NamedStepClause Action2() {} } public class NamedStepClause : StepClause { public StepClause Step(string name) {} } Basically, I want to be able to do something like this: var workflow = new Workflow().Configure() .Action1() .Step("abc").Action2() .Action2() .Step("def").Action1(); So, some "steps" are named and some are not. The thing I do not like is that the StepClause has knowledge of its derived class NamedStepClause. I tried a couple of things to make this sit better with me. I tried to move things out to interfaces but then the problem just moved from the concrete to the interfaces - INamedStepClause still need to derive from IStepClause and IStepClause needs to return INamedStepClause to be able to call Step(). I could also make Step() part of a completely separate type. Then we do not have this problem and we'd have: var workflow = new Workflow().Configure() .Step().Action1() .Step("abc").Action2() .Step().Action2() .Step("def").Action1(); Which is ok but I'd like to make the step-naming optional if possible. I found this other post on SO here which looks interesting and promising. What are your opinions? I'd think the original solution is completely unacceptable or is it? By the way, those action methods will take predicates and functors and I don't think I want to take an additional parameter for naming the step there. The point of it all is, for me, is to only define these action methods in one place and one place only. So the solutions from the referenced link using generics and extension methods seem to be the best approaches so far.

    Read the article

  • best way to parse plain text file with a nested information structure

    - by Beffa
    The text file has hundreds of these entries (format is MT940 bank statement) {1:F01AHHBCH110XXX0000000000}{2:I940X N2}{3:{108:XBS/091502}}{4: :20:XBS/091202/0001 :25:5887/507004-50 :28C:140/1 :60F:C0914CHF7789, :61:0912021202D36,80NTRFNONREF//0887-1202-29-941 04392579-0 LUTHY + xxx, ZUR :86:6034?60LUTHY + xxxx, ZUR vom 01.12.09 um 16:28 Karten-Nr. 2232 2579-0 :62F:C091202CHF52,2 :64:C091302CHF52,2 -} This should go into an Array of Hashes like [{"1"=>"F01AHHBCH110XXX0000000000"}, "2"=>"I940X N2", 3 => {108=>"XBS/091502"} etc. } ] I tried it with tree top, but it seemed not to be the right way, because it's more for something you want to do calculations on, and I just want the information. grammar Mt940 rule document part1:string spaces [:|/] spaces part2:document { def eval(env={}) return part1.eval, part2.eval end } / string / '{' spaces document spaces '}' spaces { def eval(env={}) return [document.eval] end } end end I also tried with a regular expression matches = str.scan(/\A[{]?([0-9]+)[:]?([^}]*)[}]?\Z/i) but it's difficult with recursion ... How can I solve this problem?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >