Search Results

Search found 2716 results on 109 pages for 'michael tanner'.

Page 93/109 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • XMLHttpRequest.status always returning 0

    - by Michael
    html <a href="#" onclick="MyObj.startup()">click me</a> js code var MyObj = { startup : function() { var ajax = null; ajax = new XMLHttpRequest(); ajax.open('GET', 'http://www.nasa.gov', true); ajax.onreadystatechange = function(evt) { if(ajax.readyState == 4) { if (ajax.status == 200) { window.dump(":)\n"); } else { window.dump(":(\n"); } } } ajax.send(null); } } ajax.status always returning 0, no matter which site it is, no matter what is the actual return code. I say actual, because ajax.statusText returning correct value, eg OK or Redirecting... ajax.readyState also returns proper values and 4 at the end.

    Read the article

  • Blittable Vs. Non-Blittable in IL

    - by Michael Covelli
    I'm trying to make sure that my Managed to Unmanaged calls are optimized. Is there a quick way to see by looking at the IL if any non-blittable types have accidentally gotten into my pinvoke calls? I tried just writing two unmanaged functions in a .dll, one that uses bool (which is non-blittable) and one that uses ints. But I didn't see anything different when looking at the IL to let me know that it was doing something extra to marshal the bool.

    Read the article

  • Assign RegEx submatches to variables or map (C++/C)

    - by Michael
    I need to extract the SAME type of information (e.g. First name, Last Name, Telephone, ...), from numerous different text sources (each with a different format & different order of the variables of interest). I want a function that does the extraction based on a regular expression and returns the result as DESCRIPTIVE variables. In other words, instead of returning each match result as submatch[0], submatch[1], submatch[2], ..., have it do EITHER of the following: 1.) return std::map so that the submatches can be accessed via: submatch["first_name"], submatch["last_name"], submatch["telephone"] 2.) return a variables with the submatches so that the submatches can be accessed via: submatch_first_name, submatch_last_name, submatch_telephone I can write a wrapper class around boost::regex to do #1, but I was hoping there would be a built-in or a more elegant way to do this in C++/Boost/STL/C.

    Read the article

  • Click to select from a list of tags in jQuery

    - by Michael Doornbos
    I'm struggling to find a tag selection UI for a rails app. Ideally it would be something like the selection here on Stackoverflow, or on Delicious or Digg. I want users to be able to select multiple tags with a single click. We're already using jQuery, so it makes sense to use something that takes advantage of that. I've used the selection ui in jQuery and I'm not thrilled about having users need to hold down ctrl to select multiple tags.

    Read the article

  • How do I find the original git user?

    - by Michael
    Hi all, I'm trying to figure out the current installation of git on a slicehost server. Following this guide, one of the early steps is to add a user, git. However, when I do a cat /etc/passwd, I don't see this user name... How do I find where my git user is? Thanks!

    Read the article

  • Function to swap pointers in Objective-C

    - by Michael
    - (void) swapController:(MyViewController*)controller1 with:(MyViewController*)controller2 { MyViewController *swap = controller2; controller2 = controller1; controller1 = swap; } Looks like this doesn't work because I'm not passing references. How to do it anyway?

    Read the article

  • php vs python django or something else for CMS module

    - by Michael
    We're looking to develop a CMS module for our website and I need some help in choosing the language/framework for this project. Basically we need to develop a "help' module like this one from ebay http://pages.ebay.com/help/index.html which will contain a lot of static pages with nice URLs for SEO. The application must run fast using low computer resources. We have been looking to use php on a custom made mvc framework but we received advice from other sources that py/django is the exactly language/framework that we need in terms of maintainability and development speed because it was developed for exactly this kind of projects so I need an expert advice on this matter with pro and cons for each choice.

    Read the article

  • Isotope active class when using select menu

    - by Michael
    I am using Metafizzy's Isotope plugin and have it set up to filter using a select menu as seen here: http://jsfiddle.net/trewknowledge/jJZEN/ $(function() { var $container = $('#container'), $select = $('#filters select'); $container.isotope({ itemSelector: '.item' }); $select.change(function() { var filters = $(this).val(); ; $container.isotope({ filter: filters }); }); });? What I am trying to figure out is how I would add a highlight/active class to the selected elements when the filters variable is already being used.

    Read the article

  • disable the Home Button and Back Button"

    - by michael
    i want way to disable the Home Button & Back Button when click on checkbox in application , my application on version 4.2.2 i have code but not work when click on checkbox work stop to application public void HardButtonOnClick(View v) { boolean checked1 = ((CheckBox) v).isChecked(); if(checked1) { SQLiteDatabase db; db = openOrCreateDatabase("Saftey.db", SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setVersion(1); db.setLocale(Locale.getDefault()); db.setLockingEnabled(true); ContentValues values = new ContentValues(); values.put("hardBtn", "YES"); db.update("Setting", values, "id = ?", new String[] { "1" }); Toast.makeText(this, "Hard Button Locked", Toast.LENGTH_LONG).show(); //SharedPreferences pref = getSharedPreferences("pref",0); //SharedPreferences.Editor edit = pref.edit(); //edit.putString("hard","yes"); //edit.commit(); /* String Lock="yes" ; Bundle bundle = new Bundle(); bundle.putString("key", Lock); Intent a = new Intent(Change_setting.this, ChildMode.class); a.putExtras(bundle); startActivity(a);*/ super.onAttachedToWindow(); this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); isLock = true; } else { SQLiteDatabase db; db = openOrCreateDatabase("Saftey.db", SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setVersion(1); db.setLocale(Locale.getDefault()); db.setLockingEnabled(true); ContentValues values = new ContentValues(); values.put("hardBtn", "NO"); db.update("Setting", values, "id = ?", new String[] { "1" }); //SharedPreferences pref = getSharedPreferences("pref",0); //SharedPreferences.Editor edit = pref.edit(); //edit.putString("hard","no"); //edit.commit(); Toast.makeText(this, "Hard Button Un-Locked", Toast.LENGTH_LONG).show(); isLock = false; } } how can work it??

    Read the article

  • Rails cookies not working right

    - by Michael Waxman
    Rails is setting and returning a remember_token cookie like this: = cookies[:remember_token] = value6c69b17681d2bf316f8eexpiresThu Jun 10 14:55:00 -0400 2010 In other words, when I'm calling the cookie I don't just get the value. Why is this? I am setting the cookie as follows: cookies[:remember_token] = { :value => @user.remember_me, :expires => 1.year.from_now} What's going on here?

    Read the article

  • creating a static vb.net "app" that consist of a single picture

    - by michael
    I need to create a vb.net program that consists of a unmovable, always on top bitmap, with no menu bar or anything, and does not show up in the task bar as program. It needs to always start in the same place. Essentially I need to mask a part of the screen by using a bitmap that blends into the scenery. I am not sure which properties I need to tweak to achieve all of this.

    Read the article

  • Does strokeRect: of NSBezierPath always draw a transparent rect? (Cocoa OSX)

    - by Michael Minerva
    I am trying to make a custom selection box for an image view I created and I am trying to use strokeRect: from NSBezierPath but it always seems to be transparent. Called the method set to set the color the blackColor and then also tried using olorWithDeviceRed:green:blue:alpha: but no matter what I have tried the rectangle created always seems to be transparent. Is there a better method to use to draw an empty rectangle?

    Read the article

  • How to add a 9patch image to a xml drawable

    - by michael
    Hi, I have the following drawable which draw a rectangle. Can you please tell me how can I add a 9patch image as the background of this drawable? <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <stroke android:width="1dp" android:color="#FFFFFFFF" /> <solid android:color="@android:color/transparent"/> </shape> Thank you.

    Read the article

  • Colored sphere in OpenGL

    - by Michael
    Ok so here's link to code in c++ http://pastebin.com/nfPmd0um (with polish comments ;) I would like to make a sphere divided by four planes. Each part of sphere should have a different color. At the moment it displays only 2 colored parts. I know that something's wrong with that part of code in Display() function: glEnable (GL_CLIP_PLANE0 +i); glDisable (GL_CLIP_PLANE1 -i); glEnable (GL_CLIP_PLANE2 +i); glDisable (GL_CLIP_PLANE3 -i); Anyone know what should i change? Thanks in advance :)

    Read the article

  • Why should I call self=[super init]

    - by Michael
    Let's say I create my class and its init method. Why should I call and return value of superclass init assigned to self? Which cases it covers? I would appreciate examples why would I need it for Cocoa superclass and non-Cocoa.

    Read the article

  • Subclassing Cocoa means no subclass ivars in some cases?

    - by Michael
    The question is generally coming from self = [super init]. In case if I'm subclassing NSSomething and in my init's method self = [super init] returns object of different class, does it mean I am not able to have my very own ivars in my subclass, just because self will be pointing to different class? Appreciate if you could bring some examples if my statement is wrong.

    Read the article

  • Sinatra: rendering snippets (partials)

    - by Michael
    I'm following along with an O'Reilly book that's building a twitter clone with Sinatra. As Sinatra doesn't have 'partials' (in the way that Rails does), the author creates his own 'snippets' that work like partials. I understand that this is fairly common in Sinatra. Anyways, inside one of his snippets (see the first one below) he calls another snippet text_limiter_js (which is copied below). Text_limiter_js is basically a javascript function. If you look at the javascript function in text_limiter_js, you'll notice that it takes two parameters. I don't understand where these parameters are coming from because they're not getting passed in when text_limiter_js is rendered inside the other snippet. I'm not sure if I've given enough information/code for someone to help me understand this, but if you can, please explain. =snippet :'/snippets/text_limiter_js' %h2.comic What are you doing? %form{:method => 'post', :action => '/update'} %textarea.update.span-15#update{:name => 'status', :rows => 2, :onKeyDown => "text_limiter($('#update'), $('#counter'))"} .span-6 %span#counter 140 characters left .prepend-12 %input#button{:type => 'submit', :value => 'update'} text_limiter_js.haml :javascript function text_limiter(field,counter_field) { limit = 139; if (field.val().length > limit) field.val(field.val().substring(0, limit)); else counter_field.text(limit - field.val().length); }

    Read the article

  • capture the last WM_SIZE

    - by Michael
    When I resize my window I want to tell another part of my program that my window has changed size. I read on MSDN that: WM SIZE Message The WM SIZE message is sent to a window after its size has changed. However, I receive the WM_SIZE even when dragging. I noticed that there is also a WM_SIZING message that is sent when my window is resizing. At the moment I do not see the difference between WM_SIZE and WM_SIZING. Is there some way I can capture the very last WM_SIZE message, as to not "spam" my program with resize messages?

    Read the article

  • Pressed Listener for a View

    - by michael
    Hi, In android, is there such a thing for listening if a View is pressed? In background drawable, i can set assert depends on the view is pressed or not. Is it possible for me to add a Listener for a View when I pressed it? Thank you.

    Read the article

  • Which class will be instanciated

    - by Michael
    Say I have 2 subclasses from UIViewController, class A and class B. In Main nib file an object is representing class A and it is set to load file from Secondary nib file. The owner of Secondary nib is of class B. The question is - from which class an object in Main nib file will be instanciated once the nib files unarchived in the memory? The reason this question arised is that I have to take care myself if such reference to external NIB file present, to ensure that the first nib's object and second nib's owner is same. Please correct me if my statement is wrong.

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >