Daily Archives

Articles indexed Wednesday June 2 2010

Page 2/120 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to make a derived UITableVIew work

    - by justinhj
    I've made a new class in my Xcode project which is derived from UITableView I then drag a UITableView from in the interface builder onto my view and change the class of the object to my derived class. Then I drag the outlet from the table to the files owner and hook it up to an outlet variable in my main view, which is of the same type as my derived class. How do I also set up the datasource and delegate so that they belong to the derived class?

    Read the article

  • How can I use Amazon's API in PHP to search for books?

    - by TerranRich
    I'm working on a Facebook app for book sharing, reviewing, and recommendations. I've scoured the web, searched Google using every search phrase I could think of, but I could not find any tutorials on how to access the Amazon.com API for book information. I signed up for an AWS account, but even the tutorials on their website didn't help me one bit. They're all geared toward using cloud computing for file storage and processing, but that's not what I want. I just want to access their API to search info on books. Kind of like how http://openlibrary.org/ does it, where it's a simple URL call to get information on a book (but their databases aren't nearly as populated as Amazon's). Why is it so damned hard to find the information I need on Amazon's AWS site? If anybody could help, I would greatly appreciate it.

    Read the article

  • String trouble in Rave Reports 8

    - by Jørn E. Angeltveit
    We are currently working with Delphi 2006, but we are now very ready to move on to Delphi 2010. The problem lies in our Rave reports, though... We just get to many string errors when running our reports with Rave 8. And they just don't make any sense. (The reports compile with no error, and we can even run them without any error in Rave 6.) For instance: //This event causes access violation (in rtl14.bpl) at run time { Event for Page1.OnBeforeReport } function Page1_OnBeforeReport(Self: TRavePage); var s: String; begin s := 'My text in param'; s := s + ' and som more text'; s := copy(s,1,length(s)) + ' and then some more'; RaveProject.SetParam('MyTestParam', s); end OnBeforeReport; //This event works OK { Event for Page1.OnBeforeReport } function Page1_OnBeforeReport(Self: TRavePage); var s: String; begin s := 'My text in param'; s := s + ' and som more text'; s := copy(s,1,length(s)); // + ' and then some more'; RaveProject.SetParam('MyTestParam', s); end OnBeforeReport; //This event works OK too { Event for Page1.OnBeforeReport } function Page1_OnBeforeReport(Self: TRavePage); var s: String; begin s := 'My text in param'; s := s + ' and som more text'; s := copy(s,1,length(s)) + s; RaveProject.SetParam('MyTestParam', s); end OnBeforeReport; We really want to stick to Rave, because we have a lot of reports (150+) with a lot of functionality (sql statements, events etc). Besides, we have customers who have designed their own custom reports as well. Does anybody know the reason for these errors? Is there any solution or workaround to these problems?

    Read the article

  • Checking if an object has been released before sending a message to it

    - by Tom Irving
    I've only recently noticed a crash in one of my apps when an object tried to message its delegate and the delegate had already been released. At the moment, just before calling any delegate methods, I run this check: if (delegate && [delegate respondsToSelector:...]){ [delegate ...]; } But obviously this doesn't account for if the delegate isn't nil, but has been deallocated. Besides setting the object's delegate to nil in the delegate's dealloc method, is there a way to check if the delegate has already been released just incase I no longer have a reference to the object.

    Read the article

  • Field specific errors for ETL

    - by AaronLS
    I am creating a ETL process in MS SQL Server and I would like to have errors specific to a particular column of a particular row. For example, the data is initially loaded from excel files into a table(we'll call the Initial table) where all columns are varchar(2000) and then I stage the data to another table(the DataTypedTable) that contains more specific data types (datetime,int, etc.) or more tightly constrained varchar lengths. I need to be able to create error messages for a specific field such as: "Jan. 13th" is not a valid date format for the submission date. Please use a format of MM/DD/YYYY These error messages would need to be stored in some way such that later in the process a automated process can create reports with the error messages such that each message references a specific row and field(someone will need to go back and correct the data in the source system and resubmit the excel file). So ideally it would be inserted into a Failures tables of some sort and contain the primary key of the failed row, the column name, and the error message. Question: So I am wondering if this can be accomplished with SSIS, or some open source tool like Talend, and if so, what would be your general approach? Or what hand coded approach you would take? Couple approaches I've thought of using SQL(up until no I have done ETL by hand in SQL procs, but I want to consider other approaches. Possible C# even.): Use a cursor to read through the Initial table, and for each row insert a blank record with only the primary key into the DataTyped table, then use a single update statement for each column, such that if that update fails I can insert a very specific error message specific to that column in the error messages table. Insert all the data as is into the DataTyped table, but have duplicate columns like SubmissionDate and SubmissionDateOld. After the initial insert the *Old columns have data, the rest are blank, and I have a single update for each column that sets the SubmissionDate based on the SubmissionDateOld. In addition to suggesting an approach, I'd like to know if you are using that approach or something similar already in the work you do.

    Read the article

  • Duplicate Symbol Linker Error (C++ help)

    - by Vash265
    Hi. I'm learning some CSP (constraint satisfaction) theory stuff right now, and am using this library to parse XML files. I'm using Xcode as an IDE. My program compiles fine, but when it goes to link the files, I get a duplicate symbol error with the XMLParser_libxml2.hh file. My files are separated as such: A class header file that includes the XMLParser file above A class implementation file that include the class header file A main file that includes the class header file The duplicate symbol is occurring in main.o and classfile.o, but as far as I can tell, I'm not actually adding that .hh file twice. Full error: ld: duplicate symbol bool CSPXMLParser::UTF8String::to<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) constin /Users/vash265/CSP/Untitled/build/Untitled.build/Debug/Untitled.build/Objects-normal/x86_64/dStructFill.o and /Users/vash265/CSP/Untitled/build/Untitled.build/Debug/Untitled.build/Objects-normal/x86_64/main.o Copying the implementation of the class into the main file and taking the class implementation file out of the compilation target alleviates the error, but it's a disorganized mess this way, and I'll be adding more classes very soon (and it would be nice to have them in separate files). As I've come to understand it, this is caused by the file (XMLParser_libxml2.hh) having both the class and function definition and implementation in one file (and it seems as though this might have been necessary due to the use of templates in that 'header' file). Any ideas on how to get around sticking all my class files in my main.cpp? (I've tried ifdefs, they don't work).

    Read the article

  • Is unobtrusive RJS files in Rails 3 considered a good idea?

    - by midas06
    I'm working on implementing javascript functionality in my rails 3 app. Now that rjs is supposedly unobtrusive (I honestly don't know a lot about rjs), is it still "evil"? It seems to me the downside may be a lack of testability, but partial page updates via rjs seem to be easier than jumping through the rails hurdles to make ajax requests via jquery. Thoughts? Examples?

    Read the article

  • No DocBrokers are configured

    - by Ananth
    I get this error while trying to access documentum through webtop. "An error has occurred. [DM_DOCBROKER_E_NO_DOCBROKERS]error: "No DocBrokers are configured". Iam trying to access documentum for the first time. Any help ?

    Read the article

  • A little tidbit on Team Build 2010 and error MSB3147

    - by Enrique Lima
    The problem? Performing a build on a ClickOnce solution would not be successful due to the setup.bin not being located. Ok, now what? Researched from corner to corner, install, re-install, update.  Found some interesting posts to fix the issue, but most of them were focused on Team Foundation Server/Team Build 2008, and some other on 2005.  The other interesting tidbit was the frequent indication to modify the registry to help Team Build find the bootstrapper. Background info:  This was a migration I posted about a few days ago, a 32 bit TFS implementation to a full 64 bit TFS implementation.  Now, the project has binaries and dependencies on X86 (This piece of information became essential to moving from a failed build to a successful build). So, what’s the fix? The trick in this case was to go back into the Build Type and check the properties/configuration.  Upon further investigation, I found the following:  Once you Edit the Build Definition, then select Process, expand 3. Advanced and look for MSBuild Platform, switch from Auto to X86.  Ran the Build, and success!

    Read the article

  • Random MongoDb Syntax: Updates

    - by Liam McLennan
    I have a MongoDb collection called tweets. Each document has a property system_classification. If the value of system_classification is ‘+’ I want to change it to ‘positive’. For a regular relational database the query would be: update tweets set system_classification = 'positive' where system_classification = '+' the MongoDb equivalent is: db.tweets.update({system_classification: '+'}, {$set: {system_classification:'positive'}}, false, true) Parameter Description { system_classification: '+' } the first parameter identifies the documents to select { $set: { system_classification: 'positive' } } the second parameter is an operation ($set) and the parameter to that operation {system_classification: ‘positive’} false the third parameter indicates if this is a regular update or an upsert (true for upsert) true the final parameter indicates if the operation should be applied to all selected documents (or just the first)

    Read the article

  • Problem installing Ubuntu 10.04 64 bit side by side with Vista by using a bootable USB drive. What n

    - by Adam Siddhi
    What happened I decided to install Ubuntu 10.04 64 bit side by side with Vista Home Premium (I guess on another partition) with a USB stick. I found instructions on how to do this here: https://help.ubuntu.com/community/Installation/FromUSBStick To create the bootable USB drive I had to download a program called Unetbootin. That process was simple enough. All I had to do was just choose the disk image option, select the ubuntu-10.04-desktop-amd64.iso image, make sure it recognizes my USB drive and then press OK. It takes only like a few minutes to create a working bootable USB drive. Then I have to restart my computer, enter the BIOS, select my USB drive as the first boot drive, save options and continue with booting up. After this Ubuntu actually loads up. I think this is known as the Live version of Ubuntu so you can try it out before fully installing it. Any ways, on the Ubuntu 10.04 desktop I saw an installer. I click it and begin the installation process. Just so you know, I tried installing it 2 times. I will explain what happened each time: The first time I tried installing Ubuntu 10.04 I got stuck at step 4 of 7. I remember selecting the last option in the window which was Specify Partitions Manually (Advanced) I made my partition for Ubuntu like 52 gigs. I clicked forward and a little pop up window appeared saying Please Wait. So the installation process stalled on this window so I closed out of it and quit the installation process. So at this point I was worried because I had already selected the partition size and assumed it started making it. Since it stalled I had to quit out though. Anyways, once again I reached step 4 of 7 a decided to select the first option which is Install them side by side choosing between them each startup. I figured this was the safe way to go. I did that and the pop up window saying Please Wait popped up again but lasted only like 10 seconds. Then I got to I guess step 6 where it asks you to enter your desired name and password. Did that and clicked forward. The Ubuntu 10.04 installation load screen appeared and the loading bar at the bottom started filling up. So I got to 83% and stalled during the Importing other profile information (I think it was called this. I had the option to do this during I think step 6) process. So at this point I decided to get stop the installation process. I was getting very nervous. I tried to restart the computer but all that happened was that Ubuntu restarted. I finally got the computer to restart. I was pretty sure I had screwed something up big time by this point. As my computer was restarting I entered BIOS again and switched back to it booting from my main hard drive containing Vista. Saved it and continued the boot process. My worst fears were confirmed as Vista would not boot up. I mean I saw the little Microsoft Windows choppy animated green loading bar at the bottom of the screen and then boom! It decided to restart. When it restarted I had the option to run a memory test check to see if there was anything that needed to be repaired. That took like 20 minutes and at the end I saw that I did indeed have to repair something. I had to go through 2 repair processes. After each I had to restart the computer. The 2nd time it went through the repair process it said that it could not fully repair the damage. I was scared and restarted but Vista did load up. I got to my desktop and saw a message saying something like Repairs have been made, Please restart for changes to take effect I noticed that some Notification icons were missing and I could not hear volume in a video. Things were a bit funky. So I did restart and here I am. Now what?! So since I got back into Vista and thankfully have a working Internet connection I am trying to find answers to my problem (that is why I am writing this post). I am scared that I have partioned my hard drive 2 times after researching Installing Ubuntu 10.04 and seeing this post http://techie-buzz.com/foss/ubuntu-10-04-lts-installation-guide.html The author shows screen shots of installing Ubuntu 10.04. He shows the image of step 4 of 7 with a caption at the bottom. I will recreate it below: Select a partitioning option. Unless you want to format all the hard drive and install Ubuntu afresh, select the last option and proceed. Questions If I have indeed partitioned my HD 2 times (which I am sure it is), how do I get to a point where I can see all my bad, unfinished Ubuntu partitions and get rid of them? How do I clean this big mess up? & How can I ensure that this mess will not happen next time I try installing Ubuntu 10.04? Thank you Adam

    Read the article

  • Repository organization for Hadoop project

    - by Alex N.
    I am starting on a new Hadoop project that will have multiple hadoop jobs(and hence multiple jar files). Using mercurial for source control, I was wondering what would be optimal way of organizing the repository structure? Should each job live in separate repo or would it be more efficient to keep them in the same, but break down into folders?

    Read the article

  • VB6 Printer Page Size Problem

    - by mRt
    I am trying to set a custom paper size by doing: Printer.Height = 2160 Printer.Width = 11900 But it doesn't seen to have any effect. After setting this up, i ask for that values and it returns the default ones. And this: Printer.PaperSize = 256 Returns an error... Any ideas??

    Read the article

  • Finding the last focused element with jQuery.

    - by Joshua Cody
    I'm looking to determine which element had the last focus in a series of inputs, that are added dynamically by the user. This code can only get the inputs that are available on page load: $('input.item').focus(function(){ $(this).siblings('ul').slideDown(); }); And this code sees all elements that have ever had focus: $('input.item').live('focus', function(){ $(this).siblings('ul').slideDown(); }); The HTML structure is this: <ul> <li><input class="item" name="goals[]"> <ul> <li>long list here</li> <li>long list here</li> <li>long list here</li> </ul></li> </ul> <a href="#" id="add">Add another</a> On page load, a single input loads. Then with each add another, a new copy of the top unordered list's contents are made and appended. And when each gets focus, I'd like to show the list beneath it. But I don't seem to be able to "watch for the most recently focused element, which exists now or in the future." Do I have some sort of fundamental assumption wrong?

    Read the article

  • How to update a table row with save button using .ajax

    - by Randall
    I have a table which has one row and only one cell will be editable. I have accomplished this with the following code. $("td#effEndDate").click(function() { if (!$(this).hasClass("edit")) { var value = jQuery.trim($(this).html()); $(this).html("<input id=\"txtEdit\" type=\"text\" value=\"" + value + "\" />"); $(this).addClass("edit"); $("#txtEdit").focus(); } }); Now this is the part where i'm stuck. After the field is updated a save button must be clicked to call the proper .ajax method to update the database. But how can I compare the previous value to the current value on a button press? Since i'm not using the onblur property where I could have saved the old value and passed it to the update function.

    Read the article

  • CryptographicException: Unknown Error '80007005'. when calling RSACryptoServiceProvider.Decrypt() in

    - by zensunnit
    Hello, I am trying to use the RSACryptoServiceProvider to encrypt/decrypt. Encrypting works fine, but the Decrypt method() throws an exception with the message: Unknown Error '80007005'. This is the code: Byte[] plainData = encoding.GetBytes(plainText); Byte[] encryptedData; RSAParameters rsap1; Byte[] decryptedData; using (RSACryptoServiceProvider rsa1 = new RSACryptoServiceProvider()) { encryptedData = rsa1.Encrypt(plainData, false); rsap1 = rsa1.ExportParameters(false); } using (RSACryptoServiceProvider rsa2 = new RSACryptoServiceProvider()) { rsa2.ImportParameters(rsap1); decryptedData = rsa2.Decrypt(encryptedData, false); } decryptedText = encoding.GetString(decryptedData, 0, decryptedData.Length); Is anyone aware of a workaround? Thanks!

    Read the article

  • Personal Cache vs Memcache?

    - by Kerry
    I have a personal caching class, which can be seen here ( based off WordPress' ): http://pastie.org/988427 I recently learned about memcache and it said to memcache EVERYTHING: http://highscalability.com/blog/2010/5/17/7-lessons-learned-while-building-reddit-to-270-million-page.html My first thought was just to keep my class with the current functions and make it use memcache instead -- is there any downside to doing this? The main difference I see is that memcache stays on with the server from page to page, while mine is for 1 page load. The problem I see arising, and this is with any system, is that they're dynamic. They change all the time. Whether its search results, visible products, etc. etc. If it's all cached, won't the create a problem? Is there a way to handle this? Obviously if something is bringing back the same results everytime it would be cached, but that's why I was doing it on a per page load basis. I'm sure there is a way to handle this, or is the cache time usually set between 5 minutes and an hour?

    Read the article

  • set label value in vb.net

    - by julio
    Hi-- I'm usually a PHP guy but got stuck doing a project in vb.net. I have a query (sqldatasource) that returns a single value (the last update date). I want to use a label to say something like "Last updated: " < Label = (returned value) In PHP this would be simple. In vb.net, all I can find are endless badly written code behinds showing how you'd execute the query onLoad then bind it to the label. Is this really the only way to do this? It seems like a ridiculously simple problem to have such a long solution. I have used a datagrid control to just bind the query result directly, but it prints the column name as well as the date, so it's not ideal. Any ideas?

    Read the article

  • How to view history of Yum commands (update, install, remove)?

    - by Chris
    I'm seeing some errors in my apache logs and they may (or may not) be related to some packages that I recently installed/removed using Yum. Is there a way to view the history of Yum packages that have been updated/installed/removed ? I could use the "history" command from unix, but some installations may have been done with different accounts. I've tried searching the web and reading the man page too but haven't found anything.

    Read the article

  • Need some sort of "conditional grouping" in MySQL.

    - by serg555
    I have Article table: id | type | date ----------------------- 1 | A | 2010-01-01 2 | A | 2010-01-01 3 | B | 2010-01-01 Field type can be A, B or C. I need to run a report that would return how many articles of each type there is per every day, like this: date | count(type="A") | count(type="B") | count(type="C") ----------------------------------------------------- 2010-01-01 | 2 | 1 | 0 2010-01-02 | 5 | 6 | 7 Currently I am running 3 queries for every type and then manually merging the results select date, count(id) from article where type="A" group by date Is it possible to do this in one query? (in pure sql, no stored procedures or anything like that). Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >