Search Results

Search found 60 results on 3 pages for 'collin peters'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Object created in Interface Builder getting dealloc'ed too soon

    - by Collin Allen
    The Project I'm working on a relatively simple iPhone OS project that's navigation controller based, with a root table view and a detail table view. Tap an item in the main list to see its details in a pushed table view. The Setup I broke out the data source for both views into their own objects so as not to muddy the purpose of a view controller. Having done this, the table views no longer have data sources since those methods are now in separate files, so I created an instance of each data source class in the appropriate XIB files with the Object item (dragged it in, then set its class). Then, to actually connect the tableviews to their data sources, I set the dataSource outlet of each tableview to the yellow data source object in Interface Builder. The table view delegates are still set to their view controllers. The Problem The root table view works just fine, but when you tap a row to push to the detail view, the data source object gets instantiated as expected, then immediately dealloc'ed, causing a crash (numberOfSectionsInTableView: gets called on the freed object). I can't figure out why the data source is getting automatically dealloc-ed when I need it right then and there for the detail view, as indicated by my data source object creation and tableview connection in Interface Builder. What's more perplexing is that the very approach works fine for the root tableview! The Question Is there anything obvious I'm missing that would cause this to happen? Or, is this even the right way to instantiate a data source for a table view controller? It seems like poor object oriented programming to do it from within the view controller, which should only be concerned with the view. I could cram everything in two table view controller classes and it would probably work, but it would not be as modular as I'd like. Thanks!

    Read the article

  • Login Website, curious Cookie Problem

    - by Collin Peters
    Hello, Language: C# Development Environment: Visual Studio 2008 Sorry if the english is not perfect. I want to login to a Website and get some Data from there. My Problem is that the Cookies does not work. Everytime the Website says that I should activate Cookies but i activated the Cookies trough a Cookiecontainer. I sniffed the traffic serveral times for the login progress and I see no problem there. I tried different methods to login and I have searched if someone else have this Problem but no results... Login Page is: "www.uploaded.to", Here is my Code to Login in Short Form: private void login() { //Global CookieContainer for all the Cookies CookieContainer _cookieContainer = new CookieContainer(); //First Login to the Website HttpWebRequest _request1 = (HttpWebRequest)WebRequest.Create("http://uploaded.to/login"); _request1.Method = "POST"; _request1.CookieContainer = _cookieContainer; string _postData = "email=XXXXX&password=XXXXX"; byte[] _byteArray = Encoding.UTF8.GetBytes(_postData); Stream _reqStream = _request1.GetRequestStream(); _reqStream.Write(_byteArray, 0, _byteArray.Length); _reqStream.Close(); HttpWebResponse _response1 = (HttpWebResponse)_request1.GetResponse(); _response1.Close(); //######################## //Follow the Link from Request1 HttpWebRequest _request2 = (HttpWebRequest)WebRequest.Create("http://uploaded.to/login?coo=1"); _request2.Method = "GET"; _request2.CookieContainer = _cookieContainer; HttpWebResponse _response2 = (HttpWebResponse)_request2.GetResponse(); _response2.Close(); //####################### //Get the Data from the Page after Login HttpWebRequest _request3 = (HttpWebRequest)WebRequest.Create("http://uploaded.to/home"); _request3.Method = "GET"; _request3.CookieContainer = _cookieContainer; HttpWebResponse _response3 = (HttpWebResponse)_request3.GetResponse(); _response3.Close(); } I'm stuck at this problem since many weeks and i found no solution that works, please help...

    Read the article

  • Where do Java Applets live?

    - by Wendi Peters
    I'm trying to figure out where java Applets that I run from the browser live. I'm using Firefox 3.0 on Windows XP with Java 1.6 if that makes any difference. From the Java Control Panel on the toolbar, I can access "Temporary Internet Files - Settings" to find the Java cache. From there I can show the resources and see a file called "dws2010066.dat". Does this resource correspond to a file on disk? I did a search in the Java cache/my whole computer and came up empty handed.

    Read the article

  • Jquery, "$.each(", function returns error in IE. 'Length' is null or not an object

    - by Collin Estes
    My code is working fine in FireFox but my users are restricted to IE. I'm getting an error though in IE, related to my JQUERY function. populateTable:function(returnList) { var self = this; var eat = $.evalJSON(returnList.firstChild.textContent) $.each(eat,function() { $("<tr><td>" + this.reportId + "</td><td>" + this.description + "</td><td>" + this.drawingNumber + "<td></tr>").insertAfter(self.tblResults[0].childNodes[1]); }) } IE is erring on the $.each with the message below: 'Length' is null or not an object Any ideas or maybe a workaround for the $.each function? Update: returnList is an XML document object from an Ajax call. I'm trying to retrieve the JSON object string located within the XML tag.

    Read the article

  • Must web apps support back button?

    - by Patrick Peters
    I did a system test on a new ASP.NET app. I encountered several exceptions when using the BACK button in my browser (IE 7). I stated in a review-record that the web-app must support the use of a BACK button (or at least handle it gracefully with for example session-time out warnings). The teamlead did not agree with me as he stated that a web-app should not support working with the back-button by default. Do you agree?

    Read the article

  • LINQ TO SQL error: An attempt has been made to Attach or Add an entity that is not new...

    - by Collin Estes
    "An attempt has been made to Attach or Add an entity that is not new, perhaps having been loaded from another DataContext. This is not supported." I have scene a lot of solutions dealing with the Attach() method but I'm just trying to add in a new record. Not sure what is going on. Here is my code, It is failing on the star'd line.: try { LINQDataContext datacontext = new LINQDataContext(); TrackableItem ti = datacontext.TrackableItems.FirstOrDefault(_t => _t.pkId == obj.fkTrackableItemId); arcTrackableItem ati = new arcTrackableItem(); ati.barcode = ti.barcode; ati.dashNumber = ti.dashNumber; ati.dateDown = ti.dateDown; ati.dateUp = ti.dateUp; ati.fkItemStatusId = ti.fkItemStatusId; ati.fkItemTypeId = ti.fkItemTypeId; ati.partNumber = ti.partNumber; ati.serialNumber = ti.serialNumber; ati.archiveDate = DateTime.Now; datacontext.arcTrackableItems.InsertOnSubmit(ati); datacontext.SubmitChanges(); arcPWR aItem = new arcPWR(); aItem.comments = obj.comments; aItem.fkTrackableItemId = ati.pkId; aItem.fkPWRStatusId = obj.fkPWRStatusId; aItem.PwrStatus = obj.PwrStatus; **datacontext.arcPWRs.InsertOnSubmit(aItem);** datacontext.SubmitChanges();

    Read the article

  • How do you encrypt parts of a file separately using pgp?

    - by Collin Anderson
    I would like to encrypt credit card numbers on a web server as they come in using PGP. I would then like to be able to export all of the credit card numbers and other information in one file that can be easily decrypted using standard PGP software. Is it possible to take the encrypted credit card numbers and join them with other encrypted data and be able to decrypt the entire file? Basically is this true? D(E(x) + E(y)) = x + y Where '+' means string concatenation.

    Read the article

  • C#'s equivalent to VB.Net's DirectCast?

    - by Collin Sauve
    This has probably been asked before, but if it has, I can't find it. Does C# have an equivalent to VB.Net's DirectCast? I am aware that it has () casts and the 'as' keyword, but those line up to CType and TryCast. To be clear, these keywords do the following; CType/() casts: If it is already the correct type, cast it, otherwise look for a type converter and invoke it. If no type converter is found, throw an InvalidCastException. TryCast/"as" keyword: If it is the correct type, cast it, otherwise return null. DirectCast: If it is the correct type, cast it, otherwise throw an InvalidCastException. EDIT: After I have spelled out the above, some people have still responded that () is equivalent, so I will expand further upon why this is not true. DirectCast only allows for either Narrowing or Widening conversions on inheritance tree, it does not support conversions across different branches like () does. ie: C#, this compiles and runs: //This code uses a type converter to go across an inheritance tree double d = 10; int i = (int)d; VB.Net, this does NOT COMPILE 'Direct cast can only go up or down a branch, never across to a different one. Dim d as Double= 10 Dim i as Integer = DirectCast(d, Integer) The equivalent in VB.Net to my C# code is CType: 'This compiles and runs Dim d as Double= 10 Dim i as Integer = CType(d, Integer) (Edit again, I was originally using strings, I changed it to double... sorry)

    Read the article

  • Issue with UITextView in an animation block

    - by collin
    I'm having an issue with a UITextView inside another UIView whose frame is manipulated in an animation block when the keyboard displays. During the animation block the UIView scales beautifully and as expected, but the UITextView jumps out of it's superview(the UIView being animated) at the start of the animation. By the end of the animation, the UITextView ends up in the right place... what gives? Can anybody explain why the UITextView is jumping out of it's container view at the start of the animation? Thanks in advance.

    Read the article

  • An attempt has been made to Attach or Add an entity that is not new Linq to Sql error

    - by Collin Oconnor
    I have a save function for my order entity that looks like this and it breaks on the sumbmitChanges line: public void SaveOrder ( Order order ) { if (order.OrderId == 0) orderTable.InsertOnSubmit(order); else if (orderTable.GetOriginalEntityState(order) == null) { orderTable.Attach(order); orderTable.Context.Refresh(RefreshMode.KeepCurrentValues , order); } orderTable.Context.SubmitChanges(); } The order entity contains two other entities; an Address entity and a credit card entity. Now i want these two entities to be null sometimes. Now my guess for why this is throwing an error is because that both of these entites that are inside order are null. If this is the case, How can I insert an new order into the database with both entities (Address and creditCard) being null.

    Read the article

  • Creating a VS 2010 Project with only content files.

    - by Cameron Peters
    I have some content files that I would like to share between a number of projects in Visual Studio. I have put these files in their own project, set the build action to "Content", and the copy to output directory to "Copy if newer". I would like all these files to be copied to the bin/debug directory of the projects that reference them. I can get it to work by including a reference to the "contents" project in each of the projects that need the files, but that requires that a minimal assembly be generated (3K). I assume there is a way, using MSBuild, to make this all work without creating the empty assembly?

    Read the article

  • JUnit test failing - complaining of missing data that was just inserted

    - by Collin Peters
    I have an extremely odd problem in my JUnit tests that I just can't seem to nail down. I have a multi-module java webapp project with a fairly standard structure (DAO's, service clasess, etc...). Within this project I have a 'core' project which contains some abstracted setup code which inserts a test user along with the necessary items for a user (in this case an 'enterprise', so a user must belong to an enterprise and this is enforced at the database level) Fairly simple so far... but here is where the strangeness begins some tests fail to run and throw a database exception where it complains that a user cannot be inserted because an enterprise does not exist. But it just created the enterprise in the preceding line of code! And there was no errors in the insertion of the enterprise. Stranger yet, if this test class is run by itself everything works fine. It is only when the test is run as part of the project that it fails! And the exact same abstracted code was run by 10+ tests before the one that fails! f I have been banging my head against a wall with this for days and haven't really made any progress. I'm not even sure what information to offer up to help diagnose this. Using JUnit 4.4, Spring 2.5.6, iBatis 2.3.0, Postgresql 8.3 Switching to org.springframework.jdbc.datasource.DriverManagerDataSource from org.apache.commons.dbcp.BasicDataSource changed the problem. Using DriverManagerDataSource the tests work for the first time, but now all of a sudden a lot of data isn't rolled back in the database! It leaves everything behind. All with no errors Tests fail when run via Eclipse & Maven Please ask for any info which may help me solve my problem!

    Read the article

  • No Cookies at second Webrequest

    - by Collin Peters
    Hello, I write a little Tool in C# with Visual Studio 2008. My Problem: I login to a website by HTTP-webrequest, I get an authentification cookie, thats all ok. Than I make a new HTTP-webrequest and add the cookies from the first request to call the next page where i can see my personal data. I see that the cookies will associated with the second request if I debug it but if I check the network traffic I see that are no Cookies transmitted at the second request. I tried many possibilities to see why i dont work but i found nothing. Does somebody have the same problem or know a solution? (Sorry for bad english)

    Read the article

  • Configuring Warden for use in RSpec controller specs

    - by Chris Peters
    I was able to use Devise's sign_in method to log in a user in my controller specs. But now that I'm removing Devise from my application, I'm not quite sure how to get similar functionality working with just Warden on its own. How should I go about setting up spec/spec_helper.rb and related spec/support/*.rb files to get Warden running within controller specs sufficiently? I've tried setting up a file at spec/support/warden.rb with these contents: RSpec.configure do |config| config.include Warden::Test::Helpers config.after do Warden.test_reset! end end Then I have before calls similar to this to authenticate a user factory: before { login_as FactoryGirl.create(:user) } But here is the error that I keep seeing: NameError: undefined method `user' for nil:NilClass This error traces back to my authenticate_user! method in the controller: def authenticate_user! redirect_to login_path, notice: "You need to sign in or sign up before continuing." if env['warden'].user.nil? end I'd appreciate any guidance that anyone could provide.

    Read the article

  • Where do Java Applets live?

    - by Wendy Peters
    I'm trying to figure out where java Applets that I run from the browser get downloaded to. I'm using Firefox 3.0 on Windows XP with Java 1.6 if that makes any difference. From the Java Control Panel on the toolbar, I can access "Temporary Internet Files - Settings" to find the Java cache. From there I can show the resources and see a file called "dws2010066.dat". Does this resource correspond to a file on disk? I did a search in the Java cache (and my whole computer) but came up empty handed.

    Read the article

  • iPhone FTP Connection

    - by collin
    I am working on an iPhone app for a client that needs to be able to manipulate directories on an arbitrary FTP server. Does anybody know of any FTP libraries, frameworks, sample code that can remove directories from an FTP server? NOTE I have thoroughly researched CFFTP and the SimpleFTP Sample code provided by Apple and it only supports half of the FTP protocol(I don't know why there is only half of the implementation).

    Read the article

  • I'm graduating with a Computer Science degree but I don't feel like I know how to program.

    - by Wendy Peters
    I'm graduating with a Computer Science degree but I see websites like Stackoverflow and search engines like Google and don't know where I'd even begin to write something like that. During one summer I worked as a iPhone developer, but I felt like I was mostly gluing together libraries that other people had written with little understanding of what's happening underneath the hood. I'm trying to improve my knowledge by studying algorithms, but it is a long and painful process. I find algorithms difficult and at the rate I am working through my book it will a decade will have passed before I will finish. Given my current situation, I've spent a month looking for work but my skills (C, Python, Objective-C) are not so desirable in the local market, where C#, Java, and web development are much higher in demand. My GPA is ok (3.0) but it's not high enough to apply to the large companies or return for graduate studies and I don't have a good network of friends. Basically I'm graduating with a Computer Science degree but I don't feel like I know how to program. I thought that joining a company and programming full-time would give me a chance to develop my skills and learn from those more experienced than myself, but I'm struggling to find work and am starting to get really frustrated. I am going to cast my net wider and look beyond the city I've grown up in, but what have other people in similar situation tried to do?

    Read the article

  • Escaping if/else in Jade template

    - by Collin Estes
    So I have a simply block of html in my jade template with a loop: each dude, i in dudes div(class='someClass') div.otherStuff span.someContent #{name} I want to apply a data attribute to my top most div when a certain looping condition is met, in this case the first dude, I set it up like this each dude, i in dudes if i == 0 div(class='someClass, data-someAttr='first dude') else div(class='someClass') div.otherstuff span.someContent Setup like this it causes the div.otherStuff div and the span.someContent to only display on the else condition. I've moved the tab spaces around on those items but I can't get it escape that else and give the div.otherStuff and span.someContent to both the first dude and the subsequent dudes after that. I've also tried setting that data attr to a variable and trying to apply it that way but without any success. What I end up doing to get around it is this: each dude, i in dudes if i == 0 div(class='someClass, data-someAttr='first dude') div.otherstuff span.someContent else div(class='someClass') div.otherstuff span.someContent How do I escape that if/else so I dont have to duplicate the div.otherStuff and span.someContent?

    Read the article

  • Preprocessor directive to test if this is C or C++

    - by Collin
    I'm trying to find a standard macro which will test whether a header file is being compiled as C or as C++. The purpose of this is that the header may be included by either C or C++ code, and must behave slightly differently depending on which. Specifically: In C, I need this to be the code: extern size_t insert (const char*); In C++, I need this to be the code: extern "C" size_t insert (const char*); Additionally, is there a way to avoid putting #ifdef's around every declaration in the header?

    Read the article

  • Introduction to Reading Electronics Schematics [Video]

    - by Jason Fitzpatrick
    If you’re interested in electronics tinkering but a bit overwhelmed by learning electronics schematics, this helpful introductory video will get you started. Courtesy of Make magazine, this video tutorial covers what a schematic is, how schematics are laid out, and the basics of reading a schematic and its component symbols. When you’re done with the video you’ll have a better grasp of electronics circuit schematics than most of the population and, hopefully, and increased comfort reading schematics for all those DIY projects we post here. Collin’s Lab: Schematics [Make via Hacked Gadgets] HTG Explains: When Do You Need to Update Your Drivers? How to Make the Kindle Fire Silk Browser *Actually* Fast! Amazon’s New Kindle Fire Tablet: the How-To Geek Review

    Read the article

  • Weekend Entity Framework Class in Dallas...

    - by [email protected]
    Zeeshan Nirani, MVP in the Data Programability Group, co-author of the upcoming Entity Framework Recipies book, is teaching a 6 week class on Entity Framework 4.0 at Collin Community College, beginning May 22nd. The class will meet each Saturday morning from 9 am to 1. There is probably nobody in the Metroplex area that knows the Entity Framework as initimately as Zeeshan. Go and sign-up for this course NOW and consider yourself lucky to have the opportunity to attend. You WILL learn the Entity Framework which will be CRITICAL to your success in Microsoft development, as MSFT has made this framework one of their core pieces moving forward.   Contact Zeeshan at [email protected] for more details.      

    Read the article

< Previous Page | 1 2 3  | Next Page >