unc

noRollbackFor not always working on unchecked exceptions (not a duplicate)

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've seen a lot of similar questions but they are usually just tangential to mine. Here is my code. @Override //class implements interface //can also add "rollbackFor = OutOfMemoryError.class" here, to no avail @Transactional(noRollbackFor = IllegalArgumentException.class) public ReportTemplate getByCode(final String code) //throws IllegalArgumentException - see question text { if(code == null) { throw new IllegalArgumentException("ss"); } } Consumer (non-transactional) calls this method via autowired interface. Despite noRollbackFor the

Convert UNC path to local path in C#

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a way to do get local path from UNC path? For eg: \\server7\hello.jpg should give me D:\attachments\hello.jpg I am trying to save attachments to the UNC path after applying the windows file name and full path length restrictions . Here I am applying the restrictions by taking UNC path length as reference. But local path length is longer than UNC path and i think because of this I am getting the below exception. System.IO.PathTooLongException occurred HResult=-2147024690 Message=The specified path, file name, or both are too long.

Converting Java file:// URL to File(…) path, platform independent, including UNC paths

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing a platform independent application. I am receiving a file URL*. On windows these are: file:///Z:/folder%20to%20file/file.txt file://host/folder%20to%20file/file.txt (an UNC path) I am using new File(URI(urlOfDocument).getPath()) which works fine with the first one and also on Unix, Linux, OS X, but does not work with UNC paths. What is the standard way to convert file: URLs to File(..) paths, being compatible with Java 6? ...... * Note: I am receiving theses URLs from OpenOffice / LibreOffice (XModel.getURL()). 回答1: Based on

httpservlet request getparameter of unchecked and checked check boxes in java

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: my form has several checkboxes on it (around 15) and the issue im having is that the names of the check boxes only appear in the enumeration if they are checked but i want all of them to be returned so that when i print the data it will have the name of the checkbox and say "checked" or "unchecked". i had thought of one way that i could just manually set the flag to see what is present and what isnt, but that doesnt seem remotely efficient. public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,

How to access Network Share from Raspberry Pi running IoT Core in UWP app

我只是一个虾纸丫 提交于 2019-12-02 22:42:08
I have a c# UWP app that I'm intending to run on a Raspberry PI with Windows 10 IoT Core. The problem I have is when I try to connect to a UNC share to copy some files. The network is just a home network with local user credentials, share is on another computer on the same network. When running the app locally I can just use await StorageFolder.GetFolderFromPathAsync(@"\\share\folder"); to connect to the share and this works fine, I'm assuming this is because the credentials I'm using are saved on the local machine. When ran on the RPi the error received is: "The system cannot find the file

Running Get-ChildItem on UNC path works in Powershell but not in Powershell run in batch file

こ雲淡風輕ζ 提交于 2019-12-02 20:28:07
I am writing a batch file that executes a Powershell script that at one point loops items with UNC paths as attributes and uses Get-ChildItem on those paths. In a minimal version, this is what is happening in my scripts: Master.bat powershell -ExecutionPolicy ByPass -File "Slave.ps1" Slave.ps1 $foo = @{Name = "Foo"} $foo.Path = "\\remote-server\foothing" $bar = @{Name = "Bar"} $bar.Path = "\\remote-server\barthing" @( $foo, $bar ) | ForEach-Object { $item = Get-ChildItem $_.Path # Do things with item } The problem I'm running into is that when I run Master.bat , it fails at Get-ChildItem with

Windows 8 StorageFile.GetFileFromPathAsync Using UNC Path

牧云@^-^@ 提交于 2019-12-02 16:06:11
问题 Has anyone EVER managed to use a windows 8 app to copy files from a unc dir to a local dir ? According to the official documentation here It is possible to connect to a UNC path I am using the std FILE ACCESS sample and have changed one line of code to read as below I have added all the capabilities Added .txt as a file type The UNC path is read write to everyone and is located on the same machine.. But I keep getting Access Denied Errors. Can anyone possibly provide me with a working example

Windows 8 StorageFile.GetFileFromPathAsync Using UNC Path

一笑奈何 提交于 2019-12-02 09:53:35
Has anyone EVER managed to use a windows 8 app to copy files from a unc dir to a local dir ? According to the official documentation here It is possible to connect to a UNC path I am using the std FILE ACCESS sample and have changed one line of code to read as below I have added all the capabilities Added .txt as a file type The UNC path is read write to everyone and is located on the same machine.. But I keep getting Access Denied Errors. Can anyone possibly provide me with a working example This is driving me mad and really questioning the whole point of win 8 dev for LOB apps. TIA private

Silverlight project build fails in VS2010 when project is on a mapped network drive

China☆狼群 提交于 2019-12-02 08:57:10
问题 I am just learning Blend/Silverlight/VS2010/.net/etc. I have a simple project that resides on a network drive. When I tell VS2010 to rebuild the project, I get the following error message: ------ Rebuild All started: Project: MySilverlightApplication, Configuration: Debug Any CPU ------ MySilverlightApplication -> H:\PRJ\VisualStudio\ExpressionBlend\Unleashed\MySilverLightApplication\MySilverlightApplication\Bin\Debug\MySilverlightApplication.dll C:\Program Files\MSBuild\Microsoft\Silverlight

Regular Expressions ~ convert UNC to URL

岁酱吖の 提交于 2019-12-02 03:34:32
问题 I'm looking for a nice tight regex solution to this problem. I'm looking to reformat an UNC into a Uri Problem: UNC directory needs to be reformatted into a Uri \\server\d$\x\y\z\AAA needs to look like: http://server/z/AAA 回答1: I think a replace is easier to write and understand than Regex in this case. Given: string input = "\\\\server\\d$\\x\\y\\z\\AAA"; You can do a double replace: string output = String.Format("http:{0}", input.Replace("\\d$\\x\\y", String.Empty).Replace("\\", "/")); 回答2: