This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $db = $mongoClient->test; | |
| $taskcollection = $db->task_; | |
| $taskDetailscollection = $db->task; | |
| $taskDetailsdocument = array( | |
| "creator" => "testing", | |
| "callable" => "mailer:sendEmail", | |
| "args" => array(), | |
| "kwargs" => new \stdClass()), | |
| "created" => new \MongoDate(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_id" : ObjectId("554b8092d700e9ae098b456e"), | |
| "creator" : "testing", | |
| "callable" : "mailer\nsendEmail", | |
| "args" : [], | |
| "kwargs" : {}, | |
| "created" : ISODate("2015-05-07T15:11:14.705Z"), | |
| "state" : "new", | |
| "owner" : null, | |
| "result" : null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $inputFilter->add($factory->createInput(array( | |
| 'name' => 'cenLat', | |
| 'required' => true, | |
| 'validators' => array( | |
| array( | |
| 'name' => 'NotEmpty', | |
| 'options' => array( | |
| 'messages' => 'YOUR CUSTOM ERROR MESSAGE', | |
| 'type' => array('integer', 'float'), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $inputFilter->add($factory->createInput(array( | |
| 'name' => 'lon', | |
| 'required' => true, | |
| 'validators' => array( | |
| array( | |
| array( | |
| 'name' => 'NotEmpty', | |
| 'options' => array( | |
| 'messages' => 'message' | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Zend\View\Helper\Url; | |
| use Zend\Mvc\Router\Http\TreeRouteStack; | |
| class MyUrl extends Url | |
| { | |
| public function __construct(TreeRouteStack $router) | |
| { | |
| $this->setRouter($router); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Works | |
| $url = $this->getServiceLocator()->get('viewhelpermanager')->get('url'); | |
| $url('something'); | |
| Doesn't work | |
| $this->url = $this->getServiceLocator()->get('viewhelpermanager')->get('url'); | |
| $this->url('something'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //First user created | |
| use admin | |
| db.createUser( | |
| { | |
| user: "admintest", | |
| pwd: "testing", | |
| roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] | |
| } | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error | |
| TypeError: 'Database' object is not callable. If you meant to call the 'disconnect' method on a 'MongoClient' object it is failing because no such method exists. | |
| Error is happening here: | |
| https://github.com/10gen-labs/mongo-connector/blob/master/mongo_connector/connector.py#L282 | |
| CMD: | |
| mongo-connector -m 192.168.56.10:27017 -t 192.168.56.10:9200 -d elastic_doc_manager | |
| Mongo conf: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $this->add(array( | |
| 'name' => 'email', | |
| 'required' => true, | |
| 'validators' => array( | |
| array( | |
| 'name' => 'NotEmpty', | |
| 'options' => array( | |
| 'messages' => array( | |
| \Zend\Validator\NotEmpty::IS_EMPTY => 'Email cannot be empty' | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Boolean agentSuccessfullyUpdated = false; | |
| Integer attempt = 1; | |
| while (agentSuccessfullyUpdated == false) { | |
| try { | |
| dbCollection.update(new BasicDBObject(agentMuw.getQuery()), new BasicDBObject(agentMuw.getModifiers()), agentMuw.isUpsert(), agentMuw.isMultiUpdate()); | |
| agentSuccessfullyUpdated = true; | |
| agentDbObjectForList.put("permalink", permalink); | |
| } catch (Exception ex) { | |
| ex.printStackTrace(); |