Search Results

Search found 708 results on 29 pages for 'alan storm'.

Page 12/29 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • jquery set focus on dynamic content?

    - by Alan
    In jquery I've appended a <li> element to an unordered list. How do I focus on the newly created <li> ? If I do the following: $("ul").append('<li><input type="text">hi!</input></li>'); $("li:last").focus(); //doesn't work because new <li> isn't in dom yet the focus doesn't work, as noted above. I know jquery 1.4.2 has a live() event handler which allows you load event handlers to dynamically added elements, but I'm not sure what I'm doing wrong: $(document).ready(function () { $('li').live('load', function () { alert("hi!"); $("li:last").focus(); }); });

    Read the article

  • Titanium webview bug or "feature"? Numbers converted to telephone links

    - by Alan Neal
    I can't stop Titanium's webview from converting numbers to telephone links. For instance, let's say I programmatically set the innerHTML of a div called test to 96840664702 and then write javascript... alert(document.getElementById('test').innerHTML In Mobile Safari on the iPhone, Firefox, etc., the alert will read "96840664702". If I point Titanium's webview to the same page, the alert will read: <a href="tel:96840664702" x-apple-data=detectors="true">96840664702</a> How can I globally disable the data-detectors? I tried a couple meta-tags... <meta name=”format-detection” content=”telephone=no” > <meta name="x-" http-equiv="x-rim-auto-match" forua="true" content="none"/> ... but they didn't work. I couldn't find a reference for a meta tag that specifically mentioned Apple's detectors. Again, it's only a problem in Titanium's webview. It works everywhere else.

    Read the article

  • Finding first alphabetic character in a DB2 database field

    - by Paul Alan Taylor
    I'm doing a bit of work which requires me to truncate DB2 character-based fields. Essentially, I need to discard all text which is found at or after the first alphabetic character. e.g. 102048994BLAHBLAHBLAH becomes:- 102048994 In SQL Server, this would be a doddle - PATINDEX would swoop in and save the day. Much celebration would ensue. My problem is that I need to do this in DB2. Worse, the result needs to be used in a join query, also in DB2. I can't find an easy way to do this. Is there a PATINDEX equivalent in DB2? Is there another way to solve this problem? If need be, I'll hardcode 26 chained LOCATE functions to get my result, but if there is a better way, I am all ears.

    Read the article

  • WPF RichTextBox - Formatting of typed text

    - by Alan Spark
    I am applying formatting to selected tokens in a WPF RichTextBox. To do this I get a TextRange that encompasses the token that I would like to highlight. I will then change the color of the text like this: textRange.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Blue); This is happening on the TextChanged event of my RichTextBox. The formatting is applied as expected, but continuing to type text will result in the new text inheriting the formatting that has already been applied to the adjacent word. I would like the formatting of any new text to use the default formatting options defined in the RichTextBox properties. Is this possible? Alternatively I could highlight all tokens that I don't want be blue with the default formatting options but this feels awkward to me.

    Read the article

  • drscheme c# adapter

    - by alan
    Hi guys i need to integrate drscheme into my c# code for my assignment but i could find any luck on the web. Can anyone help me ? I tried ironscheme but got the following error. The type or namespace name 'Dynamic' does not exist in the namespace 'System' (are you missing an assembly reference?) C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Integration\Integration\Form1.cs 2 14 Integration Have tried googling the error message but could find any related stuff.

    Read the article

  • Android How do i overwrite the filter for my ArrayAdapter?

    - by alan
    Hey guys my first post here... Im trying to write a custom filter to filter the arraylist in my arrayadapter such that my listview is filtered when i click on the button. For instance when i click on my button public void onClick(View arg0) { String abc = "abc"; m_adapter.getFilter().filter(abc); } However, when i click on my button, my app terminate unexpectedly. Here is my code for the arrayadapter and filter. Please help me. package com.ntu.rosemobile.searchlist; public class ResultsAdapter extends ArrayAdapter<SearchItem> implements Filterable{ public ArrayList<SearchItem> subItems; public ArrayList<SearchItem> allItems; private LayoutInflater inflater; private PTypeFilter filter; public ResultsAdapter(Context context, int textViewResourceId, ArrayList<SearchItem> items) { super(context, textViewResourceId, items); this.subItems = items; this.allItems = this.subItems; inflater= LayoutInflater.from(context); } @Override public Filter getFilter() { if (filter == null){ filter = new PTypeFilter(); } return filter; } //@Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { v = inflater.inflate(R.layout.listrow, null); } SearchItem o = subItems.get(position); if (o != null) { TextView pname = (TextView) v.findViewById(R.id.productname); TextView neg = (TextView) v.findViewById(R.id.negNum); TextView pos = (TextView) v.findViewById(R.id.posNum); TextView neu = (TextView) v.findViewById(R.id.neuNum); WebImageView productPhoto = (WebImageView)v.findViewById(R.id.pPhoto); if(productPhoto!=null){ productPhoto.setImageUrl(o.getImageUrl().toString()); productPhoto.loadImage(); } if(pname!= null){ pname.setText(o.getProductName().toString()); } if (neg != null) { String a = "" + o.getNegativeReviews(); neg.setText(a); } if(neu != null){ String a = "" + o.getNeutralReviews(); neu.setText(a); } if(pos != null){ String a = "" + o.getPositiveReviews(); pos.setText(a); } } return v; } private class PTypeFilter extends Filter{ @SuppressWarnings("unchecked") @Override protected void publishResults(CharSequence prefix, FilterResults results) { // NOTE: this function is *always* called from the UI thread. subItems = (ArrayList<SearchItem>)results.values; notifyDataSetChanged(); } @SuppressWarnings("unchecked") protected FilterResults performFiltering(CharSequence prefix) { // NOTE: this function is *always* called from a background thread, and // not the UI thread. FilterResults results = new FilterResults(); ArrayList<SearchItem> i = new ArrayList<SearchItem>(); if (prefix!= null && prefix.toString().length() > 0) { for (int index = 0; index < allItems.size(); index++) { SearchItem si = allItems.get(index); if(si.getPType().compareTo(prefix.toString()) == 0){ i.add(si); } } results.values = i; results.count = i.size(); } else{ synchronized (allItems){ results.values = allItems; results.count = allItems.size(); } } return results; } } }

    Read the article

  • Using RVM with GVim (Cream): rvm command not found.

    - by Alan Peabody
    I am trying to move to GVim(cream) as my primary editor on Ubuntu. I am using the wonderful rails.vim, however I also am using RVM. Rvm works fine when doing things in a shell, and the ruby version I would like to use in rails.vim is the version set as default (but not the system version). When I try to run things like :Rgenerate migration migration_name I get: ... Missing Rails 2.3.8 gem. ... If I try: :!rvm use default I get: /bin/bash: rvm: command not found Obviously cream is not using my bash profile. What can I do to remedy this and get it working? Thanks.

    Read the article

  • Handling Hide/Show dock icon menu in AIR on OS X

    - by Alan
    I'm trying to figure out how to access the Show/Hide option that OS X automatically adds to the dock icon menu. The problem is that no matter what I do to hide my app, the dock icon menu will always show Hide and only if I click that option does it switch to Show. I want to have my app toggle visibility using the Invoke event but if a user hides the app that way and then right clicks the dock icon, they won't see Show, just Hide. Is there an event I can monitor for it? Or that I can trigger? I just want to have that menu option status be synced to whatever visibility status I set programatically. This has been driving me nuts!

    Read the article

  • Adapting existing HTML/Javascript model to Titanium's latest release (v 0.9)

    - by Alan Neal
    In pre-0.9 versions of Titanium, one could simply specify an .html file (local or remote) in the tiapp.xml file and interact with it in the same manner as one would on a website. As of version 0.9, that is no the longer case. One creates their entire app dynamically. Unfortunately, this broke my previous implementation and, other than an updated Kitchen Sink, much of the new model and API calls are not covered in the documentation (e.g., createLabel). So, my question is this... What are the simplest steps for re-creating the previous effect (knowingly forgoing some of the advantages of the Titanium's latest approach if necessary)? My previous implementation was exactly as it functions on the website. The website has a single index.html file with no content other than links to JavaScript and style files. The document body's onload event called the first JavaScript function (located in the main script) and, from that point forth, the entire content was dynamically created. How can I set up the latest version of Titanium so that I am poised to do the exact same thing? BTW: Whereas I previously had the choice to keep the files local or remote, I don't believe that remote access (e.g., simply using the webView widget to point to the website) is viable. That's because pages displayed via the webView do not have access to most of the API. Since the iPhone and Safari browsers do not support the file input type, the only means for uploading files (something my app requires) is calling Titanium's function. Thanks in advance.

    Read the article

  • Virtual Inheritance Confusion

    - by alan
    I'm reading about inheritance and I have a major issue that I haven't been able to solve for hours: Given a class Bar is a class with virtual functions, class Bar { virtual void Cook(); } What is the different between: class Foo : public Bar { virtual void Cook(); } and class Foo : public virtual Bar { virtual void Cook(); } ? Hours of Googling and reading came up with lots of information about its uses, but none actually tell me what the difference between the two are, and just confuse me more. Thanks!

    Read the article

  • Axis2 aar file structure question

    - by Alan Mangroo
    I trying to create an Axis2 arr file that has 2 package heirachies. However my service class is throwing a class not found exception when it tries to use classes in the utils package. Is it possible to do this in Axis? Any advice is very welcome. Below is an example of the structure I am trying to create (utils and org are both top level packages)... |- SampleService |-- META-INF |--- services.xml |-- utils |---MyUtils.class |-- org |---- apache |---- axis2 |----- axis2userguide |------ SampleService.class

    Read the article

  • Batch rename file extensions, including subdirectories

    - by Alan
    I'm renaming empty file extensions with this command: rename *. *.bla However, I have a folder with hundreds of such subfolders, and this command requires me to manually navigate to each subfolder and run it. Is there a command that I can run from just one upper level folder that will include all the files in the subfolders?

    Read the article

  • Does anyone know what these Oracle AQ JMS XA properties do?

    - by Alan Chan
    I'm using Oracle Advanced Queues via JMS from within Websphere App Server. Does anyone know what effect the following two properties have:- - oracle.jms.useEmulatedXA - oracle.jms.useNativeXA I have seen mentioned in some blogs and quick start guides, usually in sentences along the lines of "Add -Doracle.jms.useEmulatedXA=false -Doracle.jms.useNativeXA=true to the JAVA_PROPERTIES variable", without any explanation as to what they do:- e.g. http://biemond.blogspot.com/2008/11/using-aq-in-weblogic-103.html http://sqltech.cl/doc/oas10gR31/integrate.1013/b28994/adptr_aq.htm#CHDEADFB I'm curious as to what these two properties actually do, and what the implications of setting them are, even though they don't seem to have any affect on our app regardless of whether we set them or not. Googling hasn't given any answers, does anyone have any clue what they actually do?

    Read the article

  • PHP wrapper that is API-compatible with PDFlib.

    - by David Alan Hjelle
    Are there any wrappers to any of the other PDF generating packages for PHP that provide API compatibility with PDFlib? Our company has been generating PDFs from PHP using PDFlib for many years, but have not upgraded since version 5. Now that we are upgrading some servers, we need either upgrade or find a replacement. I'd like to replace PDFlib with an open-source product that allows commercial use. However, we (foolishly, perhaps) didn't write our own wrapper around PDFlib the first time around, and have many, many lines of code that would need to be changed and tested. I realize I could write my own wrapper, but I find it surprising that my searching thus far has yielded no-one else who has done the same.

    Read the article

  • Java - Common Gotchas

    - by Alan
    In the same spirit of other platforms, it seemed logical to follow up with this question: What are common non-obvious mistakes in Java? Things that seem like they ought to work, but don't. I won't give guidelines as to how to structure answers, or what's "too easy" to be considered a gotcha, since that's what the voting is for. See also: Perl - Common gotchas .NET - Common gotchas

    Read the article

  • How to create a custom ADO Multi Dimensional Catalog with no database

    - by Alan Clark
    Does anyone know of an example of how to dynamically define and build ADO MD (ActiveX Data Objects Multidimensional) catalogs and cube definitions with a set of data other than a database? Background: we have a huge amount of data in our application that we export to a database and then query using the usual SQL joins, groups, sums etc to produce reports. The data in the application is originally in objects and arrays. The problem is the amount of data is so large the export can take 2 hours. So I am trying to figure out a good way of querying the objects in memory, either by a custom OLAP algorithm or library, or ADO MD. But I haven't been able to find an example of using ADO MD without a database behind it. We are using Delphi 2010 so would use ADO ActiveX but I imagine the ADO.NET MD is similar. I realize that if the application data was already stored in a database the problem would solve itself. Also if Delphi had LINQ capability I could query the objects and arrays that way.

    Read the article

  • Date difference in Javascript (ignoring time of day)

    - by Alan
    I'm writing an equipment rental application where clients are charged a fee for renting equipment based on the duration (in days) of the rental. So, basically, (daily fee * number of days) = total charge. For instant feedback on the client side, I'm trying to use Javascript to figure out the difference in two calendar dates. I've searched around, but nothing I've found is quite what I'm looking for. Most solutions I've seen are of the form: function dateDiff1(startDate, endDate) { return ((endDate.getTime() - startDate.getTime()) / 1000*60*60*24); } My problem is that equipment can be checked out and returned at any time of day during those two dates with no additional charge. The above code is calculating the number of 24 hour periods between the two dates, when I'm really interested in the number of calendar days. For example, if someone checked out equipment at 6am on July 6th and returned it at 10pm on July 7th, the above code would calculate that more than one 24 hour period had passed, and would return 2. The desired result is 1, since only one calendar date has elapsed (i.e. the 6th to the 7th). The closest solution I've found is this function: function dateDiff2(startDate, endDate) { return endDate.getDate() - startDate.getDate(); } which does exactly what I want, as long as the two dates are within the same month. However, since getDate() only returns the day of month (i.e. 1-31), it doesn't work when the dates span multiple months (e.g. July 31 to August 1 is 1 day, but the above calcuates 1 - 31, or -29). On the backend, in PHP, I'm using gregoriantojd(), which seems to work just fine (see this post for an example). I just can't find an equivalent solution in Javascript. Anyone have any ideas?

    Read the article

  • PHP: PDOStatement simple MySQL Select doesn't work.

    - by Alan
    Hi I have the following PHP code doing a very simple select into a table. $statement = $db->prepare("SELECT * FROM account WHERE fbid = :fbid"); $statement->bindParam(":fbid",$uid, PDO::PARAM_STR,45); $out = $statement->execute(); $row = $statement->fetch(); $out is true (success) yet $row is null. If I modify the code as follows: $statement = $db->prepare("SELECT * FROM account WHERE fbid = $uid"); $out = $statement->execute(); $row = $statement->fetch(); $row contains the record I'm expecting. I'm at a loss. I'm using the PDO::prepare(), bindParams() etc to protect against SQL Injection (maybe I'm mistaken on that). Please halp.

    Read the article

  • Integrating virtual keyboard on a HP TouchSmart with an Adobe AIR app

    - by Alan
    Hi, Does anyone know if it's possible to integrate the ToushSmart's virtual keyboard with an Adobe AIR application? In most programs (Internet Explorer, Firefox, etc), when a user touches a text field a little keyboard icon automatically pops up which, when pressed, will bring up the virtual keyboard. However, this doesn't happen when clicking on text input fields in Adobe AIR applications. Has anyone had any experience working with AIR/Flash and touchscreens? Is there any API that can tell Windows (or the HP virtual keyboard specifically) that the user has clicked in a text field and that the virtual keyboard should be shown? The text fields are the standard kind (fl.controls.TextInput). Any suggestions would be greatly appreciated. Thanks in advance!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >