I am looking at zfmodules to get a datatable module, and have found the perfect one :
https://github.com/dudapiotr/ZfTable
..however there is very little explanation of how to configure it into an existing project, change the data source etc.
Does anyone have any experience of this module, or is successfully using it in production?
The thing that i understood from Question is " You want to inject this
Module in your current Application ", well i have checked the link [https://github.com/dudapiotr/ZfTable][1] and the module seems perfect to inject to your Application. *The only thing which seems unfitting is the 'data' folder, you should compile
'customer.sql' onto your database, and then remove the folder 'data', since it does not matches to the framework structure
**Try these steps **
*
create your sql database exactly as mentioned in customer.sql
copy this module to your application, with other residing modules (if any).
Add the module name to application.config.php in Application/config/autoload directory ( since you are adding module manually, you must add your module name there by yourself)
And last, Routing configuration of your module in Application/config/module.config.php
if you need any help in routing of step 4, go here [Zend framework not able to route the translated child routes
*
Related
I am using gradle 6.8 and MarkLogic version is 10.0-5.2,
My XQuery code is in directory \ml-gradle\src\main\common. When I run the command mlLoadModules to load XQuery into the modules database it loads with default URI /common/test.xqy.
I want to add some prefix to the URIs e.g. /rsc/common/test.xqy. How can I achieve that?
Note: I don't want to create an extra folder in my source for prefix "rsc".
It's not supported, though you could write a custom Gradle task to change the URI to whatever you like.
Why do you not want to create an "rsc" folder above "common"? I think other developers would find it much more intuitive that "rsc/common/test.xqy" becomes "/rsc/common/test.xqy" when loaded, rather than "common/test.xqy" becomes "rsc/common/test.xqy", which begs the question - where is "rsc" coming from? And then that developer would need to understand what property / custom code is adding that "rsc".
I have a Codeigniter framework setup that I move cross multiple domain setups as a default starting point. However when I was going to apply it for the first time to a one.com domain I got an error.
An Error Was Encountered
Unable to load the requested class: Form
So far I have tried with checking the source for this. I went into the autoload.php and first tried to change from "form" to "Form" as I found out on another site because of Linux being sensitive to capital letters, but to no use.
I then removed the form all together and then I got the same error, but from the helper "url". I removed that and it went up to libraries and started printing same error for the first in that array.
$autoload['libraries'] = array('Database', 'Session', 'User_agent', 'Upload');
$autoload['drivers'] = array('Form', 'Url');
If there is anything more I can add to shine light on this or make the question better please tell me and I will add it. I am not sure at all where the fault might lie so therefore the information is a bit pale.
You are trying to load a CI helper as a driver ! So the framework looks for a driver Form.php file, which doesn't exist (not in the standard CI installation).
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class
What you want to do is to load the "form" helper (and the others). A helper is loaded like: $this->load->helper('form'); or autoloaded.
CI - helper
CI - autoload
CI - driver
Every example I've found creates the database for you and then has you create tables and populate them in code. My problem, though, is that I would like to create and populate the database elsewhere (SQLiteStudio) and then include it in my app.
I sense (through the general feel of ...whatever I've been looking at. We'll call it documentation) that you are supposed to copy the database to the Environment.SpecialFolder.Personal directory. So my workflow is to include the database as a resource and then copy it to the Environment.SpecialFolder.Personal directory. Is that right? Has anyone written any of this down succinctly and authoritatively (as opposed to loose collections of articles)?
I'd prefer not to have two copies of the same database but if that's what everyone else is doing then ...okay.
I have not been able to find an answer on any of the following web pages.
https://github.com/xamarin/recipes/tree/master/Recipes/ios/data/sqlite/create_a_database_with_sqlitenet
https://forums.xamarin.com/discussion/8188/creating-database-with-sqlite-only-once
https://github.com/praeclarum/sqlite-net
https://github.com/praeclarum/sqlite-net/wiki/GettingStarted
https://forums.xamarin.com/discussion/3773/system-environment-specialfolder
https://forums.xamarin.com/discussion/36285/where-do-you-store-your-sqlite-database-in-the-app
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/databases
Since you tagged pcl, have you tried treating this as an embedded resource? You pretty much just make a folder, drop in the database, and set the build action as an embedded resource. You can access the file through your SQLite library by linking up to the path of where the database is.
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/files?tabs=vswin
Im working in a beego application with 2 modules, and has a controller with the same name in both modules.
When I use {{urlfor}} in template the generated url is linking with the other module.
Anybody know if its posible select module name in urlfor function? I search in the docs and cant see any reference about. Im currently use beego 1.4.3
Thanks in advance
For anybody with the same issue:
The problem is how I implemented the application folder structure for modules. It seems not be compatible with {{urlfor}}.
The correct answer come from github: https://github.com/astaxie/beego/issues/1100
In the link you can found the correct directory tree
I am working on a project where I create Two Application hosted in same site.
My structure is given below…
SITE
SYSTEM
APPLICATION
font_end
back_end
Now my question is,is it possible to access model of one application from another application.
As example, I have a model named ‘User_model’ in font_end application. Is it possible to use this model from back_end application.
Thanks.
Yes, it is possible, but there is a but. It doesn't matter where your files are in an absolute sense, but it is not necessarily the easiest thing in the world to accomplish.
Your best bet is to use symlinks if you can and link them into a sub-directory of your models directory. This would be simple and clean.
Barring that, you should extend Loader and overwrite the &model method to look in the secondary directory (perhaps reassign $path to the alternate application's model folder if $path == 'frontend').
If that also isn't an option, loading is done through APPPATH.'models/'.$path . '/' .$model.EXT. This means you can access the model by the relative path to APPPATH.'models/'. Don't do that if you can possibly avoid it, however. It is non-obvious and an invitation to errors.
I tried your last version (error prone I know) and got this result:
Unable to locate the model you have specified: ext.
I used this load code to access the frontend model from my backend:
$this->load->model('APPPATH.'/models/frontend/'Frontend_Model'.'EXT');
apppath and ext constants should be used like variables, but if I put it this way my notepad ++ highlighting goes wrong:
$this->load->model(APPPATH.'/models/hp/'Homepage_Model'.EXT)
admin/application/model/accounts_model.php
application/controller/home.php
Put this code in home.php to use model of admin applicaton
$this->load->model('../../../Unicorn/application/models/accounts_model');