Search Results

Search found 1557 results on 63 pages for 'daniel gollas'.

Page 50/63 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Will C++0x support __stdcall or extern "C" capture-nothing lambdas?

    - by Daniel Trebbien
    Yesterday I was thinking about whether it would be possible to use the convenience of C++0x lambda functions to write callbacks for Windows API functions. For example, what if I wanted to use a lambda as an EnumChildProc with EnumChildWindows? Something like: EnumChildWindows(hTrayWnd, CALLBACK [](HWND hWnd, LPARAM lParam) { // ... return static_cast<BOOL>(TRUE); // continue enumerating }, reinterpret_cast<LPARAM>(&myData)); Another use would be to write extern "C" callbacks for C routines. E.g.: my_class *pRes = static_cast<my_class*>(bsearch(&key, myClassObjectsArr, myClassObjectsArr_size, sizeof(my_class), extern "C" [](const void *pV1, const void *pV2) { const my_class& o1 = *static_cast<const my_class*>(pV1); const my_class& o2 = *static_cast<const my_class*>(pV2); int res; // ... return res; })); Is this possible? I can understand that lambdas that capture variables will never be compatible with C, but it at least seems possible to me that capture-nothing lambdas can be compatible.

    Read the article

  • Count number of empty input boxes in table row

    - by Daniel Brink
    How do you calculate the number of input boxes with no value in a table row using jquery? example: <table id="table1"> <tr class="data" id="row5"> <td><input type="text" value="20%" /></td> <td><input type="text" value="10%" /></td> <td><input type="text" value="" /></td> <td><input type="text" /></td> </tr> <table> I'm looking for answer = 2

    Read the article

  • Print UITableView that has content off screen?

    - by Daniel
    Hi I have an iOS app that has the ability to print a UITableView. However, only th part of the tableview that is shown is printed. Is there a way to print the whole tableview, even if it has not been drawn yet? Here is the code I am using to print: UIGraphicsBeginImageContext(self.mainTableView.contentSize); [self.mainTableView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIPrintInteractionController *printer = [UIPrintInteractionController sharedPrintController]; printer.printingItem = viewImage; UIPrintInfo *info = [UIPrintInfo printInfo]; printer.printInfo = info; UIPrintInteractionCompletionHandler completionHandler = ^(UIPrintInteractionController *pic, BOOL completed, NSError *error) { if (!completed && error) NSLog(@"FAILED! due to error in domain %@ with error code %u: %@", error.domain, error.code, [error localizedDescription]); }; UIButton * printButton = (UIButton *)sender; if(UIUserInterfaceIdiomPad == [[UIDevice currentDevice] userInterfaceIdiom]){ [printer presentFromRect:printButton.frame inView:self.view animated:YES completionHandler:completionHandler]; } else { [printer presentAnimated:YES completionHandler:completionHandler]; }

    Read the article

  • sql server db deployment script ignoring constraints etc until commit

    - by Daniel
    Hi all, I am planning on doing a database deployment script for sql server 2005. Currently we have a tool that will run all of the tables, foreign keys, indexes and then data, each of which is located in a separate file with a certain extension (eg. tab, .kci, .fky) and the tool just runs *.tab, *.kci, *.fky into the db etc. Could I possibly combine all of thse into one file and have them run ignoring referential integrity until they are all complete, I would turn it on before we started inserting test data. It is just unmanageable having to maintain 4 or 5 different types of scripts for one table. Are there any issues I should be aware of? Cheers

    Read the article

  • Force blocking read after EAGAIN?

    - by Daniel Trebbien
    I have a file descriptor that is open for reading which may be non-blocking. What I need to do is simply read all data until reaching EOF and write that data to a writable file descriptor. As the process that performs this copying is not "aware" of anything that is going on around it, I don't think that I can do something useful while waiting for data, and I don't want to use a while loop (while errno is not EAGAIN) because I think that it would be wasteful. Is there a way to block or otherwise suspend execution of the copying process until data becomes available?

    Read the article

  • How to create the automatic mass form submitter (javascript-ajax script) to be used on the 3rd part

    - by Daniel
    I need a script that can handle the following tasks. Take user data from my database and fill in and submit / post data to forms located on third part websites.: So I want to know if is it hard to create or do somebody knows if does exists some script for mass form submissions in PHP -Javascript-Ajax ? I run Dancers & Hostess & Model jobs website, I would like to find some script which allows the girls automaticly submit to hundreds websites forms (other 3rd part model agencies) with their similar model application form info on my website previously specified, 1).Firstly the girls will fill out my agency portfolio very detailed form , like this i will get all the model personal info from them , 2) Secondly i would like to allow for example models to submit to 100 and more other model agencies forms (I will find those websites before, and I will get their field names = values and thanks to some script would like to connect them with every girl data already created in my website to submit . I would like to implement it to my wordpress website where the girls has their portfolios instead of my pages . I would like to offer this service especially to models , it should work like some directory submitters , The script knows names - values and fill it out itself, but I want it online - browser side, where the girls should only fill out captcha if there is and click the button "submit".After succesful submit it should offer other form to submit. I would be very happy if you know the answer or if you can redirect me to some article

    Read the article

  • Jquery animate negative top and back to 0 - starts messing up after 3rd click

    - by Daniel Takyi
    The site in question is this one: http://www.pickmixmagazine.com/wordpress/ When you click on one of the posts (any of the boxes) an iframe will slide down from the top with the content in it. Once the "Home" button in the top left hand corner of the iframe is clicked, the iframe slides back up. This works perfectly the first 2 times, on the 3rd click on of a post, the content will slide down, but when the home button is clicked, the content slides back up normally but once it has slid all the way up to the position it should be in, the iframe drops straight back down to where it was before the home button was clicked, I click it again and then it works. Here is the code I've used for both sliding up and sliding down functions: /* slide down function */ var $div = $('iframe.primary'); var height = $div.height(); var width = parseInt($div.width()); $div.css({ height : height }); $div.css('top', -($div.width())); $('.post').click(function () { $('iframe.primary').load(function(){ $div.animate({ top: 0 }, { duration: 1000 }); }) return false; }); /* slide Up function */ var elm = parent.document.getElementsByTagName('iframe')[0]; var jelm = $(elm);//convert to jQuery Element var htmlElm = jelm[0];//convert to HTML Element $('.homebtn').click(function(){ $(elm).animate({ top: -height }, { duration: 1000 }); return false; })

    Read the article

  • Where is comprehensive documentation on Android's XML shapes?

    - by Daniel Lew
    I've been looking around for this for a long time but can never seem to find it in the Android documentation. There's all sorts of advanced things I see, but I can never find any solid documentation - there's the shapes package, but it provides no insight on how to use them in xml. The best I can do so far is finding other people's examples. Is there some magical documentation that exists for the XML shapes?

    Read the article

  • Created C header file, getting errors..

    - by Daniel
    Hi, I'v created a C header file (It's compiled), now when i compile my program it comes up with tons of errors like: warning: null character(s) ignored error: stray ‘\23’ in program TheFunctions.h:1722: error: stray ‘\200’ in program Inside the header file is simply two functions, which work in the normal c program. Please help!

    Read the article

  • Is it possible to Load hbm.xml info at app startup instead of via an embedded resource?

    - by Daniel Auger
    All of the NHibernate examples I've see that use hbm files have the hbm.xml file set as an embedded resource with "do not copy" chosen in the file properties. This means that if a database column name were to change in production, the app would have to be recompiled with the changes in the hbm.xml file during build time. Is there any way to make NHibernate load the hbm.xml files from the file system at application startup instead of using an embedded version?

    Read the article

  • Use LINQ, to Sort and Filter items in a List<ReturnItem> collection, based on the values within a Li

    - by Daniel McPherson
    This is tricky to explain. We have a DataTable that contains a user configurable selection of columns, which are not known at compile time. Every column in the DataTable is of type String. We need to convert this DataTable into a strongly typed Collection of "ReturnItem" objects so that we can then sort and filter using LINQ for use in our application. We have made some progress as follows: We started with the basic DataTable. We then process the DataTable, creating a new "ReturnItem" object for each row This "ReturnItem" object has just two properties: ID ( string ) and Columns( List(object) ). The properties collection contains one entry for each column, representing a single DataRow. Each property is made Strongly Typed (int, string, datetime, etc). For example it would add a new "DateTime" object to the "ReturnItem" Columns List containing the value of the "Created" Datatable Column. The result is a List(ReturnItem) that we would then like to be able to Sort and Filter using LINQ based on the value in one of the properties, for example, sort on "Created" date. We have been using the LINQ Dynamic Query Library, which gets us so far, but it doesn't look like the way forward because we are using it over a List Collection of objects. Basically, my question boils down to: How can I use LINQ, to Sort and Filter items in a List(ReturnItem) collection, based on the values within a List(object) property which is part of the ReturnItem class?

    Read the article

  • How can I access the int values of an object in an NSMutableArray?

    - by Daniel
    I try to access some values in a NSMutableArray I created, but I only get some numbers (address?) if I try to access them. I was able to initialize an array and can add and change objects with [myNSMutableArray addObject:[NSNumber numberWithInt:10]] and [myNSMutableArray replaceObjectAtIndex:0 withObject:[NSNumber numberWithInt:47] I also can print the value at index [0] with NSLog(@"%@", [myNSMutableArray objectAtIndex:0]); and I get 47 as expected. But how can I access the integer value of the object in the array so I can save it tomyIntValue?

    Read the article

  • .NET immutable object usage best practices? Should I be using them as much as possible?

    - by Daniel
    Say I have a simple object such as class Something { public int SomeInt { get; set; } } I have read that using immutable objects are faster and a better means of using business objects? If this is so, should i strive to make all my objects as such: class ImmutableSomething { public int SomeInt { get { return m_someInt; } } private int m_someInt = 0; public void ChangeSomeInt(int newValue) { m_someInt = newvalue; } } What do you reckon?

    Read the article

  • How can I get an image too big from a server?

    - by Daniel Calderon Mori
    I'm currenty developing for blackberry and just bumped into this problem as i was trying to download an image from a server. The servlet which the device communicates with is working correctly, as I have made a number of tests for it. But it gives me the 413 HTTP error ("Request entity too large"). I figure i will just get the bytes, uhm, portion by portion. How can i accomplish this? This is the code of the servlet (the doGet() method): try { ImageIcon imageIcon = new ImageIcon("c:\\Users\\dcalderon\\prueba.png"); Image image = imageIcon.getImage(); PngEncoder pngEncoder = new PngEncoder(image, true); output.write(pngEncoder.pngEncode()); } finally { output.close(); } Thanks. It's worth mentioning that I am developing both the client-side and the server-side.

    Read the article

  • get next available integer using LINQ

    - by Daniel Williams
    Say I have a list of integers: List<int> myInts = new List<int>() {1,2,3,5,8,13,21}; I would like to get the next available integer, ordered by increasing integer. Not the last or highest one, but in this case the next integer that is not in this list. In this case the number is 4. Is there a LINQ statement that would give me this? As in: var nextAvailable = myInts.SomeCoolLinqMethod(); Edit: Crap. I said the answer should be 2 but I meant 4. I apologize for that! For example: Imagine that you are responsible for handing out process IDs. You want to get the list of current process IDs, and issue a next one, but the next one should not just be the highest value plus one. Rather, it should be the next one available from an ordered list of process IDs. You could get the next available starting with the highest, it does not really matter.

    Read the article

  • Send 404 when requesting index.php through .htaccess?

    - by Daniel
    I've recently refactored an existing CodeIgniter application to use url segments instead of query strings, and I'm using a rewriterule in htaccess to rewrite stuff to index.php: RewriteRule ^(.*)$ /index.php/$1 [L] My problem right now is that a lot of this website's pages are indexed by google with a link to index.php. Since I made the change to use url segments instead, I don't care about these google results anymore and I want to send a 404 (no need to use 301 Move permanently, there have been enough changes, it'll just have to recrawl everything). To get to the point: How do I redirect requests to /index.php?whatever to a 404 page? I was thinking of rewriting to a non-existent file that would cause apache to send a 404. Would this be an acceptable solution? How would the rewriterule for that look like? edit: Currently, existing google results will just cause the following error: An Error Was Encountered The URI you submitted has disallowed characters.

    Read the article

  • Python - Removing duplicates from a string

    - by Daniel
    def remove_duplicates(strng): """ Returns a string which is the same as the argument except only the first occurrence of each letter is present. Upper and lower case letters are treated as different. Only duplicate letters are removed, other characters such as spaces or numbers are not changed. >>> remove_duplicates('apple') 'aple' >>> remove_duplicates('Mississippi') 'Misp' >>> remove_duplicates('The quick brown fox jumps over the lazy dog') 'The quick brown fx jmps v t lazy dg' >>> remove_duplicates('121 balloons 2 u') '121 balons 2 u' """ s = strng.split() return strng.replace(s[0],"") Writing a function to get rid of duplicate letters but so far have been playing around for an hour and can't get anything. Help would be appreciated, thanks.

    Read the article

  • Perl: getting handle for stdin to be used in cgi-bin script

    - by Daniel
    Using perl 5.8.8 on windows server I am writing a perl cgi script using Archive::Zip with to create on fly a zip that must be download by users: no issues on that side. The zip is managed in memory, no physical file is written to disk using temporary files or whatever. I am wondering how to allow zip downloading writing the stream to the browser. What I have done is something like: binmode (STDOUT); $zip->writeToFileHandle(*STDOUT, 0); but i feel insecure about this way to get the STDOUT as file handle. Is it correct and robust? There is a better way? Many thanks for your advices

    Read the article

  • How do you open a second WPF window without creating a new one.

    - by Daniel
    In the program I am trying to build, I have a menu button that opens a second window. The user puts information into the second window, presses the "Done" button, and the information is transfered into the main window. The problem I am having is opening the second window. I have both windows build in xaml files in Visual Studio but I can't find a way to show the second window. Using "Window window = new Window" does not fit my needs because 1) I already have the second window built and 2) I have tried this and I cannot figure out how to add children to the window; there is no window.children nor any grid to put the children into. Thank you in advance!

    Read the article

  • Simple cdd (custom debian distribution) problem

    - by Daniel G. R.
    Hi everyone, Im trying to make my own debian distribution but I have a problem. simple-cdd works fine but when I try to install my generated .iso, everything goes right since a message apears: " No installable kernel was found in the defined APT sources You may try to continue without a kernel. and manually install your kernel later. This is only recommended for experts, otheriwse you will likely end with a machine that dosent boot. COntinue Without installing a kernel? " And if y say yes, it continues... When is time to install grub it says: " Installation step failed An installation step failed. You can try to run the failing item again from the menu, or skip it and choose something else. The failing step is: Install the GRUB boot loader on a hard disk " HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Read the article

  • Is there a design pattern to cut down on code duplication when subclassing Activities in Android?

    - by Daniel Lew
    I've got a common task that I do with some Activities - downloading data then displaying it. I've got the downloading part down pat; it is, of course, a little tricky due to the possibility of the user changing the orientation or cancelling the Activity before the download is complete, but the code is there. There is enough code handling these cases such that I don't want to have to copy/paste it to each Activity I have, so I thought to create an abstract subclass Activity itself such that it handles a single background download which then launches a method which fills the page with data. This all works. The issue is that, due to single inheritance, I am forced to recreate the exact same class for any other type of Activity - for example, I use Activity, ListActivity and MapActivity. To use the same technique for all three requires three duplicate classes, except each extends a different Activity. Is there a design pattern that can cut down on the code duplication? As it stands, I have saved much duplication already, but it pains me to see the exact same code in three classes just so that they each subclass a different type of Activity.

    Read the article

  • How do I fix the alpha value after calling GDI text functions?

    - by Daniel Stutzbach
    I have a application that uses the Aero glass effect, so each pixel has an alpha value in addition to red, green, and blue values. I have one custom-draw control that has a solid white background (alpha = 255). I would like to draw solid text on the control using the GDI text functions. However, these functions set the alpha value to an arbitrary value, causing the text to translucently show whatever window is beneath my application's. After calling rendering the text, I would like to go through all of the pixels in the control and set their alpha value back to 255. What's the best way to do that? I haven't had any luck with the BitBlt, GetPixel, and SetPixel functions. They appear to be oblivious to the alpha value. Here are other solutions that I have considered and rejected: Draw to a bitmap, then copy the bitmap to the device: With this approach, the text rendering does not make use of the characteristics of the monitor (e.g., ClearText). Use GDI+ for text rendering: This application originally used GDI+ for text rendering (before I started working on Aero support). I switched to GDI because of difficulties I encountered trying to accurately measure strings with GDI+. I'd rather not switch back. Set the Aero region to avoid the control in question: My application's window is actually a child window of a different application running in a different process. I don't have direct control over the Aero settings on the top-level window. The application is written in C# using Windows Forms, though I'm not above using Interop to call Win32 API functions.

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >