path

Delphi LoadLibrary Failing to find DLL other directory - any good options?

≯℡__Kan透↙ 提交于 2019-12-23 22:19:50
问题 Two Delphi programs need to load foo.dll, which contains some code that injects a client-auth certificate into a SOAP request. foo.dll resides in c:\fooapp\foo.dll and is normally loaded by c:\fooapp\foo.exe. That works fine. The other program needs the same functionality, but it resides in c:\program files\unwantedstepchild\sadapp.exe. Both aps load the DLL with this code: FOOLib := LoadLibrary('foo.dll'); ... If FOOLib <> 0 then begin FOOProc := GetProcAddress(FOOLib , 'xInjectCert');

Is there an easy method to combine two relative paths in C#?

眉间皱痕 提交于 2019-12-23 21:28:02
问题 I want to combine two relative paths in C#. For example: string path1 = "/System/Configuration/Panels/Alpha"; string path2 = "Panels/Alpha/Data"; I want to return string result = "/System/Configuration/Panels/Alpha/Data"; I can implement this by splitting the second array and compare it in a for loop but I was wondering if there is something similar to Path.Combine available or if this can be accomplished with regular expressions or Linq? Thanks 回答1: Provided that the two strings are always

How to get path from image on drawable folder and set as image view, Bitmap?

半腔热情 提交于 2019-12-23 18:37:19
问题 I already have some pictures on my drawable folder from android project. I create some objects (Agents) and then I need to set the imageView with this picture I saved on database. So, I am saving the picture as String photoPath : Uri path1 = Uri.parse("android.resource://"+BuildConfig.APPLICATION_ID+"/" + R.drawable.agent1); String photoAg1 = path1.getPath(); ag1.setPhotoPath(photoAg1); (I have already tried path1.toString.) Ok, no problems until there. This object is shown at a listView with

All pairs all paths on a graph

二次信任 提交于 2019-12-23 18:06:41
问题 This is possibly a problem with possibly no optimal solution. Suppose I have a directed graph, have no clue whether it has any cycles or not(cycle detection will be one of the aspects of this problem). Given a set of vertices(possibly millions of vertices) I need to count all the distinct paths(paths with no duplicate vertices) between all the unique pairs of the given graph. How would I go about tackling this situation? Lets look at a brute-force way to do this: Compute all possible pairs

Setting directory of ComponentGroupRef in Wix?

微笑、不失礼 提交于 2019-12-23 17:33:45
问题 I have used the Heat tool to generate a wxs file based on a folder whose contents I want to install. This gives me a large file like this: <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <DirectoryRef Id="TARGETDIR"> <Directory Id="dir1FC8A0605F7DF8B33E3EECB0A1270FA2" Name="DirectoryName" /> </DirectoryRef> </Fragment> <Fragment> <ComponentGroup Id="ComponentGroupId"> <Component Id="cmp1FB67A60B41F3170889B7E5739A23560" Directory=

How to get a fixed number of evenly spaced points describing a path?

拥有回忆 提交于 2019-12-23 16:53:45
问题 Given is a path described by an ordered array of points (x,y). I'm looking for an algorithm that describes this path with a given number of points (k) that are evenly spaced along the path. Input points : [[x1,y1], ..., [xn,yn]] (randomly spaced) Where x1,y1 is the first waypoint and xn,yn the last. The path is defined by connecting every point to the next with a straight line. (Xn,Yn) -----> (Xn+1,Yn+1) Expected output : [[x1,y1], ..., [xk,yk]] (evenly spaced) Image of an example path Update

“Could not find part of the path” error when copying a file

人走茶凉 提交于 2019-12-23 15:44:20
问题 I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories and a listview control to display the contents of the directory. This is how the code would look like, partially: private void copyToolStripMenuItem_Click(object sender, EventArgs

Put object along the path and then move it (IMG INCLUDED)

半城伤御伤魂 提交于 2019-12-23 14:21:11
问题 I have a problem ( ;) ) and I need your help. Lets look at the image: 1) I have a path. Lets say it's like this: let bezierPath = UIBezierPath() bezierPath.moveToPoint(CGPointMake(10.5, 47.5)) bezierPath.addCurveToPoint(CGPointMake(45.5, 23.5), controlPoint1: CGPointMake(10.5, 47.5), controlPoint2: CGPointMake(32.5, 23.5)) bezierPath.addCurveToPoint(CGPointMake(84.5, 47.5), controlPoint1: CGPointMake(58.5, 23.5), controlPoint2: CGPointMake(84.5, 47.5)) bezierPath.addLineToPoint(CGPointMake(10

Compute number of files per folder in a complex folder structure?

烂漫一生 提交于 2019-12-23 12:55:08
问题 I have created a simple data.tree through importing a folder structure with files inside of it. if (!require("pacman")) install.packages("pacman") pacman::p_load_gh("trinker/pathr") library(pathr) library(data.tree) folder_structure <- pathr::tree(path = "/Users/username/Downloads/top_level/", use.data.tree = T, include.files = T) Now, I would like to convert the object folder_structure into a data.frame with one row per folder and a column that specifies how many files each folder contains.

Python Error on Google Cloud Install. How do I properly set the environment variable?

a 夏天 提交于 2019-12-23 12:53:26
问题 I am trying to install the Google Cloud SDK on my Windows machine. I have Python 2.7 currently installed on this machine, and it's located in the System Variables Path like this -> C:\Python27\; I am getting this error during installation: ERROR: gcloud failed to load: DLL load failed: %1 is not a valid Win32 application. The error message also prompts me to check the Python executable by saying: If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2