Search Results

Search found 1499 results on 60 pages for 'extending the clipboard'.

Page 16/60 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Yank file name / path of current buffer in Vim

    - by Dave Tapley
    Assuming the current buffer is a file open for edit, so :e does not display E32: No file name. I would like to yank one or all of: The file name exactly as show on the status line, e.g. ~\myfile.txt A full path to the file, e.g. c:\foo\bar\myfile.txt Just the file name, e.g. myfile.txt

    Read the article

  • Custom Control in ASP.NET C#

    - by Gal V
    Hello all, I created a simple custom control that only inherits from the Literal control, and doesn't have any extensions yet, code is empty. Namespace: CustomControls Class name: Literal : System.Web.UI.WebControls.Literal Next thing I do is registering this control in the aspx page as following: <%@ Register TagPrefix="web" Namespace="CustomControls" % (I read in few tutorials that this is one of the ways to register it, besides web.config etc.) After all, no intellisence for me, and worse- I get a parse error 'unknown server tag: web' when I try to run the page with the control in it. I used 'create new project' and not new website, in case this info is needed. What could be my problem? Thanks in advance.

    Read the article

  • Can I use a method as a lambda?

    - by NewAlexandria
    I have an interface the defines a group of conditions. it is one of several such interfaces that will live with other models. These conditions will be called by a message queue handler to determine completeness of an alert. All the alert calls will be the same, and so I seek to DRY up the enqueue calls a bit, by abstracting the the conditions into their own methods (i question if methods is the right technique). I think that by doing this I will be able to test each of these conditions. class Loan module AlertTriggers def self.included(base) base.extend LifecycleScopeEnqueues # this isn't right Loan::AlertTriggers::LifecycleScopeEnqueues.instance_method.each do |cond| class << self def self.cond ::AlertHandler.enqueue_alerts( {:trigger => Loan.new}, cond ) end end end end end module LifecycleScopeEnqueues def student_awaiting_cosigner lambda { |interval, send_limit, excluding| excluding ||= '' Loan.awaiting_cosigner. where('loans.id not in (?)', excluding.map(&:id) ). joins(:petitions). where('petitions.updated_at > ?', interval.days.ago). where('petitions.updated_at <= ?', send_limit.days.ago) } end end I've considered alternatives, where each of these methods act like a scope. Down that road, I'm not sure how to have AlertHandler be the source of interval, send_limit, and excluding, which it passes to the block/proc when calling it.

    Read the article

  • How to stop middle button in page from trying to open whatever is in my clipboard in Firefox on Ubun

    - by therefromhere
    In Firefox on Ubuntu, if I middle-click anywhere on a page that's not a link, it seems to treat whatever text is in the clipboard as a URL and tries to load it. This is annoying, since if I either accidentally click the middle button or (more often) miss a link when trying to middle-click it, I'll either go to whatever URL is in my clipboard or get an alert saying: The URL is invalid and cannot be loaded Is there any way of either: a) Disabling this functionality so that middle-click on a non-link does nothing (maybe an about:config setting?, or b) Making the functionality more intelligent, so that it will only try and open text if it looks like a URL (this seems like a job for a plugin).

    Read the article

  • How do I stop Firefox on Ubuntu from trying to load whatever is in my clipboard when I middle-click

    - by therefromhere
    In Firefox on Ubuntu, if I middle-click anywhere on a page that's not a link, it seems to treat whatever text is in the clipboard as a URL and tries to load it. This is annoying, since if I either accidentally click the middle button or (more often) miss a link when trying to middle-click it, I'll either go to whatever URL is in my clipboard or get an alert saying: The URL is invalid and cannot be loaded Is there any way of either: a) Disabling this functionality so that middle-click on a non-link does nothing (maybe an about:config setting?, or b) Making the functionality more intelligent, so that it will only try and open text if it looks like a URL (this seems like a job for a plugin).

    Read the article

  • Help recovering lost text from a refreshed Chrome webpage (it was in the clipboard as well)? [closed]

    - by tobeannounced
    Possible Duplicate: Chrome: where is the location to save browse temporary files Ok, so here's what happened - and yes, it was pretty stupid by me: I wrote up and submitted a post on Stack Overflow It was not suited to be placed on Stack Overflow as someone pointed out to me, so I deleted the post (this was a few hours ago) I copied the text into a new question page on Super User, but didn't submit it yet I accidentally just refreshed the webpage that had the text, and the question has now been deleted from Stack Overflow I have Lazarus installed, however the Chrome version doesn't have many features and the text was not recoverable from there. I do not have a clipboard manager, but the text was copied to my clipboard - so is there any way to get this back (Windows 7)? Although the post on Stack Overflow was deleted, I suppose it would have existed in my cache - could I recover it from there? Would the post on Stack Overflow exist in an rss feed anywhere? Many thanks, and I hope I can find this - and I am sure that the solution will prove valuable for me (and others) in the not too distant future once again.

    Read the article

  • How to clear a Firefox address bar without selecting its content?

    - by zuba
    Sometimes I need to move an url from an app to a browser. I select the url, say in gvim, and make Firefox window active. Then I see that I should clear address bar before pasting the new url, which requires selecting existing url, which wipes the new url from PRIMARY clipboard out. What is the best way to put the new url from PRIMARY clipboard to address bar? Is there a shortcut to clear address bar and then to move focus there? ps I know I can use Ctrl-C to put the new url to CLIPBOARD clipboard, but I prefer to use PRIMARY clipboard.

    Read the article

  • How to copy remote machines text to local machines clipboard through SSH?

    - by recluze
    I work on a remote machine through ssh. I have a very large text file there (approx. 500 lines) which I usually need to modify, then copy the contents of that file and paste it in my local browser. The way I usually do this is cat filename and then select/copy the ssh output. That takes a lot of time. I was wondering if there is a utility that will put the remote file's contents in my local clipboard.

    Read the article

  • Clipboard: Copy image, get path back when pasting in file input.

    - by disown
    Hi All. First question here on superuser. I sometimes get ad-hoc bug reports from customers, which I need to transfer to our online bug tracker. Works fine for text, but pictures are tedious. I'm looking for a solution to copy-paste images from documents (like excel sheets) in a way that if you paste an image to a file input (or text input) on a html page, the file will automatically be written to disk (tmp dir), and the path written to the file input field. This question is related to Directly paste clipboard image into gmail message, but I would like to ask if there is a solution using a local program only. I'm interested in solutions for all OS's.

    Read the article

  • Why is the exception thrown on memcpy using during copying LPBYTE to LPTSTR (clipboard)?

    - by user46503
    Hello, I have a LPBYTE array (taken from file) and I need to copy it into LPTSRT (actually into the clipboard). The trouble is copying work but unstable, sometime an exception was thrown (not always) and I don't understand why. The code is: FILE *fConnect = _wfopen(connectFilePath, _T("rb")); if (!fConnect) return; fseek(fConnect, 0, SEEK_END); lSize = ftell(fConnect); rewind(fConnect); LPBYTE lpByte = (LPBYTE) malloc(lSize); fread(lpByte, 1, lSize, fConnect); lpByte[lSize] = 0; fclose(fConnect); //Copy into clipboard BOOL openRes = OpenClipboard(NULL); if (!openRes) return; DWORD err = GetLastError(); EmptyClipboard(); HGLOBAL hText; hText = GlobalAlloc(GMEM_MOVEABLE, (lSize+ sizeof(TCHAR))); LPTSTR sMem = (TCHAR*)GlobalLock(hText); memcpy(sMem, lpByte, (lSize + sizeof(TCHAR))); The last string is the place where the exception is thrown. Thanks a lot

    Read the article

  • Code maintenance: keeping a bad pattern when extending new code for being consistent or not ?

    - by Guillaume
    I have to extend an existing module of a project. I don't like the way it has been done (lots of anti-pattern involved, like copy/pasted code). I don't want to perform a complete refactor. Should I: create new methods using existing convention, even if I feel it wrong, to avoid confusion for the next maintainer and being consistent with the code base? or try to use what I feel better even if it is introducing another pattern in the code ? Precison edited after first answers: The existing code is not a mess. It is easy to follow and understand. BUT it is introducing lots of boilerplate code that can be avoided with good design (resulting code might become harder to follow then). In my current case it's a good old JDBC (spring template inboard) DAO module, but I have already encounter this dilemma and I'm seeking for other dev feedback. I don't want to refactor because I don't have time. And even with time it will be hard to justify that a whole perfectly working module needs refactoring. Refactoring cost will be heavier than its benefits. Remember: code is not messy or over-complex. I can not extract few methods there and introduce an abstract class here. It is more a flaw in the design (result of extreme 'Keep It Stupid Simple' I think) So the question can also be asked like that: You, as developer, do you prefer to maintain easy stupid boring code OR to have some helpers that will do the stupid boring code at your place ? Downside of the last possibility being that you'll have to learn some stuff and maybe you will have to maintain the easy stupid boring code too until a full refactoring is done)

    Read the article

  • Does the use of mongodb enhance extending/changing database driven applications?

    - by developer10214
    When an application is created which need to store data, an SQL database is used very often. So did I in a lot of asp.net applications. The resulting applications have often an ORM like the entity framework and maybe a business layer. So when such an application needs to be extended(let's say you have to add a comment property to an object), you have to change/extend the database, then the ORM and the business layer and so on. To deploy the changes you have to update the target database and the application. I know that things like code first and fluent can make this approach easier. I tried mongodb, I only used the standard driver and I had to extend some objects and all I had to do was changing the code. So it feels that such approaches are much easier to realize when using mongodb. I don't have much experience with larger applications an mongodb. I know that a SQL database or mongodb doesn't fit for all needs and both have their pros and cons. I want to know if my feeling is right, if yes I would choose rather choose mongodb than SQL database.

    Read the article

  • Writing or extending existing emacs packages: is it worth or should I move to Netbeans/Eclipse?

    - by Andrea
    I'm finishing my master degree course in CS and I've almost become addicted to Emacs. I've used it to write in C, Latex, Java, JSP,XML, CommonLisp, Ada and other languages no other editor supported, like AMPL. I'd like to improve the packages I've been using the most or create new ones, but, in practice, I find that the implementation of Emacs leaves a lot to be desired. There are a lot of poorly-featured/poorly-maintained packages with either overlapping functionalities or obscure incompatibilities, and Elisp just seems to foster the situation by lacking the common features modern lisps have. In contrast Eclipse and Netbeans are actively improved and it does seem they can be effective for non-mainstream languages. I tried Hibachi for Ada in Eclipse and it worked well, there's CUPS for Lisp in Eclipse and LambdaBeans built using NetBeans components. On the other hand those plugins seem to be less active than their Emacs' counterparts, for example Hibachi was archived last year. What's your opinion on this? Which editor should I write extension for? EDIT: To answer Larry Coleman (see comment below): I like Emacs as a user because it is efficient both for me and the computer I'm using. It's fast and the textual interface (i.e. minibuffer) allows for quick interaction. It's solid and packages are usually small and easy to manage. If I need to correct or remove something I usually just have to change a row in my .emacs or an elisp file, or delete a directory. Eclipse plugins rely on a more complicated process that screwed my Eclipse configuration a couple of times, forcing me to do a clean reinstall. Emacs works as long as I use the basic packages. If I need something more complicated the situation gets pretty hairy. As a "power user" I think that the best I can hope for is to write a severely crippled version of the extensions I'd actually like to have; in other words, that it's not worth the trouble. I'd like to write extensions for the things I'd like to have automated in Emacs, for example project support with automated tag-table update on file writing. There are a few projects on this that lack integration, documentation, extensibility and so forth. The best one is probably CEDET, for which I believe the Greenspun's 10th rule can be applied. EDIT: To comment Larry Coleman's answer I'm pretty sure I can pick elisp programming but the extensions I have in mind don't exist yet despite their relative simplicity and the effort more knowledgeable people poured into related projects.This makes me wonder whether it is so because of the way emacs is developed, i.e. people tend to write their own little extensions without coordination, or its implementation, its extension language not being able to keep up with the growing complexity.

    Read the article

  • Extending Expression Blend 4 &amp; Blend for Visual Studio 2012

    - by Chris Skardon
    Just getting this off the bat, I presume this will also work for Blend 5, but I can’t confirm it… Anyhews, I imagine you’re here because you want to know how to create an addin for Blend, so let’s jump right in there! First, and foremost, we’re going to need to ensure our development environment has the right setup, so the checklist: Visual Studio 2012 Blend for Visual Studio 2012 OK, let’s create a new project (class library, .NET 4.5): Hello.Extension The ‘.Extension’ bit is very very important. The addin will not work unless it is named in this way. You can put whatever you want at the front, but it has to have the extension bit. OK, so now we have a solution with one project. To this project we need to add references to the following things: Microsoft.Expression.Extensibility (from c:\program files\Microsoft Visual Studio 11.0\Blend\   -- x86 folder if you are on an x64 windows install) Microsoft.Expression.Framework (same location as above) PresentationCore PresentationFramework WindowsBase System.ComponentModel.Composition Got them? ACE. Let’s now add a project to contain our control, so, create a new WPF Application project, cunningly named something like ‘Hello.Control’… (I’m creating a WPF application here, because I’m too lazy to dig up the correct references, and this will add all the ones I need ) Once that is created, delete the App.xaml and MainWindow.xaml files, we won’t be needing them. You will also need to change the properties of the project itself, so it is only a class library. Once that is done, let’s add a new UserControl, which will be this: <UserControl x:Class="Hello.Control.HelloControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid> <TextBlock Text="HELLO!!!"/> </Grid> </UserControl> Impressive eh? Now, let’s reference the WPF project from the Extension library. All that’s left now is to code up our extension… So, add a class to the Extension project (name wise doesn’t matter), and make it implement the IPackage interface from the Microsoft.Expression.Extensibility library: public class HelloExtension : IPackage { /**/ } We’ll implement the two methods we need to: public class HelloExtension : IPackage { public void Load(IServices services) { } public void Unload() { } } We’re only really concerned about the Load method in this case, as let’s face it, the extension we have doesn’t need to do a lot to bog off. The interesting thing about the Load method is that it receives an IServices instance. This allows us to get access to all the services that Expression provides, in this case we’re interested in one in particular, the ‘IWindowService’ So, let’s get that bad boy… private IWindowService _windowService; public void Load(IServices services) { _windowService = services.GetService<IWindowService>(); } Nailed it… But why? The WindowService allows us to register our UserControl with Blend, which in turn allows people to activate and see it, which is a big plus point. So, let’s do that… We’ll create an ‘Initialize’ method to create our new control, and add it to the WindowService: private HelloControl _helloControl; public void Initialize() { _helloControl = new HelloControl(); if (_windowService.PaletteRegistry["HelloPanel"] == null) _windowService.RegisterPalette("HelloPanel", _helloControl, "Hello Window"); } First we check that we’re not already registered, and if we’re not we register, the first argument is the identifier used by the service to, well, identify your extension. The second argument is the actual control, the third argument is the name that people will see in the ‘Windows’ menu of Blend itself (so important note here – don’t put anything embarrassing or (need I say it?) sweary…) There are only two things to do now - Call ‘Initialize()’ from our Load method, and Export the class This is easy money – add [Export(typeof(IPackage))] to the top of our class… The full code will (should) look like this: [Export(typeof (IPackage))] public class HelloExtension : IPackage { private HelloControl _helloControl; private IWindowService _windowService; public void Load(IServices services) { _windowService = services.GetService<IWindowService>(); Initialize(); } public void Unload() { } public void Initialize() { _helloControl = new HelloControl(); if (_windowService.PaletteRegistry["HelloControl"] == null) _windowService.RegisterPalette("HelloControl", _helloControl, "Hello Window"); } } If you build this and copy it to your ‘Extensions’ folder in Blend (c:\program files\microsoft visual studio 11.0\blend\) and start Blend, you should see ‘Hello Window’ listed in the Window menu: That as they say is it!

    Read the article

  • Is there a recommended approach for using SQL Server as an Authorization store and extending AD properties using .Net? [closed]

    - by Jim
    We are going to be using SQL Server as an authorization store for our .Net windows services and WCF services as well as storing additional metadata about users and groups to extend the AD properties. Doing this will make this self service and not require IT to change anything for our department (for users or groups). What if any are the existing recommended stategies or technologies that do this function?

    Read the article

  • Why creating a new MDX language instead of extending SQL?

    - by DReispt
    I have a long experience with SQL, but recently began working with datawarehouse and OLAP technologies: building fact and dimension tables, that then are queried using MDX (MultiDimensional eXpressions). The problem is that MDX works with a completely different logic compared to SQL, and it's a whole new learning curve even for someone with a strong SQL background. Yes, MDX allows you to do things that would be hard or almost impossible with plain SQL. But sometimes it's frustrating to be hours around an MDX to do something you know you could achieve in minutes using SQL (ok, you can tell me to RTFM ...). But why go on to the trouble of creating a new completely different language when you could build on SQL, extend it to add the features needed by OLAP applications?

    Read the article

  • How do I prevent a font from extending off the top of a textbox?

    - by David Ellis
    I'm using a barcode font (IDAutomationMC39H) in an SSRS 2005 report I'm developing, and while it renders fine in the preview in BIDS, if I export the results to PDF, print the results, or do any of the above (including preview) in Report Manager, the barcode font is extending off the top of the textbox. The barcode itself is nearly 20px tall, even at only a 12pt size. I've tried changing the CanGrow value for the textbox, but it seems that even with that set off the barcode isn't pushing the bottom edge of the textbox downwards, it's simply extending over the top of the box. I've also tried resizing the textbox to allow it to contain the entire height of the font, but even with the VerticalAlign set to Bottom the barcode still sticks to the top of the textbox and overflows out the top. See screenshot here: http://bit.ly/9UfycP Does anyone know how to force the font to be bound by the top of the box, instead of overlapping it?

    Read the article

  • A list of 'best practices' for extending the life between charges of a notebook battery.

    - by Tim Visher
    Hello Everyone, I'd like to compile a list of best practices for getting the most out of a single charge of a typical notebook battery (be it Li-Ion or Li-Poly). Sources would be great as well. I've heard, for instance, that the best things to do to improve battery performance (not the total lifetime of the battery, just single charge performance) are, in descending order of effectiveness: Turn your display all the way down. Turn off WiFi Turn off Bluetooth Spin down disks when they're not in use. etc… I'd like to get sources together for these and other tips for extending life-between-charge for any battery on any notebook (as these really are all about Demand Management rather than Life lime extension. Thanks!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >