Search Results

Search found 14344 results on 574 pages for 'path'.

Page 140/574 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • passing variable to a batch file

    - by sushant
    i am calling a batch file for xcopy. i have the path of the file to b copied in variable a. my code is: dim shell,z z="for.bat " & a & " " & b & " " & c set shell=createobject("wscript.shell") shell.Run z, 1, true where for.bat is: for %%f in (%1,%2,%3) do xcopy %%f D:\shipment\ /e when 'a' has small path like D:\flexcube, it works. but if i put some big path, say: D:\flexcube1\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder\New Folder it does not work. is their some length restriction on %1 type variables or is this some other problem? any help is really appreciated.

    Read the article

  • build.xml in ant

    - by Codenotguru
    > Can anybody help me know what these tags do in build.xml file? > > 1)<property file="" location="."/> > 2)<property environment=""/> > 3)<property name="" value=""/> 4)<path > id="classpath.base"> 5)<pathelement > location="$some.jar"/> 6)<path > id="classpath.build"> 7)<path > id="classpath.test"> > 8)<target></target> > > Thank You

    Read the article

  • doc file created in iPhone documents encoding issue

    - by Saurabh Verma
    I'm trying to write a MSword file in document directory by the following code: NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES); NSString* path; NSString* gradeDoc = [self fetchCommentsDesc]; NSString* str = [self.objStudent.strName stringByAppendingFormat:@".doc"]; path = [[paths objectAtIndex:0] stringByAppendingPathComponent:str]; [gradeDoc writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil]; [self fetchCommentsDesc] returns NSString. self.student.strName is a String Issue: When i Open the doc file created in document directory of iphone, all the special characters in the doc appears as boxes or some arabic chars. Please help!

    Read the article

  • how to copy database files from the network access server to Client PC in c#.net?

    - by zoya
    im using a code to copy the files from the database of server PC. so im accessing that server PC through IP address but it is giving me error and not copying the files in the folder of my PC (client PC) this is my code that im using...can u tell me where im wrong?? the file path is given on my listview in winform.. public string RecordingFileCopy(string recordpath,string ipadd) { string strFinalPath; strFinalPath = String.Format("\\{0}'{1}'",ipadd,recordpath); return strFinalPath; } on button click event.... { try { foreach (ListViewItem item in listView1.Items) { string sourceFile = item.SubItems[5].Text; RecordingFileCopy(sourceFile,"10.0.4.123"); File.Copy(sourceFile, Path.Combine(@"E:\name\MyDir", Path.GetFileName(sourceFile))); } } catch { MessageBox.Show("Files are not copied to folder", _strMsg, MessageBoxButtons.OK, MessageBoxIcon.Error); } }

    Read the article

  • Map Reduce job on Amazon: argument for custom jar

    - by zero51
    Hi all, This is one of my first try with Map Reduce on AWS in its Management Console. Hi have uploaded on AWS S3 my runnable jar developed on Hadoop 0.18, and it works on my local machine. As described on documentation, I have passed the S3 paths for input and output as argument of the jar: all right, but the problem is the third argument that is another path (as string) to a file that I need to load while the job is in execution. That file resides on S3 bucket too, but it seems that my jar doesn't recognize the path and I got a FileNotFound Exception while it tries to load it. That is strange because this is a path exactly like the other two... Anyone have any idea? Thank you Luca

    Read the article

  • Rails streaming file download

    - by Leonard Teo
    I'm trying to implement a file download with Rails. I want to eventually migrate this code to using S3 to serve the file. I've copied the Rails send_file code almost verbatim and I cannot seem to get it to stream a file to the user. What happens is that it sends 'a' file to the user, but the downloaded file itself simply contains the text.inspect of the Proc: # What am I doing wrong here? options = {} options[:length] = File.size(file.path) options[:filename] = File.basename(file.path) send_file_headers! options render :status => 200, :text => Proc.new { |response, output| len = 4096 File.open(file.path, 'rb') do |fh| while buf = fh.read(len) output.write(buf) end end } Ps: I've read in a number of other posts that it's not advisable to send files through the Rails stack, and if possible serve using the web server, or in the case of S3 use the hashed URL it can provide. Yes, we really do want to serve the file through the Rails stack.

    Read the article

  • Rails - undefined method `name' for nil:NilClass

    - by sscirrus
    Hi guys, Quick question. Here is my code: #routes map.resources :customers, :has_many => [:addresses, :matchings] map.connect ":controller/:action/:id" #url path: http://127.0.0.1:3000/customers/index/3 #customers controller def index @customer = Customer.find(params[:id]) end #customers view/index.html.erb ... <%= @customer.name %> ... Error: undefined method `name' for nil:NilClass. Here's my reasoning. The parameter :id is coming from my url path (i.e. we're looking for customer #3 in the above path). @customer should find that array easily, then @customer.name should produce the name, but apparently @customer is blank. Why? I assume the problem is that I'm not producing an array in my controller?

    Read the article

  • MYSQL Inserting rows that reference main rows.

    - by Andrew M
    I'm transferring my access logs into a database. I've got two tables: urlRequests id : int(10) host : varchar(100) path: varchar(300) unique index (host, path) urlAccesses id : int(10) request : int(10) <-- reference to urlRequests row ip : int(4) query : varchar(300) time : timestamp I need to insert a row into urlAccesses for every page load, but first a row in urlRequests has to exist with the requested host and path so that urlAccesses's row can reference it. I know I can do it this way: A. check if a row exists in urlRequests B. insert a row in urlRequests if it needs it C. insert a row into urlAccesses with the urlRequests's row id referenced That's three queries for every page load if the urlRequests row doesn't exist. I'm very new to MySQL, so I'm guessing that there's a way to go about this that would be faster and use less queries.

    Read the article

  • Rack URL Mapping

    - by Puru puru rin..
    Hi, I am trying to write two kind of Rack routes. Rack allow us to write such routes like so: app = Rack::URLMap.new('/test' => SimpleAdapter.new, '/files' => Rack::File.new('.')) In my case, I would like to handle those routes: "/" or "index" "/*" in order to match any other routes So I had trying this: app = Rack::URLMap.new('/index' => SimpleAdapter.new, '/' => Rack::File.new('./public')) This works well, but... I don't know how to add '/' path (as alternative of '/index' path). The path '/*' is not interpreted as a wildcard, according to my tests. Do you know how I could do? Thanks

    Read the article

  • mysql ON DUPLICATE KEY UPDATE

    - by julio
    Hi-- I'm stuck on a mySQL query using ON DUPLICATE KEY UPDATE. I'm getting the error: mySQL Error: 1062 - Duplicate entry 'hr2461809-3' for key 'fname' The table looks like this: id int(10) NOT NULL default '0', picid int(10) unsigned NOT NULL default '0', fname varchar(255) NOT NULL default '', type varchar(5) NOT NULL default '.jpg', path varchar(255) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY fname (fname), KEY picid (propid) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; And the query that's breaking is this: INSERT INTO images SET picid=732, fname='hr2461809-3', path='pictures/' ON DUPLICATE KEY UPDATE picid=732, fname='hr2461809-3', path='pictures/' I'm using a very similar query elsewhere in the app with no issues. I'm not sure why this one breaks. I expected that when the UNIQUE KEY on fname gets violated, that it would simply update the row where the violation occurred? Thanks for any help

    Read the article

  • Can I enable PreviewClick using InputBindings in WPF?

    - by No hay Problema
    I want to detect when a user clicks on an item on a listview, without using events as I do command binding and I don't like all the nonsense of the behaviours. I have tried this: <ListView x:Name="MainList" Margin="2,8,6,8" Background="Black" ItemsSource="{Binding Path=AssetsVM.Data, Mode=OneWay}" BorderBrush="{x:Null}" > <ListView.InputBindings> <MouseBinding Command="{Binding Path=AssetsVM.SelectActivo}" CommandParameter="{Binding ElementName=MainList, Path=SelectedItem}" MouseAction="LeftClick" /> </ListView.InputBindings> This works fine if I click on the listview but does not work on the items, what I need is either a way to enable "Preview" or have a MouseAction/Gesture that behaves as preview, is it possible? Thanks

    Read the article

  • How to call an xslt transform into an xsl stylesheet

    - by Mycol
    I have written an xslt that reads some xml file names and does some operations on them. I use a for-each to work them one-by-one. I have each path inside a parameter $path. But now I would like to output the result of applying an external stylesheet to those files. I would write something like <div> <something like xsl-transform($extern-xslt,$path)> </div> to have the result tree of the transformation inside the main html output. It is possible?

    Read the article

  • sqlite3.OperationalError: database is locked - non-threaded application

    - by James C
    Hi, I have a Python application which throws the standard sqlite3.OperationalError: database is locked error. I have looked around the internet and could not find any solution which worked (please note that there is no multiprocesses/threading going on, and as you can see I have tried raising the timeout parameter). The sqlite file is stored on the local hard drive. The following function is one of many which accesses the sqlite database, and runs fine the first time it is called, but throws the above error the second time it is called (it is called as part of a for loop in another function): def update_index(filepath): path = get_setting('Local', 'web') stat = os.stat(filepath) modified = stat.st_mtime index_file = get_setting('Local', 'index') connection = sqlite3.connect(index_file, 30) cursor = connection.cursor() head, tail = os.path.split(filepath) cursor.execute('UPDATE hwlive SET date=? WHERE path=? AND name=?;', (modified, head, tail)) connection.commit() connection.close() Many thanks.

    Read the article

  • Spring 3.0 MVC mvc:view-controller tag

    - by gouki
    Here's a snippet of my mvc-config.xml <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean> <mvc:view-controller path="/index" view-name="welcome"/> <mvc:view-controller path="/static/login" view-name="/static/login"/> <mvc:view-controller path="/login" view-name="/static/login"/> I have the welcome.jsp on /WEB-INF/view/ directory and login.jsp on /WEB-INF/view/static/. This work for '/index' and '/login' paths. But I'm getting 404 response for '/static/login' when invoked from the browser. I'm expecting that '/static/login/' and '/login' should behave the same. What could be wrong here? Would appreciate any help. Thanks!

    Read the article

  • Cannot find libmysqlclient under /usr. while build PHP 5.2 from source on Ubuntu 12.4

    - by fkniya
    I was trying to build PHP 5.2.17 from source on Ubuntu 12.4 64bit using this configuration: ./configure --prefix=/opt/php5.2 --with-config-file-path=/opt/php5.2 --with-mysql but I keep getting this error: configure: error: Cannot find libmysqlclient under /usr. Note that the MySQL client library is not bundled anymore! I suspected that dev package for mysql is not installed so tried installing libmysqlclient-dev but it was already there. Any Idea how to resolve this? EDIT1: I minimized the configure command so it just focuses to mysql. also I'm running a 64bit version of ubuntu. EDIT2: tried running ldconfig -v |grep mysql and here is the output # ldconfig -v |grep mysql /sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once /sbin/ldconfig.real: Cannot stat /usr/lib/x86_64-linux-gnu/libnss_db.so: No such file or directory libmysqlclient.so.18 -> libmysqlclient_r.so.18.0.0 libmysqlpp.so.3 -> libmysqlpp.so.3.1.0

    Read the article

  • WindowsPhone App data connection FAILS in MarketPlace published App but WORKS in Visual Studio development (same XAP)

    - by Tom
    Tearing my hair out(!) My last App update has been accepted and released by MarketPlace but the remote server data connection does NOT work/connect from the downloaded App (from MarketPlace). However, the same App (the accepted XAP) when I'm running it from Visual Studio, using the same remote server address works just fine. WHY!... Has anyone else ever run into anything like this? Here's the remote path: http://www.streamcommunication.com/ZenAwaken/DownloadableCollections.xml I can load that to a browser and retrieve the XML When I'm in Visual Studio I can connect via that path and retrieve the file and consume the data BUT!! The exact same XAP which has been accepted and distributed by Windows Phone marketplace FAILS. Is it possible that MarketPlace does something (encryption?) to the XAP that would corrupt the path string? Any thoughts or experiences would be very helpful! Tom

    Read the article

  • nightmare with relative imports, how does pep 366 work?

    - by pygabriel
    I have a "canonical file structure" like that (I'm giving sensible names to ease the reading): mainpack/ __main__.py __init__.py - helpers/ __init__.py path.py - network/ __init__.py clientlib.py server.py - gui/ __init__.py mainwindow.py controllers.py In this structure, for example modules contained in each package may want to access the helpers utilities through relative imports in something like: # network/clientlib.py from ..helpers.path import create_dir The program is runned "as a script" using the __main__.py file in this way: python mainpack/ Trying to follow the PEP 366 I've put in __main__.py these lines: ___package___ = "mainpack" from .network.clientlib import helloclient But when running: $ python mainpack Traceback (most recent call last): File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "path/mainpack/__main__.py", line 2, in <module> from .network.clientlib import helloclient SystemError: Parent module 'mainpack' not loaded, cannot perform relative import What's wrong? What is the correct way to handle and effectively use relative imports? I've tried also to add the current directory to the PYTHONPATH, nothing changes.

    Read the article

  • Whats the python way for recursively setting file permissions?

    - by Geoff
    What's the "python way" to recursively set the owner and group to files in a directory? I could just pass a 'chown -R' command to shell, but I feel like I'm missing something obvious. I'm mucking about with this: import os path = "/tmp/foo" for root, dirs, files in os.walk(path): for momo in dirs: os.chown(momo, 502, 20) This seems to work for setting the directory, but fails when applied to files. I suspect the files are not getting the whole path, so chown fails since it can't find the files. The error is: 'OSError: [Errno 2] No such file or directory: 'foo.html' What am I overlooking here?

    Read the article

  • FTP/SFTP module for .NET

    - by Angrius
    I am designing an auto downloader using .NET and C#. I was wondering if there is a decent/robust FTP/SFTP module out there that I can use, preferably free of charge. EDIT: I probably should've noted that I am looking for answer from somebody who tried several and found one that works very well. I currently use .NET wrapper for libcurl for FTP and it does not behave right. For example when I connect to FTP site with Filezilla and provide a path, it finds directory just fine. With libcurl, i get a header for 404 page saying path cannot be found. I am guessing that Filezilla gets 'home' directory correctly, and libcurl puts me to the root (i tried no path, and i had no permissions to access that directory). But anyways, I just don't know enough about FTP itself, so I would like something that just works. Thanks!

    Read the article

  • Context Menu event with QGraphicsWidget

    - by onurozcelik
    In my application I subclass QGraphicsWidget In paint I am drawing a line with pen width 4. I reimplemented boundingRect() and shape(). But I can't catch context menu event every time I click right mouse button. What is the problem.(Pen Width ? ) //Sample code for boundingRect() and shape() QRectF boundingRect() const { qreal rectLeft = x1 < x2 ? x1 : x2; qreal rectTop = y1 < y2 ? y1 : y2; qreal rectWidth = (x1 - x2) != 0 ? abs(x1-x2) : 4; qreal rectHeight = (y1 - y2) != 0 ? abs(y1 -y2) : 4; return QRectF(rectLeft,rectTop,rectWidth,rectHeigt); } QPainterPath shape() { QPainterPath path; path.addRect(boundingRect()); return path; }

    Read the article

  • Install Python 2.6 without using installer on Win32

    - by prosseek
    I need to run a python script on a machine that doesn't have python installed. What I did was as follows. Copy python.exe, python26.dll, msvcr90.dll and Microsoft.VC90.CRT.manifest zip all the directory in LIBs directory as the python26.zip copy all the necessary dll/pyd file inside the DLL directory. It seems to work, but when I change the python26.zip to the other name such as pythonlib.zip. It cannot find the python library anymore. Q1 : What's the magic behind the python26.zip name? The python automatically finds a library inside a python26.zip but not with different name? Q2 : If I have python26.zip at the same directory where python.exe/python26.dll is, I don't need to add path sys.path.append(THE PATH TO python26.zip). Is it correct?

    Read the article

  • iPhone application build fails with "dyld: Library not loaded: /System/[...]" error? Why?

    - by Andrew J. Brehm
    For my own reasons and not for the app store I am referencing the Apple private framework Apple80211 in an iPhone app. I got the framework from an earlier version of the iPhone SDK. I added the "existing framework", verified that that absolute path to the framework is /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/PrivateFrameworks/Apple80211.framework and tried to build the app. But the build (to device) fails with the error dyld: Library not loaded: /System/Library/PrivateFrameworks/Apple80211.framework/Apple80211 Referenced from: /var/mobile/Applications/3691587D-87AF-44EA-A505-F73D17F39B3B/iWire2.app/iWire2 Reason: image not found I cannot figure out why Xcode would look for the library in a /System path (instead of using the path given in the frameworks list) or how to change that behaviour. I tried the tricks I found here and elsewhere for similar (and identical) sitiations: Delete the myusername.* files in the xcodeproj bundle Delete the build directory Clean all targets Start new project Result is always the same. How can I add this (or a) framework to an iPhone project AND get Xcode to at least look at the library located where I point to rather than a location in /System?

    Read the article

  • How do you set a cookie to be accessible across the entire domain in Javascript

    - by Tzarkov
    I suppose there should be a way to set a cookie to be accessible from the entire domain nevermind from which directory you are setting the cookie. Say in mypage.com/blue/index.php y set the cookie "colour=blue;" this way: document.cookie = "colour" + "=" + "blue" + "; expires=" + expireDate.toGMTString() + "; path=/"; Using this code, the cookie retrieval function in mypage.com/home.php can't access the content of the cookie. If it was just from first level directories that the cookie needs to be set, we would be ok by doing path=../ instead of path=/ But how do you go about writing generic code that sets a cookie that is accessible from any page in that domain not minding how deep in the file structure is the page the cookie is being set from?

    Read the article

  • Trouble applying a simple template

    - by Adam S
    I'm having trouble applying a template to my checkboxes. I have the following template: <ControlTemplate x:Key="TriStateRed" TargetType="{x:Type CheckBox}"> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="{x:Null}" > <Setter TargetName="path" Property="Data" Value="M 0 2.5 A 5 2.5 0 1 1 5 5 L 5 8 M 5 10 L 5 10" /> <Setter TargetName="path" Property="Stroke" Value="Red" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> However, visual studio gives me the following error: Cannot find the Trigger target 'path'. (The target must appear before any Setters, Triggers, or Conditions that use it.) Can anyone make sense of this?

    Read the article

  • Phonegap 2.1 for Android - Hello World App 3 errors at launch

    - by noway
    I developed something with Phonegap for iOS, but this is my first trial for Android. I created my hello world application with CLI sth like this mentioned here: $ /path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName Even though I created this app in Eclipse Workspace, I needed to import it to Eclipse. I created two AVDs. One for API level 8, one for API level 16. When I try to build, it gives me these three errors and a warning. What is wrong with my setup? Description Resource Path Location Type error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' AndroidManifest.xml /com.example.test.testprojectname line 20 Android AAPT Problem error: No resource identifier found for attribute 'xlargeScreens' in package 'android' AndroidManifest.xml /com.example.test.testprojectname line 22 Android AAPT Problem error: Error: String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|keyboard|screenSize|locale'). AndroidManifest.xml /com.example.test.testprojectname line 51 Android AAPT Problem The import android.app.Activity is never used testprojectname.java /com.example.test.testprojectname/src/com/example/test line 22 Java Problem

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >