Search Results

Search found 491 results on 20 pages for 'craig'.

Page 17/20 | < Previous Page | 13 14 15 16 17 18 19 20  | Next Page >

  • Create an Oracle function that returns a table

    - by Craig
    I'm trying to create a function in package that returns a table. I hope to call the function once in the package, but be able to re-use its data mulitple times. While I know I create temp tables in Oracle, I was hoping to keep things DRY. So far, this is what I have: Header: CREATE OR REPLACE PACKAGE TEST AS TYPE MEASURE_RECORD IS RECORD ( L4_ID VARCHAR2(50), L6_ID VARCHAR2(50), L8_ID VARCHAR2(50), YEAR NUMBER, PERIOD NUMBER, VALUE NUMBER ); TYPE MEASURE_TABLE IS TABLE OF MEASURE_RECORD; FUNCTION GET_UPS( TIMESPAN_IN IN VARCHAR2 DEFAULT 'MONTLHY', STARTING_DATE_IN DATE, ENDING_DATE_IN DATE ) RETURN MEASURE_TABLE; END TEST; Body: CREATE OR REPLACE PACKAGE BODY TEST AS FUNCTION GET_UPS ( TIMESPAN_IN IN VARCHAR2 DEFAULT 'MONTLHY', STARTING_DATE_IN DATE, ENDING_DATE_IN DATE ) RETURN MEASURE_TABLE IS T MEASURE_TABLE; BEGIN SELECT ... INTO T FROM ... ; RETURN T; END GET_UPS; END TEST; The header compiles, the body does not. One error message is 'not enough values', which probably means that I should be selecting into the MEASURE_RECORD, rather than the MEASURE_TABLE. What am I missing?

    Read the article

  • Annoyed by the expression "Moving Forward". Why do people use it? [closed]

    - by craig
    What does “Moving Forward” mean to you? “Moving Forward”: A.To acknowledge the past but in essence, encourage a positive, professional environment to do our personal best in relation to issue that was criticized. B.To acknowledge the past and learn from case examples to develop continually updated and open sources of information. Specifically, policies and procedures or best practices. C.To dismiss the past to put behind fears of retribution. D.Combination of above choices E._____< Open Answer

    Read the article

  • Rails 3 ActiveRecord group_by sort by count

    - by Craig
    The following view code generates a series of links with totals (as expected): <% @jobs.group_by(&:employer_name).sort.each do |employer, jobs| %> <%= link_to employer, jobs_path() %> <%= "(#{jobs.length})" %> <% end %> However, when I refactor the view's code and move the logic to a helper, the code doesn't work as expect. view: <%= employer_filter(@jobs_clone) %> helper: def employer_filter(jobs) jobs.group_by(&:employer_name).sort.each do |employer,jobs| link_to employer, jobs_path() end end The following output is generated: <Job:0x10342e628>#<Job:0x10342e588>#<Job:0x10342e2e0>Employer A#<Job:0x10342e1c8>Employer B#<Job:0x10342e0d8>Employer C#<Job:0x10342ded0>Employer D# What am I not understanding? At first blush, the code seems to be equivalent.

    Read the article

  • Which parallel sorting algorithm has the best average case performance?

    - by Craig P. Motlin
    Sorting takes O(n log n) in the serial case. If we have O(n) processors we would hope for a linear speedup. O(log n) parallel algorithms exist but they have a very high constant. They also aren't applicable on commodity hardware which doesn't have anywhere near O(n) processors. With p processors, reasonable algorithms should take O(n/p log n/p) time. In the serial case, quick sort has the best runtime complexity on average. A parallel quick sort algorithm is easy to implement (see here and here). However it doesn't perform well since the very first step is to partition the whole collection on a single core. I have found information on many parallel sort algorithms but so far I have not seen anything pointing to a clear winner. I'm looking to sort lists of 1 million to 100 million elements in a JVM language running on 8 to 32 cores.

    Read the article

  • Double Linked List header node keeps returning first value as 0

    - by Craig
    I will preface to say that this is my first question. I am currently getting my Masters degree in Information Security and I had to take C++ programming this semester. So this is homework related. I am not looking for you to answer my homework but I am running into a peculiar situation. I have created the program to work with a doubly linked list and everything works fine. However when I have the user create a list of values the first node keeps returning 0. I have tried finding some reading on this and I cannot locate any reference to it. My question is then is the header node(first node) always going to be zero? Or am I doing something wrong. case: 'C': cout<<"Please enter a list:"<<endl; while(n!=-999){ myList.insert(n); cin>> n;} break; I now enter: 12321, 1234,64564,346346. The results in 0, 12321, 1234, 64564,346346. Is this what should happen or am I doing something wrong? Also as this is my first post please feel free to criticize or teach me how to color code the keywords. Anyway this is a homework assignment so I am only looking for guidance and constructive criticism. Thank you all in advance So I cannot figure out the comment sections on this forum so I will edit the original post The first section is the constructor code: template <class Type> doublyLinkedList<Type>::doublyLinkedList() { first= NULL; last = NULL; count = 0; } Then there is my insert function : template <class Type> void doublyLinkedList<Type>::insert(const Type& insertItem) { nodeType<Type> *current; //pointer to traverse the list nodeType<Type> *trailCurrent; //pointer just before current nodeType<Type> *newNode; //pointer to create a node bool found; newNode = new nodeType<Type>; //create the node newNode->info = insertItem; //store the new item in the node newNode->next = NULL; newNode->back = NULL; if(first == NULL) //if the list is empty, newNode is //the only node { first = newNode; last = newNode; count++; } else { found = false; current = first; while (current != NULL && !found) //search the list if (current->info >= insertItem) found = true; else { trailCurrent = current; current = current->next; } if (current == first) //insert newNode before first { first->back = newNode; newNode->next = first; first = newNode; count++; } else { //insert newNode between trailCurrent and current if (current != NULL) { trailCurrent->next = newNode; newNode->back = trailCurrent; newNode->next = current; current->back = newNode; } else { trailCurrent->next = newNode; newNode->back = trailCurrent; last = newNode; } count++; }//end else }//end else }//end Then I have an initialization function too: template <class Type> void doublyLinkedList<Type>::initializeList() { destroy(); } Did I miss anything?

    Read the article

  • Synfony2 validation changes invalid integer to 0

    - by Craig
    I've added validation to a form and found that in some cases it is losing the invalid data I am feeding it and saving 0s instead. The output at the bottom shows that if I post the latitude as 'zzzzzz' (clearly not a number nor between -90 and 90) the form is declared as valid and saved with the value 0 How can that happen given that I have declared the input must be a number? ProxyType.php buildForm() $builder ->add('siteName', null, array('label' => 'Site name')) .... ->add('latitude', 'number', array('label' => 'Latitude')) ->add('longitude', 'number', array('label' => 'Longitude')) .... ; ProxyController.php createAction .... $postData = $request->request->get('niwa_pictbundle_proxytype'); $this->get('logger')->info('Posted latitude = '.$postData['latitude']); $form = $this->createForm(new ProxyType(), $entity); $form->bindRequest($request); if ($form->isValid()) { $this->get('logger')->info('Form declared valid : latlong ('.$entity->getLatitude().','.$entity->getLongitude().')'); .... validation.yml Acme\PictBundle\Entity\Proxy: properties: longitude: - Min: { limit: -180 } - Max: { limit: 180 } latitude: - Max: { limit: 90 } - Min: { limit: -90 } Output [2012-09-28 02:05:30] app.INFO: Posted latitude = zzzzzz [] [] [2012-09-28 02:05:30] app.INFO: Form declared valid : latlong (0,0) [] []

    Read the article

  • Tracking down origin of I/O in multi-process server

    - by Craig Ringer
    I'm currently trying to track down some phantom I/O in a PostgreSQL build I'm testing. It's a multi-process server and it isn't simple to associate disk I/O back to a particular back-end and query. I thought Linux's perf tool would be ideal for this, but I'm struggling to capture block I/O performance counter metrics and associate them with user-space activity. It's easy to record block I/O requests and completions with, eg: sudo perf record -g -T -u postgres -e 'block:block_rq_*' and the user-space pid is recorded, but there's no kernel or user-space stack captured, or ability to snapshot bits of the user-space process's heap (say, query text) etc. So while you have the pid, you don't know what the process was doing at that point. Just perf script output like: postgres 7462 [002] 301125.113632: block:block_rq_issue: 8,0 W 0 () 208078848 + 1024 [postgres] If I add the -g flag to perf record it'll take snapshots of the kernel stack, but doesn't capture user-space state for perf events captured in the kernel. The user-space stack only goes up to the entry-point from userspace, like LWLockRelease, LWLockAcquire, memcpy (mmap'd IO), __GI___libc_write, etc. So. Any tips? Being able to capture a snapshot of the user-space stack in response to kernel events would be ideal.

    Read the article

  • Rails 3 refactoring issue

    - by Craig
    The following view code generates a series of links with totals (as expected): <% @jobs.group_by(&:employer_name).sort.each do |employer, jobs| %> <%= link_to employer, jobs_path() %> <%= "(#{jobs.length})" %> <% end %> However, when I refactor the view's code and move the logic to a helper, the code doesn't work as expect. view: <%= employer_filter(@jobs_clone) %> helper: def employer_filter(jobs) jobs.group_by(&:employer_name).sort.each do |employer,jobs| link_to employer, jobs_path() end end The following output is generated: <Job:0x10342e628>#<Job:0x10342e588>#<Job:0x10342e2e0>Employer A#<Job:0x10342e1c8>Employer B#<Job:0x10342e0d8>Employer C#<Job:0x10342ded0>Employer D# What am I not understanding? At first blush, the code seems to be equivalent.

    Read the article

  • Useful Vim features

    - by Craig H
    Vim is my editor of choice, and I feel I am above average in my use of it. I do recognize, though, that the feature list of vim is huge. With this in mind, I was wondering what features you vim users out there use on a regular basis.

    Read the article

  • Javascript How do I force a string + variable to be evaluated as a variable

    - by Craig Rinde
    Im not even sure how to word this and is probably why I am having trouble finding an answer in google. When the code is run currentCardRow will equal 1 therefore it should be cardSelected1 which is what is shown in the console.log. I need it to go a step further because cardSelected1 is a variable and I need it to evaluate show in the console log as Invitation. Invitation is an example of a variable for cardSelected1. I am not sure on what the correct syntax is to make this happen. var currentCardSelected = "cardSelected" + currentCardRow; Thanks for your help!

    Read the article

  • Regex if-else expression

    - by craig
    I'm trying to extract the # of minutes from a text field using Oracle's REGEXP_SUBSTR() function. Data: Treatment of PC7, PT1 on left. 15 min. 15 minutes. 15 minutes 15 mins. 15 mins 15 min. 15 min 15min 15 In each case, I'm hoping to extract the '15' part of the string. Attempts: \d+ gets all of the numeric values, including the '7' and '1', which is undesirable. (\d)+(?=\ ?min) get the '15' from all rows except the last. (?((\d)+(?=\ ?min))((\d)+(?=\ ?min))|\d+), an if-else statement, doesnt' match anything. What is wrong with my if-else statement?

    Read the article

  • VS2005: two projects doing identical tasks but with different result

    - by Craig Johnston
    In VS2005 I have multi-project solution. Two of the projects use an external set of DLLs to create a report, using report definition data taken from an SQL Server. One of the projects creates the report just fine, but the other project results in an Exception. I have checked that the projects are referencing the same versions of the all the DLLs and they appear to be identical. What could the cause of this problem?

    Read the article

  • DataTable from TextFile?

    - by Craig
    I have taken over an application written by another developer, which reads data from a database, and exports it. The developer used DataTables and DataAdaptors. So, _dataAdapter = new SqlDataAdapter("Select * From C....", myConnection); and then ExtractedData = new DataTable("CreditCards"); _dataAdapter.Fill(ExtractedData); ExtractedData is then passed around to do different functions. I have now been told that I need to, in addition to this, get the same format of data from some comma separated text files. The application does the same processing - it's just getting the data from two sources. So, I am wondering if I can get the data read into a DataTable, as above, and then ADD more records from a CSV file. Is this possible?

    Read the article

  • What is this VB6 method doing?

    - by Craig
    We are converting a VB6 application to C# (4.0). and have come across a method in VB6 that we're battling to understand. Public Sub SaveToField(fldAttach As ADODB.Field) Dim bData() As Byte Dim nSize As Long nSize = Len(m_sEmail) bData = LngToByteArray(nSize) fldAttach.AppendChunk bData If nSize > 0 Then bData = StringToByteArray(m_sEmail) fldAttach.AppendChunk bData End If nSize = Len(m_sName) bData = LngToByteArray(nSize) fldAttach.AppendChunk bData If nSize > 0 Then bData = StringToByteArray(m_sName) fldAttach.AppendChunk bData End If bData = LngToByteArray(m_nContactID) fldAttach.AppendChunk bData End Sub It seems like it's doing some binary file copy type thing, but I'm not quite understanding. Could someone explain so that we can rewrite it?

    Read the article

  • Change query to use a LEFT join

    - by Craig
    I have a query which is failing, as it needs to be using LEFT JOIN, as opposed to the default INNER JOIN used by the 'join' syntax: var users = (from u in this._context.Users join p in this._context.Profiles on u.ProfileID equals p.ID join vw in this._context.vw_Contacts on u.ContactID equals vw.ID orderby u.Code select new { ID = u.ID, profileId = p.ID, u.ContactID, u.Code, u.UserName, vw.FileAs, p.Name, u.LastLogout, u.Inactive, u.Disabled }).ToList(); How would i re-write this so that is utilises a LEFT join?

    Read the article

  • echo POST array.. or other ideas?

    - by gamerzfuse
    Update: As seen in the Original Questions below, I am looking to echo an array. The problem is that when I send the Moneris gateway to return a POST array to my new file (cart.php) it gets a 500 Internal Server Error. This is the same error I received when it send to the script, which should have worked. Is there any reason that it would always send a 500 Internal Server Error? Cart.php Direct Link Craig ORIGINAL QUESTION: Hello there, I am back for another question. Here is my dilemma: I have a script (ImageFolio Commerce) that hasn't been updated on our server since.. probably 2003. The script had a Payment Gateway (Moneris) manually added to it by the company who offers the script. This costs $1000 to get them to add a gateway. I now have a new client who purchased this business from the previous owner. While switching the account to the new owner's Moneris account, we found out that things have been updated. Long story short.. The Moneris gateway can send 3 types of responses: POST with XML Data POST GET I imagine it is easiest to just use the POST array. I have the file that it sends the response to. As of now the file responds with a Internal Server error, but it does process the order. What I want to do is determine what the POST array is that is being sent, so that I can take it and echo it in a logical manner. Is there a way to capture and echo the entire POST? Or can someone suggest a better method of doing this? Thank you, Craig

    Read the article

  • Last week I was presented with a Microsoft MVP award in Virtual Machines – time to thank all who hel

    - by Liam Westley
    MVP in Virtual Machines Last week, on 1st April, I received an e-mail from Microsoft letting me know that I had been presented with a 2010 Microsoft® MVP Award for outstanding contributions in Virtual Machine technical communities during the past year.   It was an honour to be nominated, and is a great reflection on the vibrancy of the UK user group community which made this possible. Virtualisation for developers, not just IT Pros I consider it a special honour as my expertise in virtualisation is as a software developer utilising virtual machines to aid my software development, rather than an IT Pro who manages data centre and network infrastructure.  I’ve been on a minor mission over the past few years to enthuse developers in a topic usually seen as only for network admins, but which can make their life a whole lot easier once understood properly. Continuous learning is fun In 1676, the scientist Isaac Newton, in a letter to Robert Hooke used the phrase (http://www.phrases.org.uk/meanings/268025.html) ‘If I have seen a little further it is by standing on the shoulders of Giants’ I’m a nuclear physicist by education, so I am more than comfortable that any knowledge I have is based on the work of others.  Although far from a science, software development and IT is equally built upon the work of others. It’s one of the reasons I despise software patents. So in that sense this MVP award is a result of all the great minds that have provided virtualisation solutions for me to talk about.  I hope that I have always acknowledged those whose work I have used when blogging or giving presentations, and that I have executed my responsibility to share any knowledge gained as widely as possible. Thanks to all those who helped – a big thanks to the UK user group community I reckon this journey started in 2003 when I started attending a user group called the London .Net Users Group (http://www.dnug.org.uk) started by a nice chap called Ian Cooper. The great thing about Ian was that he always encouraged non professional speakers to take the stage at the user group, and my first ever presentation was on 30th September 2003; SQL Server CE 2.0 and the.NET Compact Framework. In 2005 Ian Cooper was on the committee for the first DeveloperDeveloperDeveloper! day, the free community conference held at Microsoft’s UK HQ in Thames Valley park in Reading.  He encouraged me to take part and so on 14th May 2005 I presented a talk previously given to the London .Net User Group on Simplifying access to multiple DB providers in .NET.  From that point on I definitely had the bug; presenting at DDD2, DDD3, groking at DDD4 and SQLBits I and after a break, DDD7, DDD Scotland and DDD8.  What definitely made me keen was the encouragement and infectious enthusiasm of some of the other DDD organisers; Craig Murphy, Barry Dorrans, Phil Winstanley and Colin Mackay. During the first few DDD events I met the Dave McMahon and Richard Costall from NxtGenUG who made it easy to start presenting at their user groups.  Along the way I’ve met a load of great user group organisers; Guy Smith-Ferrier of the .Net Developer Network, Jimmy Skowronski of GL.Net and the double act of Ray Booysen and Gavin Osborn behind what was Vista Squad and is now Edge UG. Final thanks to those who suggested virtualisation as a topic ... Final thanks have to go the people who inspired me to create my Virtualisation for Developers talk.  Toby Henderson (@holytshirt) ensured I took notice of Sun’s VirtualBox, Peter Ibbotson for being a fine sounding board at the Kew Railway over quite a few Adnam’s Broadside and to Guy Smith-Ferrier for allowing his user group to be the guinea pigs for the talk before it was seen at DDD7.  Thanks to all of you I now know much more about virtualisation than I would have thought possible and it continues to be great fun. Conclusion If this was an academy award acceptance speech I would have been cut off after the first few paragraphs, so well done if you made it this far.  I’ll be doing my best to do justice to the MVP award and the UK community.  I’m fortunate in having a new employer who considers presenting at user groups as a good thing, so don’t expect me to stop any time soon. If you’ve never seen me in action, then you can view the original DDD7 Virtualisation for Developers presentation (filmed by the Microsoft Channel 9 team) as part of the full DDD7 video list here, http://www.craigmurphy.com/blog/?p=1591.  Also thanks to Craig Murphy’s fine video work you can also view my latest DDD8 presentation on Commercial Software Development, here, http://vimeo.com/9216563 P.S. If I’ve missed anyone out, do feel free to lambast me in comments, it’s your duty.

    Read the article

  • Mobile: Wrox Cross Platform Mobile Development - iPhone, iPad, Android, and everything with .NET & C#

    - by Wallym
    Wrox has produced a bundle of their 3 best selling mobile development books and it is available as of Today (March 16). A bundle of 3 best-selling and respected mobile development e-books from Wrox form a complete library on the key tools and techniques for developing apps across the hottest platforms including Android and iOS. This collection includes the full content of these three books, at a special price: Professional Android Programming with Mono for Android and .NET/C#, ISBN: 9781118026434, by Wallace B. McClure, Nathan Blevins, John J. Croft, IV, Jonathan Dick, and Chris Hardy Professional iPhone Programming with MonoTouch and .NET/C#, ISBN: 9780470637821, by Wallace B. McClure, Rory Blyth, Craig Dunn, Chris Hardy, and Martin Bowling Professional Cross-Platform Mobile Development in C#, ISBN: 9781118157701, by Scott Olson, John Hunter, Ben Horgen, and Kenny Goers Remember, go buy 8-10 copies of the 3 book set for the ones you love. They will make great and romantic gifts!!

    Read the article

  • when to use a scaled/enterprise agile software development framework and when to let agile processes 'emerge'?

    - by SHC
    There are quite a few enterprise agile software development frameworks available: Scott Ambler: Disciplined Agile Delivery Dean Leffingwell: Scaled Agile Framework Alan Shalloway: Enterprise Agile Book Craig Larman: Scaling Lean and Agile Barry Boehm: Balancing Agility and Discipline Brian Wernham: Agile Project Management in Government - DSDM I've also spoken with people that state that your enterprise agile processes should just 'emerge' and that you shouldn't need or use a framework because they constrain you. Question 1: When should one choose an enterprise agile software development framework, and when should one just let their agile processes 'emerge'. Question 2: If choosing an enterprise agile software development framework, how does one select the appropriate framework to use for their organisation? Please provide evidence of your experience or research when answering questions rather than just presenting opinions.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20  | Next Page >