» Home » Document » Page 1
In MongoDB, why does updating/finding exact documents fail when the document has an embedded document?
by Londo_Jowo in Programming Languages

I'm using pymongo for reference.

So if I have a document like this:

'name': 'bill',
'color': 'blue',
'subdocument': {
'title': 'Untitled',
'content': 'Hello World',

If I find this document doing db.users.find()[0] and then pass it as an argument to update, Mongo will not find

How do I add an XElement to a document, avoiding the “incorrectly structured document” error?
by DougoMan in Programming Languages
// Remove element with ID of 1
var userIds = from user in document.Descendants("Id")
where user.Value == "1"
select user;
// Add element back
var newElement = new XElement("Id", "0",
new XElement("Balanc

Return the most similar document compared to a query document by using Cosine similarity in python
by Thomas Gueze in Coding

I have a set of files and a query doc.My purpose is to return the most similar documents by comparing with query doc for each of the document.To use cosine similarity first i have to map the document strings to vectors.Also i have already created a tf-idf function that calculate for each of the document.

To get the index of the strings i have a function like that ;


Parsing xml (xforms) document with javascript `document.getElementsByTagName` not working in phongap android
by deom2i in Javascript

I am having some trouble parsing xform xml with javascript.

The structure of the root of the xml is:

<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ex="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa">

need to convert SPQuery on a single document library to SPSiteDataQuery on all document libraries in the site
by Javed in Software

I need help converting the following code snippet to use SPSiteDataQuery instead of SPQuery b/c I need to query accross all Document Libraries in the site.

Here's the original code:

using (SPWeb oWeb = new SPSite(properties.SiteId).OpenWeb(properties.RelativeWebUrl))
SPList oList = oWeb.Lists["Quality Documents"];

agent.runWithDocumentContext(document) retrieve document “body” field
by Pug in Web Design

In one of our XPages application we use the class

This we must use instead of bind the XPage directly to the Notes Document, because the user have no direct access to the database which inherit the Document source.
So after the agent was run we get the needed field information from the returned document context and set thi

Issue with uploading document like docx,xlsx to SharePoint document library using FPSE
by Mcad in Programming Languages

I have used FPSE method to upload documents to Document Library in SharePoint 2010. This method successfully uploads document and updates its field values.

But for documents like .docx, .xlsx, it cannot set the value for the Property "ContentType" for these documents.


I have a document library where I have added one custom content type "MyCustDocume

how do I display document-uri as text in an html document from a xslt file in internet explorer?
by Mansur in Programming Languages

I have the following two files. When I try to view the xml document in internet explorer 9 it does not translate using the xslt file.

my xml file

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="xsl.xslt"?>

my xslt file

How to use source document with form as a template for multiple page target document in PDFBox
by YuriyLazarev in Programming Languages

I am using PDFBox 1.2.1 in Java and I am trying to use single page pdf document which has an acro form in it as a template for making multiple page target pdf.

PDDocument sourceDocument = PDDocument.load(fileStream);
PDDocument targetDocument = new PDDocument();
PDDocumentCatalog sourceDocCatalog = sourceDocument.getDocumentCatalog();
PDAcroForm acroFormFromSource

how to detect ,on load of the html document, whether the body of the iframe document is ready to be displayed?
by rpanic in Web Design

Suppose a HTML document has a iframe.
Using javascript,I want to detect ,on load of the html document, whether the body of the iframe document is ready to be displayed.

I want to be able to overwrite the the body contents (before it actullay loads) of the iframe.
Any suggestions? can I do it with jquery?

say if ,HTML doc is


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .