Search Results

Search found 2008 results on 81 pages for 'greg smith'.

Page 32/81 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Any hosted versions of jQuery that have the 'Access-Control-Allow-Origin: *' header set?

    - by Greg Bray
    I have been working with jQuery recently and ran into a problem where I couldn't include it in a userscript because xmlhttpRequest uses the same origin policy. After further testing I found that most browsers also support the Cross-Origin Resource Sharing access control defined by W3C as a workaround for issues with same origin policy. I tested this by hosting the jQuery script on a local web server that included the Access-Control-Allow-Origin: * http header, which allowed the script to be downloaded using xmlhttpRequest so that it could be included in my userscript. I'd like to use a hosted version of jQuery when releasing the script, but so far testing with tools like http://www.seoconsultants.com/tools/headers I have not found any sites that allow cross-origin access to the jQuery script. Here is the list I have tested so far: http://www.asp.net/ajaxlibrary/CDN.ashx http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery Are there any other hosted versions of jQuery that do allow cross origin access?

    Read the article

  • XCode GCC-4.0 vs 4.2

    - by John Smith
    I have just changed a compiler option from 4.0 to 4.2. Now I get an error: jump to case label crosses initialization of 'const char* selectorName' It works fine in 4.0 Any ideas?

    Read the article

  • How do you traverse and store XML in Blackberry Java app?

    - by Greg
    I'm having a problem accessing the contents of an XML document. My goal is this: Take an XML source and parse it into a fair equivalent of an associative array, then store it as a persistable object. the xml is pretty simple: <root> <element> <category_id>1</category_id> <name>Cars</name> </element> <element> <category_id>2</category_id> <name>Boats</name> </element> </root> Basic java class below. I'm pretty much just calling save(xml) after http response above. Yes, the xml is properly formatted. import java.io.IOException; import java.util.Hashtable; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.util.Vector; import net.rim.device.api.system.PersistentObject; import net.rim.device.api.system.PersistentStore; import net.rim.device.api.xml.parsers.DocumentBuilder; import net.rim.device.api.xml.parsers.DocumentBuilderFactory; public class database{ private static PersistentObject storeVenue; static final long key = 0x2ba5f8081f7ef332L; public Hashtable hashtable; public Vector venue_list; String _node,_element; public database() { storeVenue = PersistentStore.getPersistentObject(key); } public void save(Document xml) { venue_list = new Vector(); storeVenue.setContents(venue_list); Hashtable categories = new Hashtable(); try{ DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory. newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); docBuilder.isValidating(); xml.getDocumentElement ().normalize (); NodeList list=xml.getElementsByTagName("*"); _node=new String(); _element = new String(); for (int i=0;i<list.getLength();i++){ Node value=list.item(i).getChildNodes().item(0); _node=list.item(i).getNodeName(); _element=value.getNodeValue(); categories.put(_element, _node); } } catch (Exception e){ System.out.println(e.toString()); } venue_list.addElement(categories); storeVenue.commit(); } The code above is the work in progress, and is most likely heavily flawed. However, I have been at this for days now. I can never seem to get all child nodes, or the name / value pair. When I print out the vector as a string, I usually end up with results like this: [{ = root, = element}] and that's it. No "category_id", no "name" Ideally, I would end up with something like [{1 = cars, 2 = boats}] Any help is appreciated. Thanks

    Read the article

  • Detect file creation date on iPhone OS?

    - by Greg Maletic
    I was planning on writing some code whose logic was based upon testing the creation date of a particular file in my app's Documents folder. Turns out, when I call -[NSFileManager attributesOfItemAtPath:error:], NSFileCreationDate isn't one of the provided attributes. Is there no way to discover a file's creation date? Thanks.

    Read the article

  • How do I specify a crossdomain policy file to allow Flash to grab a bitmap from an RTMP (Wowza) vide

    - by Ken Smith
    I'm trying to get a bitmap/snapshot of a Wowza video stream playing on my client, like so: var bitmapData:BitmapData = new BitmapData(view.videoPlayerComponent.width, view.videoPlayerComponent.height); bitmapData.draw(view.videoPlayerComponent); When I do this, I get this error message: SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://localhost:51150/Resources/WRemoteWebCam.swf cannot access rtmp://localhost/videochat/smithkl42._default/. No policy files granted access. I presume the error comes from not being able to locate the appropriate crossdomain.xml file. I'm not quite sure where it's looking for it, and a wireshark sniff was inconclusive, so I've tried placing one in each of the following places: http://localhost/crossdomain.xml http://localhost:1935/crossdomain.xml http://localhost:51150/crossdomain.xml I can retrieve the file successfully from each of those three locations. (I'm pretty sure that the last one wouldn't have any effect, since it's just the location of the web site which hosts the page that hosts the .swf file, but on the off chance...) These are the contents of the file that it's grabbing in each instance: <cross-domain-policy> <allow-access-from domain="*" to-ports="*" /> </cross-domain-policy> And it's still throwing that same error message. I've also followed the instructions on the Wowza forums, to turn on StreamVideoSampleAccess in the [install]\conf[appname]\Application.xml, with no joy: <Client> <IdleFrequency>-1</IdleFrequency> <Access> <StreamReadAccess>*</StreamReadAccess> <StreamWriteAccess>*</StreamWriteAccess> <StreamAudioSampleAccess>*</StreamAudioSampleAccess> <StreamVideoSampleAccess>*</StreamVideoSampleAccess> <SharedObjectReadAccess>*</SharedObjectReadAccess> <SharedObjectWriteAccess>*</SharedObjectWriteAccess> </Access> </Client> Any thoughts?

    Read the article

  • How do I export a PFX Code Signing Key to SPC and PVK under Windows 7?

    - by Greg Finzer
    I have a code signing key in PFX format that I need to export into SPC and PVK files. I tried to install the OpenSSL from Shining light but the install fails under Windows 7. http://www.shininglightpro.com/products/Win32OpenSSL.html Here are the instructions I am using from Comodo as a basis: https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1089 Anyone know of an alternate way to do this?

    Read the article

  • MS SQL Bridge Table Constraints

    - by greg
    Greetings - I have a table of Articles and a table of Categories. An Article can be used in many Categories, so I have created a table of ArticleCategories like this: BridgeID int (PK) ArticleID int CategoryID int Now, I want to create constraints/relationships such that the ArticleID-CategoryID combinations are unique AND that the IDs must exist in the respective primary key tables (Articles and Categories). I have tried using both VS2008 Server Explorer and Enterprise Manager (SQL-2005) to create the FK relationships, but the results always prevent Duplicate ArticleIDs in the bridge table, even though the CategoryID is different. I am pretty sure I am doing something obviously wrong, but I appear to have a mental block at this point. Can anyone tell me please how should this be done? Greaty appreciated!

    Read the article

  • Proper way to implement IXmlSerializable?

    - by Greg
    Once a programmer decides to implement IXmlSerializable, what are the rules and best practices for implementing it? I've heard that GetSchema() should return null and ReadXml should move to the next element before returning. Are these true? And what about WriteXml: should it write a root element for the object or is it assumed that the root is already written? How should child objects be treated and written. Here's a sample of what I have now. I'll update it as I get good responses. public class Calendar: IEnumerable<Gvent>, IXmlSerializable { public XmlSchema GetSchema() { return null; } public void ReadXml(XmlReader reader) { if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Calendar") { _Name = reader["Name"]; _Enabled = Boolean.Parse(reader["Enabled"]); _Color = Color.FromArgb(Int32.Parse(reader["Color"])); if (reader.ReadToDescendant("Event")) { while (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Event") { var evt = new Event(); evt.ReadXml(reader); _Events.Add(evt); } } reader.Read(); } } public void WriteXml(XmlWriter writer) { writer.WriteAttributeString("Name", _Name); writer.WriteAttributeString("Enabled", _Enabled.ToString()); writer.WriteAttributeString("Color", _Color.ToArgb().ToString()); foreach (var evt in _Events) { writer.WriteStartElement("Event"); evt.WriteXml(writer); writer.WriteEndElement(); } } } public class Event : IXmlSerializable { public XmlSchema GetSchema() { return null; } public void ReadXml(XmlReader reader) { if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Event") { _Title = reader["Title"]; _Start = DateTime.FromBinary(Int64.Parse(reader["Start"])); _Stop = DateTime.FromBinary(Int64.Parse(reader["Stop"])); reader.Read(); } } public void WriteXml(XmlWriter writer) { writer.WriteAttributeString("Title", _Title); writer.WriteAttributeString("Start", _Start.ToBinary().ToString()); writer.WriteAttributeString("Stop", _Stop.ToBinary().ToString()); } }

    Read the article

  • How Do I Programmatically Set a File Tag

    - by Greg Bishop
    When using Windows Explorer to view files, I'm given the option to set a "tag", "category", or other attributes. For a JPEG a different set of attributes (including "tag") are options. I'd like to be able to set these programmatically. How do I programmatically set a file tag and other file attributes using Delphi (I have Delphi 2010 Pro)?

    Read the article

  • Modulo operator in Objective-C returns the wrong result

    - by Greg Maletic
    I'm a little freaked out by the results I'm getting when I do modulo arithmetic in Objective-C. -1 % 3 is coming out to be -1, which isn't the right answer: according to my understanding, it should be 2. -2 % 3 is coming out to -2, which also isn't right: it should be 1. Is there another method I should be using besides the % operator to get the correct result?

    Read the article

  • Rails Enterprise Edition crashes in gc_sweep

    - by Greg
    My Rails application crashes intermittently with the following message: /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/utils.rb:52: [BUG] gc_sweep(): unknown data type 0x0(0xbdc2ca0) ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01 I am running the app on Nginx / Passenger. Ruby 1.8.7, Rails Enterprise Edition 2.3.5, Ubuntu 9.10 32bit. Does anybody have an idea how to fix this?

    Read the article

  • Rails: keeping DRY with ActiveRecord models that share similar complex attributes

    - by Greg
    This seems like it should have a straightforward answer, but after much time on Google and SO I can't find it. It might be a case of missing the right keywords. In my RoR application I have several models that share a specific kind of string attribute that has special validation and other functionality. The closest similar example I can think of is a string that represents a URL. This leads to a lot of duplication in the models (and even more duplication in the unit tests), but I'm not sure how to make it more DRY. I can think of several possible directions... create a plugin along the lines of the "validates_url_format_of" plugin, but that would only make the validations DRY give this special string its own model, but this seems like a very heavy solution create a ruby class for this special string, but how do I get ActiveRecord to associate this class with the model attribute that is a string in the db Number 3 seems the most reasonable, but I can't figure out how to extend ActiveRecord to handle anything other than the base data types. Any pointers? Finally, if there is a way to do this, where in the folder hierarchy would you put the new class that is not a model? Many thanks.

    Read the article

  • Using Timthumb to Resize Images from CKEditor

    - by Edward Coleridge Smith
    I am using CKEditor to do basic text and image input into my website. I have noticed that it is quite sporadic in it's method of generating HTML for images when you add them. (Sometimes it might use height and width tags, other times it might use CSS). I use Timthumb for on the fly image resizing on a number of other websites and find it very useful. I use a mod_rewrite rule in my .htaccess file to allow me to create domains like http://localhost/images/800x600/image.jpg and achieve resizing. I would like to somehow incorporate this into CKEditor. I cannot find how to do this looking through the documentation so I have tried post-processing the data produced by CKEditor using Regex, however as mentioned before CKEditor seems to be too sporadic to be able to get this to work all the time. Anyone else done this before? How did you achieve it?

    Read the article

  • Fastest image iteration in Python

    - by Greg
    I am creating a simple green screen app with Python 2.7.4 but am getting quite slow results. I am currently using PIL 1.1.7 to load and iterate the images and saw huge speed-ups changing from the old getpixel() to the newer load() and pixel access object indexing. However the following loop still takes around 2.5 seconds to run for an image of around 720p resolution: def colorclose(Cb_p, Cr_p, Cb_key, Cr_key, tola, tolb): temp = math.sqrt((Cb_key-Cb_p)**2+(Cr_key-Cr_p)**2) if temp < tola: return 0.0 else: if temp < tolb: return (temp-tola)/(tolb-tola) else: return 1.0 .... for x in range(width): for y in range(height): Y, cb, cr = fg_cbcr_list[x, y] mask = colorclose(cb, cr, cb_key, cr_key, tola, tolb) mask = 1 - mask bgr, bgg, bgb = bg_list[x,y] fgr, fgg, fgb = fg_list[x,y] pixels[x,y] = ( (int)(fgr - mask*key_color[0] + mask*bgr), (int)(fgg - mask*key_color[1] + mask*bgg), (int)(fgb - mask*key_color[2] + mask*bgb)) Am I doing anything hugely inefficient here which makes it run so slow? I have seen similar, simpler examples where the loop is replaced by a boolean matrix for instance, but for this case I can't see a way to replace the loop. The pixels[x,y] assignment seems to take the most amount of time but not knowing Python very well I am unsure of a more efficient way to do this. Any help would be appreciated.

    Read the article

  • Real-time wmv video encoding in C#

    - by Greg Roberts
    How to encode video on the fly and send it trough the network from C#? Can't find a suitable library. I need to encode in WMV and don't mind if the actual encoding is made in C++ as long as the library has a .NET assembly available. Thanks

    Read the article

  • iPhone: Set the title of a UIButton with a single method invocation?

    - by Greg Maletic
    I'd like to set the title of a UIButton via code. I find myself having to call -[UIButton setTitle:forState:] for UIControlStateNormal, UIControlStateHighlighted, UIControlStateDisabled, UIControlStateSelected. And that doesn't even take into account all of the combinations of these states together. Needless to say, this is tiresome. Is there a single call I can make that will set one string as the title for all of the states? (Since, I assume that in 95% of the cases, that's the desired behavior?)

    Read the article

  • EnvDTE: ArgumentException when accessing the ActiveConfiguration

    - by Smith
    Hello, I'm writing an addin for Visual Studio 2008. At some point in my code, I'm attempting to access the current active configuration for a project: var configName = _Project.ConfigurationManager.ActiveConfiguration.ConfigurationName; Sometimes, in some very obscure cases, the getter for ActiveConfiguration throws an ArgumentException. Nothing in the documentation says anything about this (but given the very poor quality of the documentation, it was to be expected), and the exception's message is not helping at all. Also, ConfigurationManager is an interface, and I don't know what's the real implementation behind it, so I can't simply disassemble it in Reflector to know the cause. Any help would be greatly appreciated.

    Read the article

  • CATiledLayer blanking tiles before drawing contents

    - by Greg Plesur
    All, I'm having trouble getting behavior that I want from CATiledLayer. Is there a way that I can trigger the tiles to redraw without having the side-effect that their areas are cleared to white first? I've already subclassed CATiledLayer to set fadeDuration to return 0. To be more specific, here are the details of what I'm seeing and what I'm trying to achieve: I have a UIScrollView with a big content size...~12000x800. Its content view is a UIView backed by a CATiledLayer. The UIView is rendered with a lot of custom-drawn lines Everything works fine, but the contents of the UIView sometimes change. When that happens, I'd like to redraw the tiles as seamlessly as possible. When I use setNeedsDisplay on the view, the tiles redraw but they are first cleared to white and there's a fraction-of-a-second delay before the new content is drawn. I've already subclassed CATiledLayer so that fadeDuration is set to 0. The behavior that I want seems like it should be possible...when you zoom in on the scrollview and the content gets redrawn at a higher resolution, there's no blanking before the redraw; the new content is drawn right on top of the old one. That's what I'm looking for. Thanks; I appreciate your ideas. Update: Just to follow up - I realized that the tiles weren't being cleared to white before the redraw, they're being taken out entirely; the white that I was seeing is the color of the view that's beneath my CATiledLayer-backed view. As a quick hack/fix, I put a UIImageView beneath the UIScrollView, and before triggering a redraw of the CATiledLayer-backed view I render its visible section into the UIImageView and let it show. This smooths out the redraw significantly. If anyone has a better solution, like keeping the redraw-targeted tiles from going away before being redrawn in the first place, I'd still love to hear it.

    Read the article

  • My Windows Service crashes with "the key does not exist in the appSettings configuration section"

    - by Greg
    There is the same question listed under http://stackoverflow.com/questions/427007/the-key-userid-does-not-exist-in-the-appsettings-configuration-section, but unfortunately none of the answers worked in my case. All was working fine, I checked everything in and when I opened the solution again, it started crashing on the above. I cannot find any hint of what I am doing wrong. Any ideas? <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="URI" value="http://123.123.123.123:8080/smsxml/collector" /> <add key="Provider" value="123" /> <add key="LongCode" value="+123" /> <add key="PassWord" value="123" /> </appSettings> </configuration>

    Read the article

  • Navigate between screens in WPF

    - by Greg R
    This should be a very basic design question, but for some reason it doesn't seem to be well documented (maybe due to its simplicity?). If I'm building a dashboard application in WPF that brig up different CRM tasks and I want to navigate between screens, is this the best way to do this, or is there a better way? So for example I have Log In Screen - Main Menu Screen - Screen to one of different utilities var orderManagerWindow = new MyXamlView(); var loginWindow = Application.Current.MainWindow; orderManagerWindow.Left = loginWindow.Left; orderManagerWindow.Top = loginWindow.Top; Application.Current.MainWindow = orderManagerWindow; orderManagerWindow.Show(); loginWindow.Close(); I would really appreciate help and suggestions!

    Read the article

  • How do you mark class with TypeConverter that is not in referenced solution?

    - by Greg McGuffey
    I have a class that I've written a TypeConverter for. I want to keep the TypeConverter separate from the main solution, as it is only needed at design time and have an extensibility project now that contains the TypeConverter. Thus, when I deploy, I don't need to deploy the extensibility assembly at all. However, I can't figure out the appropriate string to use in the attribute to actually connect the class to the converter. Note I can't use this: [TypeConverter(typeof(MyConverter)] because MyConverter is in a project that isn't referenced. I need to use the string overload, but can't figure out what to use: [TypeConverter("what the heck goes in here!")] I think I need maybe a path to the assembly, maybe a GUID, the class name...just not sure...

    Read the article

  • Example of configuring wxStyledTextCtrl/wxScintilla control as code editor for custom language

    - by Greg
    How do you enable actions like Goto line number Find(/Replace) There don't appear to be default triggers for these actions. There are a bunch of methods on the control, but I'm missing the first step of how to get the 'events' that would trigger these. For instance, how does one hook ctrl+f or F3/Alt+F3 in the control and make them do a find? Should I be looking at each key using EVT_STC_KEY? Would also like any examples of using this control with Custom language definition (say something similar to C++, but not C++) Auto completion (basic keywords to start, or including variables)

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >