Questions tagged [documents]
293 questions
51
votes
13 answers
Creating Microsoft Word (.docx) documents in Ruby
Is there an easy way to create Word documents (.docx) in a Ruby application? Actually, in my case it's a Rails application served from a Linux server.
A gem similar to Prawn but for DOCX instead of PDF would be great!

Javier
- 2,491
- 4
- 36
- 57
20
votes
7 answers
Delete documents of type in Elasticsearch
I want to delete all the documents indexed within a type in Elasticsearch, using the HTTP/REST api, but I don't want to delete the mapping for this type
How can I build the query in the URL to do this?

user2816801
- 205
- 1
- 2
- 7
19
votes
13 answers
Recommended location for document storage - in database or elsewhere?
Background:
We have an in house document storage system that was implemented long ago. For whatever reason, using the database as the storage mechanism for the documents was chosen.
My question is this:
What is the best practice for storing…

Mike Ohlsen
- 1,900
- 12
- 21
18
votes
2 answers
Getting an iOS application's "~/Library" path reliably
This Apple tech note:
http://developer.apple.com/library/ios/#qa/qa2010/qa1699.html
suggests storing "internal" user documents in a subdirectory off of ~/Library. But I can't find one of the pre-created search domains that would get me this. What's…

Ben Zotto
- 70,108
- 23
- 141
- 204
17
votes
1 answer
Replacing embedded document in array in MongoDB
Is there an easy way to replace an entire embedded document in an array?
Say replacing:
{
"_id" : "2",
"name" : "name2",
"xyz..." : "xyz2..."
}
with:
{
"_id" : "2",
"name" : "name6",
"xyz..." : "xyz5..."
…

Fredrik L
- 1,790
- 4
- 21
- 28
16
votes
2 answers
How to save files in External Storage Public Directory DOCUMENTS on Android 4.1.2
i want to save a file on my Android 4.1.2 smartphone in the documents directory.
This code snippet:
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS),"test.txt");
throws this…

pebbles
- 356
- 1
- 3
- 19
13
votes
4 answers
Proper method to find user's My Documents folder on Windows with Java?
For whatever reason, I sometimes need to find the current user's My Documents folder on Windows in a Java program to read some files. But as far as I can tell, there is no way to do it that isn't severely flawed.
The first wrong way:…

Aleksei Vasiliev
- 221
- 1
- 3
- 6
13
votes
1 answer
PhoneGap iOS, how to get app "Documents" folder full path?
I need copy photo into this path. but how to get it?
“iPhone Simulator/5.1/Applications/996C42CE-B8BF-4F1A-B16C-DBF194BD5A71/Documents/"
http://docs.phonegap.com/en/1.8.0/cordova_file_file.md.html#FileTransfer
I want to download a image into my…

meadlai
- 895
- 1
- 9
- 22
12
votes
1 answer
iTunes Documents Directory in my app
how can I setup my app to accept documents via iTunes, like the Air Sharing or VLC app?
I mean, I want to allow users to get content from the app using iTunes.
Anyone know how?
Thanks

Jerem
- 123
- 1
- 4
11
votes
1 answer
Objective C documents directory keeps changing on device
I've been developing for iOS since the beginning and I've run into some trouble. I started making an app that needs to create files and save them to the documents folder and application support, however the good ol' standard way of using the…

Hayden
- 113
- 1
- 5
10
votes
1 answer
MongoDB - How to query Embedded Documents from a collection
Gurus - I'm stuck in a situation that I can't figure out how I can query from the following collection "users", it has 2 embedded documents "signup" and "activity":
{
"appid": 2,
"userid": 404915,
"signup": {
"dt": "2010-12-28",
…

Syed Kamran Haider
- 125
- 1
- 10
10
votes
2 answers
R text mining documents from CSV file (one row per doc)
I am trying to work with the tm package in R, and have a CSV file of customer feedback with each line being a different instance of feedback. I want to import all the content of this feedback into a corpus but I want each line to be a different…

user2407054
- 113
- 1
- 1
- 4
9
votes
1 answer
Mongo: How do I insert another subdocument to an existing document
I've started to learn Mongo. Given the following collection, say called posts, how would I go about inserting a new comment to an already existing document? The examples I've seen on the mongo website are for "simple" collections. Thanks for the…

Harvester316
- 381
- 1
- 8
- 17
9
votes
3 answers
Ruby YAML Multiple Documents
Here is my YAML file, 'test.yml':
---
alpha: 100.0
beta: 200.0
gama: 300.0
--- 3
...
The first document is a hash.
The second document is an integer.
I am trying to load these to a Ruby program as a hash and an integer.
Here is my current…

labelcd6
- 119
- 1
- 5
9
votes
2 answers
What is a good MongoDB document structure for most efficient querying of user followers/followees?
I've been wondering about the ideal document structure for maximum query efficiency for various situations and there's one I want to ask about. It's really borne out of me not really knowing how MongoDB behaves in memory in this specific kind of…

tdous
- 1,599
- 2
- 14
- 19