Search Results

Search found 5064 results on 203 pages for 'automatic ref counting'.

Page 9/203 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Counting builds

    - by moz
    I have a dozen of build plans managed by a unique build agent. What I want to do, is to get the total number of triggered/scheduled builds (without counting them manually from the interface). So, question is, is there a kind of counter on the server? UPDATE #1: I'm using the v2.2.1. UPDATE #2: On the server interface (Administration - System - System Information), there are some statistics including how many builds the server performed. But, this number is reinitialized when the server goes down.

    Read the article

  • Implementation of "Automatic Lightweight Migration" for Core Data (iPhone)

    - by RickiG
    Hi I would like to make my app able to do an automatic lightweight migration when I add new attributes to my core data model. In the guide from Apple this is the only info on the subject I could find: Automatic Lightweight Migration To request automatic lightweight migration, you set appropriate flags in the options dictionary you pass in addPersistentStoreWithType:configuration:URL:options:error:. You need to set values corresponding to both the NSMigratePersistentStoresAutomaticallyOption and the NSInferMappingModelAutomaticallyOption keys to YES: NSError *error; NSURL *storeURL = <#The URL of a persistent store#>; NSPersistentStoreCoordinator *psc = <#The coordinator#>; NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; if (![psc addPersistentStoreWithType:<#Store type#> configuration:<#Configuration or nil#> URL:storeURL options:options error:&error]) { // Handle the error. } My NSPersistentStoreCoordinator is initialized in this way: - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator != nil) { return persistentStoreCoordinator; } NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"FC.sqlite"]]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return persistentStoreCoordinator; } I am having trouble seeing where and how I should add the Apple code to get the Automatic Lightweight Migration working?

    Read the article

  • Fetch and bulk collect from a REF CURSOR returned by a procedure

    - by Rachcha
    I have a procedure that has a SYS_REFCURSOR as an OUT parameter. The signature is, for example, as follows: PROCEDURE myProc(p_someID IN INTEGER, p_cursor OUT SYS_REFCURSOR); I call this procedure from a function, where I have to copy a column named clientID from the p_cursor to a scalar nested table. I am doing as follows: CREATE OR REPLACE FUNCTION myFunction RETURN sys_refcursor IS someID INTEGER := 1234; myCursor SYS_REFCURSOR; TYPE t_clientID_nt IS TABLE OF NUMBER(16,0); clientID_nt t_clientID_nt; otherID SYS_REFCURSOR; BEGIN myProc (someID, myCursor); FOR i IN myCursor LOOP clientID_nt.EXTEND; clientID_nt (clientID_nt.COUNT) := i.clientID; END LOOP; -- Other code that opens the cursor otherID -- based on the IDs in clientID_nt ... ... RETURN otherID; END; / When I try to compile this function, the error I get is: PLS-00221: 'CLIENTID_NT' is not a procedure or is undefined and it is at line 11 of the code. Any help on how to fetch and bulk collect from such a cursor is greatly appreciated.

    Read the article

  • MessageQueue.BeginReceive() null ref error - c#

    - by ltech
    Have a windows service that listens to a msmq. In the OnStart method is have this protected override void OnStart(string[] args) { try { _queue = new MessageQueue(_qPath);//this part works as i had logging before and afer this call //Add MSMQ Event _queue.ReceiveCompleted += new ReceiveCompletedEventHandler(queue_ReceiveCompleted);//this part works as i had logging before and afer this call _queue.BeginReceive();//This is where it is failing - get a null reference exception ; } catch(Exception ex) { EventLogger.LogEvent(EventSource, EventLogType, "OnStart" + _lineFeed + ex.InnerException.ToString() + _lineFeed + ex.Message.ToString()); } } where private MessageQueue _queue = null;

    Read the article

  • Append XML string block WITH NAMESPACE REF to existing XmlDocument in .NET

    - by FT
    I have an xml document (XmlDocument) which looks like this... <stuff xmlns:n="hhtp://tempuri.com/"> </stuff> ... and a "fragment" (string) which looks like this <things> <thing n:type="info"> </thing> </things> I want to "inject" the fragment into the main document. How? (HINT: You can't use XmlDocumentFragment because the namespace 'n' isn't declared in the fragment, and the object model complains about this - throwing an 'unknown namespace' error even though the resultant document will be perfectly valid.)

    Read the article

  • Solved::MessageQueue.BeginReceive() null ref error - c#

    - by ltech
    Have a windows service that listens to a msmq. In the OnStart method is have this protected override void OnStart(string[] args) { try { _queue = new MessageQueue(_qPath);//this part works as i had logging before and afer this call //Add MSMQ Event _queue.ReceiveCompleted += new ReceiveCompletedEventHandler(queue_ReceiveCompleted);//this part works as i had logging before and afer this call _queue.BeginReceive();//This is where it is failing - get a null reference exception } catch(Exception ex) { EventLogger.LogEvent(EventSource, EventLogType, "OnStart" + _lineFeed + ex.InnerException.ToString() + _lineFeed + ex.Message.ToString()); } } where private MessageQueue _queue = null; This works on my machine but when deployed to a windows 2003 server and running as Network service account, it fails Exception recvd: Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object. at MYService.Service.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state) Solved: Turned out that the Q that i set up, I had to explicitly add Network Service account to it under security tab

    Read the article

  • Silly CSS ref problem.

    - by Lucifer
    Hi All, I am having a very weird problem. I cannot for the life of me figure it out. The code for my page (at the moment), is this: <link rel="stylesheet" href="assets/css/default.css" /> But, why does it not load the stylesheet? When I move the stylesheet into the same location as the index.html page, and then change the references to it to point to the root dir, it works again? It never wants to work if the stylesheet is any more than 1 directory deep. Is this normal? Or should it still work?

    Read the article

  • NSArray/NSMutableArray : Passed by ref or by value???

    - by wgpubs
    Totally confused here. I have a PARENT UIViewController that needs to pass an NSMutableArray to a CHILD UIViewController. I'm expecting it to be passed by reference so that changes made in the CHILD will be reflected in the PARENT and vice-versa. But that is not the case. Both have a property declared as .. @property (nonatomic, retain) NSMutableArray *photos; Example: In PARENT: self.photos = [[NSMutableArray alloc] init]; ChildViewController *c = [[ChildViewController alloc] init ...]; c.photos = self.photos; ... ... ... In CHILD: [self.photos addObject:obj1]; [self.photos addObject:obj2]; NSLog(@"Count:%d", [self.photos count]) // Equals 2 as expected ... Back in PARENT: NSLog(@"Count:%d", [self.photos count]) // Equals 0 ... NOT EXPECTED I thought they'd both be accessing the same memory. Is this not the case? If it isn't ... how do I keep the two NSMutableArrays in sync?

    Read the article

  • Setting spring bean property value using ref-bean

    - by Apache Fan
    Hi, I am trying to set a property value using spring. <bean id="velocityPropsBean" class="com.test.CustomProperties" abstract="false" singleton="true" lazy-init="false" autowire="default" dependency-check="default"> <property name="properties"> <props> <prop key="resource.loader">file</prop> <prop key="file.resource.loader.cache">true</prop> <prop key="file.resource.loader.class">org.apache.velocity.runtime.resource.loader.FileResourceLoader</prop> <prop key="file.resource.loader.path">NEED TO INSERT VALUE AT STARTUP</prop> </props> </property> </bean> <bean id="velocityResourcePath" class="java.lang.String" factory-bean="velocityHelper" factory-method="getLoaderPath"/> Now what i need to do is insert the result from getLoaderPath into file.resource.loader.path. The value of getLoaderPath changes so it has to be loaded at server startup. Any thoughts how i can inset the velocityResourcePath value to the property?

    Read the article

  • Counting total sum of each value in one column w.r.t another in Perl

    - by sfactor
    I have tab delimited data with multiple columns. I have OS names in column 31 and data bytes in columns 6 and 7. What I want to do is count the total volume of each unique OS. So, I did something in Perl like this: #!/usr/bin/perl use warnings; my @hhfilelist = glob "*.txt"; my %count = (); for my $f (@hhfilelist) { open F, $f || die "Cannot open $f: $!"; while (<F>) { chomp; my @line = split /\t/; # counting volumes in col 6 and 7 for 31 $count{$line[30]} = $line[5] + $line[6]; } close (F); } my $w = 0; foreach $w (sort keys %count) { print "$w\t$count{$w}\n"; } So, the result would be something like Windows 100000 Linux 5000 Mac OSX 15000 Android 2000 But there seems to be some error in this code because the resulting values I get aren't as expected. What am I doing wrong?

    Read the article

  • Counting string length in javascript and Ruby on Rails

    - by williamjones
    I've got a text area on a web site that should be limited in length. I'm allowing users to enter 255 characters, and am enforcing that limit with a Rails validation: validates_length_of :body, :maximum => 255 At the same time, I added a javascript char counter like you see on Twitter, to give feedback to the user on how many characters he has already used, and to disable the submit button when over length, and am getting that length in Javascript with a call like this: element.length Lastly, to enforce data integrity, in my Postgres database, I have created this field as a varchar(255) as a last line of defense. Unfortunately, these methods of counting characters do not appear to be directly compatible. Javascript counts the best, in that it counts what users consider as number of characters where everything is a single character. Once the submission hits Rails, however, all of the carriage returns have been converted to \r\n, now taking up 2 characters worth of space, which makes a close call fail Rails validations. Even if I were to handcode a different length validation in Rails, it would still fail when it hits the database I think, though I haven't confirmed this yet. What's the best way for me to make all this work the way the user would want? Best Solution: an approach that would enable me to meet user expectations, where each character of any type is only one character. If this means increasing the length of the varchar database field, a user should not be able to sneakily send a hand-crafted post that creates a row with more than 255 letters. Somewhat Acceptable Solution: a javascript change that enables the user to see the real character count, such that hitting return increments the counter 2 characters at a time, while properly handling all symbols that might have these strange behaviors.

    Read the article

  • How to change src (ajax ref in options (events: 'href') when calling refetchEvents

    - by Martin Glynn
    My site is for listing theatrical productions (http://theaterOnline.com) I want to use a drop down list to enable users to filter the listings by location or genre. The following code refreshes the screen: $("#cfilter").change(function() { $('#calendar').fullCalendar('refetchEvents' ) }) but I need to be able to change SRC in the ajax call below: $.ajax({ url: src, dataType: 'json', data: params, cache: options.cacheParam || false, success: reportEventsAndPop}) which is a passed parameter from eventSources[1] TIA for anyone who can help!

    Read the article

  • [LaTeX] positions of page numbers, position of chapter headings, chapters AND Table of Contents, Ref

    - by kaikanmonaco
    I am writing my PhD thesis (120+ pages) in latex, the deadline is approaching and I am struggling with layout problems. I am using the documentstyle book. I am posting both problems in this one thread because I am not sure if the solution might be related to both problems or not. Problems are: 1.) The page numbers are mostly located on the top-right of each page (this is correct and where I want them to be). However, only on the first page of chapters and on the first page of what I call "special chapters", the page number is located bottom-centered. With "special chapters" I mean: List of Contents, List of Figures, List of Tables, References, Index. My university will not accept the thesis like this. The page number must ALWAYS be top-right one each page, even if the page is the first page of a chapter or the first page of something like the List of Contents. How can I fix this? 2.) On the first page of chapters and "special chapters" (List of Contents...), the chapter title is located far too low on the page. This is the standard layout of LaTeX with documentstyle book I think. However, the chapter title must start at the very top of the page! I.e. the same height as the normal text on the pages that follow. I mean the chapter title, not the header. I.e., if there is a chapter called "Chapter 1 Dynamics of foobar under mechanical stress" then that text has to start from the top the page, but right now it starts several centimeters below the top. How can I fix this? Have tried all kinds of things to no effect, I'd be very thankful for a solution! Thanks.

    Read the article

  • Zend Framework - counting rows in select clause ?

    - by moogeek
    Hello! I'm investigating Zend Framework and currently stucked in counting resulting rows of sql query... Every method I try (from documentation and some blogposts and tutorials) returns an error (like Call to undefined function) or simply gives the incorrect value. I've tried this: $checkquery = $db->select() ->from('users', 'COUNT(*)') ->where('login = ?', $login) ->where('password = ?', $password) ->query(); $checkrequest=fetchRow($checkquery)->num; ...then this one: $checkquery = $db->select() ->from('users', '*') ->where('login = ?', $login) ->where('password = ?', $password) ->query(); $checkrequest=count($checkquery->fetchAll()); and even: $checkquery = $db->select() ->from('users', '*') ->where('login = ?', $login) ->where('password = ?', $password) ->query(); $checkrequest=$checkquery->fetchAll()->num; Also rowCount() and count(fetchRow()) and count(fetchAll()->toArray()). But always I got an error message or duplicate inserts in db in further insert function. So what is the correct way to do the resulting row calculation in select clause in Zend Framework 1.9 (I use this one) ?

    Read the article

  • Seperating and counting CSV entries from database (Access/ASp Classic)

    - by Katherine Perotta
    hey i could really use some help with this one. I have a faq with multiple "tags" and I would like to separate and count them. They are currently in the database as follows: ID-----------------TITLE--------------CONTENT-----------TAGS Sample Records: 1---------------sampletitle 1---------amplecontent--------tag1,tag2,tag3 2---------------sampletitle 2---------moresamplestuff-----tag3,tag4,tag5 How could I go about counting the number of times each tag is used? In the end, would it be easier to just create a separate table called TAGS, with a single tag corresponding to a single ID in FAQ? The only reason I don't prefer doing something like that is because I have so much data already it would take quite a while. However, if there's no alternative or if its easier than doing string parsing like that, im willing to do it. The goal is to display each unique tag and the number of times it is used. Would it be better to do the heavy lifting in the database or ASP? I have gotten as far as getting a list of all tags and displaying them in an array (with each tag separated). So at this point what I need to do is count each value and then remove the duplicates (while preserving the count number somewhere). This is in ASP classic using an Access database. Thanks!

    Read the article

  • Return REF CURSOR to procedure generated data

    - by ThaDon
    I need to write a sproc which performs some INSERTs on a table, and compile a list of "statuses" for each row based on how well the INSERT went. Each row will be inserted within a loop, the loop iterates over a cursor that supplies some values for the INSERT statement. What I need to return is a resultset which looks like this: FIELDS_FROM_ROW_BEING_INSERTED.., STATUS VARCHAR2 The STATUS is determined by how the INSERT went. For instance, if the INSERT caused a DUP_VAL_ON_INDEX exception indicating there was a duplicate row, I'd set the STATUS to "Dupe". If all went well, I'd set it to "SUCCESS" and proceed to the next row. By the end of it all, I'd have a resultset of N rows, where N is the number of insert statements performed and each row contains some identifying info for the row being inserted, along with the "STATUS" of the insertion Since there is no table in my DB to store the values I'd like to pass back to the user, I'm wondering how I can return the info back? Temporary table? Seems in Oracle temporary tables are "global", not sure I would want a global table, are there any temporary tables that get dropped after a session is done?

    Read the article

  • Portable way of counting milliseconds in C++ ?

    - by ereOn
    Hi, Is there any portable (Windows & Linux) way of counting how many milliseconds elapsed between two calls ? Basically, I want to achieve the same functionnality than the StopWatch class of .NET. (for those who already used it) In a perfect world, I would have used boost::date_time but that's not an option here due to some silly rules I'm enforced to respect. For those who better read code, this is what I'd like to achieve. Timer timer; timer.start(); // Some instructions here timer.stop(); // Print out the elapsed time std::cout << "Elapsed time: " << timer.milliseconds() << "ms" << std::endl; So, if there is a portable (set of) function(s) that can help me implement the Timer class, what is it ? If there is no such function, what Windows & Linux API should I use to achieve this functionnality ? (using #ifdef WINDOWS-like macros) Thanks !

    Read the article

  • Using 'ref code' related to the spinner option chosen

    - by user1508541
    I am trying to add a spinner function in a trial app which compares the frequency charts of earphones. I am trying to extract the info from " http://www.headphone.com/learning-center/build-a-graph.php " website. what I want to do is make the spinner work like the drop down list in the mentioned website. On further inspection what I found was that every dropdown element is provided with a unique code that is called when the particular element is selected. I need help in replicating the same in an android spinner.

    Read the article

  • On counting pairs of words that differ by one letter

    - by Quintofron
    Let us consider n words, each of length k. Those words consist of letters over an alphabet (whose cardinality is n) with defined order. The task is to derive an O(nk) algorithm to count the number of pairs of words that differ by one position (no matter which one exactly, as long as it's only a single position). For instance, in the following set of words (n = 5, k = 4): abcd, abdd, adcb, adcd, aecd there are 5 such pairs: (abcd, abdd), (abcd, adcd), (abcd, aecd), (adcb, adcd), (adcd, aecd). So far I've managed to find an algorithm that solves a slightly easier problem: counting the number of pairs of words that differ by one GIVEN position (i-th). In order to do this I swap the letter at the ith position with the last letter within each word, perform a Radix sort (ignoring the last position in each word - formerly the ith position), linearly detect words whose letters at the first 1 to k-1 positions are the same, eventually count the number of occurrences of each letter at the last (originally ith) position within each set of duplicates and calculate the desired pairs (the last part is simple). However, the algorithm above doesn't seem to be applicable to the main problem (under the O(nk) constraint) - at least not without some modifications. Any idea how to solve this?

    Read the article

  • c# counting identical strings from text file

    - by Winkz
    I have a foreach statement where I go through several lines from a text file, where I have trimmed down and sorted out the lines I need. What I want to do is count up on how many times an identical string is present. How do I do this? Here is my code. It's the second if statement where I am stuck: foreach (string line in lines.Where(l => l.Length >= 5)) { string a = line.Remove(0, 11); if ((a.Contains(mobName) && a.Contains("dies"))) { mobDeathCount++; } if (a.Contains(mobName) && a.Contains("drops")) { string lastpart = a.Substring(a.LastIndexOf("drops")); string modifiedLastpart = lastpart.Remove(0, 6); } Heres what some of the lines look like: a bag of coins a siog brandy a bag of coins a bag of coins the Cath Shield a tattered scroll So what im trying to do is counting up there are 3 lines with bag of coins. But i need to make it so that it can be everything, theres a drop lists thats huge. So cant add all of em, would take too long

    Read the article

  • SDK2 query for counting: which is more efficient?

    - by user1195996
    I have an app that is displaying metrics about defects in a project. I have the option of making one query that returns all the defects, and from that I can break out about four different metrics (How many defects escaped QA in 90 days, 180 days, and then the same metrics again but only counting sev1/sev2 defects). I could make four queries and limit the results to one so that I just get a count for each. Or I could make one query that encompass them all (all defects that escaped QA in 180 days) and then count up the difference. I'm figuring worst case, the number of defects that escaped QA in the last six months will generally be less than 100, certainly less 500 worst case. Which would you do-- four queryies with one result each, or one single query that on average might return 50, perhaps worst case 500? And I guess the key question is-- where are the inflections points? Perhaps I have more metrics tomorrow (who knows, 8?) and a different average defect counts. Is there a rule of thumb I could use to help choose which approach?

    Read the article

  • Windows XP "automatic" services not starting

    - by Mala
    Hi I have a fresh install of WinXP. The main problem is that every time I start it up, I have to go into Administrative Tools and start the needed services, such as DCOM, RTP, DHCP, etc etc. The only services that start automatically are: plug and play remote procedure server windows audio workstation All of the rest have to be started manually, in spite of the fact that they're listed as "automatic". Why won't they start on their own like they should? Thanks, Mala

    Read the article

  • Automatic acronym and jargon expansion tool

    - by Ivo Bosticky
    Are there any tools that would help with comprehension of technical documents that contain a mix of domain specific and company specific acronyms and jargon? A tool that is functionally similar to the automatic acronym expansion done by Wikileaks in their Afgan War Diary (as seen at http://213.251.145.96/id/310B4FC4-2F89-4653-A546-1AD5D55BD9F7/) but ideally supports PDF or Microsoft Word documents. The list of acronyms and jargon and their expanded text could be provided in a separate file.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >