Search Results

Search found 2409 results on 97 pages for 'alex polo'.

Page 82/97 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • How do I load a Direct X .x 3D model in iPhone SDK?

    - by Alex
    I have been searching the internet for the last few days trying to figure this out. My goal is to draw a textured and animated .x file exported from a 3D program. I found a tutorial of how to load and draw a .obj file, which I understand, but the tutorial doesn't say how to texture it, and .obj doesn't support animation. The .x file structure is human readable just like .obj, but I have no clue how to texture it, and I might be able to figure out how to animate it, but I would prefer to be instructed on that. Any help would be GREATLY appreciated.

    Read the article

  • Django database - how to add this column in raw SQL.

    - by alex
    Suppose I have my models set up already. class books(models.Model): title = models.CharField... ISBN = models.Integer... What if I want to add this column to my table? user = models.ForeignKey(User, unique=True) How would I write the raw SQL in my database so that this column works?

    Read the article

  • Catch a generic exception in Java?

    - by Alex Baranosky
    We use JUnit 3 at work and there is no ExpectedException annotation. I wanted to add a utility to our code to wrap this: try { someCode(); fail("some error message"); } catch (SomeSpecificExceptionType ex) { } So I tried this: public static class ExpectedExceptionUtility { public static <T extends Exception> void checkForExpectedException(String message, ExpectedExceptionBlock<T> block) { try { block.exceptionThrowingCode(); fail(message); } catch (T ex) { } } } However, Java cannot use generic exception types in a catch block, I think. How can I do something like this, working around the Java limitation? Is there a way to check that the ex variable is of type T?

    Read the article

  • I have data about deadlocks, but I can't understand why they occur (MS SQL/ASP.NET MVC)

    - by Alex
    I am receiving a lot of deadlocks in my big web application. http://stackoverflow.com/questions/2941233/how-to-automatically-re-run-deadlocked-transaction-asp-net-mvc-sql-server Here I wanted to re-run deadlocked transactions, but I was told to get rid of the deadlocks - it's much better, than trying to catch the deadlocks. So I spent the whole day with SQL profiler, setting the tracing keys etc. And this is what I got. There's a Users table. I have a very high usable page with the following query (it's not the only query, but it's the one that causes troubles) UPDATE Users SET views = views + 1 WHERE ID IN (SELECT AuthorID FROM Articles WHERE ArticleID = @ArticleID) And then there's the following query in ALL pages: User = DB.Users.SingleOrDefault(u => u.Password == password && u.Name == username); That's where I get User from cookies. Very often a deadlock occurs and this second LINQ TO SQL query is chosen as a victim, so it's not run, and users of my site see an error screen. I read a lot about deadlocks... And I don't understand why this is causing a deadlock. So obviously both of this queries run very often. At least once a second. Maybe even more often (300-400 users online). So they can be run at the same time very easily, but why does it cause a deadlock? Please help. Thank you

    Read the article

  • Select <a> which is the second <a> on a page that contains some href text?

    - by Alex
    Hello there, I'm working with a page that has several links that contain the same href text, and I need to select the second anchor element on the page that contains said href text. Here's a simplified version of the link structure of the page: <a href="same/link/to/stuff/">same link</a> <a href="same/link/to/stuff/">same link</a> How do I fashion my selector so that it only selects the second anchor in the above example? Thanks!!

    Read the article

  • How do I most efficienty check the unique elements in a list?

    - by alex
    let's say I have a list li = [{'q':'apple','code':'2B'}, {'q':'orange','code':'2A'}, {'q':'plum','code':'2A'}] What is the most efficient way to return the count of unique "codes" in this list? In this case, the unique codes is 2, because only 2B and 2A are unique. I could put everything in a list and compare, but is this really efficient?

    Read the article

  • Contact page MVC workflow

    - by alex
    All my previous projects have had this workflow on Contact pages User submits form Controller gets $_POST details Controller validates details (and sets error messages if necessary) Controller sends email Controller redirects to thanks page Is this the standard workflow? I used to validate everything in controllers, and then did some more reading and they recommended against it. Therefore, should I send the $_POST details to a helper type object and let it do all the work (validation/sending)?

    Read the article

  • joining two tables and getting aggregate data

    - by alex
    how do i write a query that returns aggregate sales data for California in the past x months. ----------------------- ----------------------- | order | | customer | |-----------------------| |-----------------------| | orderId int | | customerId int | | customerId int | | state varchar | | deposit decimal | ----------------------- | orderDate date | ----------------------- ----------------------- | orderItem | |-----------------------| | orderId int | | itemId int | | qty int | | lineTotal decimal | | itemPrice decimal | -----------------------

    Read the article

  • ASP.NET check if LinqToEntities returned something or not.

    - by Alex
    How to make this method return boolean value, depending on query return. False - nothing, True - data exists. Before i just returned int from uniqueQuote.Count() but does not look like great method. Thank you! private bool CheckEnquiryUser(int enquiryId, Guid userId) { int selectedEnquiryId = enquiryId; Guid currentUserId = userId; Entities ctx3 = new Entities(); var uniqueQuote = from quot in ctx3.Enquiries.Include("aspnet_Users") where quot.EnquiryId == selectedEnquiryId && quot.aspnet_Users.UserId == currentUserId select quot; bool exist = uniqueQuote; return exist;

    Read the article

  • ActionScript JPGEncoder +bad quality of the image

    - by Alex
    I have noticed that the quality of the images produced by the JPEGEncoder does not match that of other encoders available (i.e. php's built in image compression functions from the gd library) Any explanation ? or hints/workarounds for improving the quality of compressed images by JPEGEncoder ??

    Read the article

  • jQuery AJAX & an ASP.NET web service works locally but not remotely

    - by Alex
    Interesting one here. I have an ASP.NET 1.1 project that contains a web service in it. I'm using jQuery's AJAX functionality to call some services from the client. This is what my code looks like: $.ajax({ type: "POST", url: 'foo.asmx/functionName', data: 'foo1=' + foo1 + '&foo2=' + foo2, dataType: "xml", success: function(xml) { //do something with my xml data }, error: function(request, error){ //handle my error } }); This works great when I run the site from my IDE on localhost. However, when I deploy this site to any other server I get a parsererror error from jQuery. It does not appear to even call my service as I dropped in some code to write a log file to disk and it's not making it there. The same exact XML should be returned from both my localhost and the server I deployed to. Any ideas?

    Read the article

  • Just how much do I want to make virtual?

    - by Alex
    I am writing an abstract superclass where literally every method is going to be overridden. There is some default functionality I could implement, but most of the time it's enough to leave the implementation to the subclass writer. Since just about every method is going to be overwritten, how much should I make virtual and how much should I just leave as regular methods? In the current incarnation, everything is virtual, but I still haven't let this loose to anyone to use, so the design is flexible. What advantages/disadvantages are there to virtual functions? Links to good reading material about this would be appreciated.

    Read the article

  • OpenID login on local development server for google app engine

    - by Alex Jeffery
    Are you able to use open id to log into the local development server with google app engine sdk version 1.4.1 and python 2.5? When I execute this self.redirect(users.create_login_url(continue_url, None, openid_url)) I get redirected to http://localhost/_ah/login rather than the openid url. The openid url and continue url are valid. My app.yaml looks like this - url: /_ah/login_required script: do_openid_login.py - url: /users/(.*) script: routers/user_router.py login: required If I browse to http://localhost/users/ I am also redirected to http://localhost/_ah/login rather than http://localhost/_ah/login_required Is there a config issue or does openid not work locally?

    Read the article

  • Getting input in system() function (Mac)

    - by Alex
    #include <iostream> using namespace std; int main() { short int enterVal; cout << "enter a number to say: " << endl; cin >> enterVal; system("say "%d"") << enterVal; return 0; } Is what I am currently trying. I want the user to enter a number and the system() function says it basically. The code above has an error which says " 'd' was not declared in this scope ". Thanks in advance.

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >