Search Results

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

Page 35/232 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • R: How to plot a vector, grouped by a factor

    - by amarillion
    In R, given a vector casp6 <- c(0.9478638, 0.7477657, 0.9742675, 0.9008372, 0.4873001, 0.5097587, 0.6476510, 0.4552577, 0.5578296, 0.5728478, 0.1927945, 0.2624068, 0.2732615) and a factor: trans.factor <- factor (rep (c("t0", "t12", "t24", "t72"), c(4,3,3,3))) I want to create a plot where the data points are grouped as defined by the factor. So the categories should be on the x-axis, values in the same category should have the same x coordinate. Simply doing plot(trans.factor, casp6) does almost what I want, it produces a boxplot, but I want to see the individual data points.

    Read the article

  • Extracting attribute data from a raster

    - by user308827
    Hi, I have a raster file (basically 2D array) with close to a million points. I am trying to extract a circle from the raster (and all the points that lie within the circle. Using ArcGIS is exceedingly slow for this. Can anyone suggest any image processing library that is both easy to learn and powerful and quick enough for something like this? Thanks!

    Read the article

  • Annoying Captcha >> How to programm a form that can SMELL difference between human and robot?

    - by Sam
    Hi folks. On the comment of my old form needing a CAPTHA, I felt I share my problem, perhaps you recognize it and find its time we had better solutions: FACTUAL PROBLEM I know most of my clients (typical age= 40~60) hate CAPTCHA things. Now, I myself always feel like a robot, when I have to sueeze my eyes and fill in the strange letters from the Capcha... Sometimes I fail! Go back etc. Turnoff. I mean comon its 2011, shouldnt the forms have better A.I. by now? MY NEW IDEA (please dont laugh) Ive thought about it and this is my idea's to tell difference between human and robot: My idea is to give credibility points. 100 points = human 0% = robot. require real human mouse movements require mousemovements that dont follow any mathematical pattern require non-instantaneous reading delays, between load and first input in form when typing in form, delays are measured between letters and words approve as human when typical human behaviour measured (deleting, rephrasing etc) dont allow instant pasting or all fields give points for real keyboard pressures retract points for credibility when hyperlinks in form Test wether fake email field (invisible by human) is populated (suggested by Tomalak) when more than 75% human cretibility, allow to be sent without captcha when less than 25% human crecibility, force captcha puzzle to be sure Could we write a A.I. PHP that replaces the human-annoying capthas, meanwhile stopping most spamservers filing in the data? Not only for the fun of it, but also actually to provide a 99% better alternative than CAPTHCA's. Imagine the userfriendlyness of your forms! Your site distinguishing itself from others, showing your audience your sites KNOWS the difference between a robot and a human. Imagine the advangage. I am trying to capture the essense of that distinguishing edge. PROGRAMMING QUESTION: 1) Are such things possible to programm? 2) If so how would you start such programm? 3) Are there already very good working solutions available elsewhere? 4) If it isn't so hard, your are welcome to share your answer/solutions below. 5) upon completion of hints and new ideas, could this page be the start of a new AI captcha, OR should I forget about it and just go with the flow, forget about the whole AI dream, and use captcha like everyone else.

    Read the article

  • Grouping geographical shapes

    - by grenade
    I am using Dundas Maps and attempting to draw a map of the world where countries are grouped into regions that are specific to a business implementation. I have shape data (points and segments) for each country in the world. I can combine countries into regions by adding all points and segments for countries within a region to a new region shape. foreach(var region in GetAllRegions()){ var regionShape = new Shape { Name = region.Name }; foreach(var country in GetCountriesInRegion(region.Id)){ var countryShape = GetCountryShape(country.Id); regionShape.AddSegments(countryShape.ShapeData.Points, countryShape.ShapeData.Segments); } map.Shapes.Add(regionShape); } The problem is that the country border lines still show up within a region and I want to remove them so that only regional borders show up. Dundas polygons must start and end at the same point. This is the case for all the country shapes. Now I need an algorithm that can: Determine where country borders intersect at a regional border, so that I can join the regional border segments. Determine which country borders are not regional borders so that I can discard them. Sort the resulting regional points so that they sequentialy describe the shape boundaries. Below is where I have gotten to so far with the map. You can see that the country borders still need to be removed. For example, the border between Mongolia and China should be discarded whereas the border between Mongolia and Russia should be retained. The reason I need to retain a regional border is that the region colors will be significant in conveying information but adjacent regions may be the same color. The regions can change to include or exclude countries and this is why the regional shaping must be dynamic. EDIT: I now know that I what I am looking for is a UNION of polygons. David Lean explains how to do it using the spatial functions in SQL Server 2008 which might be an option but my efforts have come to a halt because the resulting polygon union is so complex that SQL truncates it at 43,680 characters. I'm now trying to either find a workaround for that or find a way of doing the union in code.

    Read the article

  • ArcObjects: Is buffering a point faster than buffering a line / polyline?

    - by Quigrim
    I can write my code logic to either buffer a polyline or to buffer the to and from point of the polyline. Working with the points will be easier, so it is the preferred way. Logically my reasoning tells me that buffering a point will be faster as it will always be a perfect circle. But will buffering 2 points still be faster than buffering 1 polyline? My gut says yes. Any comments?

    Read the article

  • Area of a irregular shape

    - by Naveen
    I have set of points which lies on the image. These set of points form a irregular closed shape. I need to find the area of this shape. Does any body which is the normal algorithm used for calculating the area ? Or is there any support available in libraries such as boost? I am using C++.

    Read the article

  • Access ELF string table section header

    - by idealistikz
    Assume: Elf_Section_Header *sectionHeaderTable //points to the start of a ELF section header table Elf_Section_Header *symtabHeader //points to the start of the symtab section header Why doesn't the following point me to the associated string table section header? Elf_Section_Header *strTabSectionHeader = (Elf_Section_Header *)((char *)sectionHeaderTable + (symtabHeader-strtab_index)); 'strTabSectionHeader-type == SHT_STRTAB' is equal to false How should I point ot the strTabSectionHeader?

    Read the article

  • Great Circle & Rhumb line intersection

    - by Karl T
    I have a Latitude, Longitude, and a direction of travel in degrees true north. I would like to calculate if I will intersect a line defined by two more Lat/Lon points. I figure the two points defining the line would create my great circle and my location and azimuth would define my Rhumb line. I am only interested in intersections that will occur with a few hundred kilometers so I do not need every possible solution. I have no idea where to begin.

    Read the article

  • Pruning data for better viewing on loglog graph - Matlab

    - by Geodesic
    Hi Guys, just wondering if anyone has any ideas about an issue I'm having. I have a fair amount of data that needs to be displayed on one graph. Two theoretical lines that are bold and solid are displayed on top, then 10 experimental data sets that converge to these lines are graphed, each using a different identifier (eg the + or o or a square etc). These graphs are on a log scale that goes up to 1e6. The first few decades of the graph (< 1e3) look fine, but as all the datasets converge ( 1e3) it's really difficult to see what data is what. There's over 1000 data points points per decade which I can prune linearly to an extent, but if I do this too much the lower end of the graph will suffer in resolution. What I'd like to do is prune logarithmically, strongest at the high end, working back to 0. My question is: how can I get a logarithmically scaled index vector rather than a linear one? My initial assumption was that as my data is lenear I could just use a linear index to prune, which lead to something like this (but for all decades): //%grab indicies per decade ind12 = find(y >= 1e1 & y <= 1e2); indlow = find(y < 1e2); indhigh = find(y > 1e4); ind23 = find(y >+ 1e2 & y <= 1e3); ind34 = find(y >+ 1e3 & y <= 1e4); //%We want ind12 indexes in this decade, find spacing tot23 = round(length(ind23)/length(ind12)); tot34 = round(length(ind34)/length(ind12)); //%grab ones to keep ind23keep = ind23(1):tot23:ind23(end); ind34keep = ind34(1):tot34:ind34(end); indnew = [indlow' ind23keep ind34keep indhigh']; loglog(x(indnew), y(indnew)); But this causes the prune to behave in a jumpy fashion obviously. Each decade has the number of points that I'd like, but as it's a linear distribution, the points tend to be clumped at the high end of the decade on the log scale. Any ideas on how I can do this?

    Read the article

  • SQLite join selection from the same table using reference from another table

    - by daikini
    I have two tables: table: points |key_id | name | x | y | ------------------------ |1 | A |10 |20 | |2 | A_1 |11 |21 | |3 | B |30 |40 | |4 | B_1 |31 |42 | table: pairs |f_key_p1 | f_key_p2 | ---------------------- |1 | 2 | |3 | 4 | Table 'pairs' defines which rows in table 'points' should be paired. How can I query database to select paired rows? My desired query result would be like this: |name_1|x_1|x_2|name_2|x_2|y_2| ------------------------------- |A |10 |20 |A_1 |11 |21 | |B |30 |40 |B_1 |31 |41 |

    Read the article

  • Changing scaling of MATLAB Figure

    - by Phil
    I have a figure that displays 20,000 points on the x-axis. So it labels the x-axis from 0 ... 20,000. However, now I would like to scale it from 0 to 50. But when I try to do this in the plot window it just shows me the first 50 points, instead of changing the scale. Is there any straightforward way to do that in MATLAB?

    Read the article

  • how to upload a file from php to amqp

    - by user2462648
    i want to know... how can i send a file to a rabbitmq queue from php. i have gone through many examples most of them didnt work. below is a consumer producer example which is near to working. Below is a the publisher.php <?php require_once('../php-amqplib/amqp.inc'); include('../config.php'); $conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); $channel = $conn->channel(); $channel->exchange_declare('upload-pictures','direct', false, true, false); $metadata = json_encode(array( 'image_id' => $argv[1], 'user_id' => $argv[2], 'image_path' => $argv[3] )); $msg = new AMQPMessage($metadata, array('content_type' => 'text/plain','delivery_mode' => 2)); $channel->basic_publish($msg, 'upload-pictures'); $channel->close(); $conn->close(); ?> consumer.php <?php require_once('../php-amqplib/amqp.inc'); include('../config.php'); $conn = new AMQPConnection(HOST, PORT, USER, PASS,VHOST); $channel = $conn->channel(); $queue = 'add-points'; $consumer_tag = 'consumer'; $channel->exchange_declare('upload-pictures','direct', false, true, false); $channel->queue_declare('add-points',false, true, false, false); $channel->queue_bind('add-points', 'upload-pictures'); $consumer = function($msg){}; $channel->basic_consume($queue,$consumer_tag,false,false,false,false,$consumer); ?> according to the example provided in the rabbitmq manual, i need to run consumer(php consumer.php) first in one terminal and the publisher (php publisher.php 1 2 file/path.png) in another terminal, i will get a "Adding points to user: 2" message in the consumer terminal. iam not getting this message at all. can you suggest where iam going wrong

    Read the article

  • C#: Drawing only a portion of a path

    - by John
    I have a series of points in a GraphicsPath; for our purpose lets assume its the outline of an uppercase B. I want to be able to be able to draw only the bottom portion that would resemble an uppercase L. I'd like to be able to select a window of points from the GraphicsPath. Is there a handy way to do this without doing point interpolation?

    Read the article

  • sql error, NULL??

    - by Luke
    So I have a query, can someone let me know if it looks ok content wise? "INSERT INTO ".TBL_MESSAGES." (NULL, 'Your ranking points have changed', 'Due to your recent activity, your ranking points have increased by $r', '2', '$u', '0', '0', '0', '0', NULL, NULL, NULL, NULL, now())"; I can add further information if the query doesnt appear to have a problem? Thanks

    Read the article

  • Pros and Cons of C vs C++ programming

    - by Mohit Deshpande
    I am trying to decide on whether I should learn C or C++. I come from a very object-oriented background of java and C#. I have heard that C++ is more object-oriented than C, BUT I have also heard that a C program compiles and runs faster than a C++ program. Please help me get the facts straight by giving pros and cons of BOTH points of views. (Points of views being C over C++, or C++ over C)

    Read the article

  • match strings in python

    - by mesun
    Write a function, called constrainedMatchPair which takes three arguments: a tuple representing starting points for the first substring, a tuple representing starting points for the second substring, and the length of the first substring. The function should return a tuple of all members (call it n) of the first tuple for which there is an element in the second tuple (call it k) such that n+m+1 = k, where m is the length of the first substring. Complete the definition def constrainedMatchPair(firstMatch,secondMatch,length):

    Read the article

  • Equivalant of this gradient code in ie css filter

    - by Wiika
    Hi All, i need an equivalent or an alternative for this code in internet explorer using the filter method background: -moz-linear-gradient(center bottom , rgb(132, 133, 132) 0%, rgb(35, 35, 35) 49%, rgb(104, 104, 104) 100%) repeat scroll 0% 0% transparent; the most important thing in the code is the points ( 0% - 49% - 100% ) i believe that the filter method doesn't have points and doesn't accpect more than two parms for the colors , Is there a way to do it in filter or a javascript script for that ? Thanks.

    Read the article

  • Convolve a column vector

    - by Geoff
    This is an OpenCV2 question. I have a matrix: cv::Mat_<Point3f> points; representing some space curve. I want to smooth it (using, for example a Gaussian kernel). I have tried using: cv::Mat_<Point3f> result; cv::GaussianBlur(points, result, cv::Size(4 * sigma, 1), sigma, sigma, cv::BORDER_WRAP); But I get the error: Assertion failed (columnBorderType != BORDER_WRAP)

    Read the article

  • Adding google.maps.latlng within a loop

    - by Mick Morrison
    I am new to Java Script. I am using it, in combination with Java Server Faces. I want to add some points to define a Polilyne using GoogleMaps Apiv3. My problem is that I can't add a FOR statement to the javascript, because it dumps. If I comment this FOR loop, it also dumps. The dump I am getting is: "javax.servlet.ServletException: null source". Has anyone any suggestion to solve this? Thanks in advance, Emanuel <script type="text/javascript"> function initialize() { var longit = "${dateRange.longitude}" ; var lat = "${dateRange.latitude}" ; var latlng = new google.maps.LatLng(lat, longit); var myOptions = { zoom: 15, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var points = []; var cadena1 = "${dateRange.latArray}" ; var cadena2 = "${dateRange.longArray}" ; var latArray = cadena1.split('?'); var longArray = cadena2.split('?'); /* The code Below is the one that fails */ for (var i=0; i < latArray.length; i++) { points.push(new google.maps.LatLng(latArray[i], longArray[i])); } /* Finish of the error code */ // The Polilyne is created var mapPath = new google.maps.Polyline ({ path: points, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 4 }); mapPath.setMap(map); } </script> </head> <body onload="initialize()"> <h:graphicImage url="http://localhost:8080/gps_tracking/faces/resources/images/logo.jpg"> </h:graphicImage> <h1 align="center">Sol-Tech</h1><br /> <hr></hr> <div id="map_canvas" style="width:100%; height:100%"></div> </body>

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >