Posts

c++ - Is there any difference these two pieces of code? -

# शामिल हैं & lt; stdio.h & gt; कक्षा ए {सार्वजनिक: int a; }; वर्ग बी: सार्वजनिक ए {निजी: int a;}; Int main () {B b; प्रिंटफ़ ("% d", बी.ए.); वापसी 0; } # शामिल हैं & lt; stdio.h & gt; कक्षा ए {सार्वजनिक: int a; }; वर्ग बी: निजी ए {}; Int main () {B b; प्रिंटफ़ ("% d", बी.ए.); वापसी 0; } मैं पूछता हूं क्योंकि मुझे अलग-अलग त्रुटियां मिलती हैं: त्रुटि: 'इंट बी :: ए' निजी है त्रुटि: 'एट ए :: ए' अनुपलब्ध है इसके अलावा त्रुटियों से क्या पता चलता है, क्या व्यवहार में कोई अंतर नहीं है कोड के इन दो टुकड़ों में से? ये अलग हैं पहले उदाहरण में, आप चर 'ए' के ​​दो उदाहरण बना रहे हैं आधार वर्ग में से एक, एक बच्चे की कक्षा में। दोनों उदाहरणों में आप चर पर पहुंच प्राप्त नहीं कर सकते। यदि आपके पास: ए * पीए = नया बी (); pA- & gt;; // यह ए :: ए को संदर्भित करेगा, जिसे अनुमति दी गई है क्योंकि इसे सार्वजनिक रूप से परिभाषित किया गया था बी * पीबी = नया बी (); पंजाब & gt;; // यह बी :: ए का उल्लेख करेगा, जिसे...

RoR: Where is the "rails/info/properties" route defined? -

I am running Rail 2.3.4. When I prepare a new railway project, the public / index.html file contains a link to the name "About your app environment" which indicates "Rail / information / properties" in Dev mode, this runtime Summarizes the environment However, in production mode, a 404 page can not be found. Does anyone tell me how and where the "Rail / Info / Properties" route is configured? I should understand how this has been set. link AJAX request closed from rail / info / property Does. The properties is defined in the action rail :: information controller . There is no need to explicitly define the route because it is the default route of the train code : controller /: action / id (although there is no ID in this case and The controller rail lives in the name space.)

java - "The method setListAdapter(ArrayAdapter) is undefined for the type create" -

I fully understand the Java & amp; Android, so I tried to find useful specimens from Android & amp; Database. I found this blog with a project: I took part in this project and it works fine, but I try to create a new project to copy having had; Paste the code in it and it is not working: ( I had a problem on this line: this.setListAdapter (new array adapter & lt; string & Gt; (this, Android .R.layout.simple_list_item_1, result)); This is the error I get: Method set list adapter (Arrayadapter ) Is unspecified for this type It looks like a method in C #, but I call it the original project I can get it. Make me a mistake when you call this.setListAdapter ListActivity you probably should increase the class simply increase activity .

What is the difference between these two uses of const in C++? -

संभव डुप्लिकेट: बीच में अंतर क्या है एक const * pa2 = pa1; और A * const pa2 = pa1; (मेरे पास उदाहरण के लिए कुछ वर्ग ए है)। दाएं से बाएं टाइप करें: एक const * pa2 = pa1; pa2 केवल पढ़ने के लिए एक सूचक है (ऑब्जेक्ट को संकेतक के माध्यम से बदला नहीं जा सकता है) ए * कॉन्स्ट पे 2 = पे 1; pa2 ए के लिए केवल पढ़ने के लिए पॉइंटर है (सूचक को बदला नहीं जा सकता है) इसका अर्थ यह नहीं है कि कोई भी बदल नहीं सकता है (या वास्तव में निरंतर) const भ्रामक है, इसे केवल पढ़ने के लिए ही समझें। अन्य एलाइज़ेड पॉइंटर्स ए। संशोधित हो सकते हैं

MySQL Normalization stored procedure performance -

I wrote a hosting process in MySQL, which is currently in a table and "normal" means that For each value passed to the stored procedure, it checks whether the price is already in the table or not. If it is, then it stores the ID of that row in a variable. If the price is not in the table, then it enters the newly entered value ID, then the stored procedure takes the ID and inserts them in a table that is equal to the original de-certified table, but this table is completely normal And mainly consists of foreign keys My problem with this design is that the stored procedure takes about 10ms or more, which is too long When you are trying to work through some 10 million records, my suspicion is that performance is to be done in a manner in which I am inspecting. I.e. INSERT (argument_from_sp) duplicate key update ID = LAST_INSERT_ID (ID) in tables (first_view) values; SET @TableAId = LAST_INSERT_ID (); "On duplicate key update" is a bit of a hack, due to the...

php - get_called_class hack not working with eval-code -

I am using a ge_called_class hack which is delayed in php version 5.2 (found) Allows stable binding from I have the following in my code: # db_record.php $ ac = "Forum Refresh"; $ Object = $ ac :: find ("all"); This will not work in PHP 5.2 for some reason, so I have done this: # db_record.php $ ac = "Forum refresh"; Eval ("\ $ objects = {$ ac} :: search ('all');"); On the other hand it will not work with the get_called_class function. I get an error that the file function can not read the blank space in the code. If you are using eval, then your solution is wrong. Why would your non-eval version not work? What's going wrong? What is a complete and complete error message? The user-supply version of get_called_class does a back lint and tries to open the caller's file to determine the name of the class. The reason eval fails is because the eval backtrace does not provide the file name. (Edit: Be...

objective c - Doxygen including methods twice doc files -

I am having this problem where Doxygen is adding method to the document file twice. Is there a setting which blocks the auto-reproduction of the documentation for methods within the .m file? For example, I would look something like this in the document, where + + (status *) register is the user's first definition header from the XXXXXX.h file where the second is from XXXXXX.m Header documentation: / ** @ short test is more often return @ and # (description) #> * / + (Status *) Register User; Output: + (status *) Register User test nowadays Returns: & lt; # (Details) # & gt; + (Status *) Register User & lt; # (Brief description) # & gt; & Lt; # (Broader details) # & gt; Register user returns: & lt; # (Details) # & gt; Definition on Line 24 of the file XXXXXX.m The problem is resolved! I came to know that my build directory and my SSN directory were included in Doxygen. I have EXCLUDE_PATTERNS * / Svn / * * /. Added to Bu...