Search Results

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

Page 144/232 | < Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >

  • Android: Constructing a triangle based on Geographical information

    - by Aidan
    Hi Guys, I'm constructing a geolocation based application and I'm trying to figure out a way to make my application realise when a user is facing the direction of the given location (a particular long / lat co-ord). I've got the math figured, I just have the triangle to construct. Here's a further clarification of what I want to do.. I just want to know is there a way to get java to construct 2 other co-ordinates based on my orientation in relation to true north and my current co-ordinate? I'd like to construct a tri-angle, 45 degrees out each way of my current location (one of the points) and 1 kilometer in that direction. The problem is I don't know how to make Android/Java recognise that I want to find that point in the direction I'm currently facing.. Anyone got any ideas?

    Read the article

  • Puzzle - Dynamically change data template control from another data template

    - by Burt
    I have a DataTemplate that contains an Expander with a border in the header. I want the header border to have round corners when collapsed and straight bottom corners when expanded. What would best practice be for achieving this (bonus points for code samples as I am new to XAML)? This is the template that holds the expander: <DataTemplate x:Key="A"> <StackPanel> <Expander Name="ProjectExpander" Header="{Binding .}" HeaderTemplate="{StaticResource B}" > <StackPanel> <Border CornerRadius="0,0,2,2"> This is the expander datatemplate: <DataTemplate x:Key="B"> <Border x:Name="ProjectExpanderHeader" CornerRadius="{Binding local:ItemUserControl.ProjectHeaderBorderRadius, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}}" Background="{StaticResource ItemGradient}" HorizontalAlignment="{Binding HorizontalAlignment, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}, Mode=OneWayToSource}"> <local:ItemContentsUserControl Height="30"/> </Border> </DataTemplate>

    Read the article

  • C# - Getting record from a row using DataRow

    - by pinkcupcake
    I'm trying to get record of a row using DataRow. Here's what I've done so far: uID = int.Parse(Request.QueryString["id"]); PhotoDataSetTableAdapters.MembersTableAdapter mem = new PhotoDataSetTableAdapters.MembersTableAdapter(); PhotoDataSet.MembersDataTable memTable = mem.GetMemberByID(uID); DataRow[] dr = memTable.Select("userID = uID"); string uName = dr["username"].ToString(); Then I got the error: Cannot implicitly convert type 'string' to 'int' The error points to "username". I don't know what's wrong because I'm just trying to assign a string variable to a string value. Anyone figures out the reason of the error? Please help and thanks.

    Read the article

  • Build Process failed with maven package

    - by vijay.shad
    Hi I am working on a maven project to build a simple utility api. The same source code when build on my office win XP machine, was successful. Now i am at home and working with same source code on CentOS machine. Here the build process failed strangely. The error it reports is ideally in my points should we warning message. As shown below. [ERROR] com.vsd.Provider:[12,240] The import java.util.Set is never used Can you please give me some idea, where can I look into?

    Read the article

  • Zend - Deny access to CSS, JS, Image files

    - by Vincent
    All, I have the following Zend application structure: helloworld - application - configs - controllers - models - layouts - include - library - public - design -- css -- site.css -- js -- global.js -- images -- siteheader.gif -- sitefooter.gif - .htaccess - index.php My .htaccess file in public folder looks like this: Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] My document root points to the "public" folder. Currently, if the user visits a directory level URL, (Ex: http://localhost/design or localhost/css) , my .htaccess file above make sure to show him the "Access Forbidden" page. But if he visits the file level URL, (Ex: http://localhost/design/css/site.css), it shows him the CSS file or the js file or PHP file.. How can I make sure to lock file level access for the above file types, if accessed directly from the URL? Since my application is JS intensive, I want to protect it from users looking at it. Thanks

    Read the article

  • Problem with Google AJAX Search API RESTful interface

    - by robert_d
    When I send the following query http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q=coffee%20New%20York%20NY using c# WebClient.DownloadString function or ordinary web browser I get JSON data which is different from data for the same query using JavaScript and Google AJAX Search API. From REST service I get the following url field http://www.google.com/maps/place?source003duds0026q003dcoffee0026cid003d13245583795745066822 but from JavaScript query I get this url field http://www.google.com/maps/place?source=uds&q=coffee&cid=13245583795745066822 The problem with REST service answer is that the url it gives points to a web page with error message "We currently do not support the location". What am I doing wrong?

    Read the article

  • IIS browse directory problem on a virtual directory

    - by user335518
    I have two differents virtual directories mapping to the same directory on the OS. In one of this virtual directories I need to have the browse folders disable, and in the other one I need to have it enable. The problem is that when I changed one of them the other change as well. I thinks this problem is related that both virtual directories points to the same folder in the OS, but with the IIS6 I had this same configuration with out a problem. Any idea of a work around with this? Thanks!

    Read the article

  • How can I leverage String constants in an XML file?

    - by jayshao
    I'd like to enforce standardized keys by storing them as static final String variables on a Java class, and either referencing or statically importing them, to use them as values in either XML, Strings, Methods, Annotations, etc. Does anyone know a good way to have Maven insert (like filtering) values like StringKeys.SOME_KEY into an XML file? e.g. something like <element value="${StringKeys.SOME_KEY}"/> or similar - the main idea is to enforce commonality and prevent key mis-alignment. Or an alternative solution to accomplish the same - with some semantic that if a non-existant String is referenced, that it fails during build? Bonus points if it works in C# as well.

    Read the article

  • Can I improve performance by refactoring SQL commands into classes?

    - by Matthew Jones
    Currently, my entire website does updating from SQL parameterized queries. It works, we've had no problems with it, but it can occasionally be very slow. I was wondering if it makes sense to refactor some of these SQL commands into classes so that we would not have to hit the database so often. I understand hitting the database is generally the slowest part of any web application For example, say we have a class structure like this: Project (comprised of) Tasks (comprised of) Assignments Where Project, Task, and Assignment are classes. At certain points in the site you are only working on one project at a time, and so creating a Project class and passing it among pages (using Session, Profile, something else) might make sense. I imagine this class would have a Save() method to save value changes. Does it make sense to invest the time into doing this? Under what conditions might it be worth it?

    Read the article

  • Why does C++ mandate that complex only be instantiated for float, double, or long double?

    - by templatetypedef
    According to the C++ ISO spec, §26.2/2: The effect of instantiating the template complex for any type other than float, double or long double is unspecified. Why would the standard authors explicitly add this restriction? This makes it unspecified, for example, what happens if you make complex<int> or a complex<MyCustomFixedPointType> and seems like an artificial restriction. Is there a reason for this limitation? Is there a workaround if you want to instantiate complex with your own custom type? I'm primarily asking this question because of this earlier question, in which the OP was confused as to why abs was giving bizarre outputs for complex<int>. That said, this still doesn't quite make sense given that we also might want to make complex numbers out of fixed-points types, higher-precision real numbers, etc. Thanks!

    Read the article

  • Is it better to use GL_FIXED or GL_FLOAT on Android.

    - by Timmmm
    I would have assumed that GL_FIXED was faster, but the iPhone docs actually say to use GL_FLOAT because GL_FIXED has to be converted to GL_FLOAT. Is it the same on Android? I suppose it varies by phone, but what about recent popular ones (Nexus One, Droid/Milestone, etc.)? Bonus points: This appears to be completely undocumented (e.g. search google for GL_FIXED!) but where is the 'point' in GL_FIXED? I.e. how much is (GL_FIXED)1 worth?

    Read the article

  • FlexBuilder 3 Linked folders not picking up as files.

    - by Jafin
    I am using Flex Builder 3 to write a flex component. I have created a real folder path \common. Under common I create a Linked Folder to Session. Session points to a shared source folder with a item with a namespace of common\Session\ClassName. When I go to compile the project FlexBuilder warns that it was unable to find the type. if I stop using Linked folders and create a physical \common\Session\ in my project and place SessionInfo.as in the folder then it works. just in case my textual explanation is a bit obscure here is the layout. \src\common\Session\SessionInfo.as namespace of SessionInfo is common.Session. If you need any further info just let me know.

    Read the article

  • Objective-c pointer assignment and reassignment dilema

    - by moshe
    Hi, If I do this: 1 NSMutableArray *near = [[NSMutableArray alloc] init]; 2 NSMutableArray *all = [[NSMutableArray alloc] init]; 3 NSMutableArray *current = near; 4 current = all; What happens to near? At line 3, am I setting current to point to the same address as near so that I now have two variables pointing to the same place in memory, or am I setting current to point to the location of near in memory such that I now have this structure: current - near - NSMutableArray The obvious difference would be the value of near at line 4. If the former is happening, near is untouched and still points to its initial place in memory. If the latter is happening,

    Read the article

  • Conceptually, how does replay work in a game?

    - by SnOrfus
    I was kind of curious as to how replay might be implemented in a game. Initially, I thought that there would be just a command list of every player/ai action that was taken in the game, and it then 're-plays' the game and lets the engine render as usual. However, I have looked at replays in FPS/RTS games, and upon careful inspection even things like the particles and graphical/audible glitches are consistent (and those glitches are generally *in*consistent). So How does this happen. In fixed camera angle games I though it might just write every frame of the whole scene to a stream that gets stored and then just replays the stream back, but that doesn't seem like enough for games that allow you to pause and move the camera around. You'd have to store the locations of everything in the scene at all points in time (No?). So for things like particles, that's a lot of data to push which seems like a significant draw on the game's performance whilst playing.

    Read the article

  • Using WiX, how do I change a property of a subfolder of a virtual directory?

    - by Joergen Bech
    I have a hierarchy of Directory elements in a WiX script. I also have a component that creates a virtual directory (using IIS:WebVirtualDir), which points to the root of my Directory hierarchy. How do I change a property (e.g. AnonymousAccess) of a subfolder of the virtual directory, e.g. MyVirtualDir <<< this is the virtual directory root MyVirtualDir\MySubFolder <<< this is the subfolder for which I wish to change a property using WebDirProperties Please note that I do not wish to create a new virtual directory for the subfolder. I only wish to change a few security settings. The current script is too big to post here, but take a look at the WiX tutorial: 5.3 Web Directory. Suppose in that example that there was another Directory element named "MySubFolder" nested within the "InstallDir" element. What would then be the next step in order to set properties for "MySubFolder" without turning it into a virtual directory?

    Read the article

  • Using `rack-rewrite` to Remove the Month and Date from a Permlink

    - by Bryan Veloso
    I've started the process of moving my blog to Octopress, but unfortunately, a limitation of Jekyll doesn't allow me to use abbreviated month names for my permalinks. Therefore I'm looking to just get rid of the month and day bits altogether. I'ved read in this article that you can use rack-rewrite to take care of the redirection, since I am using Heroku to host this. So how would I turn: This: example.com/journal/2012/jan/03/post-of-the-day/ Into this: example.com/journal/2012/post-of-the-day/ Extra points: If I had another rule that redirected /blog/ to /journal/, would that rule still adhere to the above one as well? So from: This: example.com/blog/2012/jan/03/post-of-the-day/ To this: example.com/journal/2012/jan/03/post-of-the-day/ And finally to: example.com/journal/2012/post-of-the-day/ Thanks for the assistance in advance. :)

    Read the article

  • Google MAP API v3: Link markers to an external list

    - by meo
    Given is a database with locations, we feed those tho the google map api and all points are displayed. Now there is a list of this location right next to the google map. How can i link the places in the list to the dots on the map? Like this: http://www.local.ch/en/q/ubs.html I want to light up the point on the map on the list item hover and open the info-box by clicking on the list item. Can anyone point me into the right direction?

    Read the article

  • desktop module for existing web application

    - by maxxxee
    My client has a running web application which has been online for more than a year. Recently the client has introduced smart cards for his employees. Because of the difficulty in integrating smart card with its api on a web interface(i will post another detailed question on this later) we are planning to have desktop interface for this. There are 10-20 terminals which will use the desktop interface. 3 approaches for doing this that I have considered : Direct connection and operations on DB-Not using this because of data integrity and consistency issues. Build web service end points and use it from desktop interface Build a dll with common functions and use from both web and desktop Questions: 1. What are your opinions based on 2 and 3 approach? 2. Any other approach that I should consider? Note: I am using .Net framework, web application in asp.net

    Read the article

  • Accessing entire netflix catalog via API v1.5

    - by Stone
    Netflix recently updated their API methods for obtaining the full Netflix catalog. I'm curious if anyone has had any success accessing these new xml documents and downloading them via API v1.5 (9/2012). Previously, you could download the entire Netflix catalog via one API call (which I had working perfectly). Now, there are supposedly two calls to make: one for dvd's and one for streaming movies. I cannot make these calls return anything except for an empty array. Please don't offer an answer unless you have personally downloaded the entire catalog via these new API's. Bonus points if you can tell me how to do it in Ruby. http://developer.netflix.com/blog/read/Update_Changes_for_the_Public_API

    Read the article

  • Plotting a cumulative graph of python datetimes

    - by ventolin
    Say I have a list of datetimes, and we know each datetime to be the recorded time of an event happening. Is it possible in matplotlib to graph the frequency of this event occuring over time, showing this data in a cumulative graph (so that each point is greater or equal to all of the points that went before it), without preprocessing this list? (e.g. passing datetime objects directly to some wonderful matplotlib function) Or do I need to turn this list of datetimes into a list of dictionary items, such as: {"year": 1998, "month": 12, "date": 15, "events": 92} and then generate a graph from this list? Sorry if this seems like a silly question - I'm not all too familiar with matplotlib, and would like to save myself the effort of doing this the latter way if matplotlib can already deal with datetime objects itself.

    Read the article

  • Get the count of A -> B and B->A without duplicates

    - by TomGasson
    I have a table like so: index|from | to ------------------ 1 | ABC | DEF 2 | ABC | GHI 3 | ABC | GHI 4 | ABC | JKL 5 | ABC | JKL 6 | ABC | JKL 7 | DEF | ABC 8 | DEF | GHI 9 | DEF | JKL 10 | GHI | ABC 11 | GHI | ABC 12 | GHI | ABC 13 | JKL | DEF And I need to count how the total times between the points (regardless of direction) to get the result: A | B | count ----------------- ABC | DEF | 2 ABC | GHI | 5 ABC | JKL | 3 DEF | GHI | 1 DEF | JKL | 2 So far I can get: SELECT `a`.`from` as `A`, `a`.`to` as `B`, (`a`.`count` + `b`.`count`) as `count` FROM (SELECT `from`, `to`, count(*) as `count` FROM `table` GROUP BY 1,2) `a` LEFT OUTER JOIN (SELECT `from`,`to`, count(*) as `count` FROM `table` GROUP BY 1,2) `b` ON `a`.`from` = `b`.`to` AND `a`.`to` = `b`.`from` But I'm unsure how to remove the A/B swapped duplicates.

    Read the article

  • How JSF2.0 binds Managed Beans with xhtml?

    - by rahul_d_m
    i have very basic question about How JSF2.0 binds Managed Beans with xhtml? say i have inputtext with value="#{MymanagedBean.property}" how this MymanagedBean reference is resolved in JSF 2 ? please consider following points while answering. in ealier version i.e. with JSF 1.2 we have to write binding in faces-config.xml but with JSF 2 it is not mandatory to have faces-config.xml if you do view source of xhtml pages.. you will not find anywhere MymanagedBean reference. then how it is done?

    Read the article

  • Can I improve performance by refactoring SQL commands into C# classes?

    - by Matthew Jones
    Currently, my entire website does updating from SQL parameterized queries. It works, we've had no problems with it, but it can occasionally be very slow. I was wondering if it makes sense to refactor some of these SQL commands into classes so that we would not have to hit the database so often. I understand hitting the database is generally the slowest part of any web application For example, say we have a class structure like this: Project (comprised of) Tasks (comprised of) Assignments Where Project, Task, and Assignment are classes. At certain points in the site you are only working on one project at a time, and so creating a Project class and passing it among pages (using Session, Profile, something else) might make sense. I imagine this class would have a Save() method to save value changes. Does it make sense to invest the time into doing this? Under what conditions might it be worth it?

    Read the article

  • Using htaccess redirect all files to another domain but exclude the root domain.

    - by Shawn
    Recently, I want to restructure and redesign my website, my old website located at www.example.com, there are lots of blog posts under this domain, like: www.example.com/post1 www.example.com/post2 www.example.com/post3 ... I can redirect all those posts to another sub domain points in another folder (not sub folder), (if I put all those posts in a sub folder, it will recursive the subfolder name) , anyway, it works for me by using the code below: RewriteEngine On RewriteRule ^(.*)$ http://pre.example.com/$1 [L,R=301] But there is one things I want to do is not redirect the main domain, only all the posts. RewriteEngine on RewriteCond %{REQUEST_URI} !^/blog/ # the new blog # I tried below #RewriteCond %{REQUEST_URI} !^/$ #RewriteCond %{REQUEST_URI} !^www.example.com$ RewriteRule ^(.*)$ http://pre.example.com/$1 [L,R=301] Is it possible I can do that? Thx.

    Read the article

  • Why is 'volatile' parasitic in C++?

    - by Steve
    Consider the following code: int main() { int i; volatile int* p = &i; int *v = p; return 0; } This gives an error in g++: $ g++ -o volatile volatile.cpp volatile.cpp: In function ‘int main()’: volatile.cpp:6: error: invalid conversion from ‘volatile int*’ to ‘int*’ My intention was that I want to make p volatile. However, once I've read the value of p, I don't care if accessing v is volatile. Why is it required that v be declared volatile? This is hypothetical code of course. In a real situation you could imagine that p points to a memory location, but is modified externally and I want v to point to the location that p pointed to at the time of v = p, even if later p is externally modified. Therefore p is volatile, but v is not. By the way I am interested in the behaviour both when this is considered C and C++, but in C this only generates a warning, not an error.

    Read the article

< Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >