Search Results

Search found 1882 results on 76 pages for 'tom barnett'.

Page 55/76 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • How can I improve my programming skills with out a computer (or reading material)?

    - by Tom Duckering
    Given the recent and continued chaos with grounded flights and folks stuck in airports, and what not, I'm wondering if anyone has any suggestions for activities that would help sharpen and develop a progammer's mind. The constraints are: Laptop is out of battery and there are no free sockets. You're bored of the book you're reading or you have none with you. Reasonable resources such as a pen and pad of paper are available. Rules can be bent within reason. As daft examples, things I have thought about are: How I might optimise the boarding of a plane. How I might improve the UI of a departure board.

    Read the article

  • How to "reset" subviews of scrollview for new items?

    - by Tom Tallak Solbu
    I have a MasterViewController displaying Items. Selecting an Item (ItemA), displays images of ItemA in a DetailViewController. The DeatilViewController contains a scrollView, displaying all the images. When tableView:didSelectRowAtIndexPath is called, the images is added to an UIImageView, that is tagged and added as a subview to a scrollview. NSUInteger i; for (i = 1; i <= numberOfImages; i++) { NSString *imageName = [ItemAImages objectAtIndex:i-1]; UIImage *image = [UIImage imageNamed:imageName]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.tag = i; [scrollView addSubview:imageView]; } Works fine. But when I go back to the MasterViewController, and selects a ItemB, the ItemA is still displayed, like the iPhone simulator refuses to forget the previous scrollview,containing ItemA images. I have tried [subview removeFromSuperview]; which results in either no scrollview at all, or no effect. Depending on when this method is called. How can I "reset" the scrollview for the next Item?

    Read the article

  • Ajax, not sending querystring data

    - by Tom Gullen
    var http = false; // Creates xmlhttp object if (navigator.appName == "Microsoft Internet Explorer") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { http = new XMLHttpRequest(); } http.onreadystatechange = function() { if (http.readyState == 4) { alert(http.responseText); } } // Functions to calculate optimum layout etc. function compute() { var statusSpan = document.getElementById("cwStatus"); document.getElementById("fader").style.display = ""; document.getElementById("computingWait").style.display = ""; statusSpan.innerHTML = "<b>Status:</b> Realigning sattelites" http.open("GET", "alg.aspx?cr=8&cc=7&sq=3,3", true); http.send(null); } This code sort of works, but the querystring data isn't being passed through. It keeps returning an ASPX error page which only happens when there is no querystring data. Thanks for any help

    Read the article

  • Quaternion Cameras and projectile vectors

    - by Tom J Nowell
    In our software we have a camera based on mouse movement, and a quarternion at its heart. We want to fire projectiles from this position, which we can do, however we want to use the camera to aim. The projectile takes a vector which it will add to its position each game frame. How do we acquire such a vector from a given camera/quaternion?

    Read the article

  • Possible to add an EventListener to a function for Actionscript 3?

    - by Tom
    I'm trying to setup something like Aspect Oriented Programming in Actionscript 3, basically the only thing I need to be able to do is something like this: SomeClass.getMethod("methodName").addEventListener(afterMethodExecuted, function() { //run code }); This way I can run code after (or before) any method in any class has run, allowing numerous new possibilities. How should I implement this?

    Read the article

  • Accessing smart card with Java

    - by Tom Brito
    I'm trying to learn about how does Java access smart cards, due to a project analysis. I wonder if there is any kind of virtual smart card which I could use to make some tests with Java? By the way, I've read about Java Card, and looks like it is used to run Java in cards, not to smart card data access, right?

    Read the article

  • How do I write a bash script to restart a process if it dies?

    - by Tom
    I have a python script that'll be checking a queue and performing an action on each item: # checkqueue.py while True: check_queue() do_something() How do I write a bash script that will check if it's running, and if not, start it. Roughly the following pseudo code (or maybe it should do something like ps | grep?): # keepalivescript.sh if processidfile exists: if processid is running: exit, all ok run checkqueue.py write processid to processidfile I'll call that from a crontab: # crontab */5 * * * * /path/to/keepalivescript.sh Thanks in advance.

    Read the article

  • How to set -Xbootclasspath for a JRE with a custom launcher?

    - by Tom
    I have a Java application which is using a certain Java Runtime Environment. The application uses it's own launcher to startup the java virtual machine. No use of the java.exe, javaw.exe, javaws.exe binaries is being made -- as the application seems to have it's own launcher which is a different executable. This custom launcher is using the rest of the JRE files, such as bin/client/jvm.dll and rt.jar package etc. Now, the problem is that I want to set a boot class path for this custom launcher. The custom launcher does not support the -Xbootclasspath command line parameter, like the default java.exe does. Is there any way for me to set the boot class path now for this java runtime environment? Thanks in advance. Some things to keep in mind: I do not have the source of this application This is meant for self and personal debugging use only, not for distribution

    Read the article

  • svn: Item <folder> is out of date

    - by Tom Brito
    I'm using subclipse, and always when delete a folder in Eclipse, and try to commit it, the following errors raise: svn: Item <folder> is out of date svn: DELETE of <folder>: 409 Conflict (http://myintranet) Deleting and commiting via command line works fine, but what's wrong with doing it via subclipse? Is anyone more experiencing this problem? (I experienced this problem in Ubuntu 9.10 and 10.04; last Eclipse version; and subclipse 1.4 - as the next versions of subclipse have much more bugs) --updated: Its when I delete folders, not files

    Read the article

  • Update model objects across different activities

    - by Tom Esterez
    Lets say I have 2 activities: A: A ListView displaying articles titles. Data is fetched from a web server and converted from XML to a list of ArticleSummary. Only user titles and id are returned by the server. Click on a title starts activity B. B: A form to edit an article. Article is fetched from server. When the user hits OK, modifications are sent to the server and activity closed. When the user go back to activity A, I would like to update the article title without any additional web request. I was thinking about the following solution: When article is modified, send a broadcast event with article id and new attributes values. Listen for this event on activity A Update the ArticleSummary object notify data changed on ListView Is there a better approach ?

    Read the article

  • Cannot add or update a child row: a foreign key constraint fails

    - by Tom
    table 1 +----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+----------------+ | UserID | int(11) | NO | PRI | NULL | auto_increment | | Password | varchar(20) | NO | | | | | Username | varchar(25) | NO | | | | | Email | varchar(60) | NO | | | | +----------+-------------+------+-----+---------+----------------+ table2 +------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------+----------------+ | UserID | int(11) | NO | MUL | | | | PostID | int(11) | NO | PRI | NULL | auto_increment | | Title | varchar(50) | NO | | | | | Summary | varchar(500) | NO | | | | +------------------+--------------+------+-----+---------+----------------+ com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (myapp/table2, CONSTRAINT table2_ibfk_1 FOREIGN KEY (UserID) REFERENCES table1 (UserID)) What have I done wrong? I read this: http://www.w3schools.com/Sql/sql_foreignkey.asp and i don't see whats wrong. :S

    Read the article

  • Can I share code & resources between Android projects without using a library?

    - by Tom
    The standard advice for sharing code & resources between Android projects is to use a library. Personally I find this works poorly if (a) the shared code changes a lot, or (b) your computer isn't fast enough. I also don't want to get into deploying multiple APK's, which seems to be necessary when I use dependent projects (i.e. Java Build Path, Projects Tab). On the other hand, sharing a folder of source code by using the Eclipse linked source feature works great (Java Build Path, Source tab, Link Source button), but for these two issues: 1) I can't use the same technique to share resources. I can create the link to the resources parent folder but then things get wonky and the shared resources don't get compiled (I'm using ADT 21). 2) So then I settle for copying the shared resources into each project, but this doesn't work because either. The shared code can't import the copy of its resources because it doesn't know the package name of the project that uses it. The solution I've been using is to access the resources dynamically, but that has become cumbersome as the number of resources grows. So, I need a solution to either (1) or (2), or I'll have to go back to a library project. (Or maybe there is another option I haven't thought of?)

    Read the article

  • File name containing more than 16 characters inside parentheses failing

    - by Tom anMoney
    I am generating file names that contain a timestamp in the following format: "base_name (yyyy-mm-dd hhmmss).ext" This seems to cause a problem on Android. Here's my log: /storage/sdcard0/anMoney/transfer/Net worth over time _ Forecast (2012-11-19 110550).pdf E/Gmail (11802): java.io.FileNotFoundException: /storage/sdcard0/myapp/transfer/Net worth over time _ Forecast (2012-11-19 110550).pdf: open failed: ENOENT (No such file or directory) E/Gmail (11802): at libcore.io.IoBridge.open(IoBridge.java:416) E/Gmail (11802): at java.io.FileInputStream.<init>(FileInputStream.java:78) E/Gmail (11802): at java.io.FileInputStream.<init>(FileInputStream.java:105) E/Gmail (11802): at android.content.ContentResolver.openInputStream(ContentResolver.java:445) E/Gmail (11802): at com.google.android.gm.provider.MailEngine.cacheAttachment(MailEngine.java:3054) E/Gmail (11802): at com.google.android.gm.provider.MailEngine.sendOrSaveDraft(MailEngine.java:2746) E/Gmail (11802): at com.google.android.gm.provider.MailProvider.sendOrSaveDraft(MailProvider.java:477) E/Gmail (11802): at com.google.android.gm.provider.MailProvider.insert(MailProvider.java:534) E/Gmail (11802): at android.content.ContentProvider$Transport.insert(ContentProvider.java:201) E/Gmail (11802): at android.content.ContentResolver.insert(ContentResolver.java:864) E/Gmail (11802): at com.google.android.gm.provider.Gmail$MessageModification.sendOrSaveNewMessage(Gmail.java:3576) E/Gmail (11802): at com.google.android.gm.ComposeActivity$SendOrSaveTask$1.onInitializationComplete(ComposeActivity.java:1765) E/Gmail (11802): at com.google.android.gm.provider.MailEngine$5.run(MailEngine.java:1006) E/Gmail (11802): at android.os.Handler.handleCallback(Handler.java:615) E/Gmail (11802): at android.os.Handler.dispatchMessage(Handler.java:92) E/Gmail (11802): at android.os.Looper.loop(Looper.java:137) E/Gmail (11802): at android.os.HandlerThread.run(HandlerThread.java:60) E/Gmail (11802): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory) Now, if I trim the file name to have only 16 characters within the parentheses, everything is working as expected. I am able to send the file as a GMail attachment. The following file name is working fine: /storage/sdcard0/myapp/transfer/Net worth over time _ Forecast (2012-11-19 11070).pdf I tried the following troubleshooting: It's not the overall length of the file name, as if I shorten the base name, the same behavior remains It's not GMail, uploading the file to Google Drive fails similarly 16 characters inside the parentheses work, but not 17 It's not the space character inside the parentheses that causes the issue, as I replaced it with a dash and it's the same problem. Anybody has any ideas on what's going on here?

    Read the article

  • Objective-C retain counts clarification

    - by Tom
    Hey, I kind of understand what's retain counts for. But not totally. I looked on google a lot to try to understand but still I don't. And now I'm in a bit of code (I'm doing iPhone development) that I think I should use them but don't know totally how. Could someone give me a quick and good example of how and why using them? Thanks!

    Read the article

  • jQuery child of clicked element

    - by Tom
    Hi, I've got a list of links which have a click event attached to them, I need to get the ID from the child A link. So in the example below if I clicked the first list element I'd need google retuned. I've tried '$this a' but can't quite work out the syntax. jQuery: $("ul li").click(function(event){ $("input").val($(this).html()); } ); html: <ul> <li><a href="http://www.google.com" id="google">Google</a> </ul>

    Read the article

  • How to encrypt a RSAKey using another RSAKey?

    - by Tom Brito
    I know its not the usual thing to do. But the specification I'm implementing is discribed this way, and I cannot run out. I was trying to encrypt the modulus and exponent of the private key, but the following test code raises an exception because the byte array is 1 byte larger then the maximum allowed by RSA block: import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import javax.crypto.Cipher; import org.apache.commons.lang.ArrayUtils; public class TEST { public static KeyPair generateKeyPair() throws NoSuchAlgorithmException, NoSuchProviderException { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA", "BC"); keyPairGenerator.initialize(1024); return keyPairGenerator.generateKeyPair(); } public static void main(String[] args) throws Exception { KeyPair keyPair = generateKeyPair(); RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); System.out.println("Priv modulus len = " + privateKey.getModulus().bitLength()); System.out.println("Priv exponent len = " + privateKey.getPrivateExponent().bitLength()); System.out.println("Priv modulus toByteArray len = " + privateKey.getModulus().toByteArray().length); byte[] byteArray = privateKey.getModulus().toByteArray(); // the byte at index 0 have no value (in every generation it is always zero) byteArray = ArrayUtils.subarray(byteArray, 1, byteArray.length); System.out.println("byteArray size: " + byteArray.length); RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); Cipher cipher = Cipher.getInstance("RSA", "BC"); cipher.init(Cipher.ENCRYPT_MODE, publicKey); byte[] encryptedBytes = cipher.doFinal(byteArray); System.out.println("Success!"); } } (obs. its just a test, i would never encrypt the private key with its pair public key) The byte array is 128 bytes, the exactly maximum allowed by a RSA block, so why the exception? And how to fix it?

    Read the article

  • C# convert binary data to string?

    - by Tom
    Hi, just going through the registry retrieving values and binary is making my file outputer fall. I was wondering how could I convert Subkey.getValue(value[i]) into a String if the Value type is binary? Thank you in advance

    Read the article

  • Meshing different systems of keys together in XML Schema

    - by Tom W
    Hello SO, I'd like to ask people's thoughts on an XSD problem I've been pondering. The system I am trying to model is thus: I have a general type that represents some item in a hypothetical model. The type is abstract and will be inherited by all manner of different model objects, so the model is heterogeneous. Furthermore, some types exist only as children of other types. Objects are to be given an identifier, but the scope of uniqueness of this identifier varies. Some objects - we will call them P (for Parent) objects - must have a globally unique identifier. This is straightforward and can use the xs:key schema element. Other objects (we can call them C objects, for Child) are children of a P object and must have an identifier that is unique only in the scope of that parent. For example, object P1 has two children, object C1 and C2, and object P2 has one child, object C3. In this system, the identifiers given could be as follows: P1: 1 (1st P object globally) P2: 2 (2nd P object globally) C1: 1 (1st C object of P1) C2: 2 (2nd C object of P1) C3: 1 (1st C object of P2) I want the identity syntax of every model object to be identical if possible, therefore my first pass at implementing is to define a single type: <xs:complexType name="ModelElement"> <xs:attribute name="IDMode" type="IdentityMode"/> <xs:attribute name="Identifier" type="xs:string"/> </xs:complexType> where the IdentityMode is an enumerated value: <xs:simpleType name="IdentityMode"> <xs:restriction base="xs:string"> <xs:enumeration value="Identified"/> <xs:enumeration value="Indexed"/> <xs:enumeration value="None"/> </xs:restriction> </xs:simpleType> Here "Identified" signifies a global identifier, and "Indexed" indicates an identifier local only to the parent. My question is, how do I enforce these uniqueness conditions using unique, key or other schema elements based on the IdentityMode property of the given subtype of ModelElement?

    Read the article

  • Best workflow with Git & Github

    - by Tom Schlick
    Hey guys, im looking for some advice on how to properly structure the workflow for my team with git & github. we are recent svn converts and its kind of confusing on how we should best setup our day-to-day workflow. Here is a little background, im comfortable with command line and my team is pretty new to it but can follow use commands. We all are working on the same project with 3 environments (development, staging, and production). We are a mix of developers & designers so some use the Git GUI and some command line. Our setup in svn went something like this. We had a branch for development, staging and production. When people were confident with code they would commit and then merge it into the staging. The server would update itself and on a release day (weekly) we would do a diff and push the changes to the production server. Now i setup those branches and got the process with the server running but its the actual workflow that is confusing the hell out of me. It seems like overkill that every time someone makes a change on a file they would create a new branch, commit, merge, and delete that branch... from what i have read they would be able to do it on a specific commit (using the hash), do i have that right? is this an acceptable way to go about things with git? any advice would be greatly appreciated.

    Read the article

  • is it possible to use a python scrapper in a website?

    - by Tom
    I want to scrap a website and use that content in a website of my own. I am just wondering if that can be done with python 2.7, and if so how? If not, do I have to use JavaScript to scrap it? And do you have a good place to learn how to do that or good libraries for it. For those of you wondering, the website I am scrapping is legal, and they allow for this to be done. I have searched all over but apparently nobody tries to implement these scrappers that they write. I can write a web scrapper in python just fine. Say my scrapper scraps a name from a wikipedia page (John Doe for example), how can I use that name that I get in my website? Another update, I have found pjsrape and PhantomJS. I have only found one stack overflow post and the github examples with aren't very intuitive. If anybody has any experience or better ways to do it I would very much appreciate it

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >