Search Results

Search found 6242 results on 250 pages for 'named pipe'.

Page 52/250 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • NSTask Tail -f Using objective C

    - by Bach
    I need to read the last added line to a log file, in realtime, and capture that line being added. Something similar to Tail -f. So my first attempt was to use Tail -f using NSTask. I can't see any output using the code below: NSTask *server = [[NSTask alloc] init]; [server setLaunchPath:@"/usr/bin/tail"]; [server setArguments:[NSArray arrayWithObjects:@"-f", @"/path/to/my/LogFile.txt",nil]]; NSPipe *outputPipe = [NSPipe pipe]; [server setStandardInput:[NSPipe pipe]]; [server setStandardOutput:outputPipe]; [server launch]; [server waitUntilExit]; [server release]; NSData *outputData = [[outputPipe fileHandleForReading] readDataToEndOfFile]; NSString *outputString = [[[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding] autorelease]; NSLog (@"Output \n%@", outputString); I can see the output as expected when using: [server setLaunchPath:@"/bin/ls"]; How can i capture the output of that tail NSTask? Is there any alternative to this method, where I can open a stream to file and each time a line is added, output it on screen? (basic logging functionality)

    Read the article

  • Need a better way to execute console commands from python and log the results

    - by Wim Coenen
    I have a python script which needs to execute several command line utilities. The stdout output is sometimes used for further processing. In all cases, I want to log the results and raise an exception if an error is detected. I use the following function to achieve this: def execute(cmd, logsink): logsink.log("executing: %s\n" % cmd) popen_obj = subprocess.Popen(\ cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = popen_obj.communicate() returncode = popen_obj.returncode if (returncode <> 0): logsink.log(" RETURN CODE: %s\n" % str(returncode)) if (len(stdout.strip()) > 0): logsink.log(" STDOUT:\n%s\n" % stdout) if (len(stderr.strip()) > 0): logsink.log(" STDERR:\n%s\n" % stderr) if (returncode <> 0): raise Exception, "execute failed with error output:\n%s" % stderr return stdout "logsink" can be any python object with a log method. I typically use this to forward the logging data to a specific file, or echo it to the console, or both, or something else... This works pretty good, except for three problems where I need more fine-grained control than the communicate() method provides: stdout and stderr output can be interleaved on the console, but the above function logs them separately. This can complicate the interpretation of the log. How do I log stdout and stderr lines interleaved, in the same order as they were output? The above function will only log the command output once the command has completed. This complicates diagnosis of issues when commands get stuck in an infinite loop or take a very long time for some other reason. How do I get the log in real-time, while the command is still executing? If the logs are large, it can get hard to interpret which command generated which output. Is there a way to prefix each line with something (e.g. the first word of the cmd string followed by :).

    Read the article

  • Make Errors: Missing Includes in C++ Script?

    - by Abs
    Hello all, I just got help in how to compile this script a few mintues ago on SO but I have managed to get errors. I am only a beginner in C++ and have no idea what the below erros means or how to fix it. This is the script in question. I have read the comments from some users suggesting they changed the #include parts but it seems to be exactly what the script has, see this comment. [root@localhost wkthumb]# qmake-qt4 && make g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I. -o main.o main.cpp main.cpp:5:20: error: QWebView: No such file or directory main.cpp:6:21: error: QWebFrame: No such file or directory main.cpp:8: error: expected constructor, destructor, or type conversion before ‘*’ token main.cpp:11: error: ‘QWebView’ has not been declared main.cpp: In function ‘void loadFinished(bool)’: main.cpp:18: error: ‘view’ was not declared in this scope main.cpp:18: error: ‘QWebSettings’ has not been declared main.cpp:19: error: ‘QWebSettings’ has not been declared main.cpp:20: error: ‘QWebSettings’ has not been declared main.cpp: In function ‘int main(int, char**)’: main.cpp:42: error: ‘view’ was not declared in this scope main.cpp:42: error: expected type-specifier before ‘QWebView’ main.cpp:42: error: expected `;' before ‘QWebView’ make: *** [main.o] Error 1 I have the web kit on my Fedora Core 10 machine: qt-4.5.3-9.fc10.i386 qt-devel-4.5.3-9.fc10.i386 Thanks all for any help

    Read the article

  • R plotting multiple histograms on single plot to .pdf as a part of R batch script

    - by Bryce Thomas
    I am writing R scripts which play just a small role in a chain of commands I am executing from a terminal. Basically, I do much of my data manipulation in a Python script and then pipe the output to my R script for plotting. So, from the terminal I execute commands which look something like $python whatever.py | R CMD BATCH do_some_plotting.R. This workflow has been working well for me so far, though I have now reached a point where I want to overlay multiple histograms on the same plot, inspired by this answer to another user's question on Stackoverflow. Inside my R script, my plotting code looks like this: pdf("my_output.pdf") plot(hist(d$original,breaks="FD",prob=TRUE), col=rgb(0,0,1,1/4),xlim=c(0,4000),main="original - This plot is in beta") plot(hist(d$minus_thirty_minutes,breaks="FD",prob=TRUE), col=rgb(1,0,0,1/4),add=T,xlim=c(0,4000),main="minus_thirty_minutes - This plot is in beta") Notably, I am using add=T, which is presumably meant to specify that the second plot should be overlaid on top of the first. When my script has finished, the result I am getting is not two histograms overlaid on top of each other, but rather a 3-page PDF whose 3 individual plots contain the titles: i) Histogram of d$original ii) original - This plot is in beta iii) Histogram of d$minus_thirty_minutes So there's two points here I'm looking to clarify. Firstly, even if the plots weren't overlaid, I would expect just a 2-page PDF, not a 3-page PDF. Can someone explain why I am getting a 3-page PDF? Secondly, is there a correction I can make here somewhere to get just the two histograms plotted, and both of them on the same plot (i.e. 1-page PDF)? The other Stackoverflow question/answer I linked to in the first paragraph did mention that alpha-blending isn't supported on all devices, and so I'm curious whether this has anything to do with it. Either way, it would be good to know if there is a R-based solution to my problem or whether I'm going to have to pipe my data into a different language/plotting engine.

    Read the article

  • Best way to parse this particular string using awk / sed?

    - by Jack
    Hi, I need to get a particular version string from a file (call it version.lst) and use it to compare another in a shell script. For example sake, the file contains lines that look like this: V1.000 -- build date and other info here -- APP1 V1.000 -- build date and other info here -- APP2 V1.500 -- build date and other info here -- APP3 .. and so on. Let's say I am trying to grab the first version (in this case, V1.000) from APP1. Obviously, the versions can change and I want this to be dynamic. What I have right now works: var = `cat version.lst | grep " -- APP1" | grep -Eo V[0-9].[0-9]{3}` Pipe to grep will get the line containing APP1 and the second pipe to grep will get the version string. However, I hear grep is not the way to do this so I'd like to learn the best way using awk or sed. Any ideas? I am new to both and haven't found a tutorial easy enough to learn the syntax of it. Do they support egrep? Thanks!

    Read the article

  • OSX launchctl programmatically as root

    - by Lukas1
    I'm trying to start samba service using launchctl from OSX app as root, but I get error status -60031. I can run without problems the command in Terminal: sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist` In the objective-c code, I'm using (I know it's deprecated, but that really shouldn't be the issue here) AuthorizationExecuteWithPrivileges method. Here's the code: NSString *command = @"launchctl"; // Conversion of NSArray args to char** args here (not relevant part of the code) OSStatus authStatus = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &_authRef); if (authStatus != errAuthorizationSuccess) { NSLog(@"Failed to create application authorization: %d", (int)authStatus); return; } FILE* pipe = NULL; AuthorizationFlags flags = kAuthorizationFlagDefaults; AuthorizationItem right = {kAuthorizationRightExecute, 0, NULL, 0}; AuthorizationRights rights = {1, &right}; // Call AuthorizationCopyRights to determine or extend the allowable rights. OSStatus stat = AuthorizationCopyRights(_authRef, &rights, NULL, flags, NULL); if (stat != errAuthorizationSuccess) { NSLog(@"Copy Rights Unsuccessful: %d", (int)stat); return; } OSStatus status = AuthorizationExecuteWithPrivileges(_authRef, command.UTF8String, flags, args, &pipe); if (status != errAuthorizationSuccess) { NSLog(@"Error executing command %@ with status %d", command, status); } else { // some other stuff } I have also tried using different flags then kAuthorizationFlagDefaults, but that led to either the same problem or error code -60011 - invalid flags. What am I doing wrong here, please?

    Read the article

  • How to check volume is mounted or not using python with a dynamic volume name

    - by SR query
    import subprocess def volumeCheck(volume_name): """This function will check volume name is mounted or not. """ volume_name = raw_input('Enter volume name:') volumeCheck(volume_name) print 'volume_name=',volume_name p = subprocess.Popen(['df', '-h'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) p1, err = p.communicate() pattern = p1 if pattern.find(volume_name): print 'volume found' else: print 'volume not found' While running i always got wrong result "volume found". root@sr-query:/# df -h Filesystem Size Used Avail Use% Mounted on rootfs 938M 473M 418M 54% / /dev/md0 938M 473M 418M 54% / none 250M 4.9M 245M 2% /dev /dev/md2 9.7M 1.2M 8.0M 13% /usr/config /dev/md7 961M 18M 895M 2% /downloads tmpfs 250M 7.9M 242M 4% /var/volatile tmpfs 250M 0 250M 0% /dev/shm tmpfs 250M 0 250M 0% /media/ram **/dev/mapper/vg9-lv9 1016M 65M 901M 7% /VolumeData/sp /dev/mapper/vg10-lv10 1016M 65M 901M 7% /VolumeData/cp** root@sr-query:/# root@sr-query:/# root@sr-query:/# python volume_check.py Enter volume name:raid_10volume volume_name= raid_10volume **volume found** root@sr-query:/# I enterd raid_10volume its not listed here please check the df -h command out put(only 2 volume there sp and cp) , then how it reached else part. what is wrong in my code? Thanks in advance. is there any other way to do this work ! ?

    Read the article

  • Python: Removing particular character (u"\u2610") from string

    - by duhaime
    I have been wrestling with decoding and encoding in Python, and I can't quite figure out how to resolve my problem. I am looping over xml text files (sample) that are apparently coded in utf-8, using Beautiful Soup to parse each file, then looking to see if any sentence in the file contains one or more words from two different list of words. Because the xml files are from the eighteenth century, I need to retain the em dashes that are in the xml. The code below does this just fine, but it also retains a pesky box character that I wish to remove. I believe the box character is this character. (You can find an example of the character I wish to remove in line 3682 of the sample file above. On this webpage, the character looks like an 'or' pipe, but when I read the xml file in Komodo, it looks like a box. When I try to copy and paste the box into a search engine, it looks like an 'or' pipe. When I print to console, though, the character looks like an empty box.) To sum up, the code below runs without errors, but it prints the empty box character that I would like to remove. for work in glob.glob(pathtofiles): openfile = open(work) readfile = openfile.read() stringfile = str(readfile) decodefile = stringfile.decode('utf-8', 'strict') #is this the dodgy line? soup = BeautifulSoup(decodefile) textwithtags = soup.findAll('text') textwithtagsasstring = str(textwithtags) #this method strips everything between anglebrackets as it should textwithouttags = stripTags(textwithtagsasstring) #clean text nonewlines = textwithouttags.replace("\n", " ") noextrawhitespace = re.sub(' +',' ', nonewlines) print noextrawhitespace #the boxes appear I tried to remove the boxes by using noboxes = noextrawhitespace.replace(u"\u2610", "") But Python threw an error flag: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 280: ordinal not in range(128) Does anyone know how I can remove the boxes from the xml files? I would be grateful for any help others can offer.

    Read the article

  • Python client / server question

    - by AustinM
    I'm working on a bit of a project in python. I have a client and a server. The server listens for connections and once a connection is received it waits for input from the client. The idea is that the client can connect to the server and execute system commands such as ls and cat. This is my server code: import sys, os, socket host = '' port = 50105 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host, port)) print("Server started on port: ", port) s.listen(5) print("Server listening\n") conn, addr = s.accept() print 'New connection from ', addr while (1): rc = conn.recv(5) pipe = os.popen(rc) rl = pipe.readlines() file = conn.makefile('w', 0) file.writelines(rl[:-1]) file.close() conn.close() And this is my client code: import sys, socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = 'localhost' port = input('Port: ') s.connect((host, port)) cmd = raw_input('$ ') s.send(cmd) file = s.makefile('r', 0) sys.stdout.writelines(file.readlines()) When I start the server I get the right output, saying the server is listening. But when I connect with my client and type a command the server exits with this error: Traceback (most recent call last): File "server.py", line 21, in <module> rc = conn.recv(2) File "/usr/lib/python2.6/socket.py", line 165, in _dummy raise error(EBADF, 'Bad file descriptor') socket.error: [Errno 9] Bad file descriptor On the client side, I get the output of ls but the server gets screwed up.

    Read the article

  • Using AppFabric session state provider, does each session get its own region?

    - by goombaloon
    I've been playing around with AppFabric Beta 2's session state provider. It appears that each new session get its own region (named "Default_Region_XXXX" (where XXXX is an apparent random sequence of numbers). If I understand regions correctly, it appears that each region is tied to a single cluster host, leaving a single point of failure. Why is each session being given it own region? Also, do sessions eventually timeout and clean themselves up in the cache or is that behavior just inherited from the cache settings? I'm wondering (if in a production application scenario), if one would use a separate named cache for session state apart from other application caches? Thanks.

    Read the article

  • ServiceLocator not initialized in Tests project

    - by Carl Bussema
    When attempting to write a test related to my new Tasks (MVC3, S#arp 2.0), I get this error when I try to run the test: MyProject.Tests.MyProject.Tasks.CategoryTasksTests.CanConfirmDeleteReadiness: SetUp : System.NullReferenceException : ServiceLocator has not been initialized; I was trying to retrieve SharpArch.NHibernate.ISessionFactoryKeyProvider ---- System.NullReferenceException : Object reference not set to an instance of an object. at SharpArch.Domain.SafeServiceLocator1.GetService() at SharpArch.NHibernate.SessionFactoryKeyHelper.GetKeyFrom(Object anObject) at SharpArch.NHibernate.NHibernateRepositoryWithTypedId2.get_Session() at SharpArch.NHibernate.NHibernateRepositoryWithTypedId2.Save(T entity) at MyProject.Tests.MyProject.Tasks.CategoryTasksTests.Setup() in C:\code\MyProject\Solutions\MyProject.Tests\MyProject.Tasks\CategoryTasksTests.cs:line 36 --NullReferenceException at Microsoft.Practices.ServiceLocation.ServiceLocator.get_Current() at SharpArch.Domain.SafeServiceLocator1.GetService() Other tests which do not involve the new class (e.g., generate/confirm database mappings) run correctly. My ServiceLocatorInitializer is as follows public class ServiceLocatorInitializer { public static void Init() { IWindsorContainer container = new WindsorContainer(); container.Register( Component .For(typeof(DefaultSessionFactoryKeyProvider)) .ImplementedBy(typeof(DefaultSessionFactoryKeyProvider)) .Named("sessionFactoryKeyProvider")); container.Register( Component .For(typeof(IEntityDuplicateChecker)) .ImplementedBy(typeof(EntityDuplicateChecker)) .Named("entityDuplicateChecker")); ServiceLocator.SetLocatorProvider(() => new WindsorServiceLocator(container)); } }

    Read the article

  • Refresh conent with JQuery/AJAX after using a MVC partial view

    - by Aaron Salazar
    Using the following JQuery/AJAX function I'm calling a partial view when an option is changed in a combobox named "ReportedIssue" that is also in the partial view. The is named "tableContent". <script type="text/javascript"> $(function() { $('#ReportedIssue') .change(function() { var styleValue = $(this).val(); $('#tableContent').load( '/CurReport/TableResults', { style: styleValue } ); }) .change(); }); </script> My problem is that after the jump to the partial view I lose the link to the javascript. I think I'm supposed to use the JQuery ".live()" but I'm unsure. In short, I want to re-establish the link between my JavaScript and my combobox and after the inclusion of the partial view's HTML. I hope I'm being clear enough, Aaron

    Read the article

  • How to export SSIS to Microsoft Excel without additional software?

    - by Dr. Zim
    This question is long winded because I have been updating the question over a very long time trying to get SSIS to properly export Excel data. I managed to solve this issue, although not correctly. Aside from someone providing a correct answer, the solution listed in this question is not terrible. The only answer I found was to create a single row named range wide enough for my columns. In the named range put sample data and hide it. SSIS appends the data and reads metadata from the single row (that is close enough for it to drop stuff in it). The data takes the format of the hidden single row. This allows headers, etc. WOW what a pain in the butt. It will take over 450 days of exports to recover the time lost. However, I still love SSIS and will continue to use it because it is still way better than Filemaker LOL. My next attempt will be doing the same thing in the report server. Original question notes: If you are in Sql Server Integrations Services designer and want to export data to an Excel file starting on something other than the first line, lets say the forth line, how do you specify this? I tried going in to the Excel Destination of the Data Flow, changed the AccessMode to OpenRowSet from Variable, then set the variable to "YPlatters$A4:I20000" This fails saying it cannot find the sheet. The sheet is called YPlatters. I thought you could specify (Sheet$)(Starting Cell):(Ending Cell)? Update Apparently in Excel you can select a set of cells and name them with the name box. This allows you to select the name instead of the sheet without the $ dollar sign. Oddly enough, whatever the range you specify, it appends the data to the next row after the range. Oddly, as you add data, it increases the named selection's row count. Another odd thing is the data takes the format of the last line of the range specified. My header rows are bold. If I specify a range that ends with the header row, the data appends to the row below, and makes all the entries bold. if you specify one row lower, it puts a blank line between the header row and the data, but the data is not bold. Another update No matter what I try, SSIS samples the "first row" of the file and sets the metadata according to what it finds. However, if you have sample data that has a value of zero but is formatted as the first row, it treats that column as text and inserts numeric values with a single quote in front ('123.34). I also tried headers that do not reflect the data types of the columns. I tried changing the metadata of the Excel destination, but it always changes it back when I run the project, then fails saying it will truncate data. If I tell it to ignore errors, it imports everything except that column. Several days of several hours a piece later... Another update I tried every combination. A mostly working example is to create the named range starting with the column headers. Format your column headers as you want the data to look as the data takes on this format. In my example, these exist from A4 to E4, which is my defined range. SSIS appends to the row after the defined range, so defining A4 to E68 appends the rows starting at A69. You define the Connection as having the first row contains the field names. It takes on the metadata of the header row, oddly, not the second row, and it guesses at the data type, not the formatted data type of the column, i.e., headers are text, so all my metadata is text. If your headers are bold, so is all of your data. I even tried making a sample data row without success... I don't think anyone actually uses Excel with the default MS SSIS export. If you could define the "insert range" (A5 to E5) with no header row and format those columns (currency, not bold, etc.) without it skipping a row in Excel, this would be very helpful. From what I gather, noone uses SSIS to export Excel without a third party connection manager. Any ideas on how to set this up properly so that data is formatted correctly, i.e., the metadata read from Excel is proper to the real data, and formatting inherits from the first row of data, not the headers in Excel? One last update (July 17, 2009) I got this to work very well. One thing I added to Excel was the IMEX=1 in the Excel connection string: "Excel 8.0;HDR=Yes;IMEX=1". This forces Excel (I think) to look at all rows to see what kind of data is in it. Generally, this does not drop information, say for instance if you have a zip code then about 9 rows down you have a zip+4, Excel without this blanks that field entirely without error. With IMEX=1, it recognizes that Zip is actually a character field instead of numeric. And of course, one more update (August 27, 2009) The IMEX=1 will succeed importing data with missing contents in the first 8 rows, but it will fail exporting data where no data exists. So, have it on your import connection string, but not your export Excel connection string. I have to say, after so much fiddling, it works pretty well.

    Read the article

  • Load balancing and sessions

    - by vtortola
    Hi there, What is the better approach for load balancing on web servers? My services run in .NET and Mono, so they could be hosted on IIS or Apache2, and the will have to provide SSL connection. I've read two main approaches, store the state in a common server and use sticky sessions, there is any other else? I've read 3 diffent things about sticky sessions: 1)the load balancing device will know with which server did you start the connection and all the further connections from that host will be routed to the same server. 2)the load balancing devide read a cookie named: JSESSIONID 3)the load balancing devide read a cookie named: ASPSESSIONID I'm a little bit confused, what will happen exactly? As the connections will be SSL there is not a chance for the load balancing devide of read the cookies, so then what? About store the estate in a common server, what solutions do you know? I've read memcache is a good solution but is there any other else? Cheers.

    Read the article

  • DBD::CSV: How can I generate different behavior with the two f_ext-options ".csv" and ".csv/r"?

    - by sid_com
    This is from the DBD::File-documentation: f_ext This attribute is used for setting the file extension where (CSV) files are opened. There are several possibilities. DBI:CSV:f_dir=data;f_ext=.csv In this case, DBD::File will open only table.csv if both table.csv and table exist in the datadir. The table will still be named table. If your datadir has files with extensions, and you do not pass this attribute, your table is named table.csv, which is probably not what you wanted. The extension is always case-insensitive. The table names are not. DBI:CSV:f_dir=data;f_ext=.csv/r In this case the extension is required, and all filenames that do not match are ignored. It was not possible for me to generate different behavior with the two options ".csv/r" and ".csv". Could someone show me an example, where I can see the difference between ".csv/r" and ".csv"?

    Read the article

  • .Ajax with jQuery and MVC2

    - by Mario
    Im trying to create an ajax (post) event that will populate a table in a div on button click. I have a list of groups, when you click on a group, I would like the table to "disappear" and the members that belong to that group to "appear". My problem comes up when using jQuery's .ajax... When I click on the button, it is looking for a controller that doesnt exist, and a controller that is NOT referenced. I am, however, using AREAS (MVC2), and the area is named Member_Select where the controller is named MemberSelect. When I click on the button, I get a 404 stating it cannot find the controller Member_Select. I have examined the link button and it is set to Member_Select when clicked on, but here's the ajax call: $.ajax({ type: "POST", url: '/MemberSelect/GetMembersFromGroup', success: function(html) { $("#groupResults").html(html); } }); I havent been able to find any examples/help online. Any thoughts/suggestions/hints would be greatly appreciated. Thanks!

    Read the article

  • Load CoreData objects' string property into UIPickerView

    - by OscarTheGrouch
    Hello Currently I have an entity named "Events" in a CoreData app. "Events" has one string property named "eventName". In the -(void)viewDidLoad I am trying to Fetch all the "Events" objects and load their "eventName" by alphabetical order into a UIPickerView. The ultimate end goal is through the use of a textField, buttons and the pickerView being add new objects in and remove unwanted objects out. Basically turning the UIPickerView into a UITableView. Currently I am able to save objects to the CoreData store, but am not able to pull them/their properties out into the UIPickerView. I am willing and able to share the project source code to anyone who wants it, or is willing to look at it to help out. thanks Chris

    Read the article

  • django manage.py syncdb not working?

    - by Diego
    Trying to learn Django, I closed the shell and am getting this problem now when I call python manage.py syncdb, any idea what happened?: I've already set up a db. I have manage.py set up in the folder django_bookmarks. What's up here? Traceback (most recent call last): File "manage.py", line 2, in from django.core.management import execute_manager ImportError: No module named django.core.management my-computer:~/Django-1.1.1/django_bookmarks mycomp$ export PATH=/Users/mycomp/bin:$PATH my-computer:~/Django-1.1.1/django_bookmarks mycomp$ python manage.py syncdb Traceback (most recent call last): File "manage.py", line 2, in from django.core.management import execute_manager ImportError: No module named django.core.management my-computer:~/Django-1.1.1/django_bookmarks mycomp$

    Read the article

  • Windows batch file to delete .svn files and folders

    - by Marco Demaio
    Hi,in order to delete all ".svn" files/folders/subfolders in "myfolder" I use this simple line in a batch file: FOR /R myfolder %%X IN (.svn) DO (RD /S /Q "%%X") This works, but if there are no ".svn" files/folders the batch file shows a warning saying: "The system cannot find the file specified." This warning is very noisy so I was wondering how to make it understand that if it doesn't find any ".svn" files/folders he must skip the RD command. Usually using wild cards would suffice, but in this case I don't know how to use them, because I don't want to delete files/folders with .svn extension, but I want to delete the files/folders named exactly ".svn", so if I do this: FOR /R myfolder %%X IN (*.svn) DO (RD /S /Q "%%X") it would NOT delete files/folders named extaclty ".svn" anymore. I tried also this: FOR /R myfolder %%X IN (.sv*) DO (RD /S /Q "%%X") but it doesn't work either, he deletes nothing. Thanks for any help!

    Read the article

  • doubt in JSP:Include

    - by raja
    Hi All: I have added a code which will include child jsp using jsp:include. The problem i am facing is that the code present in child code is not executing. Below is the code iam using it now JSPF File: <jsp:include page="X.jsp" flush="true"> </jsp:include> the above code is present in a file named "A.jspf" which is included in another jsp file named "Parent.jsp". X.jsp: <%@ page import="java.util.*" %> <% System.out.println("********Child JSP"); %> Whenever i execute the parent file "Parent.jsp", all the other contents given in Parent.jsp and A.jspf is displaying except the content present in X.jsp. No error is displaying. Both X.jsp and A.jspf are present in same folder only. Please help me to resolve this issue. Thanks in advance.

    Read the article

  • JQuery UI tabs: How do I navigate directly to a tab from another page?

    - by Chris Simpson
    JQuery UI tabs are implemented by named anchors in an unordered list. When you hover over one of the tabs you can see this in the link shown at the foot of the browser: http://mysite/product/3/#orders Above would be the "orders" tab for example. JQuery obviously intercepts the click to this anchor and opens the tab instead. However if I bookmark the link above or link to it from elsewhere in the site the page does not open on the specific tab. In the tab initialisation block I was considering putting in some code that looks for a named anchor in the URL and, if it finds one, does an index lookup of the tabs and calls the select on it. This would mean it will still work with JS switched off. But is there an easier/nicer/better way?

    Read the article

  • "My account" or "Your account" labels

    - by Ferdy
    I have somewhat of a strange question that is not really technical, but I do hope to collect meaningful advice. I'm building a large web application, basically a photo sharing community site. As part of this site, logged-in users can go to their profile, from which they can see their own things (images, comments, votes) as well as edit their details and preferences. Users can also see profiles of others users (their images, comments, votes), but of course not edit their details. The question I have is simple but it keeps bothering me: What to call the personal links and content of a user? Should they be named "Your": Your images Your profile ... ...or "My": My images My profile ...or perhaps named, even if you're logged in: Fledder's images Fledder's profile As unimportant as it may sounds, I'm really looking for advice in this area. I'm particularly interested in any standards, why an option is preferred, and in which contexts it is preferred.

    Read the article

  • How do I work around this problem creating a virtualenv environment with a custom-build Python?

    - by Daryl Spitzer
    I need to run some code on a Linux machine with Python 2.3.4 pre-installed. I'm not on the sudoers list for that machine, so I built Python 2.6.4 into (a subdirectory in) my home directory. Then I attempted to use virtualenv (for the first time), but got: $ Python-2.6.4/python virtualenv/virtualenv.py ENV New python executable in ENV/bin/python Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Installing setuptools......... Complete output from command /apps/users/dspitzer/ENV/bin/python -c "#!python \"\"\"Bootstrap setuptoo... " /apps/users/dspitzer/virtualen...6.egg: Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback Traceback (most recent call last): File "<string>", line 67, in <module> ImportError: No module named md5 ---------------------------------------- ...Installing setuptools...done. Traceback (most recent call last): File "virtualenv/virtualenv.py", line 1488, in <module> main() File "virtualenv/virtualenv.py", line 529, in main use_distribute=options.use_distribute) File "virtualenv/virtualenv.py", line 619, in create_environment install_setuptools(py_executable, unzip=unzip_setuptools) File "virtualenv/virtualenv.py", line 361, in install_setuptools _install_req(py_executable, unzip) File "virtualenv/virtualenv.py", line 337, in _install_req cwd=cwd) File "virtualenv/virtualenv.py", line 590, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /apps/users/dspitzer/ENV/bin/python -c "#!python \"\"\"Bootstrap setuptoo... " /apps/users/dspitzer/virtualen...6.egg failed with error code 1 Should I be setting PYTHONHOME to some value? (I intentionally named my ENV "ENV" for lack of a better name.) Not knowing if I can ignore those errors, I tried installing nose (0.11.1) into my ENV: $ cd nose-0.11.1/ $ ls AUTHORS doc/ lgpl.txt nose.egg-info/ selftest.py* bin/ examples/ MANIFEST.in nosetests.1 setup.cfg build/ functional_tests/ NEWS PKG-INFO setup.py CHANGELOG install-rpm.sh* nose/ README.txt unit_tests/ $ ~/ENV/bin/python setup.py install Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Traceback (most recent call last): File "setup.py", line 1, in <module> from nose import __version__ as VERSION File "/apps/users/dspitzer/nose-0.11.1/nose/__init__.py", line 1, in <module> from nose.core import collector, main, run, run_exit, runmodule File "/apps/users/dspitzer/nose-0.11.1/nose/core.py", line 3, in <module> from __future__ import generators ImportError: No module named __future__ Any advice?

    Read the article

  • How do I set the ItemsSource of a DataGrid in XAML?

    - by Ben McCormack
    I'm trying to set the ItemsSource property of a DataGrid named dgIssueSummary to be an ObservableCollection named IssueSummaryList. Currently, everything is working when I set the ItemsSource property in my code-behind: public partial class MainPage : UserControl { private ObservableCollection<IssueSummary> IssueSummaryList = new ObservableCollection<IssueSummary> public MainPage() { InitializeComponent(); dgIssueSummary.ItemsSource = IssueSummaryList } } However, I'd rather set the ItemsSource property in XAML, but I can't get it to work. Here's the XAML code I have: <sdk:DataGrid x:Name="dgIssueSummary" AutoGenerateColumns="False" ItemsSource="{Binding IssueSummaryList}" > <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Binding="{Binding ProblemType}" Header="Problem Type"/> <sdk:DataGridTextColumn Binding="{Binding Count}" Header="Count"/> </sdk:DataGrid.Columns> </sdk:DataGrid> What do I need to do to set the ItemsSource property to be the IssueSummaryList in XAML rather than C#?

    Read the article

  • Linq to Sql saying that item by 'Customer' already exists. Choose a different name.

    - by Anthony Potts
    I have been going round and round with a linq to sql file while using svn for quite some time. The latest is that my dbml file shows as having an error which states that An item named "Customer" already exists. Please choose a different name. And then it repeats that again. In fact, it says it for almost every object. What is my fix? I have tried renaming the one named Customer, but that didn't fix it. I don't know where to go to fix this. I went to the .dbml file and don't see any duplication, and I went to the .dbml.layout file and didn't see any duplication there either.

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >