Posts

configuration - how to find which libraries to link to? or, how can I create *-config (such as sdl-config, llvm-config)? -

I want to write a program that gives a list of libraries that link to the given source code (or object) files (For C or C ++ programs). * In Nicos, there are useful tools like sdl-config and llvm-config but, I want to make my program work on Windows. Usage: get-library-names -l / path / to / lib a.cpp b. Cpp c.cpp d.obj Then, a list of get-library-names function names will be received which is implemented from a CPP, BQPP. , C.cpp, and d.obj and, it will do all necessary searches to properly link all library files to the / path / to / lib directory and list libraries. Is such a device already written? Is not such a tool insignificant? Thank you. Yes, which library can you link to? , You can create a PKG-config file that will allow you to run the 'pkg-config-cflags' to obtain compiler flags or 'pkg-config -libs' to get the linker libraries. If you are on Linux, then some examples. To find PC files, try looking in / usr / lib / pkgconfig, wh...

objective c - iPad App design decision -

I would like to develop a reader app that connects and adds ownership format documents. Documents are 2D (Some cool pages can add flip effects) The interface is similar to Mobile Safari, I'm trying to decide whether to write it in Quartz 2D or OpenGL or not. I have no experience from either of them any suggestions? If you do not have any prior experience, learning from OpenGL will be very easy and a reader For the app, OpenGL is most likely, anyway, unless you really need to do heavy rendering.

windows - command line tool text output -

I have a small command line tool and after running it, I want to display the text output in that way It's easy to copy / paste a person and save it or email it to someone else. Copy / paste from the command prompt is not done in standard way, so I do not want to copy / paste people from the file, it is possible to save the file to disk, but in the folder where the tool is located. Can not have access rights, so the user must configure the output file location (this can be very difficult for some users). I was thinking of launching Notepad with some text in it, originated from the command line tool. Is this possible? any other suggestions? you can use after your clip, which is given above Can be downloaded from the link, you use the pipe (|) command to copy the output of the previously executed command to the clipboard. Full details, but here are the basics with examples: dir / h | Clip - Copy the help book for DIR command in the clipboard tracert www.labnol....

c# - How can I place zeroes to the left of a given number to a maximum of 6 digits including the given numbers -

I have a method that receives the ID number and downloads an HTML website according to that ID. Generally, an IMDB link is like this: http://www.imdb.com/title/tt0892791/ http://www.imdb Com / title / tt1226229 / http: /www.imdb.com/title/tt0000429/ They all follow 'TT', then 7 digits, fill the left spaces Points due to lack of points for > How can I use C #? I'm kind of stumped. Here's my method: /// & lt; Summary & gt; /// Find Movie Pages Using Your Exactly IMDb ID /// & lt; / Summary & gt; /// & lt; Param name = "id" & gt; IMDb Movie ID & lt; / Param & gt; /// & lt; Returns & gt; Returns an HTML document with the source code. & Lt; / Returns & gt; Public HtmlDocument ByID (string id) {string url = String.Format ("http://www.imdb.com/title/tt{0}/", id); HTML document page = downloader.load (url); Return page; } Thank you very much for your time, and if you are interested in he...

c++ - How to use an overloaded function as an argument of function template? -

I think everyone has the experience of working with a code as follows: zero fun type1 & amp; nbsp;); Zero Funny (Type 2 & amp;;); Of vector & lt; Type 1 & gt; Vec; For_each (vec.begin (), vec.end (), fun); Of course it will not be compiled because it is not clear which function will pass. And what is your commonly used solution to the problem? I know this will work: for_each (vec.begin (), vec.end (), (zero (*) (type 1 & amp; )) Fun); But no better idea? Using a solution template function: Lt; Typename T & gt; Zero Fun (T & amp;); // Funny for Type 1 and Type 2 ... for_each (vec.begin (), vec.end (), joy Better method is to use functor with template operator () : struct fun {template's ; Typename t & gt; Zero operator () (T & amp; Const; }; ... for_each (vec.begin (), vec.end (), fun ()); // T operator () will automatically be deducted

NSURLCredential not working for synchronuos request in iphone -

I am using synchronous request and passing credentials, but I am getting an authentication error in reply. Below is my request code and response to server. Requests: - NSURLCredential * userCredentials = [NSURL credential credentials with user: @ "username" password: @ "passwad" firmly: NSURLCredentialPersistenceForSession]; NSURLProtectionSpace * space = [[NSURLProtectionSpace alloc] initWithHost: @ "http://webaddress.inc.com" Port: 80 protocol: @ "http" realm: @ "webaddress.inc.com" authentication method: zero]; [[NSURLCredentialStorage Shared Credential Storage] Set Credential: User Credentials for Protection Space: Space]; NSMutableURLRequest * urlRequest = [NSMutableURL request request with: URL: [NSURL URLWithString: @ "http://webaddress.inc.com"] Cash Policy: NSURLCacheStorageNotAllowed Timeframe Interval: 30]; NSURLResponse * response; NSError * error; NSDT * Return Data = [Send NSRR Connection Synchronous Req...

iphone - Adding a customized keyboard in SDK 4.0 -

Hello all I want to add my own toolbar with the button above the keyboard so that I have to customize my keyboard. I want to do this, but I also want to do this on 3.0 4.0 Please guide me how can I thanks in advance If you are using UITextView or UITextField So, use the inputAccessoryView attribute. You can create a view in the interface builder and link it, or you can create visual programs. Here are the links to the document: