Posts

mongodb - How to write Mongo DB query that compares embedded documents? -

Consider an order document with several line items embedded documents and single specially embedded documents. With any type of linearity to find the order, it works: find ({'lineItems.type': 'food'}) How to find an order At least one LineItem type is not similar to the type of the speciallifetime? In addition, some orders have no lineites. For example, find this document: lineItems: {type: food}, {type: wood} speciallinks: {type: food} but No: line items: {type: food} specialElement: {type: food} or line items: [ ] SpecialElement: {type: food}

smtp - Emails not sending, PHP and SwiftMailer -

Text after " I have my code & lt ;? Php namespace Spika \ controller; Use the Silke \ Application; Use the Syllux \ Controller ProVirus interface; Use Symfony \ Component \ HttpFoundation \ Request; Use Symfony \ Component \ HttpFoundation \ ParameterBag; Class SendPasswordController SpikaBaseController {Public Function Connect (App $ App) {$ controller = $ app ['controllers_factory']; $ Self = $ this; // $$$ = $ request- & gt; Receive ('email'); $ User = $ application ['spikadb'] - & gt; FindUserByEmail ($ email); If (isset ($ user ['_ id'])) {$ user = $ application ['spikadb'] - & gt; FindUserById ($ user ['_ id'], false); $ ResetCode = $ application ['spikadb'] - & gt; AddPassworResetRequest ($ user ['. _ Id']); $ ResetPasswordUrl = ROOT_URL "/ page / resetPassword /" $ resetCode; $ Body = "reset here password {resetpasswordUrl}" here; Try {if (SEND_EMAIL_METHOD == EMA...

javascript - How to mute a looped background video -

I am using a video loop in the background of a div. The idea is to have a video loop in the background of a div on the hover, on the hover, the video will sound. I could not find documents or methods of silence. any idea? I tried to mute adding the lines after the plug-in started - $ ("video"). Prop ('muted', true); $ ("Video"). Ether ('mute', 'mute'); I did not see the volume reference in the document's video. However, in HTML compatible browsers, it can be easily muted by focusing on silence property setting property 0 You can do this on the video elements or on the jQuery cover. $ ('prop (' volume ', 0) $ (' video ') .prop (' mute ', true) In the video elements plugin created by wallpaper, you should set the volume or mute property after which the DOM has been added. It should not be necessary, but the problems In the case you can try setting an event handler for wallpap...

visual c++ - How to output binary stream from c++ console app? -

Is it possible to return the console app to the binary stream instead of text? #include "stdafx.h" int _tmain (int argc, _TCHAR * argv []) {return 0; } How to change this code so that it returns a stream? You can set up binary mode like this, for example. Full results; // set is "binary mode" in stdout: result = _setmode (_fileno (stdout), _O_BINARY); If (result == -1) ("binary mode can not be set for stdout"); Else printf ("stdout mode is now binary");

php - continuation of of Error parsing data org.json.JsonException: Value <!DOCTYPE -

I posted many answers here and on Google and still confused why I am getting this error I made JSN step I have not been allowed to read. I changed permissions to allow everyone and it did not solve the error. I also played my IP address using my computer's IP address 196 ... and online examples of 127.0.0.1 When I use my IP, I get an error. When I used 127.0 then I failed to join the error, which I feel because IP address is not anywhere. I checked my PHP code and this input data in MySQL db. So I know that my problem is in my Java code. I am posting my code below and trying to post the minimum code, so I dump the code. If you want to post more code to me, please tell me try {// check the request method to check if (method.equals ("POST")) {// request method POST / / Default is the HTTP client default HTT Client httpClient = new DefaultHttpClient (); Http post http post = new HTTP post (url); HttpPost.setEntity (new UrlEncodedFormEntity (params)); HttpResponse http...

php - Call_user_func_array() expects parameter 1 to be a valid callback (Event handler system) -

I'm trying to create a system that handles the supply went data and Adhandlr (). Code: class test {public $ arrHandlers = array (); Public function addHandler ($ action, $ function) {$ this- & gt; ArrHandlers [$ action] = $ function; } Public function handle data ($ data) {$ data = explosion ("/", $ data); $ Action = array_shift ($ data); If (isset ($ this-> arrHandlers [$ action])) {call_user_func_array ($ this-> orientation [$ verb], array ($ data)); }}} Function testFunc () {echo fonts ("", fenc_gate_arg ()); } $ Obj = New Test (); $ Data = "egg / me / liked / cheese"; $ Obj- & gt; Edhandler ("eggs", "testfunk"); $ Obj- & gt; HandleData ($ data); What this output is: Warning: call_user_func_array () expects parameter is valid callback 1, an array of on line 13 Is not a string I want it to output: I like cheese working code: class test {public $ arrHandlers = array (); Public functio...

nhibernate - What false/true really mean for IPreInsertEventListeners? -

मुझे हाल ही में पता चला है कि IPreDeleteEventListener , IPreInsertEventListener और IPreUpdateEventListener में NHibernate.Event नामस्थान। हालांकि, यह अभी भी मुझे भ्रमित करता है कि इन घटनाओं को सफल या असफल फाइनल पर या तो क्या लौटाएगा। उदाहरण के लिए, यहां आइएंडे के ब्लॉग आलेख पर एक नज़र डालें: उसके उदाहरण के बाद, कोई भी निम्न के रूप में इंटरफेस: सार्वजनिक वर्ग ऑडिटएव्हेंट लिस्टनर: आईपीआरआईएनएसएटीएस्टएलस्टनर {सार्वजनिक बूल ऑनप्रेइन्सर्ट (ऑनप्रेइन्सर्ट @ एव्हेंट) {var ऑडिट = @ इवेंट। एंटीटी IHaveAuditInformation; अगर (ऑडिट == शून्य) वापसी झूठी; Var समय = दिनांकटाइम.अब; Var नाम = WindowsIdentity.GetCurrent ()। नाम; सेट करें (@ ईवेंट.परसिस्टर, @ इवेंट। स्थान, "बनाया गया", समय); सेट करें (@ ईवेंट.परिस्टर, @ ईवेंट। स्थान, "बनाया गया", नाम); Audit.CreatedAt = समय; Audit.Created By = name; विवरण झूठा है; }} वास्तव में क्या या तो true या false वापस मूल्य के रूप में लौटने का मतलब है, क्योंकि मेरे पास एक और उदाहरण है जहां जो वापस जाने लगता ह...