Search Results

Search found 5784 results on 232 pages for 'points'.

Page 150/232 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • deleting dynamically allocated object that contains vector in C++ STL

    - by kobac
    I have a class class ChartLine{ protected: vector<Point> line; // points connecting the line CString name; //line name for legend CPen pen; //color, size and style properties of the line }; where Point is a structure struct Point{ CString x; double y; }; In main() I dynamically allocate objects of type ChartLine with new operator. If I use delete afterwards, will default destructor ~ChartLine() properly dealocate (or clear) member ChartLine::line(which is vector btw) or I would have to clear that vector in ~ChartLine() manually? Thanks in advance. Cheers.

    Read the article

  • how to find out if a shape is passable

    - by jd
    I have a complex polygon (possibly concave) and a few of its edges marked as entry/exit points. there is a possibility that inside this polygon may lie one or more blockades of arbitrary shape. what approaches could I use to determine whether a path of certain width exists between a pair of entry/exit edges? having read through the question it looks like a homework type - it is not. I just wish to have a at least a few leads I could pursue, as this is new to me.

    Read the article

  • The meaning of tracking in git

    - by user273158
    In an article that has been cited in StackOverflow a few times (e.g. 1) , the author discusses the asymmetry between git push and git pull, and mentions the following: Update: Thanks to David Ongaro, who points out below that since git 1.7.4.2, the recommended value for the push.default option is upstream rather than tracking, although tracking can still be used as a deprecated synonym. The commit message that describes that change is nice, since it suggests that there is an effort underway to deprecate the term “track” in the context of setting this association with the upstream branch in a remote repository. (The totally different meanings of “track” in git branch --track and “remote-tracking branches” has long irritated me when trying to introduce git to people.) What is exactly the difference that he is referring to with: The notion of "tracking" in git branch --track The notion of "tracking" in remote-tracking branches in the last sentence?

    Read the article

  • How could a share a Google map mashup with my own datapoints and links back to my site?

    - by rball
    I currently have a map mashup that has locations that I'm populating from my own database. A few users would like to also show that map on their site(s). I'd like to give them the ability to do that, but would like to retain the actual functionality of the map on my own site: like add "stuff" to places on the map through my a web form on my site. I could open the entire API to allow them to create their own form along with the data points, but most of the people wanting to put up the map aren't developers, they are just enthusiasts that have put together a personal page that they want to spice up. I was thinking I could just provide a JavaScript of some kind that they could then take to place on their site, or maybe an IFRAME of some type, or...any ideas? Anyone implemented this? TIA.

    Read the article

  • Dynamically udpate canvasOverlay property of jQuery jqPlot

    - by You Kuper
    I want to dynamically udpate canvasOverlay property of jQuery jqPlot. This will provide the effect of a timeline in my jqPlot. This effect should be similar to the one shown in this jFiddle. However, instead of drawing points, I want to update canvasOverlay property every second: canvasOverlay: { show: true, objects: [ { rectangle: { xmax: new Date(), xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px", color: "rgba(0, 0, 0, 0.1)", showTooltip: true } }, ] } How can I do this? What are the functions I should use? UPDATE: My idea is to do something like this: canvasOverlay: { name: 'current', show: true, objects: [ { rectangle: { xmax: new Date(), xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px", color: "rgba(0, 0, 0, 0.1)", showTooltip: true } }, ] } /... var co = plot.plugins.canvasOverlay; var current = co.get('current'); current.options.objects.rectangle.xmax = new Date(); co.draw(plot);

    Read the article

  • Detecting touch area on Android

    - by HappyAppDeveloper
    Is it possible to detect every pixel being touched? More specifically, when the user touches the screen, is it possible to track all the x-y coordinates of the cluster of points touched by the user? How can I tell the difference between when users are drawing with their thumb and when they are drawing with the tip of a finger? I would like to reflect the brush difference depending on how users touch the screen, and would also like to track x-y coordinates of all the pixels being touched over time. Thanks so much in advance for any help.

    Read the article

  • How to save coordinates with Google Map?

    - by Pavel
    Hey everyone. I'm currently developing an app which uses tabs and google map. What I want to do is to get the gps positions, say 3, and store them in sql db (which I'm already doing) and then display them on the map. I already created canvas, added to overlay but those points disappear when I'm changing tabs so I thought if there is a way to somehow store those coords with google map so I can retrieve them and display them nicely whenever I'm clicking the "map tab"? Please can anyone help?

    Read the article

  • Class views in Django

    - by Sebastjan Trepca
    Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach. For example, I have a page that displays a user. This page is very similar to page that displays a group, but it's still not so similar to just use another data model. Group also has members etc... One way would be to point views to class methods and then extend that class. Has anyone tried this approach or has any other idea?

    Read the article

  • A good ecommerce alternative to Magento?

    - by delboud
    I been dealing with Magneto for the last 6 months now and its a real headache, always some type of error, slow, bloated, dead community and overly complex to customize (and im a designer...) I look at others like zencart but seem kinda dated compared to magento, but are their any other solutions to replace magento thats better and with a good online community? the main selling points im looking for are configurable items (as in options for products), good online community and not so hard to customize or a nice amount of templates available. has to be free and hopefully open source and if it helps this is for a custom car accessories store

    Read the article

  • Xcode OpenGL Build Error (header file not found)

    - by Strix Nebulosa
    When building my Objective-C project (for Mac OS 10.9, Xcode 5.11), I get the error message Lexical or Preprocessor Issue 'OpenGL/OpenGL.h' file not found. The error is caused by the include section of the file CVDisplayLink.h where the above named file is included. CVDisplayLink.h belongs to the framework CoreVideo. Now there are two strange points related to that issue: The error appeared after I tried to test some basic OpenGL features using the tutorial in the Mac Developer Library ( https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_drawing/opengl_drawing.html#//apple_ref/doc/uid/TP40001987-CH404-SW8 ). I added an NSOpenGLView to my MainMenu as well as the related code given in the tutorial. Then the error message appeared. I also tried to add the OpenGL and CoreVideo frameworks to my project target, but this did not help. After some frustration, I removed the NSOpenGLView from my project, as well as all related code. Now the error Message still appeares and I have no Idea how to ged rid of it.

    Read the article

  • R - Subsetting XTS via Time and Which

    - by user2844947
    Currently, I have a XTS, called Data, which contains a Date, and two value columns which are numbers. I would like to get a single number as output and which would be the mean of Value1 in the time period from a point where Value2 < mean(Value2) and going forward 14 data points, weeks in this particular data set. In order to get the dates where Value2 < mean(Value2), I wrote the below code Data[which(Data$Value2 < mean(Data$Value2)),"Date"] However, I am not sure how to get the mean of Value1 in the period, going 14 days forward from each of the resultant dates from the above code.

    Read the article

  • Is there a generic open-source reporting system out there?

    - by syntactico
    I recently started a position at a new company, and one of the first projects they want is an internal reporting system that points at database A, B, C and reports various metrics/statistics/predictions. Basically, the same thing I've done or worked on and every company I've ever been hired by. Since this gets a bit boring after a while, I was wondering if there already exists some sort of open-source package that accomplishes this goal. Ideally, it would work with multiple databases out-of-box (PostgreSQL, MySQL, MSSQL, Oracle minimally), determine relationships between tables (either automatically from their schemas, or allow you to manually set them up after pooling all the tables), allow you to create reports based on a subset of tables, customizing what data you wanted to be displayed/calculated (I suppose this would be challenging since you've no idea what every audience wants, and would need to make this flexible) I'm debating making something like this in my spare time if one does not already exist. Just curious.

    Read the article

  • youtube api: display speaker statements like a caption

    - by zmol
    I'm doing something similar to close caption but not exactly the same. I have a youtube video, and I want to display certain messages at specific points in the video. When the video loads, I pull entries from the database in the format time and sentence. For example, at 0:20 the speaker says "don't forget to write down my email that you see on the side" and I want to display the email on the side. At 0:50, he says "and I'll post my office hours" so I want to show those office hours at that time. How can I do this. The video itself is hosted on youtube, but is being displayed on a private website. The div where I want to display the messages is <div id="write">.

    Read the article

  • Accessing loop iteration in a sub-function?

    - by DisgruntledGoat
    I'm using the Google Maps API to plot several points on a map. However, in the click event function below, i is always set to 4, i.e. its value after iterating the loop: // note these are actual addresses in the real page var addresses = new Array( "addr 1", "addr 2", "addr 3", "addr 4" ); for (var i = 0; i < addresses.length; i++) { geocoder.getLatLng(addresses[i], function(point) { if (point) { var marker = new GMarker(point); map.addOverlay(marker); map.setCenter(point, 13); GEvent.addListener(marker, "click", function() { // here, i=4 marker.openInfoWindowHtml("Address: <b>" + addresses[i] + "</b>"); }); } }); } So when the marker displays it's using addresses[4] which is undefined. How do I pass the correct value of i to the function?

    Read the article

  • XCode 5 says I got a duplicate, which I don't

    - by GoodMove
    The point is every time I try to run a C++ code in XCode 5 (the file s "File.cpp") xcode returns this: duplicate symbol _main ld: 1 duplicate symbol for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) And it only returns the error, when I got the following function whatever it contains: int main() { } I checked the folder, which XCode points to (where it says the duplicates are placed), but didn't find anything though. What am I supposed to do??? #include "File.h" using namespace std; void func (void){ cout << "Hello World!" << endl; }

    Read the article

  • Why is this C or C++ macro not expanded by the preprocessor?

    - by Atul
    Can someone points me the problem in the code when compiled with gcc 4.1.0. #define X 10 int main() { double a = 1e-X; return 0; } I am getting error:Exponent has no digits. When i replace X with 10, it works fine. Also i checked with g++ -E command to see the file with preprocessors applied, it has not replaced X with 10. I was under the impression that preprocessor replaces every macro defined in the file with the replacement text with applying any intelligence. Am I wrong? I know this is a really silly question but I am confused and I would rather be silly than confused :). Any comments/suggestions.

    Read the article

  • Intersection of line and rectangle with maximum segment length

    - by Aarkan
    I have a vector represented by the slope m. Then there is rectangle (assume axis aligned), which is represented by top-left and bottom-right corner. Of course, there may be many lines with slope m and intersecting the given rectangle. The problem is to find out the line whose length of line intercept inside the rectangle is maximum among all such lines. i.e., if the line intersects rectangle at P1 and P2, then the problem is to find the equation of line for which length of P1P2 is maximum. I proceeded like this. Let the line is: y = m*x + c. Then find out the intersection with each side of rectangle and finding out the maxima for distance function between each pair of points. But it will only give me the length of line segment and there seem to be many corner cases to handle. Could anyone please suggest a better way to do this. Thanks in advance.

    Read the article

  • With google maps, can you use google's own popup windows?

    - by SLC
    I've implemented a google map with points and stuff that uses an address that the user inputs. When you click a point, the popup bubble appears with the name and address in. Often this name and address is a prominent location, as it's used for meetings and things, such as a university. If you google the address yourself on maps.google.co.uk then you get google's own popup bubble, which often has a photo, information, opening hours, links to directions, reviews, etc. etc. I am wondering if there's a way to use that popup dialog instead of my own, where it is available. I can't see anything in the API to do this. I'm using V2 as we support IE6 in a lot of our users, but I've been told recently I can upgrade to V3 should I need functionality from it. Any ideas?

    Read the article

  • how to get a product's image in magento?

    - by lock
    im running on version 1.3.2.1 but on my client's server they had magento 1.3.0 so my previous code to display images for my local copy: echo $this->helper('catalog/image')->init($_product)->resize(163, 100); does not work on the client's installation looking at the results returned by their magento, ver 1.3.0 actually returns a url although it points to the skin's media folder is there a way to get the absolute image path for the image? or should i make changes somewhere else that would tell magento that the media directory should be on the root?

    Read the article

  • SQL finding overlapping of times pass midnight (across 2 days)

    - by janechii
    Hi everyone, I know there are lots of these types of questions, but i didn't see one that was similar enough to my criteria. So i'd like to ask for your help please. The fields i have are just start and end which are of time types. I cannot involve any specific dates in this. If the time ranges don't go pass midnight across day, i'd just compare two tuples as such: end1 > start2 AND start1 < end2 (end points touching are not considered overlapped here.) But when I involve time range that pass (or at) midnight, this obviously doesn't work. For example, given: start | end --------+-------- 06:00PM | 01:00AM 03:00PM | 09:00PM Without involving dates, how can i achieve this, please. My assumption is, if end is less than start, then we're involving 2 days. I'm trying to do this in plain standard SQL, so just a simple and concise logic in the WHERE clause. Thank you everyone!

    Read the article

  • How do I tell gdb how long my zero-length array is?

    - by Joe
    Slightly oxymoronic title! Bonus points for Xcode answer but it's a gdb question. If I have a standard, statically sized array gdb will print all its elements [and Xcode will let me browse through it] but if I have a zero length array, it won't, because it doesn't know. Obviously I can print the array indexes one by one, but I'd like a dump of the whole thing. How do I tell gdb how much space I have allocated for the array to allow it to print the array (or to allow Xcode to view the array). Is it even possible?

    Read the article

  • Problem while compiling the code

    - by Atul
    Can someone points me the problem in the code when compiled with gcc 4.1.0. #define X 10 int main() { double a = 1e-X; return 0; } I am getting error:Exponent has no digits. When i replace X with 10, it works fine. Also i checked with g++ -E command to see the file with preprocessors applied, it has not replaced X with 10. I was under the impression that preprocessor replaces every macro defined in the file with the replacement text with applying any intelligence. Am I wrong? I know this is a really silly question but I am confused and I would rather be silly than confused :). Any comments/suggestions.

    Read the article

  • I created a Python egg!!! Now... what do I do with it?

    - by froadie
    I've finally figured out how to create a Python egg and gotten it to work. Now... what do I do with it? How do I use it? How do I ensure that everything was correctly included? (Simple steps please... not just redirection to another site. I've googled, but it's confusing me, and I was hoping someone could explain it in a couple of simple bullet points or sentences.)

    Read the article

  • What if Web page's background matters

    - by hgulyan
    Hi, I have a complex background image and images, that should be on exact positions of the background image. How can I organize web page? I can't use absolute positions, because I need to organize background to view it nice on any monitor, any resolution and any browser. It can be aligned to center or smth else. Web page can be written just with HTML, Javascript or with a library like JQuery. Here's an example of what kind of web page I'd like to have. http://desandro.com/portfolio/ (background picture and points on it) Thanks in advance.

    Read the article

  • Problem with sending "SetCookie" first in php code

    - by Camran
    According to this manual: http://us2.php.net/setcookie I have to set the cookie before anything else. Here is my cookie code: if (isset($_COOKIE['watched_ads'])){ $expir = time()+1728000; //20 days $ad_arr = unserialize($_COOKIE['watched_ads']); $arr_elem = count($ad_arr); if (in_array($ad_id, $ad_arr) == FALSE){ if ($arr_elem>10){ array_shift($ad_arr); } $ad_arr[]=$ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } } else { $expir = time()+1728000; //20 days $ad_arr[] = $ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } As you can see I am using variables in setting the cookie. The variables comes from a mysql_query and I have to do the query first. But then, if I do, I will get an error message: Cannot modify header information - headers already sent by ... The error points to the line where I set the cookie above. What should I do?a

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >