yaml

Symfony 1.4: use relations in fixtures with propel

Hello, I just started to use the PHP symfony framework. Currently I'm trying to create fixture files in YAML to easily insert data into my MySQL database. Now my database has a couple of relations, I have the tables Organisation and Location. Organisation org_id (PK) org_name Location loc_id (PK) org_id (FK) loc_name Now I'm ...

SnakeYAML: How to disable underscore stripping when parsing?

Here's my problem. I have YAML doc that contains the following pair: run_ID: 2010_03_31_101 When this get's parsed at org.yaml.snakeyaml.constructor.SafeConstructor.ConstructYamlInt:159 underscores get stripped and Constructor returns Long 20100331101 instead of unmodified String "2010_03_31_101" that I really need. QUESTION: How ca...

java reading numbers, interpreting as octal, want interpreted as string

hello, i am having an issue, where java is reading an array list from a YAML file of numbers, or strings, and it is interpreting the numbers as octal if it has a leading 0, and no 8-9 digit. is there a way to force java to read the yaml field as a string? code: ArrayList recordrarray = (ArrayList) sect.get("recordnum"); if (recor...

jvyaml, change config options

hi, im not sure how to change the yaml configuration options using the jvyaml class, in particular, i would like to set explicitTypes to true or false. ...

Any YAML based fixture loader for Java?

I've used DbUnit but after playing about with the Play Framework recently I've found it's Fixtures.load(String yamlFilename) really useful. Anyone know of a similar tool that can be used with any Java project? ...

python dictionary conversion from string?

if I've string like "{ partner_name = test_partner}" OR " { partner_name : test_partner } its an example string will be very complex with several special characters included like =, [ , ] , { , } what will be the best way to convert it into a python object - so I can process it I tried with eval but it requires " ' " for string, but...

One to two relationship in Doctrine with YAML

I'm working on my first Symfony project with Doctrine, and I've run into a hitch. I'm trying to express a game with two players. The relationship I want to have is PlayerOne and PlayerTwo each being keyed to an ID in the Users table. This is part of what I've got so far: Game: actAs: { Timestampable:- } columns: id: { type: i...

What file format should I use for my application?

I'm writing an application that manages todo lists. Unlike 'traditional' todo list applications I want users to have these todo list files sit on their filesystem and be visible instead of being magically hidden by the app. I want users to be able to email todo lists to each other and so on. In addition, I later intend to create a web ap...

setting url in yaml file for google app engin (page not found) problem

I am new to python and I am super excited to learn. I am building my first app on app engin and I am not totally understanding why my yaml file is not resolving to the url that I set up. here is the code handlers: - url: .* script: main.py - url: /letmein/.* script: letmein.py so if I go to http://localhost:8080/letmein/ I get ...

What is the correct way to define application-level cascade for many-to-many relationships, using Doctrine/YAML?

Hi, I have this model definition: #/config/doctrine/schema.yml NewsArticle: options: (...) columns: (...) relations: Images: class: Image local: article_id foreign: image_id refClass: ImageToNewsArticle Image: options: (...) columns: (...) relations: NewsArticles: clas...

Can Doctrine 1.2 handle custom data type like geometry data type?

I want to create tables that contain geometry data types (Mysql spatial extension). which steps are needed to map these with Doctrine 1.2? Any idea how is the codes of yaml mapping and corresponding modal class for custom data mapping with Doctrine 1.2? Thanks. ...

Symfony FK Constraint Issue

Hello! So I have a table schema that has users who can be friends. User: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true } email: { type: string(255), notnull: true, unique: true } nickname: { type: string(255), unique: true } password: { type: string(300), notnull: true } image: { ...

Symfony generating database from model

Hello, I am having troubles generating a simple database form model. I am using: Doctrine on Symfony 1.4.4 MySQL Workbench 5.2.16 with Doctrine Export 0.4.2dev So my ERL Model is: http://img708.imageshack.us/img708/1716/tmg.png Genereted YAML file: --- detect_relations: true options: collate: utf8_unicode_ci charset: utf8 t...

Using ActiveRecord::Base.transaction in a rake task?

I am writing a rake task which, at one point, uses a custom YAML file import method to seed the database. The rake task looks like: desc "Seed the database with production/ data." task :production => :environment do import_yaml 'seed/production' end At one point in the import code, I have: ActiveRecord::Base.transaction do ...

"SQLSTATE[23000]: Integrity constraint violation" in Doctrine

Hi, i do get an Integrity constraint violation for Doctrine though i really can't see why. Schema.yml User: columns: id: type: integer primary: true autoincrement: true username: type: varchar(64) notnull: true email: type: varchar(128) notnull: true password: type: var...

custom yaml files not being seen in symfony

Hi, I created a custom yaml handler, myRunnerConfigHandler, and placed it under apps/frontend/lib/myRunnerConfigHandler.class.php and created a new config_handler and placed it under apps/frontend/config/config_handler.yml Now, under config_handler.yml,I placed my configuration for my new rundown: modules/*/config/rundown.yml: ...

is there anything exist to convert xml -> yaml directly?

is there any library or way exist from which I can convert my xml records to yaml format ? ...

Ruby custom class to and from YAML;

Hi. I'm having trouble deserializing a ruby class that I wrote to YAML. Where I want to be I want to be able to pass one object around as a full 'question' which includes the question text, some possible answers (For multi. choice) and the correct answer. One module (The encoder) takes input, builds a 'question' class out of it and app...

Is there a performance gain from defining routes in app.yaml versus one large mapping in a WSGIApplication in AppEngine?

Scenario 1 This involves using one "gateway" route in app.yaml and then choosing the RequestHandler in the WSGIApplication. app.yaml - url: /.* script: main.py main.py from google.appengine.ext import webapp class Page1(webapp.RequestHandler): def get(self): self.response.out.write("Page 1") class Page2(webapp.Reque...

JSON or YAML encoding in GWT/Java on both client and server

I'm looking for a super simple JSON or YAML library (not particularly bothered which one) written in Java, and can be used in both GWT on the client, and in its original Java form on the server. What I'm trying to do is this: I have my models, which are shared between the client and the server, and these are the primary source of data i...