What I'm trying to do is to create a model called Entities.
I tried to use the console to create my model "Entities" and got this error:
C:\>li3 create model Entities
model could not be created
I'm expecting an Entities.php file to be created in my models folder.
What am I doing wrong here?
The error occurs because I called li3 by putting a PATH environmental variable to the console folder where li3 lives. I think li3 freaks out cuz it can't find the models folder.
Anyway, I added the console folder to my favorites list and shift right-click on it to make cmd go to the console folder directly so I don't have to type the long path name out. Incidentally, I also found out that by typing
li3 create "insert model name here"
the CLI will create the model, controller, and tests automagically. Too bad it doesn't do the view too.
The reason why the Lithium command doesn't create the views for you is mostly because everyone needs their views differently. With the Form helper at hand, it should not be a problem to get up and running quickly - and the Lithium error messages tell you where to start!
Related
I am currently trying to extract property values from my properties file, but am running into some problems. I can't test this in ML query console, because the properties file doesn't exist there. I am currently trying to grab the values of the file like this
let $port := #{#properties["ml.properties-name"]}
I've also looked at
xdmp:document-get-properties(
$uri as xs:string,
$property as xs:QName
however that is limited to .xml files I believe. Does anyone have a way/work-around of accessing these values? I can't seem to find one I've looked at some documentation on Marklogic's website, but can't seem to get anything to work. The way I was accessing before was in ruby, through monkey-patching allowing me to access those private fields.The problem with that is the ruby script I call is only called once, while my .xqy file is ran every minute that sends args to another function. I need to access those args from the properties file, right now I just have them hard-coded in. Any thoughts?
Thanks
You cannot access deployment properties like that, but you can pass them along with deployment. If you create a new REST app with latest Roxy, you should get a copy of this config.xqy added to src/config/:
https://github.com/marklogic-community/roxy/blob/master/deploy/sample/custom-config.xqy
That file is treated specially when deployed to the modules database. Properties references are replaced inside there. In your case, add another variable, and give it a string value following the #ml.xyz pattern:
declare variable $c:port := "#ml.property-name";
You can then import the config lib, and use it in your code.
These so-called Deployer Substitutions are described in more detail on the Roxy wiki:
https://github.com/marklogic-community/roxy/wiki/Deployer-Substitutions
I know it has been asked so many times, but I've gone through dozens of pages, with no luck, since mine seems to be a OS/machine related problem rather then of a specific library.
Trying to manage ID3Tags, or in general, files extended properties, it's clear that with a Shell object you can only retrieve them, but can't edit, therefore the only way to do that is using an external DLL (es. CDDBControl, or DSOfile), I can't get them to work, although I apparently successfully installed them with regsvr32 (references are available i.e. in Excel macro dev env.
I tried many ways....using regsvr32 either under System32 or SysWOW64, trying to put the DLLs in different location....but nothing.
Statement raising the error:
Set id3 = CreateObject("CDDBControl.CddbID3Tag")
Please note that a call like
Set FSO = CreateObject("Scripting.FileSystemObject")
instead, gives no error at all.
I just found the solution....hope this could help someone else....
The only way I made it work is to follow the instructions given in the page:
Setting MP3 ID Tags with CDDBControl.dll
Cheers.
I am doing a website on YII and PostgreSQL. It is recurrently exiting inside $model->validate() method by printing 'test'. I have searched whole code, There is no exit code on controller , model, beforeValidate(), afterValidate(), even whole project.
Question
How can i debug on such scenario. I have only access to ftp, Netbean as IDE, but no localhost. How to find which file is printing exit code or do you have any idea ?
Thank you,
Ram
Messages can be logged by calling either Yii::log or Yii::trace. The difference between these two methods is that the latter logs a message only when the application is in debug mode.
Yii::log($message, $level, $category);
Yii::trace($message, $category);
When logging a message, we need to specify its category and level. Category is a string in the format of xxx.yyy.zzz which resembles to the path alias. For example, if a message is logged in CController, we may use the category system.web.CController. Message level should be one of the following values:
For more details, refer this YII Tutorial
I'm using Mogenerator to help with my Core Data implementation and for the most part it works great. However, sometimes when I add new attributes, build, and run the project, I get the following error whenever I try to access the property:
[MyObject myAttribute]: unrecognized selector sent to instance
After looking into the machine generated class, it looks like Mogenerator creates getters/setters for some of my new attributes but not ALL of them. What am I doing wrong? How can I still get/set these new attributes when Mogenerator doesn't give me access to these methods?
What I've tried:
1. Synthesizing each new attribute in my Human generated file (this gets rid of the errors at least, but doesn't actually save anything to Core Data)
2. Writing a custom getter/setter for each missing attribute in my Human generated file (same results as above)
Okay, I forgot to follow rule #1 of resolving computer problems... delete and re-install.
I'm using BitBucket to host my repository so I just deleted my local copy and cloned the project back to my machine. It runs fine now. I'm calling this issue "closed" for now, but any thoughts on why this would happen?
I posted in the Yii forum with no luck. I am hoping someone in this community got this extension working because I really need it!
I used the yiic docs check command, and all the models seem to finally pass the check. So, I proceeded to executing this command:
yiic docs C:\path to my site\protected\models
And at first this appears onscreen:
Building.. : MyApplication Class Reference
Version... : 1.1.7
Source URL:
And then this error pops up:
Building model...
PHP Error[2]:include<GxActiveRecord.php>: failed to open stream: No such file or directory in file C:\path-to-my-app\yii\framework\YiiBase.php at line 396
Where, at that line, I have the following code:
include($className.'.php');
I don't understand why it is looking for a class I do not have!! I found it here, but I don't know in what specific folder that class should reside, or better yet why I should have to download it separately when it's not specified in the instructions. Thanks.
Looks like you've generated models from giix which have GxActiveRecord as a base class and the doc parser does not find this base class, usually you've defined this as an import in your application config, so this may be an expected behavior.
You could try importing something like 'ext.giix.components.GxActiveRecord' in every one of your model classes or copy GxActiveRecord into your models directory just for generating the docs.