Search Results

Search found 10841 results on 434 pages for 'air native extension'.

Page 73/434 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • Drag and Drop movies

    - by Nicolas
    Hi, I am currently writing a program with Qt to organize movies. I create a QTableView and a QSTandardItemModel, I want the user to be able to drag and drop a movie from the explorer in the view to add it to the movie list. I currently am able to drag and drop any file in the program, but i only want the user to be able to drop avi or mpeg files, how do you do it?

    Read the article

  • HEAD XMLHttpRequest on Chromium

    - by Treviño
    I'm trying to get the HEAD response with an XMLHttpRequest in Chromium to retrive the location URL of a compressed url, but it fails: var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function() { if (ajax.readyState == 4) alert(ajax.getResponseHeader("Location")) }; ajax.open('HEAD', "http://bit.ly/4Agih5", false); ajax.send(); // Refused to get unsafe header "Location" // Error: NETWORK_ERR: XMLHttpRequest Exception 101

    Read the article

  • How to extend methods to a class not to its instances.

    - by Fraga
    Hi. Extending methods to any instance is really easy: public static string LeaveJustNumbers(this string text) { return Regex.Replace(text, @"[\D]", ""); } ... string JustNumbers = "A5gfb343j4".LeaveJustNumber(); But what if i want to extend methods to a sealed class like string, to work like: string.Format("Hi:{0}","Fraga"); Is there any way to do it?

    Read the article

  • How to add support for a new language in FlashDevelop?

    - by TandemAdam
    I am interested in making a plugin for FlashDevelop to add support for another language. I am not too sure where I should start. So any starting points, hint, tips, or advice would go down well. There is a Plugin Development article on the FlashDevelop Wiki, but the section about adding support for new languages is just a "TODO". So this is less than helpful. I guess there are a number of parts to "supporting" a language in FlashDevelop. Here is my list, but feel free to tell me if I've missed something: Code Completion Syntax Highlighting Should appear in the "New Project" menu as a Template Should add file type/template to the "Add-New" menu Add the new project filetype (e.g. .as3proj, .as3proj, .hxproj). So how do I do all of these things? Where do I even start? Are there any good resources, documentation, or basic examples to follow? Can all of this (including the project templates) be done inside one plugin?

    Read the article

  • Tutorial for Quick Look Generator for Mac

    - by vgm64
    I've checked out Apple's Quick Look Programming Guide: Introduction to Quick Look page in the Mac Dev Center, but as a more of a science programmer rather than an Apple programmer, it is a little over my head (but I could get through it in a weekend if I bash my head against it long enough). Does anyone know of a good basic Quick Look Generators tutorial that is simple enough for someone with only very modest experience with Xcode? For those that are curious, I have a filetype called .evt that has an xml header and then binary info after the header. I'm trying to write a generator to display the xml header. There's no application bundle that it belongs to. Thanks!

    Read the article

  • Write an add-on or greasemonkey script to "Ajaxify" webpages in Firefox?

    - by Shizhidi
    Hello. I stumbled upon this add-on which "Ajaxifies" parts of its target website. https://addons.mozilla.org/en-US/firefox/addon/51789 I have a similar need like this. I want only part of the webpage's DOM to update upon receiving click on a link, since the website has a rather unified page layout. I have no experiences in writing FF add-ons but I did some basic Ajax and DOM before. So I am looking for programming tips on how to implement "Ajaxification" in a GreaseMonkey script, preferably. If it's not possible, making an add-on is also a sound choice which I'm willing to learn. Thanks in advance!

    Read the article

  • Mercurial 1.5 pager on Windows

    - by alexandrul
    I'm trying to set the pager used for Mercurial but the output is empty, even if I specify the command in the [pager] section or as the PAGER environment variable. I noticed that the command provided is launched with cmd.exe. Is this the cause of empty output, and if yes, what is the right syntax? Environment: Mercurial 1.5, Mecurial 1.4.3 hgrc: [extensions] pager = [pager] pager = d:\tools\less\less.exe Sample command lines (from Process Explorer): hg diff c:\windows\system32\cmd.exe /c "d:\tools\less\less.exe 2> NUL:" d:\tools\less\less.exe UPDATE In pager.py, by replacing: sys.stderr = sys.stdout = util.popen(p, "wb") with sys.stderr = sys.stdout = subprocess.Popen(p, stdin = subprocess.PIPE, shell=False).stdin I managed to obtain the desired output for the hg status and diff. BUT, I'm sure it's wrong (or at least incomplete), and I have no control over the pager app (less.exe): the output is shown in the cmd.exe window, I can see the less prompt (:) but any further input is fed into cmd.exe. It seems that the pager app is still active in the background: after typing exit in the cmd.exe window, I have control over the pager app, and I can terminate it normally. Also, it makes no difference what I'm choosing as a pager app (more is behaving the same). UPDATE 2 Issue1677 - [PATCH] pager for "hg help" output on windows

    Read the article

  • What is the best way to attach static methods to classes rather than to instances of a class?

    - by John Gietzen
    If I have a method for calculating the greatest common divisor of two integers as: public static int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b); } What would be the best way to attach that to the System.Math class? Here are the three ways I have come up with: public static int GCD(this int a, int b) { return b == 0 ? a : b.GCD(a % b); } // Lame... var gcd = a.GCD(b); and: public static class RationalMath { public static int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b); } } // Lame... var gcd = RationalMath.GCD(a, b); and: public static int GCD(this Type math, int a, int b) { return b == 0 ? a : typeof(Math).GCD(b, a % b); } // Neat? var gcd = typeof(Math).GCD(a, b); The desired syntax is Math.GCD since that is the standard for all mathematical functions. Any suggestions? What should I do to get the desired syntax?

    Read the article

  • Wordpress, PodCMS and Search

    - by Vian Esterhuizen
    Hey guys, I have a WordPress site for a client. He owns a video store, and I made a site for him to update the list of movies, usually just the "new this week" movies. The Pod has a field where you insert the release date. 2010-04-20 Then there is a Pod page/template combo that calls the movies with a certain release date like this: $date = pods_url_variable('last'); He then just creates a blank WP page with the slug 2010-04-20 So when you open that page, the Pod page/template reads that slug and renders a list of the appropriate movies. My problem: I need these to be searchable. Is this possible. I'm also open to suggestions on other ways to go about making this site work. I need it to be as simple as that. Uploads some movies and creates a new page. Then the rest is done automatically. Please and thank you guys

    Read the article

  • Chrome extensions: Content script (jQuery) in Youtube does not work properly

    - by Fabian
    I have this: $(document).ready(function() { $("button.yt-uix-expander-arrow").attr("id", "yt-uix-expander-arrow"); $("#yt-uix-expander-arrow").mouseover(function() { alert("Hello"); }); }); injected into Youtube. Using right click inspect element, the <button class="yt-uix-expander-arrow"> has a id="yt-uix-expander-arrow" attribute successfully added to it. However the mouseover event does not trigger. However if I were to change $("#yt-uix-expander-arrow").mouseover() to $(".yt-uix-expander-arrow").mouseover() it works. That's very unusual, because the #yt-uix-expander-arrow id has already been added to the button element. I tested it out on Facebook, adding a id to a class and doing a mouseover() event on the ID and it works. Any idea?

    Read the article

  • What is the best way to attach extenstion methods to static classes rather than to instances of a cl

    - by John Gietzen
    If I have a method for calculating the greatest common divisor of two integers as: public static int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b); } What would be the best way to attach that to the System.Math class? Here are the three ways I have come up with: public static int GCD(this int a, int b) { return b == 0 ? a : b.GCD(a % b); } // Lame... var gcd = a.GCD(b); and: public static class RationalMath { public static int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b); } } // Lame... var gcd = RationalMath.GCD(a, b); and: public static int GCD(this Type math, int a, int b) { return b == 0 ? a : typeof(Math).GCD(b, a % b); } // Neat? var gcd = typeof(Math).GCD(a, b); The desired syntax is Math.GCD since that is the standard for all mathematical functions. Any suggestions? What should I do to get the desired syntax?

    Read the article

  • Copying data across tabs

    - by Guillermo
    Hello, I got two different forms in two different tabs. One has data from our system and the other one is an interface of another, external, system in wich we need to copy data into (XML or API integration not an option here) The this is that, having open both forms - in two different tabs - i need a greasemonkey script or something similar that allows my to copy data from one form to the other (using the getValue method in Javascript). The problem right now is that I cannot figure out how to reference with a greasemonkey script one particular tab or window (to rad data from or write data to). Do you think it would be possible to do what I'm thinking to do? THANKS

    Read the article

  • Extending EF4 SQL Generation

    - by Basiclife
    Hi, We're using EF4 in a fairly large system and occasionally run into problems due to EF4 being unable to convert certain expressions into SQL. At present, we either need to do some fancy footwork (DB/Code) or just accept the performance hit and allow the query to be executed in-memory. Needless to say neither of these is ideal and the hacks we've sometimes had to use reduce readability / maintainability. What we would ideally like is a way to extend the SQL generation capabilities of the EF4 SQL provider. Obviously there are some things like .Net method calls which will always have to be client-side but some functionality like date comparisons (eg Group by weeks in Linq to Entities ) should be do-able. I've Googled but perhaps I'm using the wrong terminology as all I get is information about the new features of EF4 SQL Generation. For such a flexible and extensible framework, I'd be surprised if this isn't possible. In my head, I'm imagining inheriting from the [SQL 2008] provider and extending it to handle additional expressions / similar in the expression tree it's given to convert to SQL. Any help/pointers appreciated. We're using VS2010 Ultimate, .Net 4 (non-client profile) and EF4. The app is in ASP.Net and is running in a 64-Bit environment in case it makes a difference.

    Read the article

  • Listing down stored records localStorage | Google Chrome Extensions

    - by Jamie
    How do I get to list down the stored records in the for loop? Basically I want it to list down the records like this: '<div id="record_' + number + '">' + localstorage value + '</div>' The number in the class should add 1 every record, e.g. 1, 2, 3, 4 every record it lists down, and so on. The localstorage value should show the localStorage[] but the problem is, the localStorage name has the same, e.g. (clicks on button) it will save the value of the URL into a localStorage I then open the application and shows the window.html inside there is list of stored records by using this: '<div id="record_' + number + '">' + localstorage value + '</div>' INCLUDING the record number to add per record 1, 2, 3, etc... like this: <div id="record_1">localstorage value</div> <div id="record_2">localstorage value</div> <div id="record_3">localstorage value</div> <div id="record_4">localstorage value</div> <div id="record_5">localstorage value</div> <div id="record_6">localstorage value</div> etc...

    Read the article

  • Can a web app in xul:iframe access functions from its parent XUL file?

    - by oskar
    I want to deploy a web app as a self-contained program using XULRunner. I'm simply loading it in a xul:iframe tag within the main XUL file. It works, but I want the web app to have access to XUL components, specifically nsiFilePicker. My tentative solution is to run the xul:iframe with escalated privileges (by omitting the "type" attribute), wait for the xul:iframe to load, then define a javascript function that the web app will then call. <window id="main" width="800" height="600" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <iframe id="contentview" src="web/index.html" flex="1"/> <script> //listen for XUL window to load window.addEventListener("load",Listen,false); function Listen() { var frame = document.getElementById("contentview"); frame.addEventListener("DOMContentLoaded", DomLoadedEventHandler, true); } //listen for iframe to load function DomLoadedEventHandler() { //set function in iframe called testMe() var frame = document.getElementById("contentview"); frame.contentWindow.testMe = function () { alert("This is a test"); }; } </script> </window> ...and then in the index.html file of the web app... <script> testMe(); </script> This doesn't seem to work. Does anyone have any suggestions?

    Read the article

  • Changing save directory

    - by Nathan
    Disregard my previous pre-edit post. Rethought what I needed to do. This is what I'm currently doing: https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIScriptableIO downloadFile: function(httpLoc) { try { //new obj_URI object var obj_URI = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService). newURI(httpLoc, null, null); //new file object //set file with path obj_TargetFile.initWithPath("C:\\javascript\\cache\\test.pdf"); //if file doesn't exist, create if(!obj_TargetFile.exists()) { obj_TargetFile.create(0x00,0644); } //new persitence object var obj_Persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]. createInstance(Ci.nsIWebBrowserPersist); // with persist flags if desired const nsIWBP = Ci.nsIWebBrowserPersist; const flags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES; obj_Persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_FROM_CACHE; //save file to target obj_Persist.saveURI(obj_URI,null,null,null,null,obj_TargetFile); return true; } catch (e) { alert(e); } },//end downloadFile As you can see the directory is hardcoded in there, I want to save the pdf file open in the active tab to a relative temporary directory, or anywhere that's out of the way enough that the user won't stumble along and delete it. I'm going to try that using File I/O, I was under the impression that what I was looking for was in scriptable file I/O and thus disabled.

    Read the article

  • What is your opinion of the Telerik Extensions for MVC?

    - by Chad
    I've started digging around with using the Telerik Extensions for MVC. They don't integrate seemlessly into my current project, but I could reorganize things to fit it in. But, I'm wondering if it would be worth it in the end. I've been searching for reviews on the extensions, I haven't seen too many. So I'm asking here. On their website they claim: You can achieve unprecedented performance for your web application with the lightweight, semantically rendered Extensions that completely leverage the ASP.NET MVC model of no postbacks, no ViewState, and no page life cycle. So I'm curious, What is your opinion of the Telerik Extensions for MVC?

    Read the article

  • magento, making a grouped product show on sale based on product children prices

    - by thrice801
    Hi, Question regarding Magento and sale items. So I have to use grouped items to link multiple items which are the same style but different colors, these are the items I have showing on my search results/category pages. - I am trying to figure out how I can make the master sku, show as on sale, when the children items are marked on sale. I am able to make it show up on the product page, but anytime I have tried calling any of the getchildren methods outside of grouped.phtml, I have failed, horribly. I think I worked on that method for probably 36 hours unsuccessfully calling it from any other page. So, I thought I would ask here. Does anyone know how I could call the getchildskus or whatever it is method, from the category page, so that I can do something like, for each child product, compare sale price with active price, if there is a difference, calculate the percentage off, and display the largest difference as "ON SALE, UP TO 30% OFF!", or whatever it may be? Any help would be much appreciated. (oh, and I cant set a price on the main group sku, I sell sunglasses and watches mainly and many times a different color will differ in price quite significantly.)

    Read the article

  • Ajax In Firefox Plugin

    - by Jishnu
    Hi, Is there any way to send Ajax request to server from Firefox plugin? If yes how? If no, how do we have client server communication in Firefox plugin? I want to get some json data from server and manipulate dom object according to the client input. I am pretty beginner in plugin programming Regards, Jishnu

    Read the article

  • Ruby Doesn't Recognize Alias Method

    - by Jesse J
    I'm trying to debug someone else's code and having trouble figuring out what's wrong. When I run rake, one of the errors I get is: 2) Error: test_math(TestRubyUnits): NoMethodError: undefined method `unit_sin' for CMath:Module /home/user/ruby-units/lib/ruby_units/math.rb:21:in `sin' This is the function that calls the method: assert_equal Math.sin(pi), Math.sin("180 deg".unit) And this is what the class looks like: module Math alias unit_sin sin def sin(n) Unit === n ? unit_sin(n.to('radian').scalar) : unit_sin(n) end alias unit_cos cos def cos(n) Unit === n ? unit_cos(n.to('radian').scalar) : unit_cos(n) end ... module_function :unit_sin module_function :sin module_function :unit_cos module_function :cos ... end (The ellipsis means "more of the same"). As far as I can see, this is valid Ruby code. Is there something I'm missing here that's causing the error, or could the error be coming from something else? Update: I'm wondering if the problem has to do with namespaces. This code is attempting to extend CMath, so perhaps the alias and/or module_function isn't actually getting into CMath, or something like that....

    Read the article

  • Implementing a two-way communication between Microsoft Dynamics CRM and 3rd party app

    - by CxDoo
    I need to implement a bi-directional communication between Microsoft Dynamics CRM and a 3rd party server. The ideal scenario is as follows: User tries to create an entity in CRM In pre-create hook a 3rd party library function is called (or web service or whatever), filled with relevant info, which tries to create the respective entity on the server If the call fails, creation fails in CRM If the call succeeds, the entity is created in the CRM AND additional fields are filled with return values from the call More specifically, I want to do something like this when user tries to create a new entity instance: try { ExternalWebService.CreateTrade(ref TradeInfo info) //this was initialized on the external server myCRM_Trade_Entity.SerialNo = info.SerialNo; CreateNew(myCRM_Trade_Entity); } catch (whatever) { fail; } What would be the suggested way to do this? I am new to Dynamics, have read about Workflows and Plugins but am not sure how should I do this properly.

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >