Posts

C# show custom error from Oracle procedure -

प्रक्रिया को नोजज_विक्समाई बनाते हैं या बदलते हैं (वोटोटोजस नंबर, गुंजा नंबर, किकिस संख्या, चरखी VARCHAR2, टिप varchar2, error_msg आउट Varchar2) veiksmai मानों (vt_id_seq.nextval, vartotojas, knyga, kiekis, tipas, sysdate, TO_DATE (grazinta, 'YYYY-MM-DD')) में डालने शुरू हो रहा है; अपवाद तब होता है जब अन्य त्रुटि_एमएसg: = 'इन्सर्ट आईवक्को क्लैडा'; समाप्त; यह प्रक्रिया है जिसे कस्टम त्रुटि को प्रोग्राम में वापस करना होगा। सी # कोड: ओराकल कॉमांड सीएमडी = नया ऑरेकल कॉमांड (); cmd.Connection = conn; सीएमडी। कॉमांड टेक्स्ट = "नौजस_विईक्समाई"; cmd.CommandType = CommandType.StoredProcedure; ओडीबीपी पैरामीटर परम = नया ओडीबीपी पैरामीटर (); Cmd.Parameters.Add ("Vartotojas", OracleType.Number) .Value = vartotojas; cmd.Parameters.Add ("knyga", OracleType.Number)। मूल्य = knyga; Cmd.Parameters.Add ("kiekis", OracleType.Number)। Value = kiekis; Cmd.Parameters.Add ("grazinta", OracleType.VarChar) .Value = grazinti; cmd.Par...

php - Codeigniter URL redirection and routing -

I am trying to redirect URL with codicular routing. I can not write writing for the following If the URL comes with / api / some / some then I'll call it api / some / some , otherwise I can copy the URL to / I want to redirect to home / index . That means if a URL starts with api / , then I do not want other intelligent users to change that URL, because I want it to be the default controller home / index which tries to map the codeinator URL routing. $ route ['API / (: any)'] = 'API / (: any)'; $ Route ['(: any)'] = 'home / index' '; I'm trying with codeigniter URL routing technology but I am not able to get it. Does the URL redirect to the codeigner level with the compression server side redirection or is there a better way to do this? Solution 1. Using Codeigner Routing View it in your application / config / routes.php $ route ['API / (: any)'] = "API / $ 1"; $ Route ['(: any)...

How to arrange the outputs of an array in ascending order using C++ -

Hello I am new to programming and currently try to get program output to show in ascending To get caught in the order , int foo [10]; For (int i = 0; i I am stuck in trying to display it in ascending order, I tried different methods but my luck fails. I have asked many examples for this question. But unfortunately for me, I am only limited in answering this in C ++, no one can help. If your assignment allows you to use standard algorithms, then this is just std :: sort (std :: begin (foo), std :: end (foo)); > div>

c# - Updating Winform ListView control by one event handler that may be fired from several threads -

I have a "Win Form" application that listens to an event that can be picked up with some different threads. On that event, I want to update the "List View" control. Of course I might need to use an incognito but I have a question: should I use the lock on the function? Will not I update the "List View" control or not? Be a pot that I am updating the list view as a single function and with the same event, but more than one thread can increase the same phenomenon. Is it true that all events can be removed from all threads handled by the main thread so that they will be executed one by one? Thank you. If you think that the event can be removed from many threads at the same time, or If at least after the update is completed, then you should lock. / p> Something like this: lock (myListView) {updateMyListView (); } Should be enough lock on the list view object will still allow you to edit it. A word of warning, this will not keep oth...

zend framework2 - ZF2 Error trying to use ZfcUser\Service\User::register method to register User from another controller -

I want to register a user using ZfcUser and I want to add the database to the model in one format. So I increased the registration form and validated the data by postdata in different ways, like this: Namespace App \ Controller; Zend \ Mvc \ Controller \ AbstractActionController; Use Zend \ Form; Use Zend \ View \ Model \ ViewModel; Use the application \ model \ writer; Application \ form \ AuthorForm; Application \ form \ Author2Form; Use the ZfcUser \ Service \ user as a user service; Category Admin Controller AbstractActionController {Protected $ authorTable; Protected $ registerForm; Protected $ userService; Public function author () ($ author = new author); $ form = $ this-> getRegisterForm (); $ formRegister = $ this-> getServiceLocator () - & gt; receive ('zfcuser_register_form') ; $ formAuthor = New Author2Form (); $ request = $ this-> getRequest (); $ service = $ this- & gt; getUserService (); if ($ request-> ispost ()) {$ post $ request- ...

c# - How to Open Powerpoint file in Browser using asp.net -

I just want to open the Powerpoint file in the browser (Google Chrome). I am using this code, but this code only saves the file directly. I want to open the Chrome file in the browser where all the slides can be viewed. Here is my code string filePath = Server.MapPath ("~ / attachments / Sample.ppt"); FileInfo file = new FileInfo (filePath); If (file.Exists) {Response.ClearContent (); Response.AddHeader ("content-displacement", "file name =" + file name); Response.AddHeader ("content-length", file-length.tostring ()); Response.ContentType = "app / vnd.ms-powerpoint"; file.IsReadOnly = True; Response.TransmitFile (file.FullName); Response.End (); } But this code is saving the file directly, but not directly showing the slide of the PowerPoint file in the browser (Google Chrome) Thanks in advance ... response. Transmission file is to send a file as a download for the user. What are you doing to do this? If you want...

bash - Git Confirm Before Commit -

Is there a way to configure the gat to warn me before or after being done locally? For example, when I (ideally before), I get some type of output like "did you check settings twice?" Alternatively, can I script it from script? I was looking around, but I did not get much on the subject .. Thanks advance! Pre-committed hooks should give you the opportunity to do whatever you want. View. Example script contains good documents.