Hi. There are ways to restore files, deleted from the system by default, I'm not sure about the way they work but I guess thet read content, that has not been overwritten. On the other hand, there are programs (e.g. TrueCrypt), that encrypt disks, claiming that it wouldn't be possible to tell apart random data and file contents on such a disk without a password. Therefore I think that files, deleted from such disks can't be restored. Is that correct?
I know one way to find out would be to try it, but there is a possibility, that I would just pick the wrong restoring software. Moreover, I'm more interested in theorethical explanation why it would/wouldn't be possible. Thanks
Hello. Look at the following picture:
This is MS Word 2007, hello/world is an MathType formula and the second one is an image. I want the picture to be treated exactly the same way, specificallty, having it aligned vertically on the same level with text. How can I do that? TIA
Hello. Is it possible to fetch pages with urllib2 through a SOCKS proxy on a one socks server per opener basic? I've seen the solution using setdefaultproxy method, but I need to have different socks in different openers.
Hello, I've downloaded the Python PalmDB lib, but can't find any info on how to use it. I've tried reading docstrings and so far I've been able to come up with the following code:
from pprint import pprint
from PalmDB.PalmDatabase import PalmDatabase
pdb = PalmDatabase()
with open('testdb.pdb','rb') as data:
pdb.fromByteArray(data.read())
pprint(dir(pdb))
pprint(pdb.attributes)
print pdb.__doc__
#print pdb.records
print pdb.records[10].toXML()
which gives me the xml representation of a record (?) with some nasty long payload attribute, which doesn't resemble any kind of human-readable text to me. I just want to read the contents of the pdb file. Is there a guide/tutorial for this library? What would you do to figure out the proper way to make things done in my situation?
Hello. Take a look at this:
WebClient client = new WebClient();
WebRequestSettings wrs = new WebRequestSettings(new URL("http://stackoverflow.com/ping/?what-the-duck?"), HttpMethod.HEAD);
client.getPage(wrs);
Running this code results in throwing FileNotFoundException, because HTTP Status code on the page is 404 and getting the same page again with the GET method, with User-Agent set to Java-.... Why does it GET the page (it doesn't happen with "normal" status codes)? Is this a bug? Thanks
Here is the entire server response:
HTTP/1.1 404 Not Found
Cache-Control: private
Content-Length: 7502
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
Date: Thu, 11 Feb 2010 14:12:11 GMT
Where does it tell client to GET something? And how can I force WebClient to ignore it?
Here's a screenshot of HTTPDebugger:
The problem here is I don't understand why the second request is being sent and why is it sent with different useragent.
Hello. Suppose I have such chunk of a sentence:
(NP
(NP (DT A) (JJ single) (NN page))
(PP (IN in)
(NP (DT a) (NN wiki) (NN website))))
At a certain moment of time I have a reference to (JJ single) and I want to get the NP node binding A single page. If I get it right, that NP is the parent of the node, A and page are its siblings and it has no children (?). When I try to use the .parent() method of a tree, I always get null. The API says that's because the implementation doesn't know how to determine the parent node. Another method of interest is .ancestor(int height, Tree root), but I don't know how to get the root of the node. In both cases, since the parser knows how to indent and group trees, it must know the "parent" tree, right? How can I get it? Thanks
Hello. I've got the following code:
import time
import threading
class BaseWrapper: #static class
lock = threading.Lock()
@staticmethod
def synchronized_def():
BaseWrapper.lock.acquire()
time.sleep(5)
BaseWrapper.lock.release()
def test():
print time.ctime()
if __name__ is '__main__':
for i in xrange(10):
threading.Thread(target = test).start()
I want to have a method synchronized using static lock. However the above code prints the same time ten times, so it isn't really locking. How can I fix it? TIA
Hello. I have a Java app that takes pretty much time to be initialized (so I can't use command-line like interface) and I need to pass text and receive the output of a Java method from Python. Is it possible to load the Java application, have it opened all the time the Python script runs and use a method from that app?
Hello. Let's say there is a sentence:
On March 1, he was born.
Changing it to
He was born on March 1.
doesn't break the sense of the sentence and it is still valid. Shuffling words in any other way would produce weird to invalid sentences. So basically, I'm talking about parts of the sentence, which make the information more specific, but removing them doesn't break the whole sentence. Is there any NLP library in which identifying such parts is available?
Hello. I have some String[] arrays, for example:
['a1', 'a2']
['b1', 'b2', 'b3', 'b4']
['c1']
How can I mix them, so that I get ['a1', 'b1', 'c1', 'a2', 'b2', 'b3', 'b4'] (0 element of a, then b, c, 1 element of a, b, c and so on)? Thanks
Hello, I'm doing a university project, that must gather and combine data on a user provided topic. The problem I've encountered is that Google search results for many terms are polluted with low quality autogenerated pages and if I use them, I can end up with wrong facts. How is it possible to estimate the quality/trustworthiness of a page?
You may think "nah, Google engineers are working on the problem for 10 years and he's asking for a solution", but if you think about it, SE must provide up-to-date content and if it marks a good page as a bad one, users will be dissatisfied. I don't have such limitations, so if the algorithm accidentally marks as bad some good pages, that wouldn't be a problem.
Hello. Say I have a base form of a word and a tag from the Penn Treebank Tag Set. How can I get the conjugated form? For example for "do" and "VBN" how can I get "done"?
Hi. I don't have much experience with C# or VS, but I want to add a property table to a form, like this one:
So that columns are resizable, editable, of different types (e.g. checkbox for boolean) and sortable. How do I do that?
Hi. I intend to make some software to be sold over internet. I've only created open-source before, so I have really no idea of how to protect it from being cracked and distributed as warez. Bearing in mind that I know like two programms that aren't either cracked or not really useful I decided that the only more or less reliable way may look like this:
Connect to a server and provide licensing info and some sort of hardware summary info
If everything is fine, the server returns some crucial missing parts of the program bound to that certain pc along with the usage limit of say 2 days
That crucial stuff is not saved to hard drive, so it is downloaded every time the program starts, if the programm runs more than 2 days, data is downloaded again
If the same info is used from different computers, suspend the customer account
What do you think about this? It may seem a bit to restrictive, but I'd better make less sales at first then eventually see my precious killer app downloaded for free. Anyways, first I need some basic theory/tutorials/guides about how to ensure that user only uses a certain Java app if he has paid for it, so please suggest some.
Thanks
Hello. I'm writing a plugin to Firefox, which is basically a sidebar, that is filled with yaml-formatted information based on what user does on the page (just another web testing solution). I want to enable user to change generated text manually right in the sidebar and:
Add code-folding (folding click: \n text: some text to a single line)
Add highlighting of registered actions (click, fill and so on) and unregistered actions (syntax errors)
How do I do that? Is placing an iframe to the sidebar and trying to do that with html/js the best solution (seen it in a similar one)?
As you may have noticed, I'm a newbie in plugin writing, so please excuse if anything.
Hi. I'm using symfony with doctrine and I make a registration form. Email field is declared unique and if I set it to already existing one, I get the message An object with the same "email" already exist.. I use the following validator:
$this->validatorSchema['email'] = new sfValidatorEmail(array('required' => true), array('invalid' => 'Does not seem to be a proper email'));
How can I change the "already exists" message? Thanks