Search Results

Search found 5180 results on 208 pages for 'outside'.

Page 112/208 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • Chrome Extension: how to capture selected text and send to a web service

    - by phil swenson
    For the Google Chrome extension, I need to capture selected text in a web page and send to a web service. I'm stuck! First I tried a bookmarklet, but Chrome on Mac seems to have some bookmarklet bugs so I decided to write an extension. I use this code in my ext: function getSelText(){ var txt = 'nothing'; if (window.getSelection){ txt = "1" + window.getSelection(); } else if (document.getSelection) { txt = "2" + document.getSelection(); } else if (document.selection) { txt = "3" + document.selection.createRange().text; } else txt = "wtf"; return txt; } var selection = getSelText(); alert("selection = " + selection); When I click on my extension icon, I get a "1". So I think the act of selecting outside the browser window is causing the text to not be seen by the browser as "selected" any more. Just a theory.... thoughts?

    Read the article

  • Button click event

    - by Malcolm
    I am binding an object of other class to a silverlight list box itemsource.I want to fire the click event of a button,but I don't want to define command under this class. I have defined other class and have defined command inside it. Now the question is how to bind the command of this class to the command property of that button. There are two classes A and B I am binding the item source of a listbox to A and i have defined a command in B and i need this command to bind with the button present inside the listbox.(ie..listbox-listboxitem-button) Is there any way to bind to a property outside of the current data context?

    Read the article

  • Add shading to clipped UIView

    - by huggie
    I'm creating an iphone application. I have this UIView whose content is clipped with a path. I want to add shading and/or shadow to it. What's the best way to do this? For shadow, I tried CGContextSetShadow() but it doesn't seem to have an effect (perhaps it's drawing outside the shown region?) . How about shading? I want it to appear along the path. What's the best way to go about it? Is it to create another narrow clip strip along the original clipping path (if it's possible to have two clip path... ) Or does this need to be done in another CALayer? I am not even sure what that is yet.

    Read the article

  • How mobile printer that work alone and with WIFI for POS app?

    - by mamcx
    I'm hunting for a mobile POS printer for use in a mobile point-of-sale application (BestSeller). The requeriments is that must work independent of anything except the mobile device. So the solution is only: Printer + iPhone. I have a early question on this, here but with not answers. The idea is that the printer work as their own server and I can send print commands to make tickets and that stuff. The salesman work outside the company,and have not ascces to internet or other facilities. I found this: http://www.barcodegiant.com/epson/mobilink.htm and http://www.barcodegiant.com/zebra/mz220.htm but is not clear to me if will work as I imagine. And also, I don't find any how to in how make the programing...

    Read the article

  • NHibernate transaction management in ASP.NET MVC - how should it be done?

    - by adrin
    I am writing a simple ASP.NET MVC using session per request and transaction per request patterns (custom HttpModule). It seems to work properly, but.. the performance is terrible (a simple page loads ~7 seconds). For every http request, graphical resources incuding (all images on the site) a transaction is created and that seems to delay the loading times (without the transactions loading times per one image are ~1-10 ms with transactions they are over 1 second). What is the proper way to manage transactions in ASP.NET MVC + NH stack? When i've put all transactions into my repository methods, for some obscure reasons I got 'implicit transactions' warning in NHProf (the SQL statements were executed outside transaction, even that in code session.Save()/Update()/etc methods were invoked within transaction 'using' scope and before transaction.Commit() call) BTW are implicit transactions really bad?

    Read the article

  • Why isn't WH_MOUSE hook global anymore?

    - by Valentin Galea
    I have this global mouse hook setup in a DLL that watches for mouse gestures. Everything works perfectly but with a hook set for WH_MOUSE_LL which is a low-level hook and one that doesn't need to be in an external injectable DLL. Once I switch - to the more suitable one would say - WH_MOUSE mouse hook, everything falls apart. Once I click outside my main application (the one that installs the hook), the hook gets corrupted - ::UnhookWindowsHookEx will fail. I only found this guy saying at experts exchange: "No way, at least under Windows XP + SVP2 WH_MOUSE won't go global, you must use WH_MOUSE_LL instead." I setup the hooks correctly: in a DLL using a shared data section, posting and not sending messages from the hook proceduce. Why has this changed? And why is not documented? Anyone encountered this? Thanks! BTW: I've reverse engineered a bit the popular StrokeIt application and it uses a combination of WH_GETMESSAGE and WH_MOUSE hooks and still works on XP/Vista...

    Read the article

  • Debugger does not break when debugging PowerShell console

    - by Adam Driscoll
    I'm developing a binary PowerShell module. I have a post build event that copies that module into the 'modules' directory in my "Documents\WindowsPowerShell" folder. I then have the project set to launch PowerShell.exe. My module is loaded via Import-Module and off I go. The problem is my break points are never hit and the debugger does not break on exceptions. If I run PowerShell outside of Visual Studio and then attach the debugger to the process I can break just fine. The other strange this is that my break points are not empty. Typically if different source versions are loaded they will be. I'm running Visual Studio 2010 on a Win 7 box. My module is currently targeting .NET 3.5. I've tried running both the x64 and x86 versions of PS with no luck.

    Read the article

  • .NET 4.0 Fails When sending emails with attachments larger than 3MB

    - by JL
    I recently had an issue after upgrading my .net framework to 4.0 from 3.5: System.Net.Mail.SmtpException: Failure sending mail. --- System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Net.Base64Stream.EncodeBytes(Byte[] buffer, Int32 offset, Int32 count, Boolean dontDeferFinalBytes, Boolean shouldAppendSpaceToCRLF) at System.Net.Base64Stream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Mime.MimePart.Send(BaseWriter writer) at System.Net.Mime.MimeMultiPart.Send(BaseWriter writer) at System.Net.Mail.Message.Send(BaseWriter writer, Boolean sendEnvelope) at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- I read this connect bug listing here: http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage. If anyone cares about this issue, please vote for it on Connect, so it will be fixed sooner.

    Read the article

  • Need to make sure value is within 0-255

    - by igor
    This is probably really easy, but I'm lost on how to "make sure" it is in this range.. So basically we have class Color and many functions to implement from it. this function I need is: Effects: corrects a color value to be within 0-255 inclusive. If value is outside this range, adjusts to either 0 or 255, whichever is closer. This is what I have so far: static int correctValue(int value) { if(value<0) value=0; if(value>255) value=255; } Sorry for such a simple question ;/

    Read the article

  • Resolving patch conflicts manually

    - by Antony Hatchkins
    I've downloaded a patch from some site and trying to apply it (twisted, python web framework). Several hunks failed. How do I automate manual patching process using vim? Details: I'm trying to automate the process of applying failed hunks. Many tiny changes, each about adding/removing 1-2 chars. Difficult to see. I Have to create two new temporary files and :diffthis them manually to see the difference. Yes, outside VCS. I can imagine a neat way to deal with it using git, but I would prefer to avoid creating git repo for that.

    Read the article

  • Multiple return points in scala closure/anonymous function

    - by Debilski
    As far as I understand it, there is no way in Scala to have multiple return points in an anonymous function, i.e. someList.map((i) => { if (i%2 == 0) return i // the early return allows me to avoid the else clause doMoreStuffAndReturnSomething(i) }) raises an error: return outside method definition. (And if it weren’t to raise that, the code would not work as I’d like it to work.) One workaround I could thing of would be the following someList.map({ def f(i: Int):Int = { if (i%2 == 0) return i doMoreStuffAndReturnSomething(i) } f }) however, I’d like to know if there is another ‘accepted’ way of doing this. Maybe a possibility to go without a name for the inner function? (A use case would be to emulate some valued continue construct inside the loop.)

    Read the article

  • ModalPopupExtender OnShow Event

    - by Thomas
    When clicking a button, I have a ModalPopupExtender (Panel) that gets displayed. I can't seem to trigger any event during that process. Adding an event to the button that opens the ModalPopupExtender doesnt work, as it never triggers. Adding the button as a trigger in my UpdatePanel also doesnt work. Scenario: I have a gridview with a button outside of the gridview. Clicking the button opens up a ModalPopupExtender which needs to display the checkboxes clicked on the gridview. I have the code to get the checkboxes clicked on the Gridview, however I cant seem to use an event during the process of opening the ModalPopupExtender.

    Read the article

  • How do I find/make programming friends?

    - by Anton
    I recently got my first programming internship and was extremely excited to finally be able to talk with and interact with fellow programmers. I had this assumption that I would find a bunch of like minded individuals who enjoyed programming and other aspects of geek culture. Unfortunately, I find myself working with normal people who program for a living and never discuss or show interest in programming outside of their work. It is incredibly disappointing, because I do think one of the best ways to progress in life and as a programmer is to talk about what you enjoy with others and to build bonds with people who enjoy similar things. So how do I go about finding/making programmer friends?

    Read the article

  • [Rails] Cross Browser Popup size woes

    - by stephemurdoch
    I need to display certain content inside a popup window, and the body element must be 320px by 300px for styling purposes So I do the following: %p = link_to "Play in popup", popup_podcast_path(@podcast), :popup => ['new_window','height=300,width=320,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes'] Firefox does exactly what I ask it to do, it displays a popup window, with a page body that is 320px wide and 300px high, so my content fits perfectly inside. But Chrome includes the browser frame dimensions when sizing the popup, which means that the body element is less than the required size.... i.e. if the browser titlebar is 10px high, then this is subtracted from the space allocated to the body element How do I tell Chrome, that I want the body element to be 320 by 300, and that I dont want it to subtract the width and height of the browser frame from body element dimensions It's a bit like the old box-model problem where FF and IE added padding in different ways except firefox adds the browser frame outside the desired 320x300 size, and Chrome is adding it inside

    Read the article

  • Determine signals connected to a given slot in Qt

    - by Cody Brocious
    I've injected myself into a Qt application, and I'm attempting to figure out what signals a given slot is connected to, but can't find any information on doing this. Is there a mechanism for doing this out of the box? If so, is this exposed to QtScript? (If not, I can wrap it easily enough.) If there is no such mechanism, what would be the best way to add it? I cannot manipulate the existing application outside of simple hooking, but I could hook QObject::connect and store the connections myself, just not sure if that's the best way to go about it.

    Read the article

  • Makefile : assigning function variable in target command line

    - by Michael
    I need the xpi_hash variable to be assigned only when update target's command is decided to execute. Then I'm using this variable as environment, exporting, etc.. If I put it outside of rule, it will be expanded firstly, before $(xpi) target is called, hence will not find that file. update: $(xpi) $(target_update_rdf) xpi_hash := $(shell sha1sum $(xpi) | grep -Eow '^[^ ]+') @echo "Updating..." and above of course is not correct, because for command part the shell is represented. So maybe another way to put this question is - how to bring variable as command output?

    Read the article

  • AssociatedControlId of inner namingcontainer

    - by Eric
    Hi, I have a custom control contains a label control. I want to set the AssociatedControlId of this label to be other control id on the page, but as soon as I implement the INamingContainer in my custom control, it will run into an error saying "Unable to find control with id 'abc' that is associated with the Label 'xyz'." This would be due to the fact that the label is in a nested naming container and it trys to find the control within the same container but couldn't (as the control is on the page, outside of it own naming container) Anyone know of a way to set this property? Thanks, Eric

    Read the article

  • What are some techniques to create scrollable areas?

    - by Omega
    I'm getting started with OpenGL ES on Android and I'd looking to learn some techniques to have a game map larger than the visible area. I'm assuming I've somehow got to ensure that the system isn't rendering the entire scene, including what's outside of the visible area. I'm just not sure how I'd go about designing this! This is for simple 2D top-down tile based rendering. No real 3D except what's inherent in OpenGL ES itself. Would anyone be able to get me started on the right path? Are there options that might scale nicely when I decide to start tilting my perspective and doing 3D?

    Read the article

  • Diagonal Wedge Shaped CSS - Edge to Edge Centered in Browser

    - by Varazi
    I have been trying to make this shape in CSS. Ideally it will span the entire length of the browser window and probably extend outside the field of view to support larger screens and also be centered so that the angle does not change. Anyone have any solutions? Also I think I might run into a problem of the angle aliasing harshly. I might need to resort to using an image. Would like to use CSS though. ** Image Spelling Error. (Indefinitely not Inevitably)

    Read the article

  • Aging Data Structure in C#

    - by thelsdj
    I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items having same timestamp). So far it seems that with LINQ I could easily filter items with timestamp greater than a given time and aggregate a count. Though I'm hesitant to try to work .NET 3.5 specific stuff into my production environment yet. Are there any other suggestions for a similar data structure? The other part that I'm interested in is aging old data out, If I'm only going to be asking for counts of items less than 6 hours ago I would like anything older than that to be removed from my data structure because this may be a long-running program.

    Read the article

  • Stream a file to the HTTP response in Pylons

    - by Evgeny
    I have a Pylons controller action that needs to return a file to the client. (The file is outside the web root, so I can't just link directly to it.) The simplest way is, of course, this: with open(filepath, 'rb') as f: response.write(f.read()) That works, but it's obviously inefficient for large files. What's the best way to do this? I haven't been able to find any convenient methods in Pylons to stream the contents of the file. Do I really have to write the code to read a chunk at a time myself from scratch?

    Read the article

  • Customising event delegates in the jQuery validation plug-in

    - by Russell
    I am currently setting up the jQuery validation plug-in for use in our project. By default, there are some events automatically set up for handling. I.e. focus in/out, key up events on all inputs fire validation. I want it to only fire when the submit button is clicked. This functionality seems to be in-built into the plug-in, which is making it difficult to do this (without modifying the plug-in code, Not What I Want To Do). I have found the eventDelegate function calls in the plugin code prototype method: $(this.currentForm) .validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate) .validateDelegate(":radio, :checkbox, select, option", "click", delegate); When I remove these lines from the plug-in I get my result, however I would much rather do something Outside the plug-in to achieve this. Can anybody please help me? If you need any more details, please let me know. I have searched google with little success. Thanks

    Read the article

  • Relative paths in spring classpath resource

    - by Mike Q
    Hi all, I have a bunch of spring config files, all of which live under the META-INF directory in various subpackages. I have been using import like the following... <import resource="../database/schema.xml"/> So a relative path from the source file. This works fine when I am working with a local build outside of a jar file. But when I package everything up in a jar then I get an error that it cannot resolve the URL resource. If I change the above to an absolute path (with classpath:) then it works fine. Is there any way to use relative paths with ".." in when the configs are packaged in a jar or am I restricted to descending relative paths and absolute paths only? Thanks.

    Read the article

  • Speech Recognition Server Does Not Stay Open

    - by Waffle
    I am trying to create a simple program that loops for user speech input using com.apple.speech.recognitionserver. My code thus far is as follows: set user_response to "start" repeat while user_response is not equal to "Exit" tell application id "com.apple.speech.recognitionserver" set user_response to listen for {"Time", "Weather", "Exit"} with prompt "Good Morning" end tell if user_response = "Time" then set curr_time to time string of (the current date) set curr_day to weekday of (the current date) say "It is" say curr_time say "on" say curr_day say "day" else if user_response = "Weather" then say "It is hot outside. What do you expect?" end if end repeat say "Have a good day" If the above is run on my system it says good morning and it then pops up with the speech input system and waits for either Time, Weather, or Exit. They all do what they say they are going to do, but instead of looping if I say Time and Weather and asking again until I say exit the speechserver times out and never pops up again. Is there a way of either keeping that application open until the program ends or is applescript not capable of looping for user speech input?

    Read the article

  • how do you reuse a partial view with different ids

    - by oo
    i have a partial view with a dropdown in it. the code looks like this: <%=Html.DropDownListFor(x => Model.Exercises, new SelectList(Model.Exercises, "Id", "Name", Model.SelectedExercise), new { @id = "exerciseDropdown", @class = "autoComplete" })%> the issue is that i want to reuse this partial view in multiple places but i want to have a different id assigned to the control (instead of exerciseDropdown always) but on the outside i only have this . . <% Html.RenderPartial("ExerciseList", Model); %> is there anyway to pass in an id into a partial view. should i stick this into my view model as a seperate property "Model.ExerciseDropdown2" for example. is there a better way ?

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >