Daily Archives

Articles indexed Wednesday June 2 2010

Page 26/120 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • CSS two divs next to each other

    - by Martijn
    Hi, I want to put two divs next to each other. The right div is about 200px; en the div left must fill up the rest of the screen width? How can i do this? I don't want to use percents because then my layout is crap :) Thnx

    Read the article

  • dos batch assign returned values from a command into a variable (from powershell)

    - by nokheat
    i am refering to this question ASSIGN win XP dos commandline output to variable http://stackoverflow.com/questions/537404/assign-win-xp-dos-commandline-output-to-variable i am trying to use it on a powershell code segment so i typed powershell date (get-date).AddDays(-1) -format yyyyMMdd and confirm it returns like 20100601 but then if i tried to for /f "tokens=*" %a in ('powershell date get-date -format yyyyMMdd ') do set var=%a then it failed to work as expected. how can i transfer the date to a variable?

    Read the article

  • Problems using a library in Xcode

    - by Pablo
    Hi! I'm actually developping an application for iPhone and I need to use a library, initially dedicated to a Linux environment. Since I'm using a Mac (with Snow Leopard and Intel Core Duo), I guess it's possible to use this library in my app. My library has 3 files: a file .h, a file .a and a file .so (both .a and .so are in /Developer/usr/lib). In addition I have included the .h i nmy code and I've added the .a in XCode has a framework (and it works because XCode find the .so compiling). For your info when I use the command "file" for the file .so, I have: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped When I compile for the Xcode Simulator, I have a warning and an error. The warning is: In /Developer/usr/lib/mylib.so, file was built for unsupported file format which is not the architecture being linked (i386) The error is: "_mylib_fct", referenced from: -[MyAppAppDelegate applicationDidBecomeActive:] in MyAppAppDelegate.o Symbol(s) not found Collect2: ld returned 1 exit status When I compile for the Device 3.0 with architecture arm6, I also have the same error, but the warning is quite different: ln /Users/Pablo/MyApp/mylib.a file is not of required architecture I try to solve this and make the app working with this lib since days, and I don't understand why the compiler is complaining... is it a 32/64 bits issues ? How can I deal with that ? Your help will be very appreciated. Thx!

    Read the article

  • how can i resize font of div by resizing the div using jQuery?

    - by chirag
    Hello every one can any one help me out please? by using this code my font size is go beyound the size of parent div here $(divid).resizable({ maxHeight: parseInt(200), maxWidth: parseInt(180), resize: function(event, ui) { var width1 = parseInt(ui.element.css('width')); var height1 = parseInt(ui.element.css('height')); ui.element.css({'font-size': width1+'px'}); ui.element.css({'line-height': height1+'px'}); } }); where 'divid' is parent div where child div is present to fire resizing event of font, but i don't want font size go beyond the parent div, text is also not hidden.. can you please help me out???

    Read the article

  • Practical RAID Performance?

    - by wag2639
    I've always thought the following to be a general rule of thumb for RAID: RAID 0: Best performance for READ and WRITE from stripping, greatest risk RAID 1: Redundant, decent for READ (I believe it can read from different parts of a file from different hard drives), not the best for WRITE RAID 0+1 (01): combines redundancy of RAID 1 with performance of RAID 0 RAID 1+0 (10): slightly better version of RAID 0+1 RAID 5: good READ performance, bad WRITE performance, redundant IS THIS ASSUMPTION CORRECT? (and how do they compare to a JBOD setup for R/W IO performance) Are certain practical RAID setups better for different applications: gaming, video editing, database (Acccess or SQL)? I was thinking about hard disk drives but does this apply to solid state drives as well?

    Read the article

  • .Net Array or IList<T> from NumPy array in IronPython?

    - by Barry Wark
    Imagine I have a .Net application that supports user extensions in the form of Python modules by embedding IronPython. Using Ironclad, I can allow users to make use of the NumPy and SciPy packages from within their modules. How good is the interop provided by Ironclad? My question is: can I use a NumPy array of type T provided by the user's module in the rest of my app that requires an IList<T>? Edit To clarify, IronPython exposes any Python enumerable of objects of type T as an IEnumerable<T> or an IList<T>. I'm not sure if NumPy arrays fit in this category. I would rather not have to call .tolist() on the NumPy array as the arrays may be quite large.

    Read the article

  • Gridview rowcommand after refreshing

    - by xt_20
    I have a gridview inside an updatepanel. After updating the gridview, accessing the individual rows does not seem to give the right row. For example: protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { GridViewRow row = ((e.CommandSource as Control).NamingContainer as GridViewRow); Row from the above code gives the values from the gridview before the gridview is refreshed/updated. Anyone knows how to get the updated values?

    Read the article

  • The C++ 'new' keyword and C

    - by Florian
    In a C header file of a library I'm using one of the variables is named 'new'. Unfortunately, I'm using this library in a C++ project and the occurence of 'new' as a variable names freaks out the compiler. I'm already using extern "C" { #include<... }, but that doesn't seem to help in this respect. Do I have to aks the library developer to change the name of that variable even though from his perspective, as a C developer, the code is absolutely fine, as 'new' is not a C keyword?

    Read the article

  • Problem in In-App purchase-consumable model

    - by kunal-dutta
    I have created a nonconsumable in app purchase item and now I want to create a consumable in-app purchase by which a user to buy it every time he uses it,and also I want to create a subscription model In-App purchase. Everything works as expected except when I buy the item more than one time, iPhone pop ups a message saying "You've already purchased the item. Do You want to buy it again?". Is It possible to disable this dialog and proceed to the actual purchase?And what will have to change in following code with different model:- in InApp purchase manager.m: @implementation InAppPurchaseManager //@synthesize purchasableObjects; //@synthesize storeObserver; @synthesize proUpgradeProduct; @synthesize productsRequest; //BOOL featureAPurchased; //BOOL featureBPurchased; //static InAppPurchaseManager* _sharedStoreManager; // self (void)dealloc { //[_sharedStoreManager release]; //[storeObserver release]; [super dealloc]; } (void)requestProUpgradeProductData { NSSet *productIdentifiers = [NSSet setWithObject:@"com.vigyaapan.iWorkOut1" ]; productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers]; productsRequest.delegate = self; [productsRequest start]; // we will release the request object in the delegate callback } pragma mark - pragma mark SKProductsRequestDelegate methods (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { //NSArray *products = response.products; //proUpgradeProduct = [products count] == 1 ? [[products firstObject] retain]: nil; if (proUpgradeProduct) { NSLog(@"Product title: %@", proUpgradeProduct.localizedTitle); NSLog(@"Product description: %@", proUpgradeProduct.localizedDescription); NSLog(@"Product price: %@", proUpgradeProduct.price); NSLog(@"Product id:%@", proUpgradeProduct.productIdentifier); } /*for (NSString invalidProductId in response.invalidProductIdentifiers) { NSLog(@"Invalid product id: %@" , invalidProductId); }/ //finally release the reqest we alloc/init’ed in requestProUpgradeProductData [productsRequest release]; [[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerProductsFetchedNotification object:self userInfo:nil]; } pragma - pragma Public methods /* call this method once on startup*/ (void)loadStore { /* restarts any purchases if they were interrupted last time the app was open*/ [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; /* get the product description (defined in early sections)*/ [self requestProUpgradeProductData]; } /* call this before making a purchase*/ (BOOL)canMakePurchases { return [SKPaymentQueue canMakePayments]; } /* kick off the upgrade transaction*/ (void)purchaseProUpgrade { SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"9820091347"]; [[SKPaymentQueue defaultQueue] addPayment:payment]; } pragma - pragma Purchase helpers /* saves a record of the transaction by storing the receipt to disk*/ (void)recordTransaction:(SKPaymentTransaction )transaction { if ([transaction.payment.productIdentifier isEqualToString:kInAppPurchaseProUpgradeProductId]) { / save the transaction receipt to disk*/ [[NSUserDefaults standardUserDefaults] setValue:transaction.transactionReceipt forKey:@"proUpgradeTransactionReceipt" ]; [[NSUserDefaults standardUserDefaults] synchronize]; } } /* enable pro features*/ (void)provideContent:(NSString )productId { if ([productId isEqualToString:kInAppPurchaseProUpgradeProductId]) { / enable the pro features*/ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"isProUpgradePurchased" ]; [[NSUserDefaults standardUserDefaults] synchronize]; } } (void)finishTransaction:(SKPaymentTransaction )transaction wasSuccessful:(BOOL)wasSuccessful { // / remove the transaction from the payment queue.*/ [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:transaction, @"transaction" , nil]; if (wasSuccessful) { /* send out a notification that we’ve finished the transaction*/ [[NSNotificationCenter defaultCenter]postNotificationName:kInAppPurchaseManagerTransactionSucceededNotification object:self userInfo:userInfo]; } else { /* send out a notification for the failed transaction*/ [[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerTransactionFailedNotification object:self userInfo:userInfo]; } } (void)completeTransaction:(SKPaymentTransaction *)transaction { [self recordTransaction:transaction]; [self provideContent:transaction.payment.productIdentifier]; [self finishTransaction:transaction wasSuccessful:YES]; } (void)restoreTransaction:(SKPaymentTransaction *)transaction { [self recordTransaction:transaction.originalTransaction]; [self provideContent:transaction.originalTransaction.payment.productIdentifier]; [self finishTransaction:transaction wasSuccessful:YES]; } (void)failedTransaction:(SKPaymentTransaction )transaction { if (transaction.error.code != SKErrorPaymentCancelled) { / error!/ [self finishTransaction:transaction wasSuccessful:NO]; } else { / this is fine, the user just cancelled, so don’t notify*/ [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; } } (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { case SKPaymentTransactionStatePurchased: [self completeTransaction:transaction]; break; case SKPaymentTransactionStateFailed: [self failedTransaction:transaction]; break; case SKPaymentTransactionStateRestored: [self restoreTransaction:transaction]; break; default: break; } } } @end in SKProduct.m:- @implementation SKProduct (LocalizedPrice) - (NSString *)localizedPrice { NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [numberFormatter setLocale:self.priceLocale]; NSString *formattedString = [numberFormatter stringFromNumber:self.price]; [numberFormatter release]; return formattedString; }

    Read the article

  • Creating combinations that have no more one intersecting element

    - by khuss
    I am looking to create a special type of combination in which no two sets have more than one intersecting element. Let me explain with an example: Let us say we have 9 letter set that contains A, B, C, D, E, F, G, H, and I If you create the standard non-repeating combinations of three letters you will have 9C3 sets. These will contain sets like ABC, ABD, BCD, etc. I am looking to create sets that have at the most only 1 common letter. So in this example, we will get following sets: ABC, ADG, AEI, AFH, BEH, BFG, BDI, CFI, CDH, CEG, DEF, and GHI - note that if you take any two sets there are no more than 1 repeating letter. What would be a good way to generate such sets? It should be scalable solution so that I can do it for a set of 1000 letters, with sub set size of 4. Any help is highly appreciated. Thanks

    Read the article

  • Powershell script to create scheduled tasks from csv file

    - by Rihan Meij
    I would like to use Powershell to create a couple of scheduled tasks, on a server. I have created the file from existing schedule's I have loaded up the csv file, piped it to a select, and retreived all the info that I require from the csv file. However I am not sure on how to pass these results on to a external non powershell command. Import-Csv .\listoftasks.csv | Select 'Run As User','RP','Scheduled Type','TaskName','Task To Run','Repeat: Every','Repeat: Until: Duration' What I would like to do is something like: Import-Csv .\listoftasks.csv | Select 'Run As User','RP','Scheduled Type','TaskName','Task To Run','Repeat: Every','Repeat: Until: Duration' | schtasks /create /RU ....

    Read the article

  • VS2010 + Resharper 5 performance issues

    - by Jeremy Roberts
    I have been using VS2010 with Resharper 5 for several weeks and am having a performance issue. Sometimes when typing, the cursor will lag and the keystrokes won't show instantaneously. Also, scrolling will lag at times. There is a forum thread started and JetBrains has been responding. Several people (including myself) have added their voice and uploaded some performance profiles. If anyone here has has this issue, I would encourage you to visit the thread and let JetBrains know about it. Has anyone had this problem and have a suggestion to restore performance?

    Read the article

  • Using type hints in Clojure for Java return values

    - by mikera
    I'm working on some Java / Clojure interoperability and came across a reflection warning for the following code: (defn load-image [resource-name] (javax.imageio.ImageIO/read (.getResource (class javax.imageio.ImageIO) resource-name))) => Reflection warning, clojure/repl.clj:37 - reference to field read can't be resolved. I'm surprised at this because getResource always returns a URL and I would therefore expect the compiler to use the appropriate static method in javax.imageio.ImageIO/read. The code works fine BTW so it is clearly finding the right method at run time. So two questions: Why is this returning a reflection warning? What type hint do I need to fix this?

    Read the article

  • Is there a static code analyzer [like Lint] for PHP files?

    - by eswald
    Is there a static code analyzer for PHP files? The binary itself can check for syntax errors, but I'm looking for something that does more, like unused variable assignments, arrays that are assigned into without being initialized first, and possibly code style warnings. Open-source programs would be preferred, but we might convince the company to pay for something if it's highly recommended.

    Read the article

  • UIWebView rotation and memory problem

    - by Fer
    Hi. I have an UIWebView that loads a embedded XHTML like this: body = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; body.scalesPageToFit = YES; body.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; body.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; [self.view addSubview:body]; [body loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"article16" ofType:@"xhtml"]isDirectory:NO]]]; This XHTML have a lot of images, and when I rotate the device I got some memory warnings, and sometimes the app crashes. If I remove the autoresizing mask, specifically the UIViewAutoresizingFlexibleWidth (I have tryed with only UIViewAutoresizingFlexibleLeftMargin and UIViewAutoresizingFlexibleRightMargin with no problems), the memory warning stops, and the app does not crash anymore. If I remove all autoresizing mask, and set the new webView frame in didRotate or willRotate, I got the same warnings as using the UIViewAutoresizingFlexibleWidth. There's a app, called Atomic Web that could open the same XHTML and rotate with no memory warnings, and safari can open it as well, but if I create a project with only that UIWebView, the app sometimes crashes. Someone knows what this may be? Can I set the webview frame in other way? Why can't I use the autoresizing mask? Thanks for your attention.

    Read the article

  • Visual C# Winforms App Not Displaying Graphical Elements in Design Mode

    - by Sev
    I wrote a bunch of code in the .cs file in c# for a winforms application. The application runs fine, and everything is in it's place. Something like this: using.. namespace Temp { public class Temp : Form { Button b1; TextBox t1; Temp() { b1.Text = "Some Text"; b1.Size = new Size(50,20); ... } void function1() { // stuff } static void Main() { Application.Run(new Temp()); } } } How can I modify my code (or fix it somehow) so that the design view displays the elements in their correct positions and view so that I can visually edit them instead of having to trial/error everything. Edit for Clarification My application runs fine. The problem is, that I didn't use designer to create the application and so in the designer view, the app is empty. But not empty when I run it, since everything is positioned programmatically in the .cs file. My question is, how can I fix this, so that the designer shows the objects correctly. There is no quick fix other than to redesign everything?

    Read the article

  • Reading Excel by OLEDB reads strings as DBNull

    - by Sathish
    I am reading Excel file using OLEDB in Csharp i have shown the sample excel data what i have F1 F2 F3 F4 India 23 44 4 China 4 8 Month 6 USA 45 Neg 4 When i read this data and check in my DataTable i get Null values for "Month 6" and "Neg" where as i can be able get the F1 column correctly... my connection string is as shown Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[XLSource];Extended Properties=Excel 12.0;

    Read the article

  • Solr : how do i index and search several fields?

    - by sbrattla
    Hi, I've set up my first 'installation' of Solr, where each index (document) represents a musical work (with properties like number (int), title (string), version (string), composers (string) and keywords (string)). I've set the field 'title' as the default search field. However, what do I do when I would like to do a query on all fields? I'd like to give users the opportunity to search in all fields, and as far as I've understood there is at least two options for this: (1) Specify which fields the query should be made against. (2) Set up the Solr configuration with copyfields, so that values added to each of the fields will be copied to a 'catch-all'-like field which can be used for searching. However, in this case, i am uncertain how things would turn out when i take into consideration that the data types are not all the same for the various fields (the various fields will to a lesser og greater degree go through filters, but as copyfield values are taken from their original fields before the values have been run through their original fields' filters, i would have to apply one single filter to all values on the copyfield. This, again, would result in integers being 'filtered' just as strings would). Is this a case where i should use copyfields? At first glance, it seems a bit more 'flexible' to rather just search on all fields. However, maybe there's a cost? All feedback appreciated! Thanks!

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >