Posts

c++ - Error: *** glibc detected *** w5: double free or corruption (fasttop): -

यह मैं जो त्रुटि पा रहा हूं: ======= मेमोरी मानचित्र: ======== 08048000-0804a000 r-xp 00000000 00:28 2955225621 / घर / w5 / w5 ... अधिक निरस्त मेरा प्रोग्राम सही संकलन करता है, यहां तक ​​कि भाग मेरे उत्पादन का सही है मेरे पास 3 फ़ाइलें हैं, w5.cpp, employee.h, कर्मचारी.cpp। मुझे प्रतिलिपि निर्माता, एक असाइनमेंट ऑपरेटर और एक नाशक बनाने की आवश्यकता है। w5.cpp (इसकी थोड़ी बड़ी)। employee.h वर्ग कर्मचारी { int empNum; Char * empName; सार्वजनिक: // कंस्ट्रक्टर कर्मचारी (); कर्मचारी (पूर्णांक संख्या, const char * नाम); // कॉपी कन्स्ट्रक्टर कर्मचारी (कॉम्प कर्मचारी और स्रोत); // असाइनमेंट ऑपरेटर कर्मचारी & amp; ऑपरेटर = (कॉन्स्ट कर्मचारी और स्रोत); // डिस्ट्रिक्ट ~ कर्मचारी (); शून्य प्रदर्शन () कॉन्स्ट; बूल हैग्रेरथान (कॉन्स्ट कर्मचारी & amp;) कॉन्स्ट; }; कर्मचारी.cpp #include & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; # शामिल "कर्मचारी एच" # शामिल करें & lt; string.h & gt; कर्मचारी :: कर्मचारी () {empNum = 0; EmpName = nullpt...

What is the Scala type-programming analogy for the `this` keyword? -

I'm trying to work in my own way to understand type-programming in Scala, and I've found that Most of us need to know about typing programming. There is an equivalent equivalent in price programming as reflected in it, however, I do not have to get it according to the this key word or self-type. It is expected of such things Rsha does not mean to, but I thought I'd ask. For example, I can write the following to represent Boolean as values ​​in the run time: Sealed attribute BoolVal {def not: BoolVal def or (Key: BoolVal): BoolVal def and (Key: BoolVal) = (this.not or that.not) def Imp .not (that: BoolVal) = this.not Or that} case object TrueVal extends BoolVal {do not dominate domes = FalseVal def override or (Key: BoolVal) = TrueVal} case object FalseVal extends BoolVal {Val = No TrueVal override def or o Ride (Key: BoolVal) that =} Here my and and imp are able to take advantage of the fact that this is someone It does not matter if I have the right thing...

django - Modify image extension to use later -

I am using the PIL in the document to crop the image and save the copy of it: Image.save (os.path.abspath (os.path.join (os.path.dirname (__ file __), '..')) + kid.image_url + "thumbnail", "JPEG") The image thumbnails are temporarily saved and can be accessed at: kid.image_url + "Thumbnail" I have a problem save it in the original format, do not have a thumbnail and access it later Be enabled. Is there a better solution, such as "_ thumbnail" after the image and it should be able to access it by the child .image_url + "_ thumbnail" Here you can change "example.jpg" to "example.thumb.jpg": Import OS filename, extn = os.path.splitext (kid.image_url) thumb_filename = filename + ". Thumb" + extn

session - How does OPcache in PHP determine whether a hit how occurred or not? -

What criteria are used to determine whether a cache hit has occurred in PHP OPC? I would think that things such as request URLs, headers, etc. are affected or not, but the hit is affected or not, but how OPCAC behaves with things like pages / scripts relying on cookies / sessions for presentation of the page ? You are confusing PHP opcache with an HTTP cache. The PHP Opcache output does not cache a PHP page instead, it caches the internal presentation used by PHP for a PHP source file, when the source files are requested every time a page is requested Allows PHP to execute it instantly when necessary to redirect.

asp.net - Cryptic error message from VirtualPathProvider -

I have several ASCX files scattered in ASP.Net Legacy Project. & lt;% @ Register src = "~ / cms / header.scx "Tag name =" header "tagprofix =" uc2 "%> Line 11: & lt; Div id = "content" runat = "server" & gt; Class = "widget" & gt; VirtualPathProvider returned a VirtualFile object with the VirtualPath set to the expected '/CMS/Header.ascx' instead of '/MyLib/BootstrapHeader.ascx'. What could be the cause of this error? My open method is not being called either. Public class CMSContentVirtualPathProvider: VirtualPathProvider {Private const string CMSContentPath = "CMS /"; Private contact string CMSControlFolderName = "MyLib /"; Private cast string CMSPageFolderName = "Pages /"; Private cast string CMSMasterPagesFolderName = "master /"; Private constant string CMSPFix = "bootstrap"; Public Static Zero AppInitialize () {Hosting...

metaprograming on python Namespace object -

I want to assign all the items dynamically Namesapce objects But this is not working, how can I get it? export_file = {"default_value": "{0} _default_value.txt" .format (args.cam_ip), "msword": "{0} _msword.txt" .format (args. Cam_ip),} args = argparse.Namespace () key, value in export_file.iteritems (): args.key = value Usage: key, value in export_file.iteritems (): setattr (args, key, value) Examples of using setattr : & gt; & Gt; & Gt; Class namespace: ... def __init __ (self): ... self.a = 1 ... & gt; & Gt; & Gt; Ns = namespace ()> gt; & Gt; & Gt; Ns.a 1 & gt; & Gt; & Gt; Settrer (NS, 'A', 9) & gt; & Gt; & Gt; Ns.a 9

sockets - Java TCP Client Server Hangs Up? -

I'm currently having difficulty understanding why my code is not working, I have my client and server code down I've come to know that my problem is somewhere in the loops, but I'm not sure how to fix it so that it does not get stuck. I have searched for the forum for a while and some said that by adding a new letter it will be fixed, but I still have trouble. My main question is how can I avoid this process and communicate properly. Can anyone point me in the right direction? import java.io.buffferedReader; Import java.io.IOException; Import java.io.InputStreamReader; Import java.io.PrintStream; Import Java.net.Socket; Import java.net.UnknownHostException; Public class My_Client {public static zero main (string [] args) unknownhost extension, IOException {socket s = new socket ("localhost", 5555); BufferedReader R = New BufferedReader (new InputStreamReader (s.getInputStream ())); PrintStream w = new printstream (s.getOutputStream ()); W.print ("Hel...