w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
accessing network drive with php open dir
192.168.1.1 is invalid address for network share. Have you tried \192.168.1.1? And in both cases you should escape that and write the address as a proper string with quotation marks. Also, \192.168.1.1 alone is not "a valid folder", you have to specify one of the network shares under this IP address. That being said, you should use opendir("\\192.168.1.1\share").

Categories : Apache

How to check map network drive connection?
IWshNetwork_Class appears to be a class in the Windows Script Host Object Model COM library. Dim Network As IWshRuntimeLibrary.IWshNetwork_Class Dim Drives As IWshRuntimeLibrary.IWshCollection_Class Drives = Network.EnumNetworkDrives For DriveCounter As Long = 0 To Drives.Count – 1 Step 2 MsgBox(Drives.Item(DriveCounter) & " is mapped to " & Drives.Item(DriveCounter + 1)) Next Have a look at this PDF for more information...

Categories : Vb.Net

How can I get the UNC path of a file that is on a mapped network drive
You can use the WNetGetConnection() function to convert from a mapped drive letter to the UNC path. I can't help you with .NET sorry (which you should be careful about writing shell extensions using) but in C++, LPCWSTR pszPath = L"M:\"; // mapped drive if (GetDriveType(pszPath) == DRIVE_REMOTE) { // WNetGetConnection needs drive letter WITHOUT trailing backslash wchar_t wchDrive[3] = { pszPath[0], pszPath[1], L'' }; wchar_t wchUNC[MAX_PATH]; DWORD dwLength = _countof(wchUNC); if (WNetGetConnection(wchDrive, wchUNC, &dwLength) == NO_ERROR) { // do something with wchUNC } }

Categories : Networking

Mapping sharepoint 2013 Network drive to Mac
OS X doesn't (directly) support MS SharePoint. The link you gave describes how to map a folder shared over the SMB protocol, not SharePoint (although the same basic process would also work for the AFP, WebDAV, or NFS protocols). If you need to access SharePoint from OS X, you need to use a browser (Safari and Firefox are supported), or Microsoft Office for Mac (see this blog entry). In any case, you won't be able to access it from the Finder, or "map" it in the sense you're looking for.

Categories : Osx

Creat .BAT to copy a .mdb from network drive to local C:/
Ok, this works for me where I work. There is a mapped drive to the location where the master .mdb is. That is "i:" drive. copy i:etsleadsoftwarepaintleadmain.mdb c:paint it copies the .mdb to the "c:paint" drive on the computer where the client clicked on the .bat file. It has been a while so I can't remember where the .bat file sits. Pretty sure it is on the client's computer. Open Notepad, add the code above, and save making sure to pick the option "All files" down below. That way you can change the extension to .bat from .txt.

Categories : Networking

Check if directory exists on Network Drive
When you use System.IO.Directory.Exists, it only lets you know that it couldn't find the directory, but this could be because the directory doesn't actually exist or because the user doesn't have sufficient access rights to the directory. In order to resolve this, we add a secondary test after Directory.Exists fails to obtain the real reason for the directory's absence and we have wrapped this into a global method that is used in place of the standard Directory.Exists method: ''' <summary> ''' This method tests to ensure that a directory actually does exist. If it does not, the reason for its ''' absence will attempt to be determined and returned. The standard Directory.Exists does not raise ''' any exceptions, which makes it impossible to determine why the request fails. ''' <

Categories : C#

PHP - Imitate How the "Map Network Drive" Dropdown Works
Untested, but you could try this: <select> <?php $range = range('A', 'Z'); $used = array(); // Fill in used drives along with their descriptions while ($row = odbc_fetch_array($db)) { $used[$row['ID']] = $row['desc']); } foreach ($range as $value) { $result = $value; $dis = ""; if (in_array($value, $used) { $result .= ' -- '.$used[$value]; $dis = 'disabled="disabled"'; } ?> <option <?php echo $dis; ?>><?php echo $result; ?></option> <?php } ?> </select>

Categories : PHP

Use Python tkFileDialog to access network drive folders
win32ui.CreateFileDialog might work for you. If you're on ArcGIS, the pythonaddins.OpenDialog and pythonaddins.SaveDialog would work too.

Categories : Python

Batch - Move File to Network Drive without being logged in
You can mount the drive in the batch file. Add this before your move command: net use z: \yourserversharename Of course, you need to make sure that the account the batch file runs under has permission to access the share. If you are doing this by using a Scheduled Task, you can choose the account by selecting the task, then: right click Properties click on General tab change account under "When running the task, use the following user account:" That's on Windows 7, it might be slightly different on different versions of Windows.

Categories : Windows

How to handle bad logon when copying file from network drive
Here are some excerpts from a script I'm working with. These excerpts address some issues that are almost identical to your problem. del dela delb /f /q 2>nul 1>nul echo |net use %letter%: "\%servername%\%sharename%" /persistent:YES 2>delb 1>dela REM this part is the cool part: the "echo |" passes "" to the net use in case it prompts for username/password. REM When the net use gets that input on the username prompt, it returns "user canceled the action" and we REM capture that later on. findstr /r /i /c:"successfully" dela 1>nul 2>nul if [%errorlevel%]==[0] ( echo Success: %letter%: as \%servername%\%sharename% ) else ( echo Failed: %letter%: as \%servername%\%sharename%. REM possible errors: REM 1. syserr 55: "no longer available" = folder d

Categories : Batch File

eclipse-how to add existing source folder from remote network drive
Close eclipse before shutting down, restart eclipse after resume. No, really - Windows disconnects remote drives during sleep: network adapter is suspended, thus disconnecting from the network, thus no more remote drives. During resume, the network stack takes more time to resume than the remote drive stack, thus no more remote drive. I think you can mark the remote drive to be available when offline (http://windows.microsoft.com/en-au/windows-vista/working-with-network-files-when-you-are-offline), but I've never used this feature of Windows.

Categories : Java

Write a file to a remote location using Java with network path or drive?
You can use mapped drives or full network paths equivalently; Java doesn't care and just passes the file name on to the OS. Note that if you're using a network path, you need \\ at the beginning.

Categories : Java

RESOLVED Using Python to print the amount of space left in a network shared drive
I think you probably need to break this up into sub problems, have a go at each and post a question for any that you are stuck on, including your attempts in the post. Here are some suggested steps and areas to look into for them: Work out space remaining on drive. There is a thread here which may be helpful for this. To write to Excel there is a module named xlwt, which can be downloaded from here. I have also found a brief tutorial for using this here. EDIT For Python 3.x I found a port of xlwt which may be worth a try. I found a post here pointing the a github repository here. I could not see an installer, but it should be straight forward to build from source. You will need to download everything from this github page into a folder and then cd to that directory from the command

Categories : Python

Sitecore: Implementing mapped network drive, and applying rules to the folder structure
Sounds like a job for the Sitecore.Data.DataProviders.FileSystemDataProvider I haven't used this in a long while, but it essentially allows you to set up a new Sitecore Database (look in Web.config for how the database id="filesystem" is configured). Once in place, the file system entries (files, directories) would appear to Sitecore as "any regular item" - and could therefore be controlled by Sitecore Security. You're likely going to need to implement a bespoke extension to the FileSystemDataProvider, as you would need to persist Sitecore data (like for instance the Security Settings). All in all, sounds like a lot more work than it would probably be worth. Have you considered WebDAV as an option?

Categories : Security

when php fwrite large string on network drive, puts junk or missing part
May be the PHP script cannot complete its write operation before your user requires it. Try to call fflush() and fclose() on your script to be sure that your file is closed correctly. Remember to pay attention to PHP timeout/tuning issues that can prevent PHP to save the file correctly. Double remember to remove old files too, or your sysadmin will kill you sooner or later... BTW, IMHO it's a very ugly way of doing. You can use sessions to save user states and environments (check for session_start)

Categories : PHP

Visual Studio 2010 - Post-build event - cd "$(ProjectDir)" exits with code 1 when project is loaded from a network drive
CD is a command used by your shell command interpreter (CMD.EXE). You cannot pass a CD \servershare command to CMD.EXE. Instead I suggest to map your share name to a drive letter like (from the command prompt) NET USE Z: \servershare /PERSISTENT:YES Now you could write a batch file that uses your Z: drive and executes the commands required For example CD Z:projectfolderin elease copy *.exe z:projectfolderdistribution /Y You could also pass the predefined macros to this batch file as arguments and use them inside the batch file.

Categories : Visual Studio 2010

google drive api - copyfile working only with permission for accessing all files in drive (but jst need to copy)
According to the documentation, Files.copy() requires at least one of the following three permissions: https://www.googleapis.com/auth/drive: "View and manage the files and documents in your Google Drive" which is the one you want to avoid https://www.googleapis.com/auth/drive.file: "View and manage Google Drive files that you have opened or created with this app." Which means you can freely create any file but only open the files your app created. You can only copy a file you created, but you cannot copy any other files even if it is public. https://www.googleapis.com/auth/drive.appdata: "View and manage its own configuration data in your Google Drive" Which only lets you control your application-specific Appdata folder which is probably not what you want. You can only copy a file with

Categories : Javascript

Google drive: Get (root) file and folders with javascript api (get only deleted files on drive)
Same situation as following question: google drive api, javascript list files returns nothing I needed to add to the scope the path 'drive' at authorizing, I had only drive.file which is intent to create/edit files only. The weird thing is that the API returns deleted files when you don't have permissions to view files, I think it's a bug in the API (a serious one). Post this bug on google drive: https://productforums.google.com/forum/#!searchin/drive/security$20issue$20permission$20view/drive/pupjKxTz9FU/cUarGIl_Ah0J

Categories : Javascript

Error while Retriving files from google drive using drive API. “Calling this from your main thread can lead to deadlock
You should do any code that could take a long time such as I/O or network activity on a different thread. In your situation your file retrieval would be best done within an ASyncTask. The reason for this warning is because when your code is being executed to retrieve the file from Drive, the code will block until the file retrieval has completed, this means that nothing else within the program will be able to respond, i.e. GUI will not update and input from the user trying to do stuff with the GUI will not be registered. After a few seconds, if the file retrieval still isn't complete, then the user will be presented with an ANR (Application Not Responding) message. This will either give the user the choice of waiting, if their patient, or most likely force closing your app.

Categories : Android

Monitoring changes in Google Drive files for whole domain using Drive API
Domain-wide delegation simplifies the authentication portion for your app but you'll still need to auth as each user to get their files and changes. It may be possible for your app to "grab" all files and make itself (or a special user) the owner, then you just have one user account to scan but the "grab" process would still need to run at regular intervals to find new files created or uploaded by end users. I believe most apps that need to scan content at this level do it via cron jobs or AppEngine task queues which make it easy to chunk up the scans throughout the day. Generally they expect to scan each user account once every 24 hours or so.

Categories : Google App Engine

Google Drive Javascript API: Detect drive changes - return changes only
Start with zero on your first call. Within the response is the current largest change id, which you need to store and use on the next request. In your code, it will materialise as "resp.largestChangeId".

Categories : Javascript

Windows: How to symlink drive to another drive?
No, mklink isn't going to do it for you. What you need to do is to create a virtual hard drive (VHD) and copy the client's data to it. (Or modify the export script, which is the best thing to do.) I used Windows 7 to test my instructions below. Start-> run-> diskmgmt.msc (accept all defaults... I'm not doing anything special below) From the menu bar select Action -> Create VHD Choose the location and name the file (which will be the vhd) and specify the size and click OK. Right click on the Disk # (underneath will be Unknown and the size and "Not Initialized"). Select "Initialize Disk" & click OK Right click on the black bar of the unallocated disk space and select "new simple volume". A wizard opens up an on the second page it lets you assign the drive letter. Complete the wizar

Categories : Windows

How do I create & edit a spreadsheet file on google drive using Google Drive APIs only from my Android app?
You should take a look at Google Spreadsheet API 3.0. It supports JAVA which you can use in your Android application.

Categories : Java

Google Drive sdk for android, Getting error 400 Bad Request when uploading file to Google Drive
You seem to be setting the mime type in the File object, but you need to set it in the FileContent object. When you create your file content, you can try passing in the type in the constructor new FileContent("image/jpeg", localFile); or using the method setType("image/jpeg"); but in your mediaContent instance, not in your body instance.

Categories : Android

Find machines on local network based on port (network discover) in android
I am assuming you know how to connect to a tcp server. If not, First go through http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/ You can try opening multiple threads with each thread waiting to connect to a specific ip/port ( along with some timeout value ).If the thread produces an exception, that means the connection was unsuccesful. Othewise add that ip address to your Open_Devices list.

Categories : Java

Vertex names by creating a network object via an edgelist (R package: network)
If your ids are sequential integers as in your example, you can produce the adjacency matrix corresponding to the edgelist in your example with: >as.sociomatrix(y.nw)) 1 2 3 4 5 6 7 8 9 10 1 0 0 1 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 1 1 3 0 0 0 0 0 1 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 But maybe you have a different type of id system in your real input?

Categories : R

"Social Network Analysis Labs in R" (Stanford tutorials): Confusion over graph object / network class
I strongly suspect that the tutorial you are trying to follow was developed for igraph version 0.5.4 or earlier. At that time, vertices and edges in an igraph object were indexed from zero instead of one, and the tutorial seems to account for this, judging from the following comment in the tutorial: # IMPORTANT NOTE: Unlike in most languages, R objects are numbered # from 1 instead of 0, so if you want the first element in a # vector, you would reference it by vector_name[1]. HOWEVER, # igraph objects are numbered starting from 0. This can lead to # lots of confusion, since it's not always obvious at first which # objects are native to R and which belong to igraph. Since igraph 0.6, this is not true anymore; vertices and edges in the R interface of igraph are indexed from 1 just like

Categories : R

Hyperlink network analysis in R - measuring the 'reachability' of a vertex within a network?
I will assume your question is where to start looking. One of my favorite places is package sos. Another option would be www.rseek.org. library(sos) findFn("reachability network analysis") found 9 matches; retrieving 1 page Downloaded 8 links in 3 packages. Id Count MaxScore TotalScore Package Function Date Score Description and Link 1 4 5 10 sna 00Index NA 5 Tools for Social Network Analysis 2 4 5 10 sna hierarchy NA 2 Compute Graph Hierarchy Scores 3 4 5 10 sna reachability NA 2 Find the Reachability Matrix of a Graph 4 4 5 10 sna prestige NA 1 Calculate the Vertex Prestige Scores 5 3 1 3 ergm gof.ergm NA 1 Conduct Goodness-of-Fit Diagnostics on a Exponential Family... 6 3 1 3 ergm plot.

Categories : R

Is there any network tab with ie8 developer tool? If not then how to track network traffic in ie8 browser?
Internet Explorer 8 doesn't support network statistics in its developer tools. You'll need to upgrade to Internet Explorer 9 or use a third-party tool like Fiddler to inspect traffic.

Categories : Misc

android network change broadcast receiver and getting network type
For what you say I understand you're not taking into account that every time the receiver is triggered it creates a new instance, which is destroyed after its work. Even with static variables you don't have persistent values. One solution that worked for me is to use SharedPreferences. Be aware that on API11+ you should use the flag MODE_MULTI_PROCESS, something like this: if (Build.VERSION.SDK_INT>=11) mySettings=context.getSharedPreferences("MyPrefs",Context.MODE_MULTI_PROCESS); else mySettings=context.getSharedPreferences("MyPrefs",0); int netType = mySettings.getBoolean("netType",0); Hope it helps...

Categories : Android

azure powershell commandlets for vms metrics like cpu utilization ,network in , network out
I'm not sure if API for metrics even exists. But the good news here is if you have Diagnosticts setup as it is described here http://www.windowsazure.com/en-us/develop/net/common-tasks/performance-profiling/ you will have performance counters information stored in your WADPerformanceCountersTable table.

Categories : Azure

HybridAuth working within local network, but not when accessed outside of my network
I don't think that most of the OAuth2 providers will accept answers that are not coming from configured callback url. So making redirects with the register will most likely fail. Instead, try to configure your callback to look like: http://www.yourdomain.com:openPort/hybridauth-2.1.2/hybridauth/index.php Where openPort is a port number that your ISP will not block. Then in the router you can make port forwarding openPort->80 or you just can start your web server to openPort and make sure the router is not blocking the requests.

Categories : PHP

Using Subclipse with share drive specifically an office-like share drive
You should start with the SVN book, chapter 1: http://svnbook.red-bean.com/en/1.7/svn.basic.html You need a SVN server and repository. That is what you will "share" with. All users that want to collaborate on the versions of a file will need to use a SVN client so that they can checkout and edit files stored in your repository and commit their changes back.

Categories : Eclipse

RHQ JBoss operations network (JON) and monitoring network
Why would you not use the built in monitoring capability of LoadRunner, which would then allow you to pull all of your business data (response times and data points) together with your monitoring data into the same data set for analysis purposes? By having decoupled data sets you are making your challenge of identifying root cause that much more difficult. If you were planning on exporting data from JON|RHQ to LoadRunner analysis or exporting both to a tool such as SAS, SPSS or R for statistical analysis you would be able to reconcile the decoupled data sets. (see manual for information on importing data into Analysis for the types and formats supported)

Categories : Networking

How to flush a network stream when using network-conduit?
network-conduit should flush the stream every time you send it a ByteString, buffering is specifically not included as that would be handled by something like blaze-builder-conduit orthogonally. Are you seeing behavior which contradicts that?

Categories : Haskell

Listing of all folders of Google Drive through IOS Google Drive SDK
Assuming this code works, there is a problem in the query. Multiple queries should be combined by and. query.q = @"mimeType='application/vnd.google-apps.folder' and trashed=false"; For more examples of sample queries, take a look at Search for Files in official documentation. Also, in case this code doesn't work, you want to use Files.list() with query above. Check the link and there is a sample code for Object-c you might want to use.

Categories : Objective C

How to read parameters on Linux network interfaces file (/etc/network/interfaces)
after some days, i got the answer to my issue. Here you are.. #include <iostream> using std::cout; using std::endl; #include <fstream> using std::ifstream; #include <cstring> const int MAX_CHARS_PER_LINE = 512; const int MAX_TOKENS_PER_LINE = 20; const char* const DELIMITER = " "; int main() { // create a file-reading object ifstream fin; fin.open("/etc/network/interfaces"); // open a file if (!fin.good()) return 1; // exit if file not found // read each line of the file while (!fin.eof()) { // read an entire line into memory char buf[MAX_CHARS_PER_LINE]; fin.getline(buf, MAX_CHARS_PER_LINE); // parse the line into blank-delimited tokens int n = 0; // a for-loop index // array to store memory addresses of the tokens in b

Categories : C++

How to create a active neural network after using the SPSS module for neural network?
When you run the NN, on the export tab in the dialog box, specify a file name (with extension xml) as you have done. When you want to score a dataset, use Utilities > Scoring Wizard and select the xml file you saved. These actions have equivalent syntax as well as the dialog interfaces. HTH, Jon Peck

Categories : Xml

JS Google Drive SDK
If you want a separate app that edits the spreadsheet externally, you can use Javascript in conjunction with the Spreadsheet API at https://developers.google.com/google-apps/spreadsheets/ Alternatively you can embed Javascript within your spreadsheet using Apps Script as described here https://developers.google.com/apps-script/reference/spreadsheet/ It really depends what you are trying to achieve.

Categories : Javascript

Searching a drive with vb.net
You need recursion here which handles each folder. EDIT: As requested by the OP, a little example: Public Sub DirSearch(ByVal sDir As String) Try For Each dir as String In Directory.GetDirectories(sDir) For Each file In Directory.GetFiles(dir, "yourfilename.exe") lstFilesFound.Items.Add(file) Next DirSearch(dir) Next Catch ex As Exception Debug.WriteLine(ex.Message) End Try End Sub Also take a look at the following answers: Looping through all directory's on the hard drive (VB.NET) How to handle UnauthorizedAccessException when attempting to add files from location without permissions (C#) Also note, if you have enough access rights, you could simplify your code to this: Dim di as New D

Categories : Vb.Net



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.