Search Results

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

Page 59/434 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • How to get extension methods on Roslyn?

    - by eestein
    I need to list all extension methods found on the file. This is what I'm doing so far (looks like it's working): var methods = nodes.OfType<MethodDeclarationSyntax>(); var extensionMethods = methods.Where(m => m.Modifiers.Any(t => t.Kind == SyntaxKind.StaticKeyword) && m.ParameterList.Parameters.Any(p => p.Modifiers.Any(pm => pm.Kind == SyntaxKind.ThisKeyword))); Even though I couldn't test all cases it looks like this is working. But I was wondering if there was a more concise way to approach this solution. Is there some sort of IsExtension or some SyntaxKind.ExtensionMethod? I took a look but could not find anything obvious, at least. I'm using the latest Roslyn Sept/12

    Read the article

  • Programatically WPF Fade In (via extension methods)

    - by Dinis Cruz
    I'm trying to write a simple (stand alone) C# extension method to do a Fade-In of a generic WPF UIElement, but the solutions (and code samples) that I found all contain a large number of moving parts (like setting up a story, etc...) For reference here is an example of the type of API method I would like to create. This code will rotate an UIElement according to the values provided (fromValue, toValue, duration and loop) public static T rotate<T>(this T uiElement, double fromValue, double toValue, int durationInSeconds, bool loopAnimation) where T : UIElement { return (T)uiElement.wpfInvoke( ()=>{ DoubleAnimation doubleAnimation = new DoubleAnimation(fromValue, toValue, new Duration(TimeSpan.FromSeconds(durationInSeconds))); RotateTransform rotateTransform = new RotateTransform(); uiElement.RenderTransform = rotateTransform; uiElement.RenderTransformOrigin = new System.Windows.Point(0.5, 0.5); if (loopAnimation) doubleAnimation.RepeatBehavior = RepeatBehavior.Forever; rotateTransform.BeginAnimation(RotateTransform.AngleProperty, doubleAnimation); return uiElement; }); }

    Read the article

  • Preventing a Firefox Extension's load event from triggering across tabs

    - by lgomez
    Hi, I've been working on a Firefox extension that uses an iFrame to do some background scrapping. I have gone through a number of hoops to get it to trigger only once in the window/tab where it should but now when I open a different tab that tab triggers the load event. I found this: https://developer.mozilla.org/en/Code_snippets/Progress_Listeners but the snippets are not there. This was helpful before but doesn't solve the problem: https://developer.mozilla.org/en/Code_snippets/On_page_load More frustrating is that if there is this: https://developer.mozilla.org/En/Listening_to_events_on_all_tabs why should I worry about the normal event listener triggering in more than one tab? Any ideas or examples?

    Read the article

  • How is application virtualization implemented?

    - by noob_lurker
    I am trying to understand how software like App-V and sandboxie (http://www.sandboxie.com/) work. But for the life of me, I can't think of anything that could make this possible. How do they intercept API calls and trick the target software? If someone would say that it's just magic and pixie dust, I would believe them. Seriously though, are there any white papers that discuss solutions to this problem? If this is possible on the CLR level then that would be good but I'm willing to go native if I have to.

    Read the article

  • Maven downloads have .lastUpdated as extension

    - by user303158
    I am a beginner to Eclipse and maven. I have an Eclipse setup with m2eclipse and subversive. I have imported a maven2 project from svn. But I get the error message that a whole bunch of artifacts are missing (for instance: Missing artifact org.springframework:spring-test:jar:3.0.1.RELEASE:test). If I look in my repository I see the jar files there but they have an extra extension .lastUpdated. Why is maven appending .lastUpdated to the jars? And more importantly: how can I fix this? Btw there is no mention of the type lastUpdated in my POMs.

    Read the article

  • How to know file type without extension

    - by Ayusman
    While trying to come-up with a servlet based application to read files and manipulate them (image type conversion) here is a question that came up to me: Is it possible to inspect a file content and know the filetype? Is there a standard that specifies that each file MUST provide some type of marker in their content so that the application will not have to rely on the file extension constraints? Consider an application scenario: I am creating an application that will be able to convert different file formats to a set of output formats. Say user uploads an PDF, my application can suggest that the possible conversion formats are microsoft word or TIFF or JPEG etc. As my application will gradually support different file formats (over a period of time), I want my application to inspect the input file instead of having the user to specify the format. And suggest to user the possible formats of output. I understand this is an open ended, broad question. Please let me know if it needs to be modified. Thanks, Ayusman

    Read the article

  • Using code generated by Py++ as a Python extension

    - by gotgenes
    I have a need to wrap an existing C++ library for use in Python. After reading through this answer on choosing an appropriate method to wrap C++ for use in Python, I decided to go with Py++. I walked through the tutorial for Py++, using the tutorial files, and I got the expected output in generated.cpp, but I haven't figured out what to do in order to actually use the generated code as an extension I can import in Python. I'm sure I have to compile the code, now, but with what? Am I supposed to use bjam?

    Read the article

  • extension method phone format with country code as parameter

    - by frenchie
    Hi, I'm writing an extension method called ToPhoneFormat that formats a string of digits to phone numbers. Is it possible to add a parameter to the method that would enable me to call it like this: MyPhoneString.ToPhoneFormat(international code) That way, I could write MyPhoneString.ToPhoneFormat(1); to format a US phone number and MyPhoneString.ToPhoneFormat(33) to format a French phone number. I already wrote the method that does the formatting but I'm wondering how to build the constructor so that it works with a parameter when I'm calling it. Thanks.

    Read the article

  • Moving and renaming files, keeping extension but include sub directories in batch file

    - by Ser1esII
    Forgive me if this is nor the place to ask these questions, I am new to batch and scripts and a bit new to these kind of posts... I have a folder that will receive files and folders, I want to run a script that looks at the directory and renames all files in each subfolder numerically, and moves them if possible. For example I have something that looks like the following Recieved_File_Folder |_folder1 | |_file1.txt | |_file2.bmp |_folder2 | |_file4.exe | |_file5.bmp |__file9.txt |__file10.jpg I would like to be able to look in every directory and move it to something like this, keeping in mind the names of the files will be random and I want to keep the extension intact also. Renamed_Folder |_folder1 | |_1.txt | |_2.bmp |_folder2 | |_1.exe | |_2.bmp |__1.txt |__2.jpg I have spent alot of time on this and am not doing too well with it, any help would be very greatly appreciated!! Thank you in advance!

    Read the article

  • #include <string> adding ~43 KB to my exe

    - by Lienau
    I'm using Code::Blocks to write my program and when I include <string> (or <iostream>) the size of my exe grows. My program is very simple and I need to keep it small <20kb. I'm pretty sure this is happening because of the C++ Standards Committee swapped the old .h versions for many new libraries without the .h. But how would I keep it from adding the ~43kb? Are there settings for Code::Blocks so that it wont add the extra kb or is there another native lib I can use?

    Read the article

  • Linq Query to IEnumerable<T> Extension Method

    - by CSharpNoob
    Consider this, class Item { public string ID { get; set;} public string Description { get; set; } } class SaleItem { public string ID { get; set;} public string Discount { get; set; } } var itemsToRemoved = (List<Item>)ViewState["ItemsToRemove"]; // get only rows of ID var query = from i in itemsToRemoved select i.ID; var saleItems= (List<SaleItem>)ViewState["SaleItems"]; foreach (string s in query.ToArray()) { saleItems.RemoveItem(s); } How can I write this LINQ phrase using IEnumerable/List Extension methods // get only rows of ID var query = from i in items select i.ID; thanks in advance.

    Read the article

  • Remove .php extension (explicitly written) for friendly URL

    - by miquel
    htaccess to remove the .php extension of my site's files. RewriteEngine on RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ $1.php [L,QSA] Now, if I go to my site www.mysite.com/home works fine, it redirects to home.php but the URL is still friendly. But if I write this URL: www.mysite.com/home.php The home.php is served, and the URL is not friendly. How can I avoid this behavior? I want that if the user writes www.mysite.com/home.php, the URL displayed in the URL bar be www.mysite.com/home

    Read the article

  • regexp for detect that the url doesn´t end with an extension

    - by devnieL
    Hello. I'm using this regular expression for detect if an url ends with a jpg : var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]*^\.jpg)/ig; it detects the url : e.g. http://www.blabla.com/sdsd.jpg but now i want to detect that the url doesn't ends with an jpg extension, i try with this : var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]*[^\.jpg]\b)/ig; but only get http://www.blabla.com/sdsd then i used this : var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]*[^\.jpg]$)/ig; it works if the url is alone, but dont work if the text is e.g. : http://www.blabla.com/sdsd.jpg text

    Read the article

  • built in Soap extension php5 passing in params as associative array

    - by Ageis
    I have this xml I'm wanting to pass to this web service function <UserName>myuser</UserName> <Password>password</Password> <User> <AddCoverCode /> <title>sdadasdsa</title> </User> </CreateNewUser>','',array(),'document', 'literal'); I'm using the soap extension buit in php5. Is this what I'm supposed to be passing in the soapcall function as parameters? array('CreateNewUser' => array( 'UserName' => 'sc', 'Password' => 'i82372', 'Registration' => array('username' =>'new','password' =>'ss'));

    Read the article

  • onPageLoad is not working properly in Firefox Extension Development

    - by Tharaka Deshan
    I am new to Firefox Extension Development and doing my 1st program. Simply I needed to pop up a alert once it loaded the page. My code was like this: var myExtension = { init: function() { if(gBrowser) gBrowser.addEventListener("DOMContentLoaded", this.onPageLoad, false); }, onPageLoad: function(aEvent) { alert("Loaded"); } } window.addEventListener("load", function load(event){ window.removeEventListener("load", load, false); myExtension.init(); },false); But I am getting the alert box for couple of times. Then I found about "#document" and then I added a IF condition: onPageLoad: function(aEvent) { if (aEvent.originalTarget.nodeName == '#document') { alert("Loaded"); } } Unfortunately still I am getting the same. Please advise me on this.

    Read the article

  • Directory layout for a Python project with C extension modules

    - by Kamil Kisiel
    We have numerous projects in our organization that are mixed Python/C. Currently we're trying to standardize on a directory layout for our projects and are trying to come up with a convenient scheme. One point of contention is where to put C extension modules in the tree. We're tossing around a couple of options (relative to project root): ./src/package/subpackage/module.c or alongside the python modules in the package tree: ./package/subpackage/module.c or in a src directory in the subpackage: ./package/subpackage/src/module.c One reason for keeping them out of the package directories could be because it will lead to clutter, especially if there are other .c and .h files which aren't themselves modules but still need to be compiled. Also in the "integrated" scheme, what do you do with headers and files that are used by more than one module? Put them in a common top-level directory? I'd be interested to know what other people are using, or if there are any established best practices for this.

    Read the article

  • Execute js on DOMContentLoaded in ff-extension

    - by ArtWorkAD
    Hi, I want to enable jQuery for my extension. So I want to do something similar to $(document).ready(function() { // put all your jQuery goodness in here. }); So I came up with var app = window.document.getElementById('page'); app.addEventListener("DOMContentLoaded", onPageLoad, false); function onPageLoad(){ alert("test"); } But this does not work at all. Any ideas how to call onPageLoad each time DOM content is reloaded?

    Read the article

  • extension file "curl" is must be loaded

    - by Sharvan
    Using XAMPP 1.6.7 I installed the community version of Magento. But there seems to be a problem. I am getting the error message 'extension file "curl" is must be loaded'. In another computer, everything seems fine. (the other computer) intel(R) Pentium(R) Dual CPU, E2140 @ 1.60Hz, 1.60 GHz. 504 MB of RAM and XP professional 2002 sp2 My computer is less powerful (Inet Pentium 4 1.6 GHz. with sp2.) Please help me, thanks.

    Read the article

  • Signed and unsigned, and how bit extension works in C

    - by hatorade
    unsigned short s; s = 0xffff; int i = s; How does the extension work here? 2 larger order bytes are added, but I'm confused whether 1's or 0's are extended there. This is probably platform dependent so let's focus on what Unix does. Would the two bigger order bytes of the int be filled with 1's or 0's, and why? Basically, does the computer know that s is unsigned, and correctly assign 0's to the higher order bits of the int? So i is now 0x0000ffff? Or since ints are default signed in unix does it take the signed bit from s (a 1) and copy that to the higher order bytes?

    Read the article

  • PHP Echo current filename without extension

    - by Christian Nikkanen
    I'm working on a very simple homemade CMS that simply uses a rich text editor and database to save the website contents and displays them to visitors. Heres the save.php that saves it: <?php include 'mysqlconnection.php'; mysql_query("UPDATE Content SET Content='$_POST[edit]' WHERE PageName='$_POST[PageName]'"); mysql_close($con); ?> <?php header('Location:http://xxx.com/Kayttoliittyma'); ?> It just saves it to the database. The pagename part is the part where I need to echo the filename without the extension. It would echo to the forms hidden field. But how?

    Read the article

  • MVC Helper Extension issue

    - by BeCool
    Hi, I need to implement a HtmlHelper extension in my MVC project simply just to output some string but ONLY in the DEBUG mode, not in REALEASE. My first attempt would be: [Conditional("DEBUG")] public static string TestStringForDebugOnly(this HtmlHelper helper, string testString) { return testString; } But obviously that would give a compile error: "The Conditional attribute is not valid because its return type is not void." So my understanding is once you set [Condition] attribute, it doesnt allow to return anything? why? What is other way to implement this kind of function? anyone help would be much appreciated. Thanks!

    Read the article

  • Emacs auto-minor-mode based on extension

    - by vermiculus
    I found this question somewhat on the topic, but is there a way [in emacs] to set a minor mode (or a list thereof) based on extension? For example, it's pretty easy to find out that major modes can be manipulated like so (setq auto-mode-alist (cons '("\\.notes$" . text-mode) auto-mode-alist)) and what I'd ideally like to be able to do is (setq auto-minor-mode-alist (cons '("\\.notes$" . auto-fill-mode) auto-minor-mode-alist)) The accept answer of the linked question mentions hooks, specifically temp-buffer-setup-hook. To use this, you have to add a function to the hook like so (add-hook 'temp-buffer-setup-hook 'my-func-to-set-minor-mode) My question is two-fold: Is there an easier way to do this, similar to major modes? If not, how would one write the function for the hook? It needs to check the file path against a regular expression. If it matches, activate the desired mode (e.g. auto-fill-mode).

    Read the article

  • Download File from Web C++ (with winsock?)

    - by Lienau
    I need to download files/read strings from a specified url in C++. I've done some research with this, cURL seems to be the most popular method. Also, I've used it before in PHP. The problem with cURL is that the lib is huge, and my file has to be small. I think you can do it with winsock, but I can't find any simple examples. If you have a simple winsock example, a light cURL/Something else, or anything that could get the job done. I would greatly appreciated. Also, I need this to work with native C++.

    Read the article

  • Add 64 bit offset to a pointer

    - by Novox
    In F#, there's the NativePtr module, but it seems to only support 32 bit offsets for its’ add/get/set functions, just like System.IntPtr does. Is there a way to add a 64 bit offset to a native pointer (nativeptr<'a) in F#? Of course I could convert all addresses to 64 bit integers, do normal integer operations and then convert the result again to nativeptr<'a, but this would cost additional add and imul instructions. I really want the AGUs to perform the address calculations. For instance, using unsafe in C# you could do something like void* ptr = Marshal.AllocHGlobal(...).ToPointer(); int64 offset = ...; T* newAddr = (T*)ptr + offset; // T has to be an unmanaged type Well actually you can't, because there is no "unmanaged" constraint for type parameters, but at least you can do general pointer arithmetic in a non-generic way. In F# we finally got the unmanaged constraint; but how do I do the pointer arithmetic?

    Read the article

  • Downloading image from server without file extension (NSData to UIImage)

    - by Msencenb
    From my server I'm pulling down a url that is supposed to simply be a profile image. The relevant code for pulling down the image from the urls is this: NSString *urlString = [NSString stringWithFormat:@"%@%@",kBaseURL,profile_image_url]; profilePic = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]]; My url is in the format (note no file extension on the end since its dynamically rendered) localhost:8000/people/1/profile_image If I load the url in my browser the image displays; however the code above for pulling down the UIImage does not work. I've verified that the code does pull an image from a random site on the interwebs. Any thoughts on why this is happening?

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >