I have a tile based game and I need to find the closest tile within a 32px radius. So say a user is at 400, 200 and the user clicks at 500, 400. I need to create a path or line from the player to the mouse position on click and the closest tile that is underneath the path within 32px (or 2 tiles) must be chosen. The map is tiled at 16px....
Hi folks,
I've been googling for a while and I no result yet so I turn to you guys ^^
I'm trying to use CMake to build my C++ project and I have a problem in the header paths.
Since I'm using a lot of classes organized in several directories, all my include statements are with absolute paths (so no need to use "../../") but when try to...
I had to split up a long css file. I put the smaller css files within a "styles" directory.
Now I have to update the the urls to go up one level with the "../" notation.
Is there anyway to specify the base url from which to load assets like with the base tag in html, but with CSS?
...
I need help to create a regex (for JavaScript .match and PHP preg_match) that validates a unix type absolute path to a file (with international characters such as åäöøæð and so on) so that:
/path/to/someWhere is valid
/path/tø/sömewhere is valid
/path/to//somewhere is invalid
path/to/somewhere is invalid
/path/to/somewhere/ is invalid
...
Hi,
please see the figure to get idea of the scenario.
Now when my Package will run after executing the s! task, either A or B path will be followed. So If A is followed then Task S2 and F2 is executed. But if path B is followed, task F1 and F3 is executed. But also after completing task F3, the flow should go to task S2 via path E. ...
Some cross-platform packages like Ruby or Qt prefer %HOMEDRIVE% as the default installation path, Google Chrome uses something in %HOMEPATH%. What's the advantage and disadvantage of each choice? What's the best choice for a simple private application (i.e. a game, where the installation should work without administrator rights)? On the...
I need to draw something like a subway map (multiple routes along the same path) using PHP's image library. Here's an example:
*********
******** *
******* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * * ...
Is there anything built into System.IO.Path that gives me just the filepath?
For example, if I have a string @"c:\webserver\public\myCompany\configs\promo.xml", is there any BCL method that will give me "c:\webserver\public\myCompany\configs\"?
...
Actually I intended to ask the following question:
For an executable that lies in a
directory defined in %PATH%, how can
I find out in which of these directory
it is found?
because I need to run Excel from C# using Process.Run(...), and just indicating "Excel" works fine: Windows seems to know where to find it. However I need...
I am trying to test some code. The main script requires imports from a number of subdirectories. The structure of the scripts is like this (I edited it to make it clear that dir1 and 2 are subdirectories of build):
build
ascript.py
dir1
script2.py
dir2
script3.py
subdir1
script4.py
script5.py
subdir2
...
How do I set Href to a file on a server (example: \myserver\test\a.txt) correctly? When I assign the path to Href, it adds the domain name in front (http://mydomain.com/myserver/test/a.txt) which is not the correct path.
...
Hi all,
I want to create a speech balloon type shape, where there is a rectangle or ellipse with a triangular shape jutting out of it.
How I'm attempting to do this is to create a Path object that combines the triangle with the other shape (round rect).
I'm doing it as follows:
Path path = new Path();
// Create triangular segment
Po...
I'm trying to write a script that when clicked will add a couple of entries to the PATH Environment variable in Windows, instead of making the changes manually. I see .bat files being used all the time on Windows for a variety of reasons, so can a .bat script help me with something like that?
I actually need to download a zip from a lo...
Hi All
I am trying to set the uriString of a Uri object to a relative path for use in a GifBitmapDecoder.
At runtime i get the following error:
Invalid URI: The format of the URI could not be determined.
My relative path follows the following format:
/TestApplication;component/Images/Busy.gif
If i use the absolute path to t...
Hi,
My library project is trying to open an XmlDocument from a file that's also contained in the library. How do I get the path of a file in the library so I can open it?
The current directory is not useful and Server.MapPath returns me the path of the main web application (MVC), so how do I get the path of the file in the library?
--...
Hi,
I often use git from Terminal on Mac to download some repositories and then use it.
When I use this command:git clone git://git repository URL
repositories are downloaded in my Start folder (name account folder e.g. Matthew, if the name of my Mac account is Matthew).
I'd like to change this folder where repositories are downloa...
I have seen OpenFileDialog and SaveFileDialog in silverlight but, what if I required to select path of folder in my computer?
Scenario:
The user want to select path in the Computer which he can use for his files. For example there is a button (e.g. Select path to save your work button) which he will use to browse folder. When he is done...
This question relates to this question.
I have a EF model like this.
Using Silverlight 4 I have an application showing questions to the user, defined through the QuestionSet. If a question has more than one answer alternative, a ComboBox is rendered. If only one alternative is given, a TextBox is rendered, in which the user can put fre...
I'm looking to take a string such as
/var/www/vhosts
and turn it into a multi-dimensional, nested array such as:
array(
'var'=>array(
'www'=>array(
'vhosts'=>array()
),
),
);
Anyone got any pointers? I've had a look through Google and the search here, but I've not seen anything.
Thank...
Although I have set the output build path to: ..\..\..\..\..\..\bin\Debug\
All other projects accept the relative path above. Why not that newly added project?
When I choose the FolderDialog to set the output path, press ok then I see the absolute path in the output path textbox. Now I copy paste my relative path into the output path t...