Search Results

Search found 2767 results on 111 pages for 'alex king'.

Page 85/111 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • XNA AdGameComponent does not draw

    - by Alex Shkor
    I have following code. But AddGameComponent doesn't draw. protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); var li = new LicenseInformation(); IsTrial = li.IsTrial(); if (IsTrial) { AdGameComponent.Initialize(this, AppID); Components.Add(AdGameComponent.Current); CreateAd(); } } private void CreateAd() { bannerAd = AdGameComponent.Current.CreateAd(AdUnitID, new Rectangle(x, y, width, height), true); AdGameComponent.Current.Enabled = true; } I have tried to set DrawOrder to 1000, but ads still doesn't work.

    Read the article

  • Animate absolutely positioned div, but stop if a condition is true?

    - by Alex
    Hello all, I have a div which I place at the top right-hand corner of a website, absolutely positioned at top: 0px and right : 0px. I want to use jquery's animate function to animate the div left or right a certain amount when a button is clicked, but stop the animation if at anytime, the div's offset to the left or right is less than a certain number. I want to do this to accomodate users who click the left or right buttons more than once, so that the div does not fly out of sight. How does one accomplish this? Below is my relevant css, html, and jquery code: CSS: #scorecardTwo { position:absolute; padding:5px; width: 300px; background-color:#E1E1E1; right:0px; top:0px; display:none; } HTML: <div id = "scorecardTwo"> <span id = "dealHolder"><a href="some/link">some text</a></span> <br /> <span id = "scoreHolder">some text</span> <br /> <button type="button" id="moveLeft">Left</button>&nbsp;<button type="button" id="moveRight">Right</button> </div> jQuery (at the moment): $("#scorecardTwo").fadeIn("slow"); $("#moveLeft").bind("click", function() { $("#scorecardTwo").animate({"right":"+=76%"}, "slow"); // how to stop animation if offset is less than appropriate number? }); $("#moveRight").bind("click", function() { $("#scorecardTwo").animate({"right" : "-=76%"}, "slow"); // how to stop animation if offset is less than appropriate number? });

    Read the article

  • How to read in the XML file on a remote website using JSP?

    - by Alex
    Hi, I'm using java servlets and jsp in my application and I need to read the remote XML file and properly render it into HTML and display on a web page...What is the technology used for reading process?Should I use HTTPURLConnection class to read the contents of the xml file or there is some other way? And also,if I use servlet as a controller and JSP as a view,what would be the responsibility of servlet and jsp in this process?Should servlet just read the whole XML file and then just pass the read output to JSP which will just print it and render properly using XSL for example? I really hope to hear from any people who may help, With kind regards

    Read the article

  • Problem with using the XPATH functions

    - by Alex
    I've got a problem with using the XPATH functions. When I try to call some functions like lower-case or upper-case etc,they are not executed and I can't figure the problem out. I included the namespace xmlns:fn="http://www.w3.org/2005/xpath-functions" at the top of my XSL stylesheet and use fn namespace to call these functions but anyway nothing is working. Can anyone explain the reason and what I should do in order to be able to use the following functions? Cheers

    Read the article

  • What are the exact versions of stuff you had to install in order to be able to step-debug a Scala pr

    - by Alex R
    How do YOU debug a Scala program? I mean YOU as in the person posting the Answer :) Please answer only from personal experience, not from stuff you've heard or read on the Internet. You should not believe everything you read on the Internet, especially tales of complex open-source software configurations that actually work :-) The are many Java tools which claim to support Scala in some way or another, but I have so far struck out in trying to get any one of them to actually let me set a breakpoint in Scala code and step through it. These are big, major open-source IDEs I'm talking about here. The main problem in getting a debugger to work seems to be the "version hell" with fast-changing IDEs, Plug-Ins, JDKs, and the Scala language itself. Hence the second part of my question, which is really the most important part: What is the exact version number of the IDE, Plug-In, JDK, Scala, and even Operating System, that you are successfully using? My question is related to this one, but wider in scope: http://stackoverflow.com/questions/2272705/how-to-debug-scala-code-when-outside-of-an-ide Thanks

    Read the article

  • Help adding a backgroundView to UITableViewCell

    - by Alex
    I'm getting really desperate trying to add a UIImageView to UITableViewCell.backgroundView. All my efforts have resulted in this crappy rendering: It looks like the cell's label's white background is sitting on top of cell's background and covering portions of it. I tried setting the label's background color to clear, or some other color and it does not have any event. It is always white. The reason I know it's the text label's background causing this white area is that if I don't do [cell setText:@"Cell text here"]; the white area is gone and I see just the cell's background image. Here's the code that I'm using. The table view is added in the .xib file and UITableView is added to UIViewController: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [myCollection.items count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger rowIndex = indexPath.row; static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"darkCellBackground.png"]]; cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"darkCellBackground.png"]]; } [cell setText:@"Cell text here"]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return NO; } I'm sure I'm doing something wrong but cant quite figure out what.

    Read the article

  • Validating primitive types in ASP.NET MVC

    - by Alex
    I've implemented the following classes to validate data public abstract class Validated { public bool IsValid { get { return (GetRuleViolations().Count() == 0); } } public abstract IEnumerable<RuleViolation> GetRuleViolations(); } public partial class User: Validated { public override IEnumerable<RuleViolation> GetRuleViolations() { if (this.Age < 1) yield return new RuleViolation("Age can't be less than 1"); } } It works great! When the form is submitted I just do if (user.IsValid == false) blah... But I still need to validate that the Age is an integer int a = 0; if (!int.TryParse(age, out a)) { error = "Not integer"; // ... } How can I move this to my model?

    Read the article

  • testing existing attribute of a @classmethod function, yields AttributeError

    - by alex
    i have a function which is a class method, and i want to test a attribute of the class which may or may not be None, but will exist always. class classA(): def __init__(self, var1, var2 = None): self.attribute1 = var1 self.attribute2 = var2 @classmethod def func(self,x): if self.attribute2 is None: do something i get the error AttributeError: class classA has no attribute 'attributeB' when i access the attribute like i showed but if on command line i can see it works, x = classA() x.attributeB is None True so the test works. if i remove the @classmethod decorator from func, the problem disapears. if i leave the @classmethod decorator, it only seems to affect variables which are supplied default values in the super-class's constructor. whats going on in the above code?

    Read the article

  • How do I delete in Django? (mysql transactions)

    - by alex
    If you are familiar with Django, you know that they have a Authentication system with User model. Of course, I have many other tables that have a Foreign Key to this User model. If I want to delete this user, how do I architect a script (or through mysql itself) to delete every table that is related to this user? My only worry is that I can do this manually...but if I add a table , but I forget to add that table to my DELETE operation...then I have a row that links to a deleted, non-existing User.

    Read the article

  • Handling click events on z-index'd layers

    - by Alex
    I have 2 z-index layers in a map application I'm building. I have a problem when I click on the layers to zoom in. The click handler is on the underlying z-index layer and I don't want it to fire when a control in the overlying layer is clicked. The problem i have is that the event gets raised no matter what but the originalTarget property of the event is not the image in the underlying layer when something on the top layer is clicked. Is there anyway to change this?

    Read the article

  • C++: Chr() and unichr() equivalent?

    - by alex
    I could have sworn I used a chr() function 40 minutes ago but can't find the file. I know it can go up to 256 so I use this: std::string chars = ""; chars += (char) 42; //etc So that's alright, but I really want to access unicode characters. Can I do (w_char) 512? Or maybe something just like the unichr() function in python, I just can't find a way to access any of those characters.

    Read the article

  • Which browser versions do YouTube and Google Apps support?

    - by Alex
    Hi. We're building a site and wish to build for the same set of browsers Google Apps/Docs and YouTube support. Though not recommended, they seem to be detecting specific browsers/versions vs. features/functionality. What's the best way to support a minimum set of browsers while displaying a message to the users of older browsers to upgrade? What's the minimum set of browsers that the major sites are supporting? Thanks.

    Read the article

  • Reference variable to an object instantiated/initialized in another class in Java

    - by Alex
    The reason I'm asking is because I'm getting NullPointerException. I now this is very easy but I'm pretty new programming and find this a bit confusing. So say I have initialized an object in a class and want to access that same object from another class. Like now for instance I'm working on a small Chess game, in my model Game class I have an instance of Board, an object. Board, in turn, has an array of Squares. Square[][]. Game has board, board has Square[][]. Now if I want to access the Square[][] through the object board (in Game) of type Board. Do I just declare a variable with the same name and type or do I have to initialize it again? Board board OR Board board = new Board(); Note, I have already initialized board in the class Game so if I do it again, won't they be two totally different Board objects?

    Read the article

  • Jquery .text() call returns null?

    - by Alex
    Hey all, I'm practicing Jquery and I've written this simple Jquery statement: var someText = $("table tr td").text(); Should this not return all text of td elements found within tr's that are found within tables? How do I fix this? Currently when I run this, it says that table tr td is null, but I have a table on the page I'm testing on. Thanks!

    Read the article

  • SSIS to copy data from one table to another, where not in destination table

    - by alex
    I'm in the process of creating an SSIS package on a server (server1) that looks at the data in a sql db on another site (server2) and copies relevant rows across. The SQL statement required is: SELECT * FROM server2.ordersTable WHERE OrderID Not In (SELECT OrderID FROM server1.ordersTable This selects data from server1 which isn't in the table on server2 (based on order id) I then need to insert the result into a table on server1 How would I approach this? What components do I need etc...?

    Read the article

  • Can an iframe pop up a Lightbox-style box?

    - by Alex
    Hi. This question isn't about popping up an iframe inside a Lightbox; rather, it's about an iframe on a page that can launch its own Lightbox-style box in the page that contains that iframe. I'm thinking this can't be possible, because the iframe contains the contents of the other URL and whatever Lightbox that URL launches has to fit within the iframe. Thanks.

    Read the article

  • Java if/else behaving strangely

    - by Alex
    I'm a real newbie to java, so please excuse me if this is a hopelessly straightforward problem. I have the following from my java game server: // Get input from the client DataInputStream in = new DataInputStream (server.getInputStream()); PrintStream out = new PrintStream(server.getOutputStream()); disconnect=false; while((line = in.readLine().trim()) != null && !line.equals(".") && !line.equals("") && !disconnect) { System.out.println("Received "+line); if(line.equals("h")){ out.println("h"+EOF); // Client handshake System.out.println("Matched 1"); }else if (line.equals("<policy-file-request/>")) { out.println("..."+EOF); // Policy file System.out.println(server.getInetAddress()+": Policy Request"); disconnect=true; System.out.println("Matched 2"); }else if(line.substring(0,3).equals("GET")||line.substring(0,4).equals("POST")){ out.println("HTTP/1.0 200 OK\nServer: VirtuaRoom v0.9\nContent-Type: text/html\n\n..."); // HTML status page disconnect=true; System.out.println("Matched 3"); } else { System.out.println(server.getInetAddress()+": Unknown command, client disconnected."); disconnect=true; System.out.println("Matched else"); } } server.close(); First of all, the client sends an "h" packet, and expects the same back (handshake). However, I want it to disconnect the client when an unrecognised packet is received. For some reason, it responds fine to the handshake and HTML status request, but the else clause is never executed when there's an unknown packet. Thanks

    Read the article

  • Can someone explain Kohana 3's routing system?

    - by alex
    In bootstrap.php, where you set routes, I'm having a hard time getting them to work. I read some documentation a while ago that I can't seem to find again that explains them. Here is one of my examples Route::set('products', 'products/(type)', array('type' => '.+')) ->defaults(array( 'controller' => 'articles', 'action' => 'view_product', 'page' => 'shock-absorbers', )); I thought that would mean a request like products/something would load up the articles controller, and the action_view_product method. But I can't get it to work. Can someone please explain to me exactly how they work, and what all the method parameters are?

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >