Search Results

Search found 285 results on 12 pages for 'bruce connor'.

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

  • vmbuilder fails on chroot

    - by Bruce
    I am trying to install virtual machine with this command, but have no success: vmbuilder kvm ubuntu --verbose --suite precise --flavour virtual \ --part partitions.txt --ip 192.168.1.3 --hostname edb1 --arch amd64 \ -o --libvirt qemu:///system --user someuser --pass somepass \ --raw /home/virtual-machines/edb1.disk1.img \ --raw /home/virtual-machines/edb1.disk2.img \ --domain somedomain.com --mem 4096 --cpus 4 This is the error: ... I: Extracting xz-utils... I: Extracting zlib1g... W: Failure trying to run: chroot /tmp/tmp_JdKzu mount -t proc proc /proc , stderr: The host kernel is not original but modified by server provider. Why is the chroot needed for installation?

    Read the article

  • After 14.04 update video/totem won't play midi

    - by bruce
    Prior to the upgrade, I could be on wikipedia and play the 'play' links fine where totem would open a window and have screen graphics go on. Now, after researching, installing VLC and it's extensions, making sure the gnome codec installer is activated, and on and on, all I get is : "The parameters passed to the application had an invalid format. Please file a bug! The parameters were: --transient-for=16777296 gstreamer|1.0|totem-plugin-viewer|audio/x-midi-event decoder|decoder-audio/x-midi-event" When totem/video opens and I'm not sure whether the bug is being reported or not. Meaning I don't know if APPOrt is active for this as there's no box with a checkmark in it display. AND the window for totem/video ALWAYS has the sound muted when it opens.

    Read the article

  • What is the most appropriate testing method in this scenario?

    - by Daniel Bruce
    I'm writing some Objective-C apps (for OS X/iOS) and I'm currently implementing a service to be shared across them. The service is intended to be fairly self-contained. For the current functionality I'm envisioning there will be only one method that clients will call to do a fairly complicated series of steps both using private methods on the class, and passing data through a bunch of "data mangling classes" to arrive at an end result. The gist of the code is to fetch a log of changes, stored in a service-internal data store, that has occurred since a particular time, simplify the log to only include the last applicable change for each object, attach the serialized values for the affected objects and return this all to the client. My question then is, how do I unit-test this entry point method? Obviously, each class would have thorough unit tests to ensure that their functionality works as expected, but the entry point seems harder to "disconnect" from the rest of the world. I would rather not send in each of these internal classes IoC-style, because they're small and are only made classes to satisfy the single-responsibility principle. I see a couple possibilities: Create a "private" interface header for the tests with methods that call the internal classes and test each of these methods separately. Then, to test the entry point, make a partial mock of the service class with these private methods mocked out and just test that the methods are called with the right arguments. Write a series of fatter tests for the entry point without mocking out anything, testing the entire functionality in one go. This looks, to me, more like "integration testing" and seems brittle, but it does satisfy the "only test via the public interface" principle. Write a factory that returns these internal services and take that in the initializer, then write a factory that returns mocked versions of them to use in tests. This has the downside of making the construction of the service annoying, and leaks internal details to the client. Write a "private" initializer that take these services as extra parameters, use that to provide mocked services, and have the public initializer back-end to this one. This would ensure that the client code still sees the easy/pretty initializer and no internals are leaked. I'm sure there's more ways to solve this problem that I haven't thought of yet, but my question is: what's the most appropriate approach according to unit testing best practices? Especially considering I would prefer to write this test-first, meaning I should preferably only create these services as the code indicates a need for them.

    Read the article

  • Menus don't sync in the first place

    - by Bruce Mincks
    I have been wrestling with prompts about my default key ring for months, finally made contact with Ubuntu with the right password, and find that when I try to sync evolution Ubuntu directs me to "system-preferences- " and then the road forks between the "passwords and encryption" you indicate and the "encryption and keyrings. I have no idea which version I am using, at this point. The road goes downhill from there. I would really like to synch my windows manager and Inkscape vs. ImageMagick display (circles display as semicircles). Can someone set me straight?

    Read the article

  • Rotating Sprite around Y-Axis (2D)

    - by Bruce Collie
    I'm going to be creating a game soon, and part of it involves spinning sprites. The sprites will be spinning around the Y-Axis (imagine a spinning plate on top of a stick, where the stick stands up vertically. The main way I've thought of is to have a series of sprites for various rotation values that I blur between as the 'plate' rotates (the sprite is more complex than a plate, though). The game will be for iPhone, but I'm open to using any 2D gave development library for it.

    Read the article

  • How to access parent window in dialog

    - by Bruce
    I am using Quickly and created the main window and a dialog. In the main window I am setting access to database (u1db) in the finish_initializing method (self.db=...). After an action I open a dialog where I need access to the database. I thought that I can use self.get_parent() in the dialog to get instance of the main window and access the database, but return value of the get_parent() is None. My question is, how can I access the instance of the parent window in the dialog or perhaps where should I place the instance of the database wrapper? Shortened code: class GuitestWindow(Window): def finish_initializing(self, builder): ... self.db = u1db.open( db_path, create=True ) def on_addaccountbutton_clicked(self, widget): dialog = NewAccountDialog.NewAccountDialog() result = dialog.run() dialog.hide()

    Read the article

  • How do you get an object associated with a Future Actor?

    - by Bruce Ferguson
    I would like to be able to get access to the object that is being returned from spawning a future import scala.actors.Future import scala.actors.Futures._ class Object1(i:Int) { def getAValue(): Int = {i} } object Test { def main( args: Array[String] ) = { var tests = List[Future[Object1]]() for(i <- 0 until 10) { val test = future { val obj1 = new Object1(i) println("Processing " + i + "...") Thread.sleep(1000) println("Processed " + i) obj1 } tests = tests ::: List(test) } val timeout = 1000 * 60 * 5 // wait up to 5 minutes val futureTests = awaitAll(timeout,tests: _*) futureTests.foreach(test => println("result: " + future())) } } The output from one run of this code is: Processing 0... Processing 1... Processing 2... Processing 3... Processed 0 Processing 4... Processed 1 Processing 5... Processed 2 Processing 6... Processed 3 Processing 7... Processed 4 Processing 8... Processed 6 Processing 9... Processed 5 Processed 7 Processed 8 Processed 9 result: <function0> result: <function0> result: <function0> result: <function0> result: <function0> result: <function0> result: <function0> result: <function0> result: <function0> result: <function0> I've tried future().getClass(), and the output is result: class scala.actors.FutureActor What I'm looking to be able to access is the obj1 objects. Thanks Bruce

    Read the article

  • Dimensions of a collection, and how to traverse it in an efficient, elegant manner

    - by Bruce Ferguson
    I'm trying to find an elegant way to deal with multi-dimensional collections in Scala. My understanding is that I can have up to a 5 dimensional collection using tabulate, such as in the case of the following 2-Dimensional array: val test = Array.tabulate[Double](row,col)(_+_) and that I can access the elements of the array using for(i<-0 until row) { for(j<-0 until col) { test(i)(j) = 0.0 } } If I don't know a priori what I'm going to be handling, what might be a succinct way of determining the structure of the collection, and spanning it, without doing something like: case(Array(x)) => for(i<-1 until dim1) { test(i) = 0.0 } case(Array(x,y)) => for(i<-1 until dim1) { for(j<-1 until dim2) { test(i)(j) = 0.0 } } case(Array(x,y,z)) => ... The dimensional values n1, n2, n3, etc... are private, right? Also, would one use the same trick of unwrapping a 2-D array into a 1-D vector when dealing with n-Dimensional objects if I want a single case to handle the traversal? Thanks in advance Bruce

    Read the article

  • Using smartctl to get vendor specific Attributes from ssd drive behind a SmartArray P410 controller

    - by Lairsdragon
    Recently I have deployed some HP server with SSD's behind a SmartArray P410 controller. While not official supported from HP the server work well sofar. Now I like to get wear level info's, error statistics etc from the drive. While the SA P410 supports a passthru of the SMART Command to a single drive in the array the output I was not able to the the interesting things from the drive. In this case especially the value the Wear level indicator is from interest for me (Attr.ID 233), but this is ony present if the drive is directly attanched to a SATA Controller. smartctl on directly connected ssd: # smartctl -A /dev/sda smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Attributes Data Structure revision number: 5 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 3 Spin_Up_Time 0x0000 100 000 000 Old_age Offline In_the_past 0 4 Start_Stop_Count 0x0000 100 000 000 Old_age Offline In_the_past 0 5 Reallocated_Sector_Ct 0x0002 100 100 000 Old_age Always - 0 9 Power_On_Hours 0x0002 100 100 000 Old_age Always - 8561 12 Power_Cycle_Count 0x0002 100 100 000 Old_age Always - 55 192 Power-Off_Retract_Count 0x0002 100 100 000 Old_age Always - 29 232 Unknown_Attribute 0x0003 100 100 010 Pre-fail Always - 0 233 Unknown_Attribute 0x0002 088 088 000 Old_age Always - 0 225 Load_Cycle_Count 0x0000 198 198 000 Old_age Offline - 508509 226 Load-in_Time 0x0002 255 000 000 Old_age Always In_the_past 0 227 Torq-amp_Count 0x0002 000 000 000 Old_age Always FAILING_NOW 0 228 Power-off_Retract_Count 0x0002 000 000 000 Old_age Always FAILING_NOW 0 smartctl on P410 connected ssd: # ./smartctl -A -d cciss,0 /dev/cciss/c1d0 smartctl 5.39.1 2010-01-28 r3054 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net (Right, it is complety empty) smartctl on P410 connected hdd: # ./smartctl -A -d cciss,0 /dev/cciss/c0d0 smartctl 5.39.1 2010-01-28 r3054 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net Current Drive Temperature: 27 C Drive Trip Temperature: 68 C Vendor (Seagate) cache information Blocks sent to initiator = 1871654030 Blocks received from initiator = 1360012929 Blocks read from cache and sent to initiator = 2178203797 Number of read and write commands whose size <= segment size = 46052239 Number of read and write commands whose size > segment size = 0 Vendor (Seagate/Hitachi) factory information number of hours powered up = 3363.25 number of minutes until next internal SMART test = 12 Do I hunt here a bug, or is this a limitation of the p410 SMART cmd Passthru?

    Read the article

  • ActiveMQ 5.2.0 + REST + HTTP POST = java.lang.OutOfMemoryError

    - by Bruce Loth
    First off, I am a newbie when it comes to JMS & ActiveMQ. I have been looking into a messaging solution to serve as middleware for a message producer that will insert XML messages into a queue via HTTP POST. The producer is an existing system written in C++ that cannot be modified (so Java and the C++ API are out). Using the "demo" examples and some trial and error, I have cobbled together a working example of what I want to do (on a windows box). The web.xml I configured in a test directory under "webapps" specifies that the HTTP POST messages received from the producer are to be handled by the MessageServlet. I added a line for the text app in "activemq.xml" ('ow' is the test app dir): I created a test script to "insert" messages into the queue which works well. The problem I am running into is that it as I continue to insert messages via REST/HTTP POST, the memory consumption and thread count used by ActiveMQ continues to rise (It happens when I have timely consumers as well as slow or non-existent consumers). When memory consumption gets around 250MB's and the thread count exceeds 5000 (as shown in windows task manager), ActiveMQ crashes and I see this in the log: Exception in thread "ActiveMQ Transport Initiator: vm://localhost#3564" java.lang.OutOfMemoryError: unable to create new native thread It is as if Jetty is spawning a new thread to handle each HTTP POST and the thread never dies. I did look at this page: http://activemq.apache.org/javalangoutofmemory.html and tried but that didn't fix the problem (although I didn't fully understand the implications of the change either). Does anyone have any ideas? Thanks! Bruce Loth PS - I included the "test message producer" python script below for what it is worth. I created batches of 100 messages and continued to run the script manually from the command line while watching the memory consumption and thread count of ActiveMQ in task manager. def foo(): import httplib, urllib body = "<?xml version='1.0' encoding='UTF-8'?>\n \ <ROOT>\n \ [snip: xml deleted to save space] </ROOT>" headers = {"content-type": "text/xml", "content-length": str(len(body))} conn = httplib.HTTPConnection("127.0.0.1:8161") conn.request("POST", "/ow/message/RDRCP_Inbox?type=queue", body, headers) response = conn.getresponse() print response.status, response.reason data = response.read() conn.close() ## end method definition ## Begin test code count = 0; while(count < 100): # Test with batches of 100 msgs count += 1 foo()

    Read the article

  • Android- Using DexClassLoader to load apk file.

    - by Craig O Connor
    Hi guys, I've hit a bit of a wall. Any help would be appreciated. I have an app that I want to use DexClassLoader to load another apk file. Here is my code: DexClassLoader dLoader = new DexClassLoader("/sdcard/download/test.apk","/sdcard/download",null,ClassLoader.getSystemClassLoader().getParent()); Class calledClass = dLoader.loadClass("com.test.classname"); Intent it=new Intent(this, calledClass); it.setClassName("com.test", "com.test.classname"); startActivity(it); Now I had already installed test.apk so when I ran the above code it worked fine and launched the application. However I want to be able to run this without test.apk being installed already (as that would defeat the entire point of the application) . So I uninstalled it and when I ran the my app again I get this error: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.test/com.test.classname}; have you declared this activity in your AndroidManifest.xml. So I'm a bit stumped here. This activity is declared in the Manifest of the apk I am trying to run. I can't declare it in my applications Manifest. Any ideas? Thanks, Craig

    Read the article

  • If I select from an IQueryable then the Include is lost

    - by Connor Murphy
    The include does not work after I perform a select on the IQueryable query. Is there a way arround this? My query is public IQueryable<Network> GetAllNetworks() { var query = (from n in _db.NetworkSet .Include("NetworkContacts.Contact") .Include("NetworkContacts.Contact.RelationshipSource.Target") .Include("NetworkContacts.Contact.RelationshipSource.Source") select (n)); return query;; } I then try to populate mya ViewModel in my WebUI layer using the following code var projectedNetworks = from n in GetAllNetworks() select new NetworkViewModel { Name = n.Name, Contacts = from contact in networkList .SelectMany(nc => nc.NetworkContacts) .Where(nc => nc.Member == true) .Where(nc => nc.NetworkId == n.ID) .Select(c => c.Contact) select contact, }; return projectedNetworks; The problem now occurs in my newly createdNetworkViewModel The Contacts object does include any loaded data for RelationshipSource.Target or RelationshipSource.Source The data should is there when run from the original Repository IQueryable object. However the related include data does not seem to get transferred into the new Contacts collection that is created from this IQueryable using the Select New {} code above. Is there a way to preserve this Include data when it gets passed into a new object?

    Read the article

  • Drawing a Dragons curve in Python

    - by Connor Franzoni
    I am trying to work out how to draw the dragons curve, with pythons turtle using the An L-System or Lindenmayer system. I no the code is something like the Dragon curve; initial state = ‘F’, replacement rule – replace ‘F’ with ‘F+F-F’, number of replacements = 8, length = 5, angle = 60 But have no idea how to put that into code.

    Read the article

  • Box Shadow on only 3 sides

    - by Connor
    I have two overlapping divs that have css3 box shadows. The trouble is that even when I set the z-index I will still need to eliminate one of the div's box-shadow. I have seen cases where negative spreads and zero values are used but I don't think that would work here. The code I have now is: #bulb-top { position: relative; width: 280px; height: 280px; background-color: #E5F7A3; -webkit-border-radius: 280px; -moz-border-radius: 280px; border-radius: 280px; border: 8px solid #FFF40C; top: -430px; margin-left: auto; margin-right: auto; -webkit-box-shadow: 0px 0px 15px 1px #FFF40C; -moz-box-shadow: 0px 0px 15px 1px #FFF40C; box-shadow: 0px 0px 15px 1px #FFF40C; z-index: 4; } #bulb-bottom { position: relative; width: 140px; height: 120px; background-color: #E5F7A3; -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 0px; -moz-border-radius-bottomright: 30px; -moz-border-radius-bottomleft: 30px; -webkit-border-radius: 0px 0px 30px 30px; border-radius: 0px 0px 30px 30px; border-left: 8px solid #FFF40C; border-right: 8px solid #FFF40C; border-bottom: 8px solid #FFF40C; top: -455px; margin-left: auto; margin-right: auto; -webkit-box-shadow: 0px 0px 15px 1px #FFF40C; -moz-box-shadow: 0px 0px 15px 1px #FFF40C; box-shadow: 0px 0px 15px 1px #FFF40C; z-index: 5; } http://jsfiddle.net/minitech/g42vq/3/

    Read the article

  • How can I call `update_attribute` for a list item in rails then actually update the html using jquery?

    - by Patrick Connor
    I want my users to be able to mark one or more items from an index view as "Active" or "Inactive" using a link. The text for the link should be state aware - so it might default to "Mark as Active" if the corresponding attribute was false or null, and "Mark as Inactive" if true. Once the user clicks the link and the attribute is updated in the controller, the link-text should update based on the new state. I am WAY off here, but this is a small sample of the code I have been trying... CONTROLLER ... respond_to :html, :js ... def update @item = Item.find(params[:id]) if @item.update_attributes(params[:item]) #Not sure of how to respond to .js here end end ... update.js.erb #how do I identify which element to update? $('#item[13456]').html("State aware text for link_to") VIEW - for item in @items = item.name = link_to "Mark as Active", item_path(item), :method => :put, :remote => true. :id => "item[#{item.id}]" I am happy to read any APIs, blogs, tutorials, etc. I just can't seem to get my hands/mind around this task. Any help or guidance is greatly appreciated!

    Read the article

  • Font Awesome Not Working In Chrome

    - by Connor Black
    So I'm trying to prototype a marketing page and I'm using bootstrap and the new font awesome file. The problem is when I try to use an icon all that gets rendered on the page in a big square. Here's how I include the files in the head: <head> <title> </title> <link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/bootstrap-responsive.css"> <link rel="stylesheet" href="css/font-awesome.css"> <link rel="stylesheet" href="css/app.css"> <!--[if IE 7]> <link rel="stylesheet" href="css/font-awesome-ie7.min.css"> <![endif]--> </head> And here's an example of me trying to use an icon: <i class="icon-camera-retro"></i> But all that gets rendered in a big square. Does anyone know what could be going on?

    Read the article

  • more efficient version of this?

    - by john connor
    i have this thingy here : function numOfPackets(bufferSize, packetSize) { if (bufferSize <= 0 || packetSize > bufferSize) return 0; if (packetSize < 0) throw Error(); var out = 0; for(;;){ out++; bufferSize = bufferSize - packetSize; if( packetSize > bufferSize ) break; } return out; } which i run at often , can u give me more efficent variant of it?

    Read the article

  • Rails: Generic form actions, cancel link losing `:back` on validation failure

    - by Patrick Connor
    I am trying to create a generic set of Submit, Cancel, and Destroy actions for forms. At this point, it appears that everything is working, except that I lose :back functionality then a form reloads due to validation errors. Is there a way to catch the fact that validation has failed, and in that case, keep the request.env['HTTP_REFERER'] or :back value the same without having to edit every controller? = simple_form_for @announcement do |f| = f.error_notification = f.input :message = f.input :starts_at = f.input :ends_at #submit = f.button :submit = "or " = link_to("cancel", url_for(:back)) .right - if !f.object.new_record? - resource = (f.object.class.name).downcase = link_to "destroy", url_for(:action => 'destroy'), :confirm => "Are you sure that you want to delete this #{resource}?", :method => :delete .clear .non_input #post_back_msg #indicator.inline = image_tag "indicator.gif" .inline = "Please wait..." .non_input

    Read the article

  • Dynamic Array of Objects Sans Vector Class

    - by Connor Black
    I am doing a homework assignment for my summer OO class and we need to write two classes. One is called Sale and the other is called Register. I've written my Sale class; here's the .h file: enum ItemType {BOOK, DVD, SOFTWARE, CREDIT}; class Sale { public: Sale(); // default constructor, // sets numerical member data to 0 void MakeSale(ItemType x, double amt); ItemType Item(); // Returns the type of item in the sale double Price(); // Returns the price of the sale double Tax(); // Returns the amount of tax on the sale double Total(); // Returns the total price of the sale void Display(); // outputs sale info private: double price; // price of item or amount of credit double tax; // amount of sales tax double total; // final price once tax is added in. ItemType item; // transaction type }; For the Register class we need to include a dynamic array of Sale objects in our member data. We cannot use the vector class. How is this done? Here's my 'Register' '.h' class Register{ public: Register(int ident, int amount); ~Register(); int GetID(){return identification;} int GetAmount(){return amountMoney;} void RingUpSale(ItemType item, int basePrice); void ShowLast(); void ShowAll(); void Cancel(); int SalesTax(int n); private: int identification; int amountMoney; };

    Read the article

  • Why ajax doesn't work unless I refresh or use location.href?

    - by Connor Tang
    I am working on a html project, which will eventually package by Phonegap. So I am trying to encode the data from html form to JSON format, then use ajax send to a php file resides on server, and receive the response to do something else. Now I use <a href='login.html'> in my index.html to open the login page. In my login page, I have this <script> $(document).ready(function(e) { $('#loginform').submit(function(){ var jData = { "email": $('#emailLogin').val(), "password": $('#Password').val()}; $.ajax({ url: 'PHP/login.php', type:'POST', data: jData, dataType: 'json', async: false, error: function(xhr,status){ //reload(); location.href='index.html'; alert('Wrong email and password'); }, success: function(data){ if(data[1] == 1){ var Id_user = data[0]; location.href='loginSuccess.html'; } } }); }); }); </script> to send my data to server. But I found that it won't work, it's still in the login page. I tried to enter data and submit again, it's still nothing happen. Until I refresh the login page and enter data again, it can give an error message or go to the loginsuccess page. However, when I use <script> function loadLogin(){ location.href='login.html'; } </script> to open the login page, everything works well. So what cause this? How can I modify this piece of code to make it better?

    Read the article

  • On load rather than on click

    - by connor
    I have the following code: jQuery(function ($) { var OSX = { container: null, init: function () { $("input.apply, a.apply").click(function (e) { e.preventDefault(); $("#osx-modal-content").modal({ overlayId: 'osx-overlay', containerId: 'osx-container', closeHTML: null, minHeight: 80, opacity: 65, position: ['0',], overlayClose: true, onOpen: OSX.open, onClose: OSX.close }); }); }, open: function (d) { var self = this; self.container = d.container[0]; d.overlay.fadeIn('fast', function () { $("#osx-modal-content", self.container).show(); var title = $("#osx-modal-title", self.container); title.show(); d.container.slideDown('fast', function () { setTimeout(function () { var h = $("#osx-modal-data", self.container).height() + title.height() + 20; // padding d.container.animate( {height: h}, 200, function () { $("div.close", self.container).show(); $("#osx-modal-data", self.container).show(); } ); }, 300); }); }) }, close: function (d) { var self = this; // this = SimpleModal object d.container.animate( {top:"-" + (d.container.height() + 20)}, 500, function () { self.close(); // or $.modal.close(); } ); } }; OSX.init(); }); To load this script, a button with the class "apply" has to be clicked... Does anyone know a way of loading this script "onload" without a button being clicked? I have tried a lot of things, but I am a newbie when it comes to Javascript. Thanks!

    Read the article

  • How can I get a default value in some instances but not others?

    - by Connor Wagner
    I am making an iPhone app and want to use an 'if' statement and a boolean to set default values in some instances but not others... is this possible? Are there alternative options if it is not possible? In the MainViewController.m I have: @interface MainViewController (){ BOOL moveOver; } [...] - (void)viewDidLoad { [super viewDidLoad]; _label.text = [NSString stringWithFormat:@"%i", computerSpeed]; } } [...] - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller { [self dismissViewControllerAnimated:YES completion:nil]; moveOver = true; } The problem that it is redefined when the ViewDidLoad runs... I need a statement that will not redefine when the ViewDidLoad runs. I have something that I feel like is much closer to working... In the ViewDidLoad I have: if (playToInt != 10 || computerMoveSpeed != 3) { moveOver = TRUE; } which connects to my created method, gameLoop. It has if (moveOver == false) { computerMoveSpeed = 3; playToInt = 10; } I have tried putting the code in the gameLoop into the ViewDidLoad, but it had the same effect. When moveOver was false, the computerMoveSpeed and the playToInt were both seemingly 0. I have two UITextFields and typed 10 and 3 in them... does this not set it to the default? It seems to set the default to 0 for both, how do I change this? THIS IS A DIFFERENT ISSUE THAN THE THREE BOOLEAN VALUES QUESTION

    Read the article

  • Developer’s Life – Every Developer is a Batman

    - by Pinal Dave
    Batman is one of the darkest superheroes in the fantasy canon.  He does not come to his powers through any sort of magical coincidence or radioactive insect, but through a lot of psychological scarring caused by witnessing the death of his parents.  Despite his dark back story, he possesses a lot of admirable abilities that I feel bear comparison to developers. Batman has the distinct advantage that his alter ego, Bruce Wayne is a millionaire (or billionaire in today’s reboots).  This means that he can spend his time working on his athletic abilities, building a secret lair, and investing his money in cool tools.  This might not be true for developers (well, most developers), but I still think there are many parallels. So how are developers like Batman? Well, read on my list of reasons. Develop Skills Batman works on his skills.  He didn’t get the strength to scale Gotham’s skyscrapers by inheriting his powers or suffering an industrial accident.  Developers also hone their skills daily.  They might not be doing pull-ups and scaling buldings, but I think their skills are just as impressive. Clear Goals Batman is driven to build a better Gotham.  He knows that the criminal who killed his parents was a small-time thief, not a super villain – so he has larger goals in mind than simply chasing one villain.  He wants his city as a whole to be better.  Developers are also driven to make things better.  It can be easy to get hung up on one problem, but in the end it is best to focus on the well-being of the system as a whole. Ultimate Teamplayers Batman is the hero Gotham needs – even when that means appearing to be the bad guys.  Developers probably know that feeling well.  Batman takes the fall for a crime he didn’t commit, and developers often have to deliver bad news about the limitations of their networks and servers.  It’s not always a job filled with glory and thanks, but someone has to do it. Always Ready Batman and the Boy Scouts have this in common – they are always prepared.  Let’s add developers to this list.  Batman has an amazing tool belt with gadgets and gizmos, and let’s not even get into all the functions of the Batmobile!  Developers’ skills might be the knowledge and skills they have developed, not tools they can carry in a utility belt, but that doesn’t make them any less impressive. 100% Dedication Bruce Wayne cultivates the personality of a playboy, never keeping the same girlfriend for long and spending his time partying.  Even though he hides it, his driving force is his deep concern and love for his friends and the city as a whole.  Developers also care a lot about their company and employees – even when it is driving them crazy.  You do your best work when you care about your job on a personal level. Quality Output Batman believes the city deserves to be saved.  The citizens might have a love-hate relationship with both Batman and Bruce Wayne, and employees might not always appreciate developers.  Batman and developers, though, keep working for the best of everyone. I hope you are all enjoying reading about developers-as-superheroes as much as I am enjoying writing about them.  Please tell me how else developers are like Superheroes in the comments – especially if you know any developers who are faster than a speeding bullet and can leap tall buildings in a single bound. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL Tagged: Developer, Superhero

    Read the article

  • Python DictReader - Skipping rows with missing columns?

    - by victorhooi
    heya, I have a Excel .CSV file I'm attempting to read in with DictReader. All seems to be well, except it seems to omit rows, specifically those with missing columns. Our input looks like: mail,givenName,sn,lorem,ipsum,dolor,telephoneNumber [email protected],ian,bay,3424,8403,2535,+65(2)34523534545 [email protected],mike,gibson,3424,8403,2535,+65(2)34523534545 [email protected],ross,martin,,,,+65(2)34523534545 [email protected],david,connor,,,,+65(2)34523534545 [email protected],chris,call,3424,8403,2535,+65(2)34523534545 So some of the rows have missing lorem/ipsum/dolor columns, and it's just a string of commas for those. We're reading it in with: def read_gd_dump(input_file="blah 20100423.csv"): gd_extract = csv.DictReader(open('blah 20100423.csv'), restval='missing', dialect='excel') return dict([(row['something'], row) for row in gd_extract]) And I checked that "something" (the key for our dict) isn't one of the missing columns, I had originally suspected it might be that. It's one of the columns after that. However, DictReader seems to completely skip over the rows. I tried setting restval to something, didn't seem to make any difference. I can't seem to find anything in Python's CSV docs (http://docs.python.org/library/csv.html) that would explain this behaviour, but I may have misread something. Any ideas? Thanks, Victor

    Read the article

  • cannot connect to Apache web server through hamachi

    - by Bruce copes
    we are running an apache web server in the office. Hamachi clients are installed on the server and on the other PC's. We can ping and browse each other but cannot view the web server through Hamachi. have disabled the firewalls on the server as well as on the PC's. I have added an apache program exception in the firewall on the server, but surely this is not needed if I disable the firewall? I would be really grateful if someone could help!

    Read the article

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