file

print lists in a file in a special format in python

Hi, I have a large list of lists like: X = [['a','b','c','d','e','f'],['c','f','r'],['r','h','l','m'],['v'],['g','j']] each inner list is a sentence and the members of these lists are actually the word of this sentences.I want to write this list in a file such that each sentence(inner list) is in a separate line in the file, and each ...

Unicode and std::string in C++

If I write a random string to file in C++ consisting of some unicode characters, I am told by my text editor that I have not created a valid UTF-8 file. // Code example const std::string charset = "abcdefgàèíüŷÀ"; file << random_string(charset); // using std::fstream What can I do to solve this? Do I have to do lots of additional manu...

C# Creating a custom control

Hi, I need help creating a .dll file from a custom control so that it can be used on other projects. This is the first time I am doing this, and I couldn't find much help via google so help would be much appreciated. I have this code and I know I have to compile it as a class project, but I really don't know how, so I'd appreciate it if...

Opening External Application within Adobe Air App using JavaScript

I'm working on a personal Adobe Air Application that will hold a lot of required elements for my job including important web links to various places I may need. But I have ran into a bit of an issue... I need to have a couple of buttons that will open external applications (like ThunderBird and Spark). I'm aware that you can do this wit...

How to portably write std::wstring to file?

I have a wstring declared as such: // random wstring std::wstring str = L"abcàdëefŸg€hhhhhhhµa"; The literal would be UTF-8 encoded, because my source file is. [EDIT: According to Mark Ransom this is not necessarily the case, the compiler will decide what encoding to use - let us instead assume that I read this string from a file enc...

Open a file with Notepad in C#

hi, can anyone tell me how i open a file in c# . I don't mean reading it by textreader and readline() I mean open it as an independent file in notepad ?? thanks in advance.... thanks to you all for your effort ...

Groovy (File IO): find all files and return all files - the Groovy way

Ok, this should be easy... I'm new to groovy and I'm looking to implement the following logic: def testFiles = findAllTestFiles(); So far, I've come up with the code below which successfully prints all files names. However, instead of printing, I just need to put them into a collection. Of course, I could do this the old java way: ...

How do I make a java.io.File into a java.lang.Class to run it?

I have a program that lets a user select any .class or .jar file and run it. The problem is that, to run it, I need to use something other than a java.io.File, which is what a JFileChooser returns. How can I make a java.io.File into a java.lang.Class or java.util.jar.JarFile? ...

Convert .trc TO Pdf/.Doc

i wanna convert .trc files(sql trace files) to PDF or .Doc format , is there any convertor which can accomplish the job? ...

Using colons in ConfigParser Python

According to the documentation: The configuration file consists of sections, led by a [section] header and followed by name: value entries, with continuations in the style of RFC 822 (see section 3.1.1, “LONG HEADER FIELDS”); name=value is also accepted. Python Docs However, writing a config file always use the equal si...

Where is Kohana Version

Anyone knows Which file in Kohana framework contains the version information. Everything I look in the tutorials opposes to what I view in my application (Cannot Update at this moment). ...

Problem - file with a size but no content!?

Hi, today when I working on my site and writing in a .css file suddenly my computer shutdown when I turn it on and open the .css file I working on it was empty but file size of the file was like it is full. How I can restore the content of the file? Please help, I worked on this file almost a week. ...

How to validate the connection string comming from a text file

there is a way by which we parse any time input given by user... here i am taking the input of a connection string from a text file i am supposed to assume that the user who keeps this string in the text file can be trusted. but what if he makes a typo a mistake unknowingly, that will cause the coming code to cause exception, i would...

how to encrypt password before writing to txt file and decrypt when needed to use it

i am storing the connection string provided by the user at setup time to a txt file its a website by setup i mean first access of the admin to the site well its working but i need some code which can encrypt the password text and store to file so any one having access to the system can not understand the passward, also please show ...

tomcat is not taking my jar file in my webapps/myapp/WEB-INF/lib folder.

How do I make my tomcat to load jar files from my webapplication's WEB-INF/lib folder ? ...

Problem with reading file in Python

I have a file: Alus.txt File content: (each name in new line) Margus Mihkel Daniel Mark Juri Victor Marek Nikolai Pavel Kalle Problem: While programm reads this file, there are \n after each name (['Margus\n', 'Mihkel\n', 'Daniel\n', 'Mark\n', 'Juri\n', 'Victor\n', 'Marek\n', 'Nikolai\n...

Java service can't list files in directories

Hello everyone. I'm doing a Windows Service in Java, this service list the files in a directory and write the results in a file. My problem is that when i call Java.File.isDirectory() when the service is running it always results false (It works well when i run the service manually as any other program). Besides, if i try the following: ...