Where does webistrano store custom recipes? - capistrano

I'm trying to figure out where does webistrano keep its custom recipes (I want to copy them), and I can't seem to locate them. I've scoured the installation folder on the server to no avail.
Does anyone know where they are kept?

They were stored in its backend database.

Recipes created inside the admin interface are stored in the database. The recipes table holds the information for the recipe and the revision to be executed on, include the actual code for the current version. The recipe_versions holds a complete copy of each version of the recipe.
The project types (templates) are created inside the repository at lib/webistrano/template/

Related

Upload in Alfresco Repository

I'm new to Alfresco. What i'm trying to do is to upload a file through REST API in a folder that i have created using Alfresco Web Administration Interface. I have a few problems:
1) I can see a set of folders, but how are them managed by Alfresco? As far as i know, those folders doesn't really exists physically, they are virtual. How does Alfresco manage the folders structure and files?
2) I have seen many examples on the _REST API use to upload a file. Anyway, the destination is set by something like this
workspace://SpacesStore/aae3b33fd-23d4-4091-ae64-44a8e332091341
I can't understand: What exactly is a SpaceStore? And, does the last-part-code refers to a specific folder? How can i get those codes relative to the folder i see in the Alfresco Web Admin Interface?
1) I can see a set of folders, but how are them managed by Alfresco?
As far as i know, those folders doesn't really exists physically, they
are virtual. How does Alfresco manage the folders structure and files?
Alfresco is an implementation of the Java Content Repository (JCR), this means that all the contents are managed using a logic structure similar to a graph of nodes. Storing and manipolating content must be done using the repository API, that's why you don't see anything at a storage level.
Each content in Alfresco is a node connected to at least another node: the parent.
The storage of Alfresco is based on two components:
File system for storing binaries and search indexes
Database for storing the backup of metadata and associations
The way how Alfresco stores contents is not important for you because you typically want to access using the Alfresco API. You can create your own logic structure in the repository using any type of folders tree and content associations.
2) I have seen many examples on the _REST API use to upload a file.
Anyway, the destination is set by something like this
workspace://SpacesStore/aae3b33fd-23d4-4091-ae64-44a8e332091341 I
can't understand: What exactly is a SpaceStore? And, does the
last-part-code refers to a specific folder?
A repository typically consists of a set of JCR workspaces, the SpacesStore is one of the workspaces in Alfresco and it is the logic partition of contents in their latest version.
Alfresco also contains other workspaces:
userStore: contains person nodes
archiveStore: contains removed nodes
version2Store: contains the version history of nodes
How can i get those codes relative to the folder i see in the Alfresco
Web Admin Interface?
That code is the node reference that is the unique identifier for each node in the repository and as you can see it consists of three parts:
workspace: the store protocol
SpacesStore: the store identifier
uuid: the UUID related to the node
The store reference consists of the store protocol appended with the store identifier and it is the identifier of the workspace where the node lives. The UUID specify the content inside the workspace.
These node references are the ID for nodes and you can see all these informations using the Node Browser inside the Alfresco Explorer | Administration Console trying to navigate your repository starting from the Company Home.
Hope this helps.

Informatica Metadata Exchange (MX) Views show the object deleted

I used the PowerCenter Metadata Exchange to query.
There is a view REP_ALL_SOURCES who can provides a list of the latest version of sources defined in each folder of a repository.
But when i used this view, i find that it shows the sources deleted too. I did't find the field who can filter the object deleted. so for REP_ALL_MAPPINGS, REP_LOAD_SESSIONS are the same.
who can please tell me how to show the object only exist?
Best wishes,
Zhixin

Creating a Subfolder in pre-existing folder: SharePoint Designer

I have been working with SharePoint Designer, and have been creating workflows, but cannot seem to find a way to create a folder inside of another folder that already exists. Now, I have no problem creating a folder and then creating another one inside of it, but I need to be able to add the subfolder to a pre-existing folder. Can anyone help. I am using SharePoint Designer 2010. I keep getting the error that it could not create the list item and to make sure the list exists and the user has permissions to the list. I am the owner with all permissions and the list does exist. I can give you more details if you have specific questions. I have tried referencing the data several different ways, starting with the way in which I referenced it to create a folder and subfolder, but am having no luck. Please help.
Have you tried including the existing folder name? See this blog post for details: http://www.getinthesky.com/2012/08/creating-folders-and-sub-folders-using-sharepoint-2010-designer-workflow/
It involves creating the folder and subfolder in the same workflow, however, the parent folder must be created first anyway.

How do I edit files in place that were uploaded to Moodle?

I would like a better workflow for debugging uploaded SCOs. As things are, I must edit a file in the activity, repackage, upload, and test. Often, I just need to change a single line of code. It would be VERY nice to be able to edit that file, that line of code, on the server. So far, all I've found is that Moodle manages the files, so it seems impractical to locate and decipher the renamed files after upload.
Is there a way to configure Moodle so that it doesn't rename and relocated files in SCOs upon extraction? Actually, I'm open to any suggestions on the best, fastest workflow for debugging SCOs.
Problem background
Since Moodle 2.0, files are no longer stored on server in the conventional /this/is/the/path/to/my.file way. Instead, files are rehashed and stored in Repositories (i.e. spread all over the moodledata folder as a collection of seemingly random data). This increases security and cross-OS compatibility but complicates stuff for people who would like to simply upload a SCORM zip package via FTP. Here's more information on file handling in Moodle 2.0
Path to the soluton
Let's locate the file you want to update, then update it.
Run phpmyadmin, go to mdl_files table, find your file by name in the filename field (let's say it's portrait.jpg)
Look at the contenthash field, it'll look like abcde1234567890. This means your file is stored in moodledata/filedir/ab/cd/ folder under the name abcde1234567890.
Rename the updated portrait.jpg to abcde1234567890, upload and overwrite.
Go back to phpmyadmin and update the filesize field in record for portrait.jpg with the size of the updated file.
Obviously, this process can be automated. You'll have to write a script that allows you to upload a file, then it'll search for that file in mdl_files, save it to the correct folder and update all fields accordingly.
Alternative idea
Enable external package type (and also enable 'Update on every launch'). Go to Site administration / Plugins / Activities / SCORM and check the box down below. Now you'll be able to launch SCORM packages directly from another server, so Moodle won't mess with it. Of course, you can run in other (probably cross-domain related) problems.
Sergey's answer is very good, with one caveat:
In his example with the contenthash of abcde1234567890, the file is stored in the moodledata/filedir/ab/cd/ folder under the name abcde1234567890. Moodle uses the full contenthash to name the file.

How to dynamically create a sqlite3 database on the iPhone?

I would like to know if it is possible to create the file of a database by programming?
Actually I need to create a database if it does not exist.
I'll assume you have your own valid reasons for using sqlite3 directly rather than Core Data. There are certainly cases where it's appropriate.
The sqlite_3_open() function will create the database if it doesn't already exist. The sqlite3_open_v2() function will create the database if you pass SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE in the flags parameter. See the documentation for more details.
Of course on iPhone you'll need to make sure you're creating the database in a read-write directory such as the app's Documents directory, as opposed to the Resources directory, which is read-only.
In practice I've never tried building a database from the ground up on the iPhone. I always found it simpler to just include an empty DB file with the schema pre-built as an application resource, and then copy the file to the Documents directory the first time the app is run.
Are you sure that you need to create the database file directly? Maybe you should check out the Core Data Framework.
Thanks for your answers, I have never used Core Data so I will have a look on this.
For the moment I also copy a DB file from the Resource directory to the Documents but I would like to create a static library which can be used by many persons. So I would give a minimum of files to add to their project. That's the reason.