I have as input an array of 3D points. And I need to draw a pipe that connects those points with each other so the first point is connected to the second one, the second to the third, ... The pipe has a square-shape (not a cilinder, but more a cuboid-shape like this figure) with a width of d. And the difference between two points goes al...
I've learnt a dynamic programming algorithm to find the "cheapest" path from A to B. Each sub path has an associated cost.
Each corner is calculated using
D(i,j).value = min( (D(i-1,j).value + D(i,j).x), (D(i,j-1).value + D(i,j).y))
Where x and y are the costs of the path on the left of the node and below the node.
I'm now having trou...
I'm looking for an easy, cross platform way to join path, directory and file names into a complete path in C++. I know python has os.path.join() and matlab has fullfile(). Does Qt has something similar? QFileInfo doesn't seem to be able to do this.
...
I am trying to replace an image when a link in another part of the page is rolled over. I have a hard coded version working, but I would like to get this so that when I upload to a server I do not need to go in and change the path part.
$(document).ready(function() {
$('.laundryLinks li a').hover(function() {
$('.homeLaundryPict').attr...
Hi guys!
I'm looking for an approximation algorithm for the following problem - I have an unweighted, undirected graph, with cycles, and want to find the longest path starting from a given node.
I do value speed over performance (so a O(n^5) algorithm would probably be an overkill).
This is not homework (I swear!) or work related, but ...
I have two commands, foo and foo-bar, where foo is a symlink to foo-bar. I want to be able to type f+TAB (pretend these are the only two commands on the path that begin with f) and have one of them be completed (meaning the full name and the space after).
What ends up happening though is that it completes to just foo (no space) because ...
I'm grading C and C++ files for a class, and this assignment uses the GSL library. Since I don't have root permission on my computer, my GSL library is installed in my home directory, and thus I need to tell compilers and linkers where to find it.
This isn't a problem when I write a program myself, because I just add the appropriate -L...
Here is my code,
Dim allFiles As FileInfo() =
tempDir.GetFiles("*.pdf", SearchOption.AllDirectories)
I've googled and found that I need to change the permissions of my app from
Project properties > View UAC Settings > and change level to level="requireAdministrator"
But its also not working. I found somethi...
I'm working on a java assignment for a class and I'm unsure how to solve this problem. I don't want it completed for me, but get me started in the right direction. I'm mostly unsure of the recursive part of the program. I'm not very good at programming.
problem:
NorthEast paths are obtained from a
two-dimensional grid ...
Hi,
I need to be able to to split the executable path and arguments in a command.
Windows handles the following easily:
"notepad.exe C:\testfile.txt"
"notepad c:\testfolder\versioninfo.txt"
"C:\Windows\notepad.exe" "C:\test folder\versioninfo.txt"
rundll "C\Windows\somelibrary.dll"
Anyone has a piece of code to parse such strings...
I have a list of points (x, y coordinates) and a list of connections between them. Examples:
Points
A
B
C
D
E
Connections
AB
BC
CE
BD
D E
| |
A-B-C
Of course, there are many more points and connections than this...
What I need to do is find out the simplest path between some of these points. For example, if I wanted to go to A,...
Hi !
This is my Path:
<Style x:Key="MyPath" TargetType="{x:Type Path}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Stroke" Value="Blue" />
<Setter Property="Data" Value="M0,100 L 80,40 160,100 M 40,80 L 40,160 120,160 120,80" />
</Style>
<Pat...
I'm working on this page: http://localhost/projectname/custom.php
Both <?php echo $_SERVER['REQUEST_URI']; ?> and <?php echo $PHP_SELF; ?> don't give full location. What should I use to grab the full url location?
Thanks
...
What is the best practice when running external utilities in shell scripts. For example if I want to run 'gzip' in multiple scripts ensuring that a specific gzip binary is used should I make the full path to the binary a variable and just use the variable thoughout the script?
GZIP=/home/me/bin/gzip
$GZIP somefile
$GZIP anotherfile
Or...
Hi folks, we have a solution with multiple projects that is being developed by a team of developers. Project paths in the solution file checked in initially contains the path that are specific to that developer. Now when another dev gets latest of the solution, some of the projects won't load as the path differs.
What's a better way to ...
Scenario is:
Given the following files
c:\dev\deploy\file1.txt
c:\dev\deploy\file2.txt
c:\dev\deploy\file3.txt
c:\dev\deploy\lib\do1.dll
c:\dev\deploy\lib\do2.dll
e.g. if $pwd is the following
c:\dev\deploy
running the statement
$files = get-childitem
I want to take this list and using << foreach ($file in $files) >> I want to subs...
I currently have a graph that has about 10 million nodes and 35 million edges. For now the complete graph is loaded into memory at program start. This takes a couple of minutes (it is Java after all) and needs about half a gigabyte of RAM. For now it runs on a machine with a dual core processor and 4 gigabytes of RAM.
When the graph is ...
My script.py creates a temporary file in the same dir as the script.
When running it:
python script.py
it works just file
but it doesn't work when you run:
python /path/to/script.py
That's because I'm using a relative path to my temp file in script.py rather than an absolute one. The problem is that I don't know in which path it ...
Here's a quickie that I assume has a simple answer (maybe? Hopefully?), but I just can't find one:
I'm using the "cake" console in cakephp on Mac OS X 10.6.2. How do I set up the environment variable (or PATH?) so that all I need to type in terminal is "cake"... as opposed to the full path to the console app?
I'm unabashedly a newb wh...
Hi,
I am trying to create an animated chart which grows to the right as new data is added. I'm using a path for plotting the variables (JavaFX LineChart seems too slow), attempting to plot a new variable every 500ms by appending a new LineTo to the set of path elements. I have reduced the problem down to the following sample code. Could...