configparser raises an exception if one parses a simple .properties (key/value) file wich lacks section headers; other than rolling out code myself, is there some module that allows me to do this?
I am including chapters in my latex file one by one by using the \include{} statement, up till now I've had no problem with that. But I've recently written a chapter which I've saved under a name including spaces...because you can.
Now the include{} statement apparently doesn't like spaces, and prints just the filename in my document in stead of the chapter.
It is probably a pretty easy fix (apart from removing the spaces in the filename, ;-) ), but I can't find it.
Hi all!
Somebody has asked me to make an app in php that will generate a .doc file with an image and a few tables in it. My first approach was:
somethingsomething else
cevaaltceva');
fclose($fh);
?
This uses the data uri technique of embedding an image.
This will generate an html file that will be rendered ok in web browsers but the image is missing in Microsoft Office Word, at least in the standard setup. Then, while editing the file with Word, i've replace the image with an image from file and Microsoft Word changed the contents of the file into Open XML and added a folder, new_files where he put the imported image (which was a .png), a .gif version of the image and a xml file:
Now this isn't good enough either since i want this to be all kept in a single .doc file.
Is there a way to embed an image in an OpenXML-formatted .doc file?
Any help will be much appreciated.
Hi,
I was trying to do something like this: http://www.element-it.com/Examples/MultiPowUpload/AdvancedHTMLinterface.html
But in my search for information I found that is not possible to perform multiple file selection with simple HTML and JavaScript (and JSP in the server side). There is a way to do this without using Flash? A third party component you could recommend?
Thanks.
When trying to import scala.Option in a javafx script, I get the following javafxc error:
bad class file: scala/Option$$anonfun$orNull$1.class(scala:Option$$anonfun$orNull$1.class)
undeclared type variable: A1
Please remove or make sure it appears in the correct subdirectory of the classpath.
import scala.Option;
^
I am using Scala 2.8.0-RC1, Javafxc 1.2.3_b36, JVM 1.6.0_18-b07, OS Ubuntu 9.10. The same code was working in Scala 2.7.7 .
I'm building a program, and I'm quite confident using Objective-C, but I don't know how to programmatically download a file from the web and copy it on the hard drive.
I started with :
NSString url = @"http://spiritofpolo.com/images/logo.png";
NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
But then I don't know what to do with the data... that sucks, no ;)
Can somebody help?
I'm trying to find something like this: http://coffeescripter.com/code/ad-gallery/ that is controlled by an xml file that can simply contain the image location, thumbnail location and the text for title/description. Has to be pure jquery or javascript though - no flash based stuff.
I've found loads of great components but can't find one that is controlled by XML. Anyone happen to have seen one around anywhere please?
I'm getting an error in a JBOSS application:
Static Method [addHeader] not found on JavaBean [class com.ppnet.webservice.WebserviceHeaderWriter]
I have checked the WebserviceHeaderWriter.jar that gets deployed into JBOSS and checked it in eclipse. It looks as if it should have this method on it.
I think that the JBoss application might be loading a different version of the WebserviceHeaderWriter.jar without this method on it, is there a way to check the location of the file that is getting loaded?
Hi,
Is it possible to do a content search(for a line or a word) in a file using command prompt.?
If so can we search a directory as well.? i.e it should search all the files in the directory for a specific word or phrase.
Thanks.
Hi everyone,
can i call a jython file from another jython program and execute that .
Also i know os.system(cmd.exe)get the system prompt . is it possible that i can trigger cmd.exe and cmd.exe gets poped up into the screen.
Thanks
Hi,
I have to read a file from server side . Obtained its contents stored it in a list and sent it to template
Now, My question is how to access this list so as to display the contents of files line by line .
I am using ajax and jquery to obtain the data on client side
def showfiledata(request):
f = open("/home/tazim/webexample/test.txt")
list = f.readlines()
return_dict = {'list':list}
json = simplejson.dumps(list)
return HttpResponse(json,mimetype="application/json")
Are there any alternatives to stat (which is found on most Unix systems) which can determine the file type? The manpage says that a call to stat is expensive, and I need to call it quite often in my app.
I had a problem highlighting text in a pdf file embedded in webbrowser control and highlighting text using PDFLibNet.pdfwrapper so i'm shifting to another process where i'll just convert the pdf to html so i can manipulate the source code to highlight text.
How can i convert pdf files to html files? Is there a better way?
Thanks,
Jepe
I know this is simple thing, but i was not aware.
I used println in gsp file and expected to print output in console. But this is showing on page.
<% for(int i =0; i < threads.size();i++) {
println i
} %
thanks.
sudo gem install ruby-mbox
then I run this
require "rubygems"
require "ruby-mbox"
mbox = Mbox.new("Inbox")
and I get this
$ ruby mbox_read.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- ruby-mbox (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from mbox_read.rb:2
gem server says this
ruby-mbox 0.0.2 [rdoc] [www]
A simple library to read mbox files.
Executables are mbox-daemon, mbox-do.
Thanks in advance
I have in my url patterns,
urlpatterns += patterns('',
(r'^(?P<path>.*)$', 'django.views.static.serve',
{'document_root': '/home/tipu/Dropbox/dev/workspace/search/images'})
In my template when I do
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}style.css" />
It serves the css just fine. But the file logo.png, that's in the same directory as style.css, doesn't show when I do this:
<img src = "{{ MEDIA_URL }}logo.png" id = "logo" />
Any idea why?
i have a problem which is that i want to extract information about FAT(file allocation table) in C# but the restriction is i cannot use System.IO
so How i get drive types?cluster information e.t.c
I have 2 dimensional table in file, which look like this:
11, 12, 13, 14, 15
21, 22, 23, 24, 25
I want it to be imported in 2 dimensional array. I wrote this code:
INTEGER :: SMALL(10)
DO I = 1, 3
READ(UNIT=10, FMT='(5I4)') SMALL
WRITE(UNIT=*, FMT='(6X,5I4)') SMALL
ENDDO
But it imports everything in one dimensional array.
My app uses Core Data. I have run the app in the simulator which has successfully created and populated the corresponding sqlite file. I now want to get this pre-existing sqlite file on to an actual device and be part of my app. I have located the simulator generated sqlite file at /Library/Application Support/iPhone Simulator/6.0/Applications/identifier/Documents/myapp.sqlite and dragged it into Xcode. This has added it to my application bundle but not in an appropriate directory (with the consequence that the sqlite file can be read but not written to).
From reading about the file system I believe that the best place to put the sqlite file would be in a custom directory 'Database' under Application_Home/Library/. I don't seem to be able to do this within Xcode and despite searching I am unable to figure out how to do the following:
(1) Create a sub-directory called 'Database' in Application_Home/Library/ ?
(2) Transfer the sqlite file to my newly created 'Database' directory ?
Many thanks to @Daij-Djan of his answer below.
One other question: the path to the sqlite file will be used by the persistent store coordinator. Now depending on the size of the sqlite file it may take a while to copy or move. How can you ensure that the example code provided by @Daij-Djan has executed and finished before the persistent store coordinator tries to reference the sqlite file?
Thanks for any help in advance.
The executable file of c++ will contain linkers, modules and others, i would like to look into its contents,
i'm using linux, how can i view contents of a.out?
which command should use to browse a.out, text editors wont show the contents......
When i export WebProject (Struts Portlet) as war from RAD 7.5 it creates war, but that war file does not have my Class files. ie. Action Classes, Actionforms, validations, etc. none of the .java files class added in war. what is the issue. urgent