Search Results

Search found 14593 results on 584 pages for 'pat inside'.

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

  • google maps clicking inside a polygon

    - by amarsh-anand
    The following javascript snippet is supposed to do the following: As the user clicks on the map, initialize headMarker and draw a circle (polygon) around it As the user clicks inside the circle, initialize tailMarker and draw the path between these two markers 1 is happening as expected. But as the user clicks inside the circle, overlay is non-null while point is null in the function(overlay,point) . Can someone tell me a way out. GEvent.addListener(map, "click", function(overlay,point) { if (isCreateHeadPoint) { // add the head marker headMarker = new GMarker(point,{icon:redIcon,title:'0'}); map.addOverlay(headMarker); isCreateHeadPoint = false; // draw the circle drawMapCircle(point.lat(),point.lng(),1,'#cc0000',2,0.8,'#0',0.1); } else { // add the tail marker tailMarker = new GMarker(point,{icon:greenIcon,title:''}); map.addOverlay(tailMarker); isCreateHeadPoint = true; // load thes path from head to tail direction.load("from:" + headMarker.getPoint().lat()+ ", " + headMarker.getPoint().lng()+ " to:" + tailMarker.getPoint().lat() + "," + tailMarker.getPoint().lng(), {getPolyline:true}); } });

    Read the article

  • need to count the frequency of each terms inside a document

    - by Wai Loon II
    hi, i need to calculate the frequency of all the terms inside a document. How can i do that ? i do not ask for codes. I am just asking for guidance. Actually i am doing some similarity calculation between a document and query. I have calculated the term frequency for the query. But i do not know how to calculate the tern frequency for EACH words inside a document. Can anyone guide me ? Thank you for your attention.

    Read the article

  • JavaScript code inside UpdatePanel

    - by Ed Woodcock
    Ok: I've got an UpdatePanel on an aspx page that contains a single Placeholder. Inside this placeholder I'm appending one of a selection of usercontrols depending on certain external conditions (this is a configuration page). In each of these usercontrols there is a bindUcEvents() javascript function that binds the various jQuery and javascript events to buttons and validators inside the usercontrol. The issue I'm having is that the usercontrol's javascript is not being recognised. Normally, javascript inside an updatepanel is executed when the updatepanel posts back, however none of this code can be found by the page (I've tried running the function manually via firebug's console, but it tells me it cannot find the function). Does anyone have any suggestions? Cheers, Ed. EDIT: cut down (but functional) example: Markup: <script src="/js/jquery-1.3.2.min.js"></script> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="Script" runat="server" /> <asp:Button ID="Postback" runat="server" Text="Populate" OnClick="PopulatePlaceholder" /> <asp:UpdatePanel ID="UpdateMe" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Postback" EventName="Click" /> </Triggers> <ContentTemplate> <asp:Literal ID="Code" runat="server" /> <asp:PlaceHolder ID="PlaceMe" runat="server" /> </ContentTemplate> </asp:UpdatePanel> </div> </form> C#: protected void PopulatePlaceholder(object sender, EventArgs e) { Button button = new Button(); button.ID = "Push"; button.Text = "push"; button.OnClientClick = "javascript:return false;"; Code.Text = "<script type=\"text/javascript\"> function bindEvents() { $('#" + button.ClientID + "').click(function() { alert('hello'); }); } bindEvents(); </script>"; PlaceMe.Controls.Add(button); } You'll see that the button does not poput the alert message, even though the code is present on the page.

    Read the article

  • Display a WPF window inside another

    - by Padu Merloti
    Before pointing me to http://stackoverflow.com/questions/1287820/have-a-wpf-window-inside-another-wpf-window or telling me that MDI is soooo 1995, let me explain my application. I'm creating a MessageBanner window that works similar to the message banner we see in several sites nowadays (including SO) I want client code to call my message banner using four different modes: MessageBanner.Show(content); MessageBanner.Show(content, ownerWindow); MessageBanner.ShowModal(content); MessageBanner.ShowModal(content, ownerWindow); I believe you got the application. The thing is that when ownerWindow is displayed, I want to display my MessageBanner window inside the ownerWindow. Any ideas on how to do it?

    Read the article

  • Structs inside #define in C++

    - by Adam Smith
    Being pretty new to C++, I don't quite understand some instructions I encounter such as: #ifndef BOT_H_ #define BOT_H_ #include "State.h" /* This struct represents your bot in the game of Ants */ struct Bot { State state; Bot(); void playGame(); //plays a single game of Ants void makeMoves(); //makes moves for a single turn void endTurn(); //indicates to the engine that it has made its moves }; #endif //BOT_H_ What I don't understand is the "#ifndef BOT_H_" and the "#define -- #endif" From what I gather, it defines a constant BOT_H_ if it's not already defined when the precompiler looks at it. I don't actually get how the struct inside it is a constant and how it is going to let me access the functions inside it. I also don't see why we're doing it this way? I used C++ a while back and I wasn't using .h files, so it might be something easy I'm missing.

    Read the article

  • Very long tree control inside a <frame>

    - by ryancerium
    I have an tree control inside of a frame. It's quite tall, around 2000 pixels. Right now, we use the frame's scroll bars, which is mostly good. Unfortunately, when you select an item near the bottom of the list, the page reloads and the view goes back to the top of the list. I tried calling the tree control's ScrollNodeIntoView() function, but since we're not using the tree's scroll bars, it just thinks that it's displaying the full 2000 pixels and the control doesn't have its own scroll bar. I'm not much of an HTML guru, so I have two ideas, neither of which I know how to do. 1) Tell the frame to not to let the tree render all 2000 pixels and instead stay inside the viewable area. 2) Tell the tree to not render all 2000 pixels and instead stay within the viewable area. Setting the CSS height property on the within the frame doesn't do anything. Thanks.

    Read the article

  • [Android] GPS can't run inside TimerTask

    - by user568553
    Hi, I am trying to write an android app that acquires a GPS signal at a fix time interval, for example every 1 minute. Since the requestLocationUpdate function does not exactly implement that, I tried to use task to accomplished it. public class getGPS extends TimerTask{ public void run(){ System.out.println("Running a GPS task"); locHandler = new locationUpdateHandler(); myManager.requestLocationUpdates(provider, 60000, 0, locHandler); } } public void LoadCoords(){ Timer timer = new Timer(); timer.scheduleAtFixedRate(new getGPS(), 0, 60000); } However, from what I've seen, requestLocationUpdates would run fine if I put it inside LoadCoords(), but would not run if I put it inside the TimerTask (ie no green icon on the task bar to show that GPS is looking for a fix). Can anyone please suggest an alternative approach or pseudo-code, or correct my mistake if there is one ? Thank you in advance.

    Read the article

  • ivar is inside two blocks

    - by Desperate Developer
    I have an ivar like this declared on interface: BOOL controllerOK; I have to use this ivar inside a block that resides itself in a block. Something like myBlockl = ^(){ [self presentViewController:controller animated:YES completion:^(){ if (controllerOK) [self doStuff]; }]; }; If I try to do that, I see an error capturing self strongly in this block is likely to lead to a retain cycle for the if (controllerOK) line. This does not appear to be one of those blocks problems that you create another variable using __unsafe_unretained before the block starts. First because this instruction cannot be used with a BOOL and second because the ivar controllerOK has to be tested on runtime inside the block. Another problem is that the block itself is declared on the interface, so it will be used outside the context where it is being created. How do I solve that?

    Read the article

  • php require class call from inside method

    - by jera
    from my understanding, require pastes code into the calling php file. what if you were requiring from inside a method...it would paste the entire code/class inside the method, blocking the next statement in the method. eg. function test() { require 'pathtosomeclasscode'; somestatement; // any code after the require is blocked. } how do i get around this, to be able to require code where-ever, without it being pasted in that exact spot? Thanks in advance for your help.

    Read the article

  • Function name inside a variable

    - by John Doe
    Hello. I have a simple question (i guess). I'm getting the name of the function inside a variable from database. After that, i want to run the specific function. How can i echo the function's name inside the php file? The code is something like this: $variable= get_specific_option; //execute function $variable_somesuffix(); The "somesuffix" will be a simple text. I tried all the things i had in mind but nothing worked.

    Read the article

  • "Cannot use fixed local inside lambda expression"

    - by JulianR
    I have an XNA 3.0 project that compiled just fine in VS2008, but that gives compile errors in VS2010 (with XNA 4.0 CTP). The error: Cannot use fixed local 'depthPtr' inside an anonymous method, lambda expression, or query expression depthPtr is a fixed float* into an array, that is used inside a Parallel.For lambda expression from System.Threading. As I said, this compiled and ran just fine on VS2008, but it does not on VS2010, even when targeting .NET 3.5. Has this changed in .NET 4.0, and even so, shouldn't it still compile when I choose .NET 3.5 as the target framework? Searching for the term "Cannot use fixed local" yields exactly one (useless) result, both in Google and Bing. If this has changed, what is the reason for this? I can imagine capturing a fixed pointer-type in a closure could get a bit weird, is that why? So I'm guessing this is bad practice? And before anyone asks: no, the use of pointers is not absolutely critical here. I would still like to know though :)

    Read the article

  • jquery .inside() ?

    - by codedude
    I was wondering if it was possible to insert content inside html tags. So say you have a h4 tag: <h4>Some Header</h4> And you want the text to also be surrounded by a span with a class of "line". Like so: <h4><span class="line">Some Header</span></h4> I know about stuff like .after() but is there something like .inside() to do this with? \ Ok...I know I could do this manually, but in this situation it is out of the question. Thanks

    Read the article

  • js function causing all other functions not to work inside js file

    - by Camran
    In safari 4 and all explorer browsers, whenever I try to call a function inside a javascript file which contains this function below, that first function isn't called. So calling function1 will not work if function2 is inside the same .js file, explanation? Here is the code which makes the problem. Whenever I remove this function, everything works fine and all functions work fine. So this function is causing a problem. function addOption(selectbox, value, text, class, id_nr ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; optn.id = value; if (class==1){ optn.className = "nav_option_main"; } selectbox.options.add(optn); } Any ideas why? Thanks

    Read the article

  • Operations inside Rails I18n locales' strings

    - by Cristobal Viedma
    Hi, I am trying to put operations inside the locales to adapt to different languages. For example, in English a billion is 1,000,000,000, however in Spanish a billion is 1,000,000,000,000 so I would like to be able to have the following: en: billion: "You have %{money} billions" es: billion: "Tienes %{money/1000.0} billones" In order to be able to write: I18n.t :billion, :money => whatever And be right for whatever language. However, it seems that I cannot put operations inside the locales' strings. Any hint on how should I be doing this? Maybe my approach is just wrong "philosophically" talking? Thanks all!

    Read the article

  • Best way to find all input elements inside a form using jQuery

    - by Aayush
    I need to find all form elements inside inside a form and trigger a flag on change in the value. Currently I am using the method below. I am not sure if this works or not. But It surely works for: .find('input[type=text]) $('#form').find('input[type=text], input[type=radio], input[type=checkbox], select, textarea').each(function(){ $(this).change(function(){ if( change !== 1 ) change = 1; }); }) Now I have added multiple elements with the comma. Will this work and is this the best way to do this. Appreciate all the help. Thanks!

    Read the article

  • Format MySQL code inside PHP string

    - by JohnA
    Is there any program IDE or not that can format MySQL code inside PHP string e.g. I use PHPStorm IDE and it cannot do it. It does that for PHP and MYSQL but not for MYSQL inside php string. I am ready to use new IDE because now i have to manually format hundreds of database requests that are one line and not readable. Only criteria for my choice is that ide can do that automatically. <?php ... $request1 = "select * from tbl_admin where admin_id= {$_SESSION['admin_id']} and active= 1 order By admin_id Asc"; ... ?> should become <?php ... $request1 = "SELECT * FROM tbl_admin WHERE admin_id = {$_SESSION['admin_id']} AND active = 1 ORDER BY admin_id ASC"; ... ?>

    Read the article

  • VIM: Columnvise Increment inside and outside?

    - by hhh
    By outside, I want solutions that does not use Vim's scripting hacks but try to reuse certain basic *ix tools. Inside Vim stuff asks for solutions to get the column-increment with inside stuff such as scripting. 1 1 1 2 1 3 1 ---> 4 1 5 1 6 . . . . Vim has a script that does column-vise icrementing here. It has gathered about 50/50 ups and down, perhaps tasting a bit reinventing-the-wheel. How do you column-increment stuff in Vim without using such script? Then the other question is, how do you column-increment stuff without/outside Vim? Most elegant, reusable and preferrably-small wins the race!

    Read the article

  • Use of class definitions inside a method in Java

    - by Bragaadeesh
    Hi public class TestClass { public static void main(String[] args) { TestClass t = new TestClass(); } private static void testMethod(){ class TestMethodClass{ int a; int b; int c; } TestMethodClass testMethodClass = new TestMethodClass(); } } I found out that the above piece of code is perfectly legal in Java. I have the following questions. What is the use of ever having a class definition inside a method? Will a class file be generated for TestMethodClass Its hard for me to imagine this concept in an Object Oriented manner. Having a class definition inside a behavior. Probably can someone tell me with equivalent real world examples. Thanks

    Read the article

  • Wrapping C/C++ inside Java

    - by Ashwin
    I develop applications/programs in C/C++. I am more versed in these two languages and love being a C++ developer. I am wondering how to create a Java program that contains all my C++ code. I mean, I would like to wrap all my C++ code (that is already developed) inside Java class. But clueless how to do it. Please post your responses or methods/steps on integrating C++ inside Java. (using JNI is the way, but I could not figure it out on www how to use it) FYI, I use Eclipse IDE to develop. How and what packages should I include in my project workspace?

    Read the article

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