Posts

templates - How to make C++ find templated function header when dependent-scoped inner classes are involved? -

I am trying to create a templated C ++ function which accepts it as its logic, An indicator for an inner square object Here is a small version of class structure similar to a specific link-list or tree class: template & lt; Typename T & gt; Structure Inner {T-Wall; Inner (TV): Well (V) {}}; Inner * PTR; Exterior (t-wall) {pt = new inner (val); }}; I have created a structure to exclude them from any access control problems and removed some extraordinary example variables. In the brain with the structure of that class, there are three functions, The first of which I do not want much: template & lt; Typename T & gt; Zero TestOper (Cust Outr & Lt; T & G & OBJ) {cout & lt; & Lt; Obj.ptr- & gt; Val & lt; & Lt; Endl; } Zero Test InnerIt (infected external ; inner p) {cout & lt; & Lt; P-> Val & lt; & Lt; Endl; } Template & lt; Typename T & gt; Zero test infra-implied (Constant Tyman's external ; inner *...

It is posible to store the information of a php include into Memcached? -

Is this correct to include a PHP information in a variable? I use sensible and loading 75% of my page, 15 ms, one of them: need_once 'smarty / smarty.class.php'; Can it save this information before it's already included in a memcatch? As stated in the comments, what you are searching here is an "opcode cache" - An extension of a PHP engine that stores the result of compiling a PHP file in memory, so that the compilation happens only once The default option is this day, with PHP 5.5+ Bundled, and for PHP 5.2+ However there are other options; Another word often used (though maybe these days maybe less often) is "PHP Accelerator".

sql server - Using group by for a SQL to filter with datetime -

I am trying to create a SQL but it is not working. I have a table that: Amount of Acess | Was the computer ace? | Whats date and time 11 Computers 1 2013-12-30 09:00:00 2 Computer 2 2013-12-30 10:00:00 30 Computer 2 2013-12-30 10: 11:00 17 Computer 3 2013-12-30 17:30:00 200 Computer 4 2013-12-30 07:00:00 150 Computer 1 2013-12-30 14:00:00 19 Computer 1 2013-12-30 06:00:00 What I have to do is the result, where it has been shown to me only this way: In each computer, maximum excise and how much time was there? Result of the OS above the OS will be like this: Amount of Acess | Was the computer ace? | Whats date and time 30 computer 2 2013-12-30 10:11:00 17 computer 3 2013-12-30 17:30:00 200 computer 4 2013-12-30 07: 00:00 150 Computer 1 2013-12-30 14:00:00 Computer 2 in the exact time had maximum 30 Aces 2013-12-30 10:00:00 ... ..... The problem is how can I show a great date in each result? Can anyone help? Thanks I think you want the date whose maximum nu...

Create a Generic List of Generic objects in C# -

I have a generic class for which I would like to create a general list, where the underlying classes apply the same interface However, all of the given interface is not implemented. Describing the problem would be an easy example. Intermediate Interface Isoming {} Internal Segment Type: ISOMTI {} Internal Square Theatings: Isoming {} Internal Class SomethingElse {} Internal Square Generic Tings & lt; T & gt; {} Internal range DoThings {void Main ()} {var thing1 = New GenericTeat; This lesson & gt; (); Var thing2 = new generic typing & lieutenant; That Typing & gt; (); Var Talk 3 = New Generic Ting & lt; SomethingElse & gt; (); ** var thingList = new list & lt; Generic typing & lt; ISomething & gt; & Gt; () {Thing1, thing2}; **} } I'm unable to create a list of things which is a way of putting two things that apply the same interface in the general collection, while The interface is not currently interrupted to protect the gen...

php - Append DOMDocument root element to another DOMDocument -

I have 2 "DOMDocument" objects - $ Original and $ Excess I want to get all the children from an additional docdocument $ And add $ end to the end of the original document. I had to take the original element of the $ extra document I tried to use: $ root = $ Extra-> Document element; $ Original- & gt; Append Child ($ root) But I get an error, which is expected of Ependon Child as a logon object. I tried to access every child in the document via: $ extra-> childNodes-> Item (0); But it gives the purpose of domelimity Can you advise how to obtain an object of a domonode class? What is the most convenient way to provide this import operation? The $ basic XML looks like this: & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Products & gt; & Lt; RecordReference & gt; 345,345 & lt; / RecordReference> & Lt; NotificationType & gt; 03 & lt; / NotificationType & gt; & Lt;...

java - How to call public static String method from jar from command-line? -

हमारे पास एक परियोजना है (जैसे, फ़ू ) जिसमें कुछ सार्वजनिक स्थिर है विधियां, उनमें से कुछ रिटर्न स्ट्रिंग अब, मुझे उस प्रोजेक्ट के जार से कमांड लाइन तक पहुँचने की जरूरत है और उस स्ट्रिंग के लिए उन सार्वजनिक स्थिर स्ट्रिंग तरीकों में से एक को कॉल करें। 1 संपादन करें: मुझे एक शेल स्क्रिप्ट के लिए एक तर्क के रूप में लौटा हुआ स्ट्रिंग देना होगा। ऐसा कुछ: ./ my_bash_script.sh & lt; मूल्य जार से लौटा & gt; & Lt; अधिक तर्क & gt; हम इसे कैसे करते हैं? कमांड लाइन से जार कॉल करने की कोशिश की, लेकिन उसने मदद नहीं की। java-cp Foo.jar full.package.name.ClassName त्रुटि: मुख्य वर्ग की जार को ढूंढ या लोड नहीं किया जा सका यह अपेक्षित था, क्योंकि वर्ग में कोई मुख्य फ़ंक्शन नहीं है। इसके अलावा Foo.jar के आस-पास एक आवरण जोड़ने का प्रयास किया। जैसे, इस जार को मेरे अन्य प्रोजेक्ट में निर्भरता के रूप में जोड़ा गया, और सार्वजनिक स्थिर स्ट्रिंग विधि से Foo.jar कहा जाता है। खैर, यह काम करता है, लेकिन मुझे जावा एप्लिकेशन के बाहर एक स्ट्रिंग वापस करना होगा ...

python - Get number of characters matched in regex -

I have a file indented with a place indentation: some text Level 1 level 2 Level1 Level3 and its text I want to indent it with 4 spaces. I thought of a regex to match the starting position ^ (\ s) * . However, I do not know how to change it with "Apply a tab for each place". My estimated output will be: Level 1 level 2 with \ t * len (\ 1) exists? Edit: I appreciate a Regex based solution because I want to use it from within the SibalTimetext Editor, where the replacement performance is done by regex. I do not think the Python regex engine supports this, but since you have used the subtitle text, you It can be used, which matches the situation immediately after the end of the last match. What to Search: (^ | \) \ s Replace with: \ t This pattern will match a single whitespace character, which or line back after immediately starting