Posts

Showing posts from June, 2015

apdu - ScardTransmit always returning error 16 -

I have been trying to create an application in the window using the Winscard Library to communicate with a contactless Smart Card Reader I am I am able to connect to the device, but when I try to send some data using scardtransmit, I receive an error 16. I have attached the piece of code I am using below SCARD_IO_REQUEST pioSendPci = * SCARD_PCI_T1; // SCARD_IO_REQUEST pioSendPci = * SCARD_PCI_RAW; DWORD dwRecvLength; Bytes PBRK Bubfer [258]; Byte CMD 1 [260]; CMD 1 [0] = 0xA0; CMD 1 [1] = 0x0d; CMD 1 [2] = 0x01; CMD 1 [3] = 0x00; CMD 1 [4] = 0x01; Eulong Sendbuffen = 0x05; DwRecvLength = sizeof (pbRecvBuffer); RV2 = Skarttranimit (HCard, and POSendPC, CMD1, SSBflan, Faucet, PBRKB Buffer, and Dwreckil Langh); The command you are trying to send does not look like a valid APIU is. This form is in a valid ADU (see ISO / IEC 7816-4) (except extended length epidu): + -------- + - ------ + -------- + -------- + -------- + ---------- + --- - --- + | CLA | INS | P1 | P2. [LC]...

java - Need to implement a Distributed Hash table for P2P -

मुझे सामग्री एड्रेसेबल नेटवर्क (सीएएन) पी 2 पी डिस्ट्रीब्यूटेड हैश तालिका को ज्यादातर आरएमआई का उपयोग करना है। मुझे नेटवर्क पर साथियों द्वारा अपलोड की गई फ़ाइलों के लिए एक तंत्र को देखने के लिए इसका उपयोग करना होगा। होश तालिका वितरित करने के तरीके के बारे में मुझे क्या कोई मार्गदर्शन कर सकता है? आपका प्रश्न काफी व्यापक है मुझे एक भाग पर ध्यान केंद्रित करने की कोशिश करें: वहाँ कई अलग अलग DHT (वितरित हैश तालिका) एल्गोरिदम हैं। मुझे लगता है कि सबसे सामान्य एक तार है एक बार जब आप समझते हैं कि यह कैसे काम करता है, तो इसे जावा में आरएमआई के साथ कार्यान्वित करना सिर्फ एक विस्तार है। आप पर आवश्यक psuedo कोड और साथ ही दो विशिष्ट जावा कार्यान्वयन के संदर्भ मिल सकते हैं - और मुझे आशा है कि यह आपको एक अच्छी परिचय दे सकता है, आप जावा में तार कैसे कार्यान्वित कर सकते हैं मैंने यह भी पाया है कि ओपन कॉर्ड में एक आरएमआई पैकेज है, इसलिए शायद वे आरएमआई के शीर्ष पर चलने का समर्थन करते हैं।

android - How to prevent custom dialog from popping twice in asynctask onPostExecute? -

I am using a custom dialog in the onpostexecute method in asyncTask, it is being popped twice when a user When the button clicks, the dialog should be closed, it works fine. Is anyone being called this twice but some light can be highlighted? @Override Secure Zero PostExecute (zero result) {super.onPostExecute (Results); If (pDialog! = Null) {pDialog.dismiss (); } Try {if (responseFromServer.contains ("x")) // // password to create the last dialog dialog pop up = new interface (getActivity ()); Dialog.setContentView (R.layout.dialog_password); Dialog.setTitle ("title ..."); Dialog.setCancelable (incorrect); Last TextView Atpassword = (TextView) Dialog.Findvibaid (RID.password_dialog); Last button btnpassword = (button) dialog. FindViewById (R.id.btnsavepassword_dialog); Btnpassword.setOnClickListener {@Override Click Public Zero (see V) {if (etpassword.getText (). ToString (). Length () == 0} {toast.makeText (getActivity (), "password" Enter ...

asp.net mvc - CSS how to align elements -

Image
I have shopping cart icons and cart links, that I have other links (register and log) on ​​my menu, but I Not very good with CSS. Does anybody know how to do this? See my picture ... Code: & lt; Ul class = "nav navbar-nav navbar-right" & gt; & Lt; Li & gt; & Lt; Period & gt; & Lt; I class = "FA-shopping cart" & gt; & Lt; / I & gt; & Amp; Nbsp; @ {Html.RenderAction ("CartSummary", "ShoppingCart");} & lt; / Span & gt; & Lt; / Li & gt; & Lt; Li & gt; @HTMLconnect ("register", "register", "account", root value: empty, html, elevates: new {id = "registerLink"}) & lt; / Li & gt; & Lt; Li & gt; @HTMLconnected ("login", "login", "account", root value: empty, html elevates: new {id = "login link"}) & lt; / Li & gt; & Lt; / Ul & gt; Try your li item a Line-...

Override Checkout complete page in drupal commerce -

I want to change the contents of the checkout full page in Droop Commerce, but I do not know where to change. This is not able to find hook_form_alter, someone guide me and help me update the contents of the checkout page. The page where it says your order number is XYZ .... Even I too had faced similar problem. The easiest way to overcome this is to create a new checkout page according to your needs; Use the Rule Module to redirect to that page. Hope this helps you

google maps - Average Lng/Lat NaN Issues -

I am an amateur programmer and I have to work on a project using the Google Maps API. Short story short, I am trying to create a variable with the average latitude of the number of digits and the latitude. I am at this point that I have an array of LNG / LIT coordinates, but I am struggling to convert them into a format which I can use as an input for a Google Maps LatLng method. I have now referred to such questions for a month, and many other websites, but I am not able to understand or implement a solution. I think I can not find simple stuff, but I am beaten against it for a month and I am not getting anywhere. Any advice or assistance with this will be appreciated. // Streetser = document on Google Maps API scripts.getElementsByName ("street"); Var cityarray = document.getElementsByName ("city"); Var Geododer; Var map; Various results; Var maparre = new array (); Var avgLat; Var avgLng; Start the function () {geocoder = new google.maps.Geocoder (); Var lat...

how to connect sql server using window auth using clojure? -

I know how to use sql auth but how to use windows ath? (Use 'clojure.java.jdbc) (' [clojure.java.jdbc: as j]) is required (def db {: classname "com.microsoft .jdbc. Sqlserver.SQLServerDriver ": subprotocol" sqlserver ": nickname" // localhost; database = test; user = sa; password = sa "}) ? reference: class = "text" itemprop = "text"> what amount : nickname "// localhost; database = test; integrated security = true;

html - How to prevent Chrome (desktop) from activating portrait orientation with media selector? -

I have defined the following media selector in my CSS file: @ media screen And Firefox (on desktop) Internet Explorer ( Desktop version of Chrome (v32 in my case) Switching from landscape to portrait when the browser window is fixed The width is changed below. I was under the impression that desktop browsers were always the scenario ... Is there any way to stop Chrome from doing so? The orientation could be determined by height, for the width when the window width height , orientation will be considered as a picture. Forcing you to detect deviceorientation accurately. This demo shows the change of the landscape to portrait by using CSS orientation when the window height is greater than its width

iphone - How Do We Receive a Notification from Server When there is a Update in the Database in ios -

I'm new to notifications in iOS, my work is to receive notifications from the server, whenever there was an update in the database is. I searched it for one and implemented Location Notification in IOS. Did anything give me some steps to get notifications from the server? 1) You have to make the code from your server For Push Notification: Token for the device in which you want to receive notifications Your Push Notification Certificate from the developer. Apple.com site p12 The file that you generated for your special app (you can export the P12 file with a keychain by selecting your special app push notification certificate. 2) Enable your app to receive confirmation confirmation by using: - (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary *) launchOptions {[UIApplication Shared Application] RegisterForreremote Notification Type: (UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; Yes come back }...

How to center a row with images(Top/bottom)..Bootstrap-3 -

I am trying to align images inside a div line (with background image). To align images (left-> right) I am using offset but now my row appears above the container and now if I put margin-top in line then it works for desktop But mobile / tablet affects responsiveness. A container can help me align the row inside. & lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Img src = "picture / blueprint.png" class = "img-responsive" id = "book-img" /> & Lt; Div class = "colonel-LG-4 black-MD-4 call-SM-4 pen-xs-4" & gt; & Lt; Img src = "picture / blueprint_logo1.png" class = "img-responsive" /> & Lt; / Div & gt; & Lt; Div class = "colonel-LG-4 black-MD-4 call-SM-4 pen-xs-4" & gt; & Lt; Img src = "picture / blueprint_logo2.png" class = "img-responsive" /> & Lt; / Div & gt; & Lt; Div clas...

cv2.cv module not found in OpenCV for Python -

I am trying to use some constants in the cv2.cv module: Fps = videoCapture.get (cv2.cv.CV_CAP_PROP_FPS) However, the cv2.cv module is not present and I can not import it in any other way. What can I do about it? if OpenCV 2.4.8 - is true. The Cv2.cv module is no longer available. The constant you are looking for is: cv2.CAP_PROP_FPS

c# - adding hyperlink between the label in asp.net -

I want to display the message within the label with the code back. My code looks like lblmsg.Text = "success: you & lt; / a & gt;" in your shopping cart; + Pujanam + "& lt; a href =" ShoppingCart.aspx "& gt;; Here the" Pujan "is being removed from the database which is coming correctly And secondly I want to include the "shopping cart" text which is a hyperlink to another page, but I am getting the error. I would be happy if someone guides me Thankyou You can try that it is working for me. lblmsg.Text = "success: you Your shop C Cart & quot; + Pujanam +

c# - How to Combine WIX Setup Project with WIX Bootstrapper Project -

I have a WIX setup project that includes my custom UI and a WIX bootstrap project, in which the pre-exite Includes prerequisite / dependency MSI of my projects I want to combine them to create a single exe If I refer to my WIX setup project in Bootstrap project then it does not display my WIX UI Ia though it is able to successfully establish my setup MSI and prerequisites. & lt; Bundle name = "bootstrapper 1" version = "1.0.0.0" manufacturer = "Microsoft" upgrade code = "4056d930-16b2-44eb-a861-16db566ae44c" & gt; & Lt; BootstrapperApplicationRef ID = "WixStandardBootstrapperApplication.RtfLicense" /> & Lt; Chain & gt; & Lt; PackageGroupRef id = "Y" /> & Lt; MsiPackage SourceFile = "$ (var.BiodentifySetUp.TargetPath)" compressed = "yes" /> & Lt; / Chain & gt; & Lt; / Bundle & gt; & Lt; Piece & gt; & Lt; Package Group ID = "Y" ...

mysql - How to use two primary keys into one foreign key? -

mysql & gt; CREATE TABLE मेहमान (- & gt; आईडी पूर्णांक (11) नहीं NULL AUTO_INCREMENT, - & gt; first_name varchar (55) डिफ़ॉल्ट शून्य, - & gt; last_name varchar (55) डिफ़ॉल्ट शून्य, - & gt; ईमेल varchar (100) डिफ़ॉल्ट शून्य, - & gt; role_type पूर्णांक (4) डिफ़ॉल्ट 4, - & gt; प्रारंभ_तिथि तिथि, - & gt; EXPIRY_DATE तिथि, - & gt; कारण ब्लॉब, - & gt; added_by पूर्णांक (4) नहीं NULL दें संदर्भ super_admins (आईडी), - & gt; password_digest varchar ( 255) डिफ़ॉल्ट शून्य, - & gt; remember_token तारीख डिफ़ॉल्ट शून्य, - & gt; प्राथमिक कुंजी (आईडी), - & gt; बाधा विदेशी कुँजी (added_by) दें संदर्भ super_admins (आईडी), fk_guests - & gt; fk_guests1 विदेशी कुँजी (added_by) दें संदर्भ व्यवस्थापक बाधा (आईडी) - & gt;); इसे पॉलीमॉर्फिक रिलेशनशिप (एसोसिएशन) कहा जाता है। और आपके पास एक कॉलम नहीं हो सकता ( जोड़ दिया गया है आपके मामले में) जो एक साथ दो मूल तालिकाओं का संदर्भ देता है लेकिन आप विदेशी कुंजी बाधाओं का उपयोग करने के लिए क्...

php - Subtract minutes from date using strtotime -

मेरे पास वर्तमान दिनांक प्रारूप है $ date = 'yyyy-mm-dd hh: mm' और ध्यान दें कि $ date पहले से ही निर्धारित है और दिनांक वर्ग का उपयोग नहीं कर रहा है। मैं समझता हूं कि मुझे strtotime का उपयोग करना होगा जो मैंने अपने $ date $ datestr = strtotime ($ date) के लिए किया है मैं निर्धारित समय में 5 मिनट घटाना चाहता हूं। मैंने यह साधारण चीज़ की कोशिश की है $ A = strtotime ($ date) - strtotime ('- 5 min'); लेकिन यह मेरी सहायता नहीं करता है। यह 5 सेकंड्स को घटाना सरल है $ time = strtotime ($ तारीख) ); $ Time_new = $ time- (5 * 60); // वर्तमान $ समय से -5 मिनट का समय होगा उदाहरण $ date = date ('dmy G: i: s ए '); // वर्तमान तिथि प्रतिध्वनि $ तारीख। "& Lt; br / & gt;"; // आउटपुट: 17-फरवरी 2014 8:35:58 पूर्वाह्न $ समय = स्ट्रॉटोम ($ तारीख); // चालू दिनांक को टाइमस्टैम्प में परिवर्तित करें $ time_new = $ time - (5 * 60); // चालू समय से 5 मिनट घटाएं। $ Date_new = दिनांक ('डी-एम-वाई जी: आई: ए ए', $ टाइम_एनयू); // ...

c# - Error Collection was modified; enumeration operation may not execute. How can I DataBind after selected value on CheckListbox? -

I have the following code to select the first list item in the next list item or checklistback: var calculation = cancel Cancel cancel; Forex Currency (chkListRate.Items in ITM item) {chkListRate.DataBind (); & Gt; & Gt; & Gt; Error archive was modified; Calculation work can not be executed. Var Cancel = converter heller. In & lt; Int & gt; (Item.Value); item. Selected = count. Any (i => i.CancellationId.Equals (Cancel)); } How can I bind data after the selected value on CheckListbox? In the form of an error message, you can calculate ( foreach ) during a Can not modify archive. So delete and insert is not allowed. checkbox list. Datetime is therefore amending the error But it is not clear what you are actually trying to do. You are listed on everything that looks useless, is not it? So my hygiene chkListRate.DataBind (); To remove from loop: (chkListRate.Items in the list item item) {var cancel = ConverterHelper.To & lt; Integer & ...

c# - How to avoid the use of Subjects in RX -

So I keep reading everywhere that the use of the subject is "bad" And I agree with the logic. However, I'm trying the best way to avoid using it and is an example. At the moment, I have my abstract configuration class which contains a protected save () method that is said to be continuing when a property changes. This message can be found on the topic T & gt; Pumps a message to IObservable & lt; T & gt; comes out through the interface, which listens to serialization service class and performs serials. At this time it was the most obvious, simple and fast way to implement it. So, what would be the RX method of doing this without using a subject? Can I expose an incident instead and use it to use Observable.FromEventPattern () ? - As it seems to be a much more complicated way to go about it. It is not used by subject & lt; T & gt; is bad - there should be a way to "enter madad" - this is the educational way to say ...

c# - GridView100% Browser Width with horizontal scoll -

& lt; div शैली = "ऊंचाई: 400px; चौड़ाई 100%; अतिप्रवाह: स्क्रॉल;" & gt; & LT; GridView & gt; & Lt; / GridView & gt; & Lt; / div & gt; मैं ऊपर कोड का उपयोग कर रहा हूँ मैं चाहता हूं कि ग्रिडव्यू ब्राउज़र की चौड़ाई हो, लेकिन शेष कॉलम देखने के लिए एक क्षैतिज-स्क्रॉल पट्टी को स्लाइड करें (ब्राउज़र स्क्रॉल बार नहीं)। ऊंचाई पूरी तरह से काम करती है यह 400px लंबा है और ग्रिडव्यू पर एक लंबवत स्क्रॉल बार है जो कि शेष पंक्तियों को देखने के लिए है लेकिन ग्रिडव्यू ब्राउजर से अधिक व्यापक है और इसमें स्क्रॉल बार नहीं है इसके बजाय ब्राउज़र में एक स्क्रॉल बार है कुछ समाधान मिल चुके हैं लेकिन उन्होंने मेरे लिए काम नहीं किया जैसे कि ग्रिडव्यू में चौड़ाई जोड़ने और एक निश्चित चौड़ाई का उपयोग करना जो काम करता है, लेकिन मैं इसे ब्राउज़र की चौड़ाई में स्केल करना चाहता हूं। आशा है कि कोई मुझे एक कार्यशील समाधान दे सकता है यदि आप स्थिति: रिश्तेदार को अपने डिवि कंटेनर में जोड़ते हैं और फिर अपने ग्रिड व्यू बिल्कुल, आपको जो चाहें प्राप्त करना चाहिए

javascript - jquery highlight words only -

I only want to highlight words and words, for example I do not want to highlight the words "ant Hit elephants "Here I just want to highlight ant ... but as I have highlighted the code I jQuery.fn.highlight = function (pat, className, CaseSen) {function innerHighlight (node, pat) {var skip = 0; If (node.nodeType == 3) {if (caseSen == false) {var pos = node.data.toUpperCase () IndexOf (pat);} else {var pos = node.data.indexOf (Pat); } If (condition> = 0) {var spannode = document.createElement ('span'); Spannode.className = className || 'Exposed'; Var middlebit = node.plitText (pos); Var Endbit = MiditusPlatchText (Pat Length); Var middleclone = middlebit.cloneNode (true); Spannode.appendChild (middleclone); Middlebit Parentnode. Revolving (Spandode, Middlebida); Leave = 1; }} And if (node.Nodtip == 1 & amp; amp; node.childnodes & amp; / / Script (style | style) /i.test (node.tagName)) {for (var i = 0; i & lt ; Node.childNodes.length; ++ i) ...

c# - filling list / Array by loop -

Image
इस सवाल का पहले से ही एक उत्तर है: 29 जवाब मैं जोड़ना चाहता हूँ सूची बॉक्स से सरणी या सूची में चयनित मान और मुझे एक अजीब त्रुटि मिलती है यहां मेरा कोड है निजी शून्य बटन 3_Click (ऑब्जेक्ट प्रेषक, EventArgs ई) {सूची & lt ; स्ट्रिंग & gt; _AttName = नई सूची & lt; स्ट्रिंग & gt; (); (Int _i = 0; _i & lt; listBox1.SelectedItems.Count; _i ++) के लिए (यदि (listBox1.SelectedItem! = Null) {- & gt; यहां विफलता - & gt; _AttName.Add (listBox1.SelectedValue.ToString ()); ListBox1.Set चुने गए (सूची बॉक्स 1। चयनित इंडेक्स, गलत); }}} या निजी शून्य बटन 3_Click (ऑब्जेक्ट प्रेषक, EventArgs ई) {string [] _AttName = new string [listBox1.SelectedItems.Count] ; के लिए (int _i = 0; _i & lt; listBox1। चुने गए आइटम। संख्या; _i ++) {यदि (listBox1। चुने गए इटैम! = नल) {_AttName [_i] = listBox1। चुने गए वैल्यू। टॉस्ट्रिंग (); ListBox1.Set चुने गए (सूची बॉक्स 1। चयनित इंडेक्स, गलत); }}} यहां त्रुटि है I समस्या: आपको यह त्रुटि मिल जाएगी क्योंकि सूच...

regex - Rename all '.' to '_' in a filename except for the extension -

I am trying to create a script which is all "." Events in a file name with "_" for example, when I try to change all the symbols, I use it: rename 'y / / _ / '' {} 'File # test 1.2.jpg - & gt; Test_1.2.jpg That works fine, but when I do it "." The extension of the symbol also changes: Rename 'y /./_/' '{}' file # test 1.2.jpg - & gt; Itemprop = "text"> You can use a letterhead to replace all the points before the very last dot: rename / \. (? = [^.] *.) / _ / G '' {} ' or using the negative eye head: Rename / s (?)? [^^] $) / _ / G '' {} ''

sql - Metadata reporting database - what type of DB schema should I use? -

I projected a project for the purpose of collecting server configuration metadata from Windows Server and to store it in DB. I will collect data for more than 100 configuration fields for each server. In the client who wants to be able to work, it is to compare data configured for the same server at different points of the same time, or two different servers which are the same function (i.e. Exchange Server ) To see if there is a difference and what the difference might be. For DB design, I usually just normalize all the data in the OLTP type schema, where all the same configuration items will remain on a table related to their specific area (such as hardware information) but I am thinking that this may be a bad move and I should save it to an OLAP type of data warehouse. I'm not sure how to go with DB design, so it can do with some direction on whether I want to normalize data and create many tables, or with a huge table Should go with normalization and more than 100 fie...

javascript - TypeError: Cannot read property 'subject' of null -

I am retrieving the data from the template archive from mongodb. So my problem occurs when I give an incorrect templateName , this program is considered to catch an error but it does not do that the program goes ahead & amp; I get the error TypeError: Properties of the zero 'subject' can not be read. How to handle this thing? Template.findOne ({name: templateName}, function (mistake, template) {if (err) {console.log ('an error occurred'); console.log (err.message) ; Callback (mistake);} and {template_subject = template.subject; template_html = template.dataMsg;}); If the wrong template name has been given, I want to return the error to the callback function. Will not be back. Template.findOne ({name: templateName}, before using something like this, should test variable existence: function (mistake, template) {If (fault === faucet & amp; template == faucet} {// there is no error, but no result was found err = new error (templateName + ...

javascript - Image hiding on load in bpopup -

I need help! I have the following code onSubmit one file upload: function upload file () {var file = _ ("file1"). Files [0]; Var formidata = new form data (); Formdata.append ("file1", file); Var Ajax = New XMLHttpRequest (); Ajax.upload.addEventListener ("progress", progress handler, wrong); Ajax.addEventListener ("load", full handler, incorrect); Ajax.addEventListener ("Error", errorHandler, incorrect); Ajax.addEventListener ("abort", abortHandler, incorrect); Ajax.open ("Post", "php_parsers / file_upload_parser.php"); Ajax.send (formdata); } Function Full Handler (E) {var fileDest = e.target.responseText; // file location response is Text_ ("unloaded IMG"). Src = fileDest; // '_' iselementbyid function is $ ('# sesame'). BPopup (); } I started the JCRPP on the object as follows: jQuery (function ($) {$ ('# uloadedImg'). );}); HTML is: When I tes...

c# - Design assistance: Calculation of time with expression parsed at runtime -

I have some columns in the database that have time in the HH: MM format. Now if there are no simple expressions like 11:00 - 12:00 then I can easily call an extension method in C # as the subtractTime and its logic At the runtime I will store my formula in the database for example: condition value exam time frame & gt; 10:00 SubtractTime (original, left) Now in the above case, I can call the runtime using my subtractTime function, but my problem is What if my expressions become complicated: 10:00 + 12:00 * 00:02 - 10:11 I like this How do I parse the expressions? I do not need coding help because I already have HH: MM after designing my extension for time, it's more of a design question. I need a scalable solution so that I can make a rule engine efficiently. I would say store it to find a string and operator. Create a recursive function parse endacam (string input), which parse the result in the correct order and calculates. Something like this: ...

android - How to show 3 dots at the end of text in textview -

I know that this question is asked many times, I have gone through all the solutions, but still the problem There is a similar. I should have a length of 50 characters in my text. Android: layout_height = "wrap_content" Android: layout_below = "@ + id / notification_head" Android: layout_centerHorizontal = "true" Android: layout_margin = "10dp" Android: gravity = "center" Android: Alpsas = "and" Android: maxLength = "50" Android: text = "Hello Developer, please check this message for a longer length of up to 50 characters." Android: Text Size = "20 SP" /> The text here is just a sample lesson that I have added. It is not displaying 3 dots at the end, but showing up to 50 characters. I have also tried Maximum Rows , Single Row False but there are no positive results. I do not want to handle this thing by logically adding three things to the program. current (shout-out to ...

Tracking Widgets using google analytics -

I have this widget code that I want to track through GA analytics without the GA structure. How can I use this GA tracking program? The widget code is as follows: & lt; Script src = "http://widgets.unnamed.co.ke/21/index.php? source = mysite" type = "text / javascript" & gt; & Lt; / Script & gt; We added the Google Analytics code to the widget JavaScript. Note that when your code is inside the GA code function, you have to make some adjustments. Ex: var g = window._gaq || (Window._gaq = []); G. Push (['some_unique_name._setAccount', 'UA-XXXXXXX-X']); In addition to this, you must ensure that you do not interfere in GA's GA site. Then you need to make sure that the domain (and some other definitions) are set on the same domain, such as the GA definitions of the site, you should also make sure to use your own tracker.

call return inside GCC compound statement expressions -

Can I safely use returns within the GCC compound statement expressions? defines macros for example I #define CHECK_FUNC_RESULT (func) \ ({\ int result = func (); \ if (! Result) return; \ Result; \}) and use it somewhere else in the code like this: int function1 () {returns (if some_condition) 0 ; ... return 1; } Void function2 () {if (CHECK_FUNC_RESULT (function1)} {... to do something}} What I really == on function2 (some_condition without any undefined behavior) Can I expect to return from? This should work, but if your () action If the function1 1 returns is your example: never) it looks like a dangerous construction, because nobody else will ever be executed.

ruby on rails - Rake aborted even after completely running migration -

When I generate a new migration, and both check it up and down, then I will close the 'rake' is!' In the end, when I go down, though it runs all the migration and there is no problem going to the migration, everything is smooth, can anyone tell me why this is happening? $ rake db: migrated version = 20140217090240 == create syntax: reverting =========================== ====================== - Drop_table ((section: -) - & gt; 0.0050s == Create Hint: Inverted (0.0060s) =============================================== = == create page replay ============================================= ======= - Drop_Table ((page) - & gt; 0.0030s == Page Build: Refunded (0.0040C) ==================================== === ==== == CreateSubjects: Retraction ===================================== ==== ======== - Drop_ table (- topics) - & gt; 0.0030s == CreateSignIt: returned (0.0230s) ====================================== ==== AlterUsers: Revert ===============================...

Reading a file on the local machine with javascript -

I am new to javascript What am I trying to do: Write a script, which reads a php or txt file, Take the information (a number), and replace it on a page like a banner. It will be something like ratings, and this rating will be on the local machine. I need some scripts that will work with most browsers. Thanks for your help !!! Only Internet Explorer supports this through ActiveXObject. You can access the file system using ActiveXObject and then read the file. View: Function readfile () {var fso, F1, ts, s; Var ForReading = 1; Fso = new ActiveXObject ("Scripting.FileSystemObject"); F1 = fso.CreateTextFile ("c: \\ testfile.txt", true); // Write a line Response.Write ("writing file "); F1.WriteLine ("Hello World"); F1.WriteBlankLines (1); F1.Close (); // Read the contents of the file Response.Write ("Reading the file "); Ts = fso.OpenTextFile ("c: \\ testfile.txt", for readings); S = ts.ReadLine (); reaction. Type ...

oracle adf - How to remove search feature in inputComboboxListOfValues? -

मैं Jdeveloper संस्करण 11.1.1.7.0 पर काम कर रहा हूं। मैं घटक 'inputComboboxListOfValues' का उपयोग कर रहा हूँ मेरी आवश्यकता के लिए मुझे क्वेरी फीचर की ज़रूरत नहीं है और ड्रॉप डाउन सूची में दिखाई देने के लिए 'अधिक' या 'खोज' जैसी लिंक नहीं चाहिए। क्या मैं इस खोज विकल्प को निकाल सकता हूँ? चूंकि मैं इस घटक से परिचित नहीं हूँ, मैंने ऑनलाइन खोज की डॉक्टर को पढ़ने से, मुझे लगता है कि आप को खोज विकल्प बंद करने के लिए कोई शैली विशेषता नहीं है, लेकिन ओरेकल फोरम पर इस चर्चा के अनुसार: ऐसा लगता है कि आप कर सकते हैं खोज घटक को छुपाने के लिए आपके घटक के लिए कुछ स्किनींग करें ... लेकिन मैंने इसे अभी तक नहीं किया है। स्किनिंग के लिए एक लिंक भी है: फिर "af: inputComboboxListOfValues" खोजें

c# - SelectedValues not working in MultiSelectList mvc -

Image
मेरे पास एक वर्ग है सार्वजनिक वर्ग की श्रेणी {सार्वजनिक इन्ट आईडी}; सेट; } सार्वजनिक स्ट्रिंग नाम {get; सेट; } सार्वजनिक आइकलिंग & lt; श्रेणी & gt; श्रेणी चयनित {प्राप्त; सेट; } सार्वजनिक स्थैतिक सूची & lt; श्रेणी & gt; GetOptions () {var श्रेणियों = नई सूची & lt; श्रेणी & gt; (); श्रेणियां। जोड़ें (नई श्रेणी () {आईडी = 1, नाम = "बाइक"}); श्रेणियां। जोड़ें (नई श्रेणी () {आईडी = 2, नाम = "कार"}); श्रेणियां। जोड़ें (नई श्रेणी () {आईडी = 3, नाम = "ट्रकों"}); वापसी श्रेणियां; }} नियंत्रक में मैं भरें मिल्लिजेलइटटम्स और उसके लिए चयनित वैल्यू सेट करें सार्वजनिक कार्यप्रदर्शन सूचकांक () {class cat = new category (); बिल्ली। श्रेणी चयनित। जोड़ें (नई श्रेणी {आईडी = 1, नाम = "बाइक"}); बिल्ली। श्रेणी चयनित। जोड़ें (नई श्रेणी {आईडी = 3, नाम = "ट्रकों"}); Var list = Category.GetOptions (); Product.Categories = नई मल्टी सीलिस्ट (सूची, "आईडी", "नाम", श्रेणी चयनित); } मेरे पास दृश्य कोड में ...

javascript - jQuery UI 1.10 dialog - prevent insertBefore -

With the new jQuery UI, when two open a dialogue window and trigger the focus - the focusing dialog before the other dialogs Will be inserted. I have made my way to do this with the z-index , so I want to disable the default one. I have set up for you View my issue What is the method to disable this behavior? I also have to link which I think describes it Edit: I found I got it but the ticket Open: Edit: OK, I found a place that triggers it _moveToTop: function (event, mute) moved to {var} = !! This. UIDL OH.NXL (":"). InsertInternin (this.widiology). Length; If (moved and quiet); {This._trigger ("focus", event); } Retired; }, This is a script that is executed. Now I know that I can modify the function inside jQuery. How to extend this part with your own functionality? I have added this to my scripts to disable this behavior. jQuery.ui.dialog.prototype._moveToTop = function (event, mute) {back true; };

if statement - How to use options in bash for skipping parts of code -

I have a bidding script and I want to be able to leave it (which - is not executed) / P> To make it clear what I want to accomplish, I have given the statement if which basically fulfills the same thing. no arguments are passed when using the script, then executing all four echo statements Are there. If I want to leave one of those echo statements, then I use the skipLETTER as the first code: . All letters are printed except /script.sh skipA and A . It works, but it has many limitations - for one, I can not leave many parts using the same logic ( $ 1 ). I want to achieve the same thing with the options, so I can write something like this: ./ script - skipA -skipD And as a result, print only B and C letters. I know I can use the getopt or getopts to get it, but I can not find any simple usage example I've received. I code with the following algorithm: All in file 1 Capture executable codes Call each function according to logic in f...

symfony - What's the function of bootstrap.cache.php? -

I'm reading the code of Silicon, I have classes in bootstrap.cache.php Other files In existence, so I am confused about what is the work of bootstrap.cache.php ? This is part of the Symfony standard version, which will compile the most used class in a file in a request, as found in the HttpFoundation component. Symfony uses PSR-0 class loading, i.e. One square per file, so this bootstrap file will reduce the number of file access to the system.

Is it possible to do the IO monad from Haskell in Clojure? -

I have looked at more documentation. I have read more through the Moned blog entries. The closest I can get - but this does not apply to the 'Monad interface' (for a better phrasing wish) does not appear This is the use of ST in Hassel The example is oneST :: STs int - note that it works correctly for any one = = var var; & Lt; - Modify newSTRef 0stiff var (+1) readSTRef var one :: int one = runST oneST My question is: Is it possible to do this in closure? Can you provide an example? yes There are a few ways to answer this question. Unfortunately: Think of IO as a Monod Transformer which gives special permission to work with side effects. Then there is no monad in the closure, an IO monad, because the display of side effects is not a privileged operation in the closure. Phatuan: Close Turing-Full, so that you can apply all hoccases including IO MonD in Clozer. Haskell Turing is full, so that you can apply all the closures in Haskell and expo...

c# - Accessing the out parameter of a Function when it is invoked through a Func -

sorry I did not do very well with the title of the question, hopefully it will be apparenent with some code I have created a class that stores poker hand information as follows Public class BestHandSummary & lt; T & gt; {Public Func & lt; T, bool & gt; Test {received; Set; } Public Ranking Rank {get; Set; } // Enum: Nothing, afternoon, straight, flush, poker: In the ascending order the public int receives the bestcard { Set; } Public Besthand (Ranking R) {Rank = R; } .. ///default ctor} I started the rule collection in the order of the most valuable hand, when I took the first () of the matched rules, chose the most powerful hand As the best hand will be Rules = New list & lt; BesthandSamuri & lt; PokerHand & gt; & Gt; () {New BesthandSamuri & lt; PokerHand & gt; {Test = h = & gt; H. Hand Containsfoff (best out of the card), Rank = Ranking.ForoffCand, BestCard = Bestcard, New BesthandSmaller & lt; PokerHand & gt; {Test = h...

c++ - MovetoThread problems with custom Qobject -

I am new to QThreads and could not understand why I did not get a new thread ID for my class. But first about my basic problem some basic I have a normal C ++ class, which requires long time to calculate, gives the name Heavybase class I have no QT element in this class. My goal is to calculate this square in its thread so that GUI can run normal during computing. I have read some implementation for the Qt threading problem and I decided to use QTthread with a QObject. It may be possible to stop this thread and with my first try Qt Conquer was not possible. Because I have created my own QObject: h.file: # include & lt; QObject & gt; #include & lt; HeavyBaseClass.h & gt; Class Captimization: Public Q Object, Heavyboxecas {Q Object Public: Coopermization (Heavyweight Class Input Parameter, QoBect * Parents = 0); Zero debug and fed (); Hint: public slot:}; #endif // QOPTIMIZATION_H CPP file: #include "qoptimization.h" # include & lt; QDebug ...

image - Android - ImageButton positioning to bitmap -

Image
Okay, though I use this site a lot, it really is my first question. Although I have many years of experience in programming using Visual Studio, I have recently been stuck in image positioning (using android studio) android. I have an image in an imageview that automatically scales for the screen (as you would expect) for the orientation of the screen and the super imaging applied to it. Currently, I am using Auto Position in ImageView for ImageButtons, but to the right of the image (scaled) in the upper right corner of the image, Or the situation does not matter. I can get the size of the image (default), but I need to recover, size scale and x: y coordinate and then accordingly adjust the setTop () and setRight () of ImageButton Please. I have read the burden of examples here but I feel that none of them want to do what I want. Is there a simple way to get the size / status of the display / scale image (where the actual image pixels are displayed), or something that I h...

javascript - Set text state to active on page load -

I want it when the page loads the 'Instagram' text, already Color is given, then you can switch between others, it does not know how to 'active' onload or how to set something ($.) ($ (This) .addClass ("hover");}, function () {$ (This) .removeClass ("hover");}); $ (".filter") (function () {$ (".filter"). RemoveClaim ("active"); $ (this) .removeClass ("hover"). AddClass ("active");}) ; Activate the class in HTML Lt; Div class = "button one" & gt; & Lt; A href = "#" class = "active filter" & gt; Instagram & lt; / A & gt; & Lt; / Div & gt;

c++ - Boost Asio sample HTTP Server -- taking this example and making it "production ready" -

In my search for a clean, simple, modern, and cross-platform HTTP server, I settled on Boost. ASIO C ++ 11 Example HTTP Server You can find it, and boost source source directory in boost_1_55_0 / doc / html / boost_asio / example / cpp11 / http / server I have reviewed the code, and it starts getting quite clean and well documented, so it's almost ideal. I only have a few small questions, whose performance has only one effect, which is now a secondary priority (priority is stability), because I want to use the same portable code on mobile and embedded platforms This magic number appears in 512 request_handler :: handle_request () in request_handler.cpp : // Fill in the reply to the customer. Rep.status = Answer: OK; Four buff [512]; While (Read: buf, sizeof (buf)). Gcount ()> rep.content.append (buf, is.gcount ()); rep.headers.resize (2); Rep.headers [0] .name = "content-length"; Rep.headers [0] .value = std :: to_string (rep.content.size ()); Rep.hea...

javabeans - sizzle.js handle selectors with user defined tags or bean tags -

मेरे पास मेरे मार्कअप में है। ... & lt; bean: message key = "Tandc.link" बंडल = "msg_hws_pricing" & gt; & LT; ul & gt; & Lt; li & gt; कमाएं + मेरे पुरस्कार के साथ अंकों को भुनाएं ® & lt; / li & gt; & Lt; li & gt; फिटनेस सेंटर & lt; / li & gt; & Lt; / ul & gt; & Lt; / सेम: संदेश & gt; ... मैं किसी भी तत्व के लिए सीएसएस चयनकर्ता बनाने के लिए एक सामान्य नियम का पालन करता हूं, 'फिटनेस सेंटर' वाले ली तत्व के लिए मेरे पास इस तत्व के लिए सीएसएस चयनकर्ता बनाया गया है: '# कीमत बॉक्स-कंटेनर & gt; बीन: संदेश: nth-child (6) & gt; उल: nth-child (1) & gt; लाइट: nth-child (2) ' जबकि sizzle.js का उपयोग करते हुए उसी का मूल्यांकन करते हैं, मुझे त्रुटि मिलती है "त्रुटि: सिंटेक्स त्रुटि, अपरिचित अभिव्यक्ति: असमर्थित छद्म: MESSAGE" मैं इन बीन ऑब्जेक्ट के लिए चयनकर्ता कैसे उत्पन्न कर सकता हूं और सिज़ल। जेएस का इस्तेमाल करके उसी का मूल्यांकन कर सकता हूं। मैं मार्कअप को ब...

jquery - Javascript numeric input (regex) validation rules -

I got some stuck here. Regarding input of accounting data, the analyst has the rules on the input of decimal data in a specific set text box. Since I have not studied regular expressions at this point, and because I have time limits for presenting a lot of work, I request you to help. The rules are (on the blur): IE8 + compatible; Set the default on 2 digits behind commas; Reject ".", "," And other characters compared to numerical characters; If the returned number has multiple separators, then only keep it for the last time. Clarification: Employees can have different regional settings, and commas / dot can be used either decimal or thousand separators. If an employee pastes a copy - thousand and a decimal separator, then it has to be ignored. Numeric '). ('Staining', function () {var mystring = $ ('# test_rules.numeric'). Val (); myString = parseFloat (myString.replace (/ [^ \ D.- .-] / g, '')) ; My...

android - What's the best way to skip an Activity -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं एक ऐप विकसित कर रहा हूं जिसमें एक उपयोगकर्ता अपने डैशबोर्ड में प्रवेश करता है और लॉग इन रहता है जब तक वह लॉग आउट नहीं करता (मेरा मतलब है कि ऐप बंद है और पुनरारंभ होता है, वह अब भी प्रवेश में रहता है)। मैं यह जांचने के लिए । Preference.java सार्वजनिक करने के लिए SharedPreferences का उपयोग कर रहा हूं। कक्षा प्राथमिकता {संदर्भ संदर्भ; साझा किए गए साझा किए गए संदर्भ लोक पसंद (संदर्भ संदर्भ) {this.context = context; SharePref = context.getSharedPreferences ("लॉगिनस्टेट", 0); } सार्वजनिक बूलियन getIsLoggedIn () {साझा साझा Pref.Boolean ("राज्य", गलत); } सार्वजनिक शून्य सेटIsLoggedIn (बूलियन राज्य) {SharedPreferences.Editor संपादक = sharePref.edit (); संपादक। इनपुटबोलियन ("राज्य", राज्य); editor.commit (); }} मैं फ़ंक्शन setIsLoggedIn (true) कॉल करता हूं जब उपयोगकर्ता लॉग इन करता है और setIsLoggedIn (false) जब उपयोगकर्ता लॉग आउट करता है । अगर उपयोगकर्ता पहले ही लॉग इन हो तो लॉगिन एक्टिविटी...

atk4 - Search Box which instantly filters a html table with ATK? -

I'm basically trying to do this. I have content and a textfield. When I write on the textfield, I want to change the table so that only matches can be visible. Without pressing a button Datalet looks like a solution but I do not know how to integrate it with ATK. Because of this, I am writing this because I am not enough to do this work with ATK. Even Google did not manage that change. Who can point me in the right direction? thank you in advanced. As a simple example, you can see how Autocomplete Field is implemented in ATK. / P>

asp.net mvc - Attach files using <a href="mailto:? -

I have the following code snippet: This mail opens the approach with the subject, but failed to attach the file. Actually I am trying to attach two files in MVC4 view, so MailAttachment [0] & lt; A href = "melto:? Topic = @ (model. Malpot) and attachment = @ (model. Mail attachment [0])" & gt; & Lt; Img src = "~ / images / mail" /> & lt; / A & gt; I do not have to call any action message, so that the approach is trying to open itself. You can not add mail-broken to client side files with server-side code (razor code) , Unless you give the correct path to the client side file. First you need to download the file to the client side of the user. Then ask that file to attach in the email. In addition to the Melato scheme. As an alternative, you can send email from server itself.

java - sub class does acquire the interface implemented by the superclass? -

Just a little question that might be stupid but I have to make sure. If I get 2 classes: Classes and classesby have been declared in this way Public class A utility ... // Usage is an interface clearly ... Public classes class A Expanding ... ... Is Classbubble usable? Edit and if the answer is yes, then I will write this declaration below Public Class Enhancement Class A Useful What will happen? Eclipse does not show me errors, but I have to know whether there will be any way Public Classes Class A Appliances Applies To Usable Bus is equal to public classb class A expands . As you've already raised the classes , which implements all the methods in your interface usable , the eclipse wont show any error (compilation): usable = new category (); Usable = new classbie ();

ios7 - Does QuickBlox support push messages with content-available flag for iOS 7? -

I did not find this parameter in the APNS option. Please add this feature to Admin console. For reference, details from your opponent: Content available: (iOS only) If you are writing a newsstand app, or an app using remote notification background mode launched in iOS7 (Aka "background push"), set this value to 1 to trigger a background download. Thank you in advance, though this is not an option, then your service is great. This feature is under development because I know it will be issued in 1-2 weeks. . > So, stay with the Blogs Blog soon This will also be available in the admin panel and through the API Update Check this update, check this feature in

c# - Entity Framework user select database target -

So here's my question for my open source project that it is necessary that we store the contents of the cache on the file system Let us, currently we serial the cache in JSS and store it as plain text files. Since we want to move away from this solution in future versions, we are now exploring a way to store cash in a database. In our current plans, the user is likely to decide which database he wants to use (such as SQL Server Compact, pre-existing databases etc.). Now my questions are: Is there something like this that can be achieved with EF? Can I switch the database when the application is running, or do I need to re-compile the application for switching the database? Is the best way to do this would be EF or am I looking for better solutions? Can such things be achieved with EF? Can I switch the database while running the application, or do I need to compile the application for switching the database? If you have separate databases like Oracle, MS SQL etc., in...

Image and print_media_type for pdfkit are not working on rails 4.0.2 -

I have created a PDF using pdfkit.pdf. But the image on my PDF is not being displayed and print_modia type is not working either. I am using Rails 4.0.2 and Ruby 2.0.0. Can anyone help me solve this problem? I am attaching the details here thanks. Mani file: Mani 'pdfkit', '0.5.2' Mani 'wkhtmltopdf-binary', '0.9 9.1' Mani ' Wichtmltopdf-heroku ',' 1.0.0 ' application.css: @ media print {body {text- Alignment: justification; Font-size: 566px; Background color: red; }} application.rb: "pdfkit" requires config.middleware.use PDFKit :: Middleware, : Print_media_type = & gt; True config / initializers / pdfkit.rb: PDFKit.configure do | Config | Config.wkhtmltopdf = 'C: \ Program Files \ wkhtmltopdf \ bin \ wkhtmltopdf.exe' config.default_options = {: page_size = & gt; 'A4' ,: Page_Hut = & gt; '2478',: footer_right = & gt; "1in" ,: "1in",: m...

sql - Update A table with Join and Computed Column -

मेरे पास निम्न संरचना के 2 टेबल हैं Table1 आईडी (लंबी), नाम (नर्वचर), वैल्यूएक्सिस्ट (बीट) टेबल 2 आईडी (लंबा), टेबल 1 आईडी (लंबी), मान (इंट) Table.Id और Table2.Table1Id पर विदेशी कुंजी बाधा के साथ अब मैं निम्नलिखित तर्क के अनुसार तालिका 1 को अद्यतन करना चाहता हूं अगर (वहां तालिका 1 में एक पंक्ति तालिका 1 के बराबर मान हैं और कम से कम एक मूल्य है & gt; 0) तब तालिका 1। मूल्यएं = 1 अन्य तालिका 1। वैल्यूएक्सिस्ट = 0 मैंने देखा है और कई उदाहरणों की कोशिश की है ताकि कैसे एक कॉलम को शामिल करने के साथ एक कॉलम अपडेट किया जा सकता है लेकिन cudnt कोई भी उदाहरण ढूंढता है जिसमें तर्क को या कुछ कम्प्यूटित कॉलम के माध्यम से किया जा रहा है यहां एक तरीका है यह update में एक सहसंबद्ध subquery का उपयोग करता है और आप इस समस्या के बारे में कैसे बताया है के करीब है: update table1 t1 सेट वैल्यूएक्सिस्ट = (जब मौजूद होता है (1 से चुनें तालिका 2 टी 2 जहां टी 2.Table1Id = t1.Id और T2.Value & gt; 0) तब 1 और 0 अंत); यदि आपके पास Table2 (Table1Id, Value) पर एक इंडे...

How is console.developers.google.com different from appengine.google.com? -

Google is the cloud and the app engine is they interchangeable? Will eventually be delayed? If I start to start, can I not be able to go back? Jordan Answer, with Google Cloud Platform Support, answers me: There are next generation portals for managing all Google Cloud Platform projects. Currently, you can not manage many aspects of your AppEngine app but from within the Developer Console, and there are some places where it is redirected back to the AppEngine Admin console Will go. You can use both without any disease, just know that at some point (I'm unsure about the deadline) the admin console (appennect.net) will end.

javascript - Highcharts : How to flag the local maxima on a dynamic graph drawn using HighChart -

यहां jsfiddle लिंक है और यह मेरा कोड है $ (फ़ंक्शन () {$ (दस्तावेज़) .ready (फ़ंक्शन () {उच्चचरट .सेटऑफॉशन ({वैश्विक: {useUTC: false}}); var चार्ट; $ ('# कंटेनर')। उच्चचर्च ({चार्ट: { टाइप करें: 'पट्टी', एनीमेशन: हाईचार्ट्स एसवीजी, // पुराने आईई मार्जिन में चेतन नहीं: 10, घटनाएं: {load: function () {// चार्ट के अपडेट को प्रत्येक दूसरे var श्रृंखला = सेट करें श्रृंखला [0]; सेट इन्टरवाल (फ़ंक्शन () {var x = (नया दिनांक ())। GetTime (), वर्तमान समय y = गणित.रेन्डम (); श्रृंखला.एडपॉइंट ([x, y], सच है, सच (शीर्षक: {text: 'value'},);}}, शीर्षक: {text: 'Live random data'}, xAxis: {type: 'datetime', tickPixelInterval: 450}, yAxis: प्लॉट लाइन: [{मूल्य: 0, चौड़ाई: 1, रंग: '# 808080'}], प्लॉट विकल्प: {श्रृंखला: {लाइनव्यूथ: 1}}, टूलटिप: {formatter: function () {वापसी '& lt; b & gt;' + This.series.name + '& lt; / b & gt; & lt; br / & gt;' + उच्चचरटडेटाफ़ॉर्मेट ('% Y-% m-% d% H:% M:% S', this.x) ...

html - Java search string for certain wordgroups -

I have this code, which is working fine, which is giving me the source code of a website: Package Quellenpackage; Import java.net.URL; Import java.io * *; Public class Quellcode throws IOException {/ ** * @ Ultimate Argus * / Public Static Zero Main (String [] Args) {// TODO Auto generated method stub final string meineURL = "http://www.onvista.de/ Aktien / Technische-kennzahlen / Aareal-bank- Aktie-DE0005408116 "; Url url = new url (mien url); InputStreamReader isr = New InputStreamReader (url.openConnection (). GetInputStream ()); Buffed reader br = new buffed reader (ISR); // Read full content String Line = ""; String code = ""; While ((line = br.readline ()) = null) {code + = row + "\ r \ n"; } // open reader br.close (); Isr.close (); // Give the page content. System.out.println (code); } Right now, it shows me all the code on the page, but I only want a certain part. This part must be exactly between the exact signals "Start...

java - Finding Inorder Successor in Binary Search Tree -

I am creating a binary search tree class, I got all my actions accepting the successor. My tree input 30 10 45 38 20 50 25 33 8 12 When I print inland traversal it comes up 8 10 12 20 25 30 33 38 45 50 When I put value 8, it says that its successor is 12. This is also for input 10 and 12. When I enter value 33 then it says that the successor is 50. Its not I can not fix it Any help of suggestions would be appreciated. I'm calling it primarily: BinarySearchTree BST = new BinarySearchTree (array); BST.getSeccessor (a); // Where is a user input to find this successor The following is my code ... Public TreeNode successor (tree node node) { If (node ​​== faucet) returns node; If (node. Right! = Null) {return leftmonod (node ​​right); } Treeoid y = node. Parent; While (empty! = Y & amp; y.right) .equals (node)) {node = y; Y = y.parent; } Return y; } Public stable TreeNode left modode (tree node node) {if (null == node) {return tap; } While (zero! = Node. L...

java - I want to send Run time Notification through E-mail in my designed web application by using Executors Thread Pool -

This may be a silly question, but I am a novice on this, I am creating a web application where notification emails Is sent. For this I am planning to use the Execute Service. I am a bit confused with the executors service, should I use the Executor Service (S) = Executor, Niffix and Pull (10)) in direct way or should I make it in one place and receive the same executable service item every time? You definitely need to reuse the same executable service object. And probably does not need 10 threads, 1 should be enough. Instead of defining an executable service as a stable field (although you can do this), if you are using, then you can define it as a spring service or spring or a As a field in singleton: There should be a slightly more predictable behavior in a webpad. That being said, ideally you should not put this functionality in your webpages at all. A webapp will be positioned on a web server, which is already managing the thread pool. Ideally there should be only one ...

How to define sister predicate in Prolog -

"predicates अभिभावक (एक्स, वाई) का उपयोग कर , पुरुष (एक्स) , और मादा (एक्स) लिखो, एक प्रोल की व्याख्या करें जो कि बहन (एक्स, वाई) परिभाषित करता है। " मैं सिखाने की कोशिश कर रहा हूं खुद को गिगल्स के लिए प्रोलोल का उपयोग कैसे करना है, और मैं जो सबक का उपयोग कर रहा हूं, उसे एक असाइनमेंट के रूप में है, मुझे यह भी पता नहीं है कि इस के साथ कहां आरंभ करना है उस बहन (एक्स, वाई) का अर्थ है: एक्स वाई की एक बहन है (केवल एक्स ही चाहिए महिला हो) माता-पिता (एक्स, वाई) का अर्थ है: एक्स वाई का मूल है। बहन (एक्स, वाई): - महिला (एक्स), अभिभावक (जेड, वाई), अभिभावक (जेड , एक्स), एक्स \ = वाई। प्रोलॉग सीखने के लिए यहां एक महान ऑनलाइन संसाधन है:

security - How to secure my PHP site using sessions? -

I am trying to understand a good method to protect my site from attack. I am currently using cookies method. However, after some web research, I think it is not good to use cookies for security reasons, so my second option would be to use the session. I read this article. In response to Anurag Jain, it has been said that the site should use https and it will not happen that the session ID should not be sniffed. But there are some things that I do not understand. When a user logs in to the site. I will run a query to check if the credential matches the user name and password. Then I store some information in different sessions (such as USER_ID, FULL_USER_NAME, TEAM_NAME, ACCESS_LEVEL) After logging in and after a session is created, I can create session_id () after the session session begins I am After that I can save the session with an IP address in a database table. But after this how do I check the security every time to ensure that this user is actually created session ...

java - Custom Hibernate insert for collections, counterpart of @WhereJoinTable -

I'm trying to map a relationship with an additional feature (flag) in an additional table, but without I am clearly defining this host table in one unit. Problem: Trade has been assigned to 0 or 1 main country, trade is also linked to 0 or more secondary countries. I have three tables: business , country , business_Country my business In , I have @WhereJoinTable which works well to get back: @OneToOne @JoinTable (name = "business_country", joinColumns = @JoinColumn (name = "business_id"), inverseJoinColumns = @JoinColumn (name = "country_id") @ @jinJinTable (volume = "is_main = 1") private country's main country; @OneToMany @JoinTable (name = "business_country", joinColumns = @JoinColumn (name = "business_id"), inverseJoinColumns = @JoinColumn (name = "country_id")) @WhereJoinTable (section = "is_main = 0") set & Lt; Country & gt; Secondary countries = new hashets &...

javascript - Knockout bind input text box to another text box -

I have two input tags and when I type in one, I want the exact same value in both of the knockout I am experimenting with it and thinking how I will fulfill it. & lt; Input type = "text" data-bind = "value: theValue" /> & Lt; Br / & gt; & Lt; Input type = "text" data-bind = "value: the value" /> & Lt; Script type = "text / javascript" & gt; Var VisualModel = {theValue: Ko.SourceWeb ("Default Text"),}; Ko.applyBindings (see new modell ()); & Lt; / Script & gt; Whatever you have, you just want to add valueUpdate: ' The above version in your binding ' so that you can update as your type. & lt; Input type = "text" data-bind = "value: theValue, valueUpdate: 'afterkeydown'" /> & Lt; Br / & gt; & Lt; Input type = "text" data-bind = "value: theValue, valueUpdate: 'afterkeydown'" /> In additio...