Posts

Showing posts from May, 2013

winforms - Problem with icon color in .NET Windows Forms menu -

I am using VS2008 and I am creating a Windows project. There is a menu of menu strip class in the form, and items (surprising) toolstripmenuitimate objects are. I want to add beautiful icons from the icon set. I'm all fine and okay, as long as I did not get near the "copy" icon you can see it ("Warning! 1MB image!" Below "page_white_copy") I was expecting the image I get. Any ideas why colors are all messed up? Added: Here is an image that shows what I mean: How will you get the image project? I'm guessing that it has to be done with some colors, which is being misquoted in alpha channel, I save the icon you want. PNG to see if it decides whether it decides.

vb.net - Sub New() is not accessible in this context because it is 'Friend' -

So what does it mean and how do I fix it? This puts a new keyword in the message is coming when I went below the line (lines) If I remove it I, I get an error at runtime so I need to find new applications. What am i doing wrong dim as Ops AeccPointStyle = new AeccPointStyle OPS = oDescKey.PointStyle Debug.Print (oPS.Name) Debug.Print (oPS.MarkerSymbolName) Also try the New AeccPointStyle Ops as the slow ops = oDescKey.PointStyle Debug.Print (oPS.Name) Debug.Print (oPS.MarkerSymbolName) Thank you uPDATE 1 - meta- 1 - nothing dim Ops AeccPointStyle = as ops = oDescKey.PointStyle 2 - as dim Ops AeccPointStyle = oDescKey.PointStyle Both versions NullRefer Throw enceExceptions. After the text "itemprop =" text "> AeccPointStyle is a blank creator friend, which means only classrooms inside its assembly can call it Has been marked as. But by looking at my code, I do not think you need to call New, just set it to nothing, or even bette...

java - HtmlUnit property undefined script error -

I am submitting a form using the Java HtmlUnit package. I'm able to get pages and submit forms, but on one page I'm getting a ScriptException error message is "Can not set property" disabled "insufficient" "0" " I think It is possible that this may be due to a JavaScript method that attempts to set a variable which has not been declared in the form but I am not sure. tempForm = MyPage .getFormByName ("menu_form"); tempForm.getInputByName ("user Ta id ") setValueAttribute (" myusername ") .; Actimelpij edit Krensbsilibrafej = (Acaelpiaf) Temppformkgetinputbi-name (" Sbmit_btn "). Click (); EcmaError: Lainnanbr = [824] columns = [0] line source = [Empty] name = [type error] source name = [https://labserver.comp.com/mcwebadm/cgi-bin/edit_local.pl?operation=edit& script; return_address =% 2Fmcwebadm% 2Fcgi-bin% 2Fmenu .pl & amp; selected = (9, 32) to (840, 15)] message = [Writing error 23220...

c# - FolderBrowserDialog behavior in Windows 7 -

I am using one of my applications if I have a new folder within FolderBrowserDialog 'And after trying to rename the' new folder ', and when pressed (not enter), it gets' new folder' in the property and not the name that I have changed the name. Is this a Win7 bug? This behavior is not new to windows 7 - this is at least Windows XP, possibly before (my Has nothing to do with the first test). Update : How to Reproduce XP Using Firefox 3.06, Tools | Select Options . Select Main tab, and in the Downloads section, save the file to , then browse Browse Select Desktop as your folder. Press New Folder , type the name of any folder, then press Enter . Result: The name of the folder "new folder" at the bottom of the dialog, is still the name given to you in your actual selection.

visualization - Application to generate Java class hierarchy diagram -

एक उपकरण खोज रहा है जो: एक नेत्रहीन मनभावन (भयावह नहीं), ऑर्थोगोनली उच्च गुणवत्ता वाले पीएनजी छवियों (300 डीपीआई) का उत्पादन क्लास, अमूर्त वर्ग, इंटरफेस, और एन्यूमरेटेड प्रकार (प्राथमिक रूप से रंग से) को अलग-अलग रूप से अलग करता है इंटरैक्टिव यूजर इंटरफेस चित्र से पैकेज़ों और / या व्यक्तिगत वर्गों की छंटाई की अनुमति देता है एक सेट का उपयोग कर बीज (जैसे, फ़ाइल & raquo; ओपन ): निर्देशिका JAR फ़ाइलें व्यक्तिगत स्रोत फ़ाइलें व्यक्तिगत संकलित वर्ग एक एकल निष्पादन योग्य का उपयोग करता है हल्के (~ 5 एमबी) का उपयोग करता है वर्ग निर्भरता का पूर्ण स्वचालित विश्लेषण करता है सरल है (ग्राफ के निर्माण के लिए 10 क्लिक से कम) है ओएसएसएस या जीपीएल (वैकल्पिक है) का उपयोग करने के लिए आसान है (न्यूनतम इंटरफ़ेस, ग्राफ पीढ़ी पर केंद्रित) ) एक कॉल-ग्राफ़ पदानुक्रम उत्पन्न करता है उपकरण जो इस कार्य को पूरा नहीं करेगा, इसमें शामिल हैं: डॉक्सिजन + ग्राफ़विज़ (या डॉट) यूएमएल मॉडेलर्स जावा के लिए स्ट्रक्चरल विश्लेषण (स्रोत फ़ाइलों को पार्स नहीं कर सकत...

java - Hibernate flush and JTAUnexpectedRollbackException -

I am using Spring and Hibernate for transactions and atoms I use annotation based transactions I have a DAO object And in one of the ways I call entityManager.persist () to save the otag. Now whenever an ORA error occurs during the update, for example an infringement is violated or the definition of a greater than a database in the column is determined, I get JTAUnexpectedRollbackException instead of the generic JDBCcpsation which is thrown by spring is. I tried to make constant efforts to catch it, but I am not getting any exceptions. Hibernation actually makes actual updates during the flush, which happens during the transaction commitment and therefore unexpected rollback exposure I think how can I get around this and the unexpected rollback exception Can I get generic JDBCCCC instead? Firstly, Disclaimer: I do not use atomicocos I do not believe that the error in the question is: There is no connection, but surely this can not know. I had a similar problem in the spring...

Where can I find some good documentation about Haskell programming language? -

I found that there is a problem with the Haskell documentation. I am very clear and not very easy about this language Where can a better document be found? "post-text" itemprop = "text"> Haskell itself is not particularly obvious or simple, and the learning curve can be cruel because of this, I'm not sure "Better documentation" will help you if you are a skilled programmer, you probably are using published API and manual to know about what you already know. It does not work for Haskell, you have to send yourself mentally on the same day that you were sitting in front of your first computer. It really feels like you are releasing everything from scratch. Tutorials are your best bet here, especially, and more. Once you understand the language, you will get it, you do not rely on the documentation as you can expect. I've found that I can see the source code in Haskell and actually understand what's going on with a particular function....

c# - Why can't List<parent> = List<child>? -

निम्नलिखित कोड क्यों काम नहीं करेगा? वर्ग अभिभावक {} कक्षा बच्चे: अभिभावक {} सूची & lt; माता पिता & gt; माता-पिता = नई सूची & lt; बच्चे & gt;; यह मेरे लिए स्पष्ट लगता है क्या हो रहा है? सी # वर्तमान में समर्थन नहीं करता है। नेट 4.0, हालांकि, इंटरफेस और प्रतिनिधियों पर। इस ब्लॉग पर कुछ समय पहले अपने ब्लॉग पर बहुत अच्छा था।

java - Would it be accurate to say that JAXB is to XML as Hibernate is to a database schema? -

If I want an ORM which helps me to develop a "database based" application, it would be good to be in hibernation , But if I need to map the entities or objects to nodes in an XML file, then JAXB will be the right type of technology ... will this be a true assessment? Yes, JACAB is targeted to force Java objects against XML and vice versa. It's not an exact analogy, IMO, but I think I'm seeing what you're doing. :)

.net - How to implement a simple XPath lookup -

हमारे पास बहुत ही सरल कार्यान्वयन के साथ एक XML फ़ाइल है: & lt; root xmlns : XLink = "http://www.w3.org/1999/xlink" & gt; & Lt; प्रथम चाल्ड id = "ID1" / & gt; ... & lt; ref xlink: href = "# ID1" / & gt; & Lt; / जड़ & gt; मान लीजिए XLink कार्यान्वयन इसके मुकाबले किसी भी अधिक जटिल नहीं होगा। हालांकि, महत्वपूर्ण बिंदु यह है कि तत्व (इस मामले में पहली बच्ची) दस्तावेज़ में कहीं भी प्रकट हो सकता है, कहीं भी पदानुक्रम में। एक XPath लुकअप में आप & lt ; Ref> नोड जैसे अभिव्यक्ति का प्रयोग करके: // * [@ id = 'id1'] क्या सबसे अच्छा उपयोग कर रहा है? मैंने इन पंक्तियों के साथ कुछ सोचा होगा: XDocument doc = XDocument.Load ("file.xml"); Var dest = xDoc.Descendants ()। जहां (ई = & gt; (स्ट्रिंग) ई। विशेषता ("आईडी") == "ID1")। सिंगलऑर डीफॉल्ट (); मैंने वास्तव में इसका अभी तक परीक्षण नहीं किया है। लेकिन सामान्य शब्दों में, यदि एक्सएमएल दस्तावेज काफी बड़ा है, तो क्या LINQ ...

How do you check what files are inside an NSIS setup.exe? -

In my NISIS script, I use this line: file ". . \ Help \ *. * " My problem is that my subversion repository has my help directory (we continually add new functionality). This means that there is a .svn directory in the help directory. I want to see the content of setup.exe which was created by NSIS to verify that there is no .svn directory in it. P.S. I used to see if NISIS files are added when the wildcard is used. It is not but I want to verify it, so the question is. These things are usually compressed files. You can check with 7z / 7-ZIP to open the EXE archive. As a comment, after the comment below, I want to point to my recent notes on the properties of 7-zip on the superuser,

testing - How to test HttpApplication Object with HttpApplicationState -

I am trying to test a 'plugin' for an asp.net HTTP application that is Application_Start . The code is something like this: Private HTTP application application; Public Zero Application_Start (Object Sender, EventArgs e) {this.application = HttpApplication as Sender; StartReportService (); } Private Zero StartReportService () {Handlersports = New Sort List & lt; String, string & gt; (); HandledReports.Add ("myindex", "myvalue"); } Public System Selection. Generic In short, & lt; String, string & gt; HandledReports {get {application.application.Lock (); Var handledReports = (sorted list & lt; string, string & gt;) application. Application ["Handled Reports"]; Application.Application.UnLock (); Returns handled; } Set {application.Application.Lock (); application. Application ["handoverports"] = value; Application.Application.UnLock (); }} The problem is that I can not find a good way to test HttpApplica...

java - Amazon SQS invalid binary character in message body -

I have a web app that sends messages to an Amazon SQA queue. Amazon sqs gives an 'AmazonSQSException' liberalization because the message contains an invalid binary character The message is a reference obtained from an incoming HTTP request. This is what it looks like: > ^ FA 'A' A LT; 99> a e) J It seems that letters in bold are invalid Characters Is Amazon an Easy Way to Filter Characters Accepted? The message body contains the characters allowed by Amazon. I'm not sure whether 'regex me' should be used to replace illegal characters by '' The language you are using, for example, many programming languages ​​allow you to translate Amazon specifications directly that you were associated with a regular expression, which means "not one or more characters in the permissible limits". For example, Pearl: Referrer = ~ s / [^ \ x {9} \ x {a} \ x {d} \ x {20} - \ x {D7FF} \ x {E000} - \ x {FFFD} \ x {10000} - \ x {10FFFF}} ...

.net - How to distinguish that a type is ValueType Or RefereceType? -

Some simple types like int, string, .... It's easy to understand that they are ValueTypes or RefrenceTypes. Want to know what is the way to distinguish it? There are values ​​of all the strings, nim and the original type. At runtime you can check this type of: type type = type (TypeName); If (type.IsValueType) {// ...}

accelerometer - How to use Shake API in iPhone SDK 3.0? -

Apple announced the Shake API in the iPhone SDK 3.0. I do not get any information about this new feature Who knows how to use it? Any example, the link would be nice. The APIs you are looking for are: - (Zero) speedbuggan: (UIEventSubtype) document with speed: (UIEvent *) event; - (void) Speed ​​canceled: (UIEventSubtype) Documents with speed: (UIEvent *) event; - (zero) speed-bound: Documenter with UIEventSubtype speed: (UIEvent *) event; Generally, you only apply it: - (zero) speedend: (UIEventSubtype) document with speed: (UIEvent *) event {if (event.type == UIEventSubtypeMotionShake) {/ In addition, you want to handle it in dynamic: with: not speed: with: with: In your UIViewController subclass (UIViewController is a subclass of UIResponder) Additionally, . MotionBegan: withEvent: called when the phone suspects are getting nervous, but the OS can determine the difference between moving with a user's purpose and walking accidentally (walking on the stairs). I...

sql server 2005 - SQL 'Like' operator and 'aa' -

We've stumbled upon a very strange problem in one of our applications to compare a bunch of the seach engine filters Uses a stored procedure for However, when a specific type of string is inserted, then SQL Server (2005) behaves very strangely. I have separated the problem from the following: Choose 'match!' Whereas '% telia%' like 'telia' This Milan is Danish Norwegian CI AS and we have letters that mean the same thing also includes 'A' which means there is one'. This match will not automatically match "A" with "A". This will ensure that "one" is sorted correctly, but this option will not change . In the same way "SS" vs. "ß" in German, for example You have to clear the data in one way or the other. SELECT REPLACE ('teliå', 'a', 'aa'), / * ... or * / REPLACE ('telia', 'a', 'a') edit, May 2013 I think a is guessing th...

c# - asp:SqlDataSource binded to asp:DropDownList -

I have an asp: SqlDataSource and asp: dropdown list components on my page. This works fine on the normal page. Now I want to put it on a new page like URL ... mypage.aspx? In TransactionID = 2 page_load I want to make the transaction drop down selected index 2. But it always connects to 1. I think these things happen in this sequence: In page_load I set 2 selected index. Then the asp: SQL decoding the selection statement and binds it in the dropdown list, that is why the index selected in my dropdown list is always 1, whether I set it in page_load. So, how can I bind ASP: SQLDOSOSSRSAP: dropdown list and select it to some of the selected index parameter To set the selected index, type an event handler for the OnDatabase event of DropDownLists then is bound to it

iphone - AutoCompletion on UISearchBar -

I am developing applcation with UISearchBar & amp; Tableview Enter event on UISearchBar text I am reading four. & Amp; For the recorded text I am getting results from the database but the problem is that it is a blocked call. So I waited until the result is returned, but then I press the next four presses. I have to ask the database to enter for each character, I have query to enter the whole text from the database. I want to implement auto-compositing like Google search bar in the Google search bar, the user has to wait to get the list of voiced characters Iwant that I am using iPhoneSDK 3.0 to be implemented in my applcation The same thing is going on when I'm pressing backspace. But the problem is that this application crashes on iPhone Simulatior if I constantly press backspace. Can someone signal me ??? You can always apply your text lookup to a different thread - this is likely to present suggestions often. Can not do it, but it does not have at least bloc...

Strange Javascript/cross site cookies problem -

I'm running a PHP script that is running on domain B, when some generates JS The idea is that in the given html page I can have: So when the page loads, the script is called and the JS is generated and run on the local page. The problem is that depending on myscript.php b domain cookies if I type in my address bar, the script works fine, and I see JS text in the browser window. But when I include the quoted line above in the webpage running on a different webserver, call it A, it does not work. JS is still generated, but this is incorrect, Because there is no cookie available on the script. So, in a nutshell, access the script directly, cookies are available, all are well accessed by calling the script from the page provided from any other domain and it does not have access to cookies. I do not understand that due to the call to a script run on the B domain, the browser does not seem to send cookies to B? This is a security feature, cookie information is ne...

header - How to know which dynamic libraries are needed by an ELF? -

Is there a tool that prints the name of the dynamic libraries needed to run Linux executable by reading the header? I need to know if there are some weird dependencies (i.e. not very standard) in the binary that I have just created from source (this is the python branch of GDB) or it is mostly statically linked is. I think the makefile would be easier than reading ... "post-text" itemprop = "text"> / usr / bin / ldd your friend Sample output: linux-vdso.so.1 = & Gt; (0x00007ffd14f79000) libselinux.so.1 = & gt; /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f2d875fc000) libacl.so.1 = & gt; /lib/x86_64-linux-gnu/libacl.so.1 (0x00007f2d873f4000) libc.so.6 = & gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d8702f000) libpcre.so.3 = & gt; /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2d86df1000) libdl.so.2 = & gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2d86bed000) /lib64/ld-linux-x86-64.so.2 (0x00007f2d8781f000) libattr.so.1 = ...

mysql - Problem with UTF-8 in Create Schema By Hibernate -

After this is my hibernate.hbm.xml and I use MySQL ->> & lt; / hibernate-configuration & gt; when I This program creates a table in the database for the first time but my problem is that the charset is still latin1_swedish_ci (Latin) and what should I change in the hibernate.hbm.xml settings? UTF8 does not have to be div class = "text after" itemprop = "text"> I solve this problem by setting the character set-server in the code : [mysqld] character-set-server = utf8

.NET PropertyGrid Collection Editor and List<T> -

I am using PropertyGrid control in a WinForms application. The window itself builds into a category that has a list of items, if I like it, the grid has expanded and let the user modify the item like tree view, then I will compromise for the collection editor. If it will stop indexing members as "Rosswell". Windows.Command.Model "(fully resolved class name). I have both DisplayName attribute Included in It is only added to the system and class, but the archive editor window itself seems to ignore it (FWIW, it is .NET 3.5 in VStudio 2008.) Any suggestions? As long as I'm not blue on the face, I goggle (and fell asleep !!). A good value (C # example) class MyClass {public string can override the ToString method to provide someValue; set;} public override string toasting () {Use} Mr. string. Format ( "some value = {0}" it. Some value);}}

apache - mod_rewrite not working as internal proxy -

I have a site that directs traffic to www.example.com 123.45.67.89, port 8080 Need to use mod_rewrite, this is the rewrite rule I am using via an internal proxy: RivetingIn on Rivet rules ^ (. *) $ Http://123.45.67.89 : 8080 / $ 1 [P] When I go to www.example.com/myurl, I receive the following error with 404: Requested URL / myurl not on this server Was In. This redirect works on our dev server, but not on production. Is this an Apache setting that I need to enable to do this work? Thank you You should be able to use it.

sql server - Updating records with SQL statement that are in 2 diff. tables not working -

यह मेरा एसक्यूएल कथन है: UPDATE sysdba.CONTACT, sysdba.ADDRESS SET sysdba .ADDRESS.Address1 = '123 Tech Parway' WHERE sysdba.CONTACT.AddressID = sysdba.ADDRESS.AddressID और sysdba.CONTACT.contactID = 'CRBD' यहां क्या गलत है? टीएसक्यूएल समाधान UPDATE sysdba.ADDRESS SET पता 1 = '123 टेक पारवे 'से sysdba.ADDRESS INNER sysdba.CONTACT पर sysdba.CONTACT.AddressID = sysdba.ADDRESS.AddressID जहां sysdba.CONTACT.contactID =' CRBD ' पर जाएं

html - What is a good solution for cross browser javascript redirect with history? -

I am currently fighting Google Chrome on the following chrome: location.href = Url location.replace (url) document.location = url window.navigate (url) // does not work in Chrome / Firefox location.assign (Url)) window.open (url, '_self') window. Location.href = Url I have tried everything, and will not add any history entry Explanation ours A table of items, when a JavaScript redirect with no way to history in Google Chrome? Thank you. On clicking on the row, I want to navigate the page on a specified URL, if anyone has a good solution for anyone other than using this optical / dispatch method, then we are now using it, Please tell me Update It appears that Stackworflow has a similar problem with itself. In the main view, click on one of the first 3 columns in the question list (# answer, etc.), then click on the back button, this will take you back 2 pages. Although I should first say that this Chrome is behaving idiot...

How do I write/perform a type operations in Clojure? -

I have a hard time typing check type in the closure. Please help me please. How do I write 'four'? In closure? How do I write / write atom? In closure? How do I know how the item is in closure? Can I write (type? An-item) ? user & gt; (Example; character \ c) is true character here java.lang.Character . The traditional definition of atom , I think "zero or anything that is not a pair", but it does not make sense in the closure because the closure is everything under the sun For the opposition does not use cells we have vectors and hashpaps and sets. There is a possibility in the closure: (defn atom? [X] (not coll? X))

css - Change alpha for an image hover in CSS2 standard? -

Imageprop = "text"> I am trying to add alpha effect to my image image is in round shape rectangular shape. I know that there are attributes for changing alpha in CSS3, but I'm trying to be in line with the W3C standard, which is still CSS 2. Sorry, I did not tell my question correctly, I was trying to change the alpha while hovering over the image using CSS 2. I'm thinking of using "background-image" for 100% alpha and using the IMG tag for 50% alpha. Is there a better way of doing this? If the image is one, then you can include the alpha directly image. Of course this will require a script for IE6. Otherwise, you can use CSS to set transparency. EDIT: Updated only to work on the hover, note that it will not work in IE6. img.transparent {filter: alpha (opacity = 100); / * Internet Explorer * / Opacity: 1; / * Fx, Safari, Opera, Chrome * img.transparent: Hover {Filters: Alpha (Opacity = 50); / * Internet Explorer * / Opacity: 0.5; / * Fx, S...

cucumber - How can I determine if a radio button is checked already? -

I am using webrat with cucumber and I would like to test if a radio button is already being checked When i am on a page How can I do that? There was no move in Ibrat who could do that. find_field ("radio_button_name"). May be checked or in the new syntax: Expected (find_field ("radio_button_name")). Check

php - WMD Markdown and server-side -

Image
I have worked on the last 2 days, and I do not get the security data to be solved with security data, I would like to On the site HTML / XML and lt; Be able to post code> (with WMD) At the moment, I use stock data in Markdown format, but if I disable JavaScript, the user can easily push the XSS. If I use strip_tags or html_entities all the data to user HTML / XML & lt; Code> How can I do this? In my opinion, I want html_entities , just the code between pre / pre, but how?! My data is in Markdown. After that, what can I do to deny XSS properties: & lt; Img src = "javascript: alert ('xss');" / & Gt; To "clean" your HTML, you can use a device like Actually, it allows you to specify which tags / attributes are allowed only to keep them. It also produces valid (X) HTML code as output - which is good. You can see that there is an example that is almost XSS posted by you, BTW; -) For example, you can try with some HTM...

JQuery asp.net validator callout plugin updatepanel -

I am using this plugin: This control is valid To be there is an updatepanel inside I am starting the plugin like this: $ (document) .ready (all) before posting back Works fine, the callout plugin gets spoiled after an ASINC postback. Function () {$ .updnValidatorCallout.attachAll ();}); I put it in the confirmation of pageload and update the end of the pane, but no success was found. Anyone have more information about this? This is how UpdatePanel works. When UpdatePanel refreshes, it will replace the attached content inside it. This will break your plugin because it will not be able to find the original plugin. To resolve this, call this 'attachAll' method when UpdatePanel refreshes it to force it again.

functional programming - Is List-Comprehension any better than List-Abstractions? -

Why people like list signals like ([x 2 '] (* 2x) ) instead of (map # (*% 1 2) '(1 2 3)) ? Does such programming benefit? 1. Is this more readable? 2. Is it fast in some cases? 3. Is it better for some type of operation and data structures? For a given example, there is no benefit; But in general, for is useful when you are involved in two (or more) views or when some filtering is required - with for Code>: Let's and : are generally more readable than a series of nested maps and filters .

Creating submenu with css in IE -

I want to create a sub-menu in IE while using CSS, but the IV does not work with the hover action. Do not want to use javascript. How do I solve it? Is there another way to create a sub menu without css or javascript? You can use the following code: IE6 based on the JQuery library if (jQuery.browser.msie & navigator.userAgent.toLowerCase). Indexoff ('msie 6') & gt; -1) {jQuery (document). (Function () {jQuery ('. Menu') hover (function () (jQuery) () this .addClass ('hover');}, function () {jQuery (this) .removeClass ('hover'); });}); } Please change the selector "menu li" into it and write it in the following manner in the menu. Menu Lee: Hover,. Menu Lee Hopper {...}

c# - Should one use self-referencing generic inheritance like Customer : Entity<Customer> -

क्या स्व संदर्भित सामान्य विरासत का उपयोग करना उचित है? सार्वजनिक अमूर्त वर्ग इकाई & lt; टी & gt; {सार्वजनिक गाइड आईडी {प्राप्त करें; सेट;} सार्वजनिक int संस्करण {get; सेट;} सार्वजनिक टी क्लोन () {... // clone routine ... return T; }} सार्वजनिक वर्ग ग्राहक: इकाई & lt; ग्राहक & gt; {सार्वजनिक स्ट्रिंग ग्राहकनाम {प्राप्त करें; सेट;} ...} एक आधार ग्राहक वर्ग को ग्राहक कैसे डालता है? "ग्राहक: इकाई" क्या लाभ प्रदान करता है? क्या जेनेरिक के बिना "ग्राहक: इकाई" का उपयोग करना बेहतर है? आपको इसकी आवश्यकता होती है जब आप इसकी आवश्यकता होती है, न कि सिर्फ इसलिए कि आप कर सकते हैं उपरोक्त उदाहरण में, यह क्लोन () को कार्यान्वित करने के लिए कुछ समझ में आता है। हालांकि, जैसा कि आप सही तरीके से बताते हैं, इसका मतलब है कि आपके इकाई वर्गों में वास्तव में एक आम आधार वर्ग नहीं होगा, और उन गुणों को जो वास्तव में आम हैं, वे उपलब्ध नहीं होंगे। इसे संभाल करने का सही तरीका इसे सामान्य और गैर-सामान्य भागों में विभाजित करना है: सार्वजनिक अमूर्त वर्ग इकाई {स...

logging - Why would a log statement change the output of a program? -

During the interview I asked the following questions, and I am still not quite clear on the answer. I was wondering if anyone knew where I could learn more, googling is not helping much: Say you have a program that you want to test. You add a single log statement and suddenly, the program that produced the expected output would stop the expected production output. Ah I really did that. Let's consider a program that is a bug that has to expose the heap. If you present a log or print statement, call the log may change the stack enough to change the behavior. This is an interesting problem, perhaps one of the easiest to do this with a bad format in a printf ... OK, at least one example would look like this in the framework . int parent () {... printf ("% s \ n", itao (child ()); Int kids () {int num; Scanf ("% d% d", num); / * Notice to the format; Scanf will eat as much as it should * be compared to stack * / return number; / * But this return ...

php - PDO Prepared Inserts multiple rows in single query -

I currently use this type of SQL on MySQL to insert multiple rows of values ​​in a single query Enter: VALUES ('r1v1', 'r1v2'), ('r2v1', 'r2v2'), in the `TBL` (` key1`, `key2`),. .. Ready read statement on PDO, should give me better protection than static questions. So I would like to know if it is possible that "insert several lines of values" using a query "using ready statements If so, then I know that I How do I apply it? Insert multiple values ​​with PDO ready statement According to this page, it is faster than regular inserts, because putting multiple values ​​into an executed statement $ 'Data field = array (' field ',' field b ', ...); $ data [] = array (' field '= & gt;' value ',' fieldb '= & gt;' Value '....); $ data [] = array (' field '= & gt;' value ',' fieldb '= & gt;' value '....); More data values ...

time - Automatically timing every executed command and show in Bash prompt? -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब मुझे अक्सर भूल जाते हैं स्पष्ट रूप से "टाइम" कमांड के साथ फांसी फैलाने के लिए, आदर्श रूप से मैं अगले शेल प्रांप्ट में देखूंगा कि आखिरी कमांड ने कितना वास्तविक समय लिया था (हर कमांड पर)। मैंने पहले से ही बास प्रलेखन के माध्यम से दागे, लेकिन आप यह कर सकते हैं: $ Bind '"\ Cj": "\ C-atime \ Cm"' या इसे अपने ~ / .inputrc में रखें: "\ Cj": "\ C-atime \ CM" तब जब आप समय नींद 1 करना चाहते हैं, तो आप टाइप करेंगे सो 1 और के बजाय + जे + मैं j और एम बाध्य कमांड में (या .inputrc फ़ाइल में)। हर बार जब आप एन्टर करें दबाते हैं, तो आपको समय जोड़ा जाता है जो बहुत कष्टप्रद हो सकता है और मल्टी-लाइन कमांड लिखते समय त्रुटियों का कारण बन सकता है। आप इसे अपने ~ / .bashrc में समय अधिक कॉम्पैक्ट बनाने के लिए जोड़ सकते हैं: निर्यात TIMEFORMAT = 'r: % R, यू:% यू, एस:% S ' (मेरे उत्तर की तरह।)

c# - Implementing IList interface -

I'm new to generic, I'll call it IList & lt; T & gt; From the interface, I want to apply my own collection. Can you please provide me some links for a class which is IList & lt; T & gt; Interface or provide me a code that applies at least add and remove methods? Unless you have a strong reason to do this, your best The condition will be derived from the system. Collections.ObjectModel.Collection & lt; T & gt; Please note that IList this does not need to implement [int] (indexer) o (1) (basically, access to constant-time), this very recommendation It is done that you do this.

SQL Server function to convert Unix time to local datetime -

I convert a Unix time value to SQL Server for an efficient SQL Server function (in my case 2005) Viewing data time, using local time (especially taking account of summer adjustment - i.e. just not adding to 01/01/1970 in seconds) SELECT DATEADD (second, @ts, {d '1970-01-01'}) After you date, now you do dateadd For the date of return you will need some functions to check the DST on the basis of DST state, Sample: build function [DBO]. [Fn_GetDaylightSavingsTimeStart] (@ year varchar (4)) DSTSTRteEa SmarterDate @DTSEndWeek smalldatetime set @DTSStartWeek = '03 / 01 / '+ Convert (varchar, @year) Return Date datepart (dw, @dtsstartweek) when date date date 1 (hour, 170, @ DTSTTATEAQ 2) then dateadd (hour, 314, @ dtststattek), when 3 days (hours, 290, dtststreet, one), after 4 minutes, dated date (hour, 266, dtststttehike), 5 minutes time (242 hours) , DTSTTATEAk), after 6 minutes, Dated (Hour, 218, DTSTST) when End date end of 7 days (hour, 194, dtststhrhh) ...

SVG to JPEG via PHP4 -

I am currently struggling with a side project, hope you can help me. I am trying to convert SVG images into JPEG with PHP. Basically I tried php_java.dll and jar, which comes with PHP 4.2.2 but I have never received any warnings, but I have ever managed to get simple test Not working. All the text about it is for JDK1.4 and one is for JDK1.2. This will enable me to use it. That's why I looked very hard and saw secret references to SVG in JPEG. GD seems to be able to load and save JPEG, PNG, GIF, etc., but SVG is not straightforward. The GD seems to use a vector graphics format, but it is not entirely certain that it is SVG compatible (I am a noo for both). I got it, but obviously Pearl is required - PHP and Lieutenant; -> Java I hate to go that route. I found a site (which I can not get anymore) that discusses the speed of many SVG conversions with RSVG, Cairo and the other. Speaking of JPEG applications that convert SVG, people also discuss. Although this can work...

Eclipse BIRT and Oracle: Need to set role before running report -

Is it possible to define the role of the database before running a report? I have a lot of databases in which there are several schemas with the same set of tables in each number, where there are many roles to control each schema, reading, writing, data management etc. None of these have the default role. In Sqlplus or TOAD, before I run a selection statement, I can roll the SET. I would also like to do the same in BIRT. It may be possible to do this by using an open event after the Oda data source, but I have not found an example to use and use the original connection in JavaScript. I do not have permission to add or change anything at the end of the server. You can make an additional call to the database by using JavaScript in the open method after the data source. You can use JavaScript or Java event handlers to execute the SET ROLE statement or call a stored procedure that will execute it for you. This is done after the initial DB connection, but before the data set ...

design - To re-write or not? -

This is a strategic question I have a large part of software, web based, which is about 50 to 60 different tasks The software runs approximately 100 MySQL tables, and may be considered as a large module that can target different sets of 3 large audiences. It runs very well. The software was launched 5 years ago, and has gone through incremental improvements. I designed a lot and wrote the system alone. There are definitely places where the design is bad; And after 5 years, I feel that if I rewrite some parts of it then I can definitely do a better job. But we have never written it from scratch, so some bad designs have been left there. The code works, but design is not at all beautiful at all places. The system was built on a proprietary software platform; The platform provides strong security (99% of other web platforms, gel saftles, forcible parameter SQL, line based ACL on mySQL data) and performance (the number of resources increases, the number of concurrent hits is not). ...

What is the difference between a member variable and a local variable? -

What is the difference between member variables and a local variable? Are they the same? All this is very abstract, though. Here is a C # example: class program {static void Main ()} {// This is a local variable, its lifestyle / lecture area is determined by Phu Fu; }} Square Foo {// This is a member variable - a new instance of this variable will be created for each // new instance of // fu. The life span of this variable is equal to the frequency of "this" // fu . Int bar; }

php - Drupal 6: Views: Listing taxonomy terms with tagged nodes underneath -

I need to create a scene that lists the rules of classification and then lists the top 3 recently (Order according to node: update date) node with that tag Exclude the example: article Article 2 Article 3 Podcast Podcast 1 Podcast 2 Podcast 3 . I have created a scene of "Term" and I can get the view to output all the conditions. However, I do not know how to link in nodes tagged with the classification word. I used to look around close to the node, but I did not need much for output. In exterior scenes, it seems that taxnavis in fact. What does the module do? (Disclaimer: I am its author)

ruby on rails - nginx rewrite rules with Passenger -

I am attempting to migrate from Apache to NGN using the passenger in both instances to host the Railway app . The app makes a request, which is for an image - if the image / system / logo / $ is on the requested image, it should be served, or if it is necessary, to allow it to hit the rail app Rewrite code% {DOCUMENT_ROOT} / system / logo /% {REQUEST_FILENAME} -f rewrite rule ^ / (where it is *) $ Http://assets.clg.eve-metrics.com/system/logos/$1 This worked fine properties. Subdomains have other subdomains, but the same root Along with, the bus passenger is set to host special, static files (the expiry time). In the NGN, I am using the following: server {80; passenger active; Server_name clg.eve-metrics.com www.clg.eve-metrics.com; root / opt / www / CLG / current / public; on jeez; gzip_min_length 1000; gzip_proxied end No-Cash No-Store Private Oath; Gzip_types Text / Plain App / XML Text / CSS Application / JavaScript; G Zip_disable msie6; error_page 500 502 503 50...

javascript - Looking for a Dijit Widget which works like a default html select -

I'm looking for a widget that works like a normal HTML complex (combo box). Until now, all the DIGIT widgets are available, there is an editable text box. I do not have a drop down box and no editable textbox & lt; Choose Name = "Acrobox" & gt; & Lt; Option value = "1" selected = "selected" & gt; Hund & lt; / Options & gt; & Lt; Option value = "2" & gt; Katze & lt; / Options & gt; & Lt; Option value = "3" & gt; Mouse & lt; / Option & gt; & Lt; Option value = "4" & gt; Waldelf & lt; / Option & gt; & Lt; / Select & gt; It is also important for me, that the upper code is working with the widget and the widget has to use the "value" value, not the display text. I am checking this digit widgets: Cambaughton, ComboBox, FilteringSchedited, Dropdown Button. Perhaps there is a feature that I forgot to set up. Is there a widget tha...

algorithm - Sort array in ascending order while minimizing "cost" -

I'm taking the next 22 hours (data structures) and I'm homework for a summer semester online post till now, I have not had any problem with assignment. Take a look at Assignment 4 below, and see if you can give me a hint about how to contact this. Please do not provide a complete algorithm, thanks only one approach! A "costed sort" is an algorithm in which the sequence of values ​​should be arranged in ascending order. By doing the difference between the position of two values ​​at a time until the order is in the correct sequence. Each exchange has a cost, which is calculated as the calculation of the two values ​​included in the interchange. The total cost of the sort is the sum of the cost of the interchange. For example, suppose that the initial sequence was {3, 2, 1}. Interchange 1: {3, 1, 2} Interchange cost = 0 interchange 2: {1, 3, 2} Interchange cost = 4 interchange 3: a potential series of interchange: Given the total cost of {1, 2, 3} interchange = 5, ...

Error 210002 with XCode + SVN -

I am trying to use the built-in subversion server on OS X. I use SSN via SSN I am trying and not Apache However this is not working. When I try to configure the repository, I get the following error: Error: 210002 (Network connection unexpectedly turned off) Description: Connection closed unexpectedly , I tried to "svn list" from the command line and it worked. Also, I am using the same URL structure on the configuration screen. From the command line, it works! Any suggestions about how to troubleshoot this problem? I had only one error, but what happened, a server was rebuilt and " My user account in the file named "known" was the old server setup of the same machine, in "~ / .ssh", I trashed the Known_hosts file and went to the terminal, and again SSH-ed liters. ..

memcached - Memcache in high performance sites with PHP -

I am trying to customize a webservice that needs to be somewhat faster (less than 1 second) And necessary to maintain a high load of requests (more than 1000 / second) we are using memcached as a way of storing objects in "memory". It seems that we are getting large number of output errors from memcash. [Thu 23 Jul 22:59:42 2009] [Error] [Client 123.456.789.10] PHP Warning: Memcache :: Connect () [Memcache.connect]: 127.0.0.1121211 Not connected Maybe, the connection timed out (110) Then, for questions The memory would be used to store objects in memory Is that the time to make that? Will APC be a better place for these things? Read number and Are there common problems that I'm ignoring in establishing memcache to work more efficiently? Thanks for any help, I'm new to working with memcache, and I think I'm missing something. To answer your first point: memcached The power is that it allows the creation of a cluster of cache servers: This ...

How do you call Scala objects from Java? -

जावा कोड: import javax.swing.Timer; कक्षा मुख्य {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग एल्ग्स []) {मायलिस्टर मेरीलिस्टनर = नई माइलिस्टनर (); टाइमर टाइमर = नया टाइमर (1000, मायलिस्टर); timer.start (); जबकि (टाइमर.इसरिंग ()) {System.out.print ("।"); }}} स्काला कोड: आयात करें java.awt.event.ActionListener; आयात करें java.awt.event.ActionEvent; वर्ग MyListener ActionListener विस्तारित {ओवरराइड डीईएफ एक्शन कार्रवाई (arg0: ActionEvent) {println ("कुछ करो"); }} कमांड लाइन: scalac MyListener.scala javac Main.java जावा- सीपी / यूआरएसआर / शेरे / जावा / एससीला- library.jar: । मुख्य मैं java.util का उपयोग करके शुरू करूँगा। Timer - नहीं javax.swing .Timer। स्विंग टाइमर तब तक काम नहीं करेगा जब तक कि आप अपना एपीआई जीयूआई के साथ नहीं चला रहे हो (यानी यह काम नहीं करेगा, अगर आप कंसोल के जरिये लिनक्स पर इसे विशेष कमांड लाइन पैरामीटर के बिना चलाते हैं - सबसे अच्छा टाला)। एक तरफ सेट करना: सुनिश्चित करें, जब आप कोड चलाने का प्रयास करते हैं, तो आप अपने क्लास...

jquery ajax problem -

A few days ago I posted this question: who created a series of divs using this code with me ( "+ I). SlideDown () seems ("input") addClass ("SomeClass") .; } My problem is that I now need to get the values ​​of each #play div and send it to a php script via AJAX. If I had a certain number of divs, then I could do it easily, but how do I have to do it when I do not know how many #play will be? More details! It seems that I did not explain clearly in my basic question, so I will try and explain things better. I want to use an AJAX phone in the remote php script. $ .pos t jQuery method I can send the information of remote scripts very easily. Here's an example: $ ("# submit"). Click (function () ($ {. .post ("..// include / process.php", {play_0: $ ("(" # play \ _2 "). Val (), play_3: $ (" # play (" (Play);} ();} ();};);};};};} The php script can now access this information via the $ _POST array...

large sql resultsets in java -

Can I get big results in Java? I have around 140,000 rows with 3 columns. There is no specific way of achieving a large result set; This can be done by jdbc like any other database query The key is how the results are handled. 140,000 small records are not very high, but if they have a problem keeping them in the application memory once in a while, then consider whether they can be processed "streamwise"? That is, use the necessary information from each record, then discard the record before retrieving the next. In this way, the requirement of memory does not depend on the number of records in the result set.

c++ - Finding edge in weighted graph -

I have a graph with four nodes, each node represents a position and they are like two dimensional grids is kept. Each node has connections (one edge) for everyone (according to the condition) adjacent nodes. There is also the weight of each edge. Nodes are represented by the weight of A, B, C, D and edges, which are represented by numbers: A 100 B 120 220 C 150 D I want to create a container and an algorithm that shares the nodes with the highest weight. Then reset the weight of that edge, for example, the above processing, the highest load is on the side of the beady, so we switch them on, the node (position) can be switched more than once. Since any node can be switched more than once, so all the edges involved in either B or D are reset. The weight is only on the edge, switching can give us the final layout: C, D, A, B. I am currently running a terrible implementation of this. I store a long list of edges, which are connected to the nodes (potential), keep a value fo...

python - How to set LANG variable in Windows? -

I am making an application which supports multi language and I Gettext and Locale How to set the LANG variable in Windows? In systems like Linux and Unix, it is as simple as $ LANG = en_US dragon appname.py and it automatically sets that location Will make special language but in Windows, C: \ & gt; SET LANG = en_US Dragon Application or C: \ & gt; SET LANG = en_US C: \ & gt; Python appname.py does not work. Whatever user it sets in the control panel.

.net - Can't see the designer view in Visual Studio 2008 C# Windows Forms due to weird error -

When I try to click on the Designer tab to view the designer, I get this error: To prevent potential data loss before loading the designer, the following errors should be solved: The designer could not be shown for this file because none of the classes are ready can be done. The designer examined the file in the following sections: Form 1 --- The base class 'System.Windows.Forms.Form' could not be loaded. Ensure that the assembly has been referred and all the projects have been made. I want to go to the designer and I do not know what is wrong. My Form 1 code looks at the top of it: using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Text; Using System.Windows.Forms; Using System.Drawing.Drawing2D; Using System.Diagnostics; Namespace Fobar {Public Partial Category Form 1: Form {List & lt; Charlabel & gt; AllChars = new list & lt; Charlabel & gt; (); Public Form 1 () ...

r - Reshaping time series data from wide to tall format (for plotting) -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मेरे पास एक डेटा फ्रेम है कॉलम में संग्रहित कई रिटर्न का समय श्रृंखला। पहले स्तंभ में तिथियां होती हैं, और बाद के कॉलम प्रत्येक नाम के साथ स्वतंत्र समय श्रृंखला होते हैं कॉलम हेडर वेरिएबल नाम हैं। ## मेरे पास इस तरह की डेटा फ्रेम है & lt; - seq (as.Date ('2009-01-01'), = 'दिनों से ', लंबाई = 10) एक्स & lt; - rnorm (10,0,1) वाई & lt; - rnorm (10,0,2) Z & lt; - rnorm (10,0,4) dat & lt; - data.frame ( टी, एक्स, वाई, जेड) ## जो टी XYZ 1 के रूप में प्रकट होता है 1 9-01-01-01 -1.8763317 -0.1885183 -6.655663 2 2009-01-02 -1.3566227 -2.1851226 -3.863576 3 2009-01-03 -1.3447188 2.4180249 -1.543931 मैं प्रत्येक समय सीरीज़ को एक अलग साजिश पर एक पंक्ति के रूप में साजिश करना चाहता हूं, एक जाली में, प्रत्येक नामित वेरिएबल नामों के अनुसार भूखंड। यह जाली के साथ साजिश करने के लिए, डेटा एक लंबा प्रारूप में होना चाहिए, जैसे: t प्रतीक मूल्य 1 2009-01-01 एक्स -1.8763317 2 2009- 01-02 वाई -0.1885183 2 2...

Date formatting from SQLite query -

I am trying to drag and format timestamps from my SQLIT DB. In my reading, it seems that the SQLite formatting is very limited in comparison to the date format conversion available for PHP. I get this query from javascript: SELECT strftime ('% m% d,% Y', timestamp) savedate and it gives I am trying to get it back: 03 03, 2009 March 3, 2009 Any suggestions? Unfortunately, SQLite. You must use it for a month's name either a lookup table, a case statement, or a switch at the presentation level.

remoting - What is the underlying mechanism used to communicate between .Net AppDomains in the same process? -

I would realize a rational knee-jerk reaction "You're stupid remoting! Read MSDN docs." I can find out about every scrap of information. Net remoting is in the context of inter-process communication: sockets, shared memory, pipe ... classics when it comes to IPC, but an appdomain is not really a process. However, AppDomains enjoy the most benefits of being one. From an academic perspective, OS IPCs are heavier than communication between old institutions, which remain in the same process. Is there a special apparmon pipe that uses the communication process to cross an appledom limit within the same process? I doubt it. I would be surprised if MS has changed the basic principles of process alienation in the Windows kernel to adjust app docs. In this case there is no need for a faster way to enterprosession communication, as the appdomain is in the same process And CLR has all those and full addresses. This is actually a few markers in the call stack as well as fluc...

Verifying that a string contains only letters in C# -

I have an input string and I want to verify that this is in: Only letters or numbers letters and numbers only letters, numbers or underscores only To clarify, I have 3 in the code There are different cases Calling for different verification What is the easiest way to get it in C #? characters only: Rexax. IS match (input, @ "^ [a-ja-jade] + $"); Only letters and numbers: Regex.IsMatch (Input, @ "^ [a-zA-Z0-9] + $"); Only letters, numbers, and underscores: Reggae. IS Match (input, @ "^ [A-GAA-G-0-9 _] + $");

Suggestions for a user notification system in MySql and PHP -

I am implementing a notification system and see if these suggestions are valid for setting up, if Better or better solution is available than any other: An information has been added to the database. A guest / identifiable user logs on or uses the site. Notification table stores notification texts and IDs. Option 1: Alert table stores all users who have read the notification Option 2: Alert table Store all users who have not read the notification Is these options too much, is it probably better to add 100,000+ alerts and as such, users abandon their information or Interacted with them, change their position Bone or is deleted warning. This can be a very big desk ... What is a more extensible set up for custom alerts based on user activity? I will not do it like this, I keep a record (user, notification) for each and I mark each record as unread or unread. When you read it, you can record, which can be important depending on your application (for example, if y...

php - get only 5 elements from array -

मेरी सरणी का पालन करें: array 'testuri / abc' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'एबीसी' (लंबाई = 3) 'वजन' = & gt; फ्लोट 5 'टेस्टरी / एबीडी' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'abd' (लंबाई = 3) 'वजन' = & gt; फ्लोट 2 'टेस्टरी / डेस' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'डेस' (लंबाई = 4) 'वजन' = & gt; फ्लोट 2 'टेस्टरी / जीडीएम' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'जीडीएम' (लंबाई = 3) 'वजन' = & gt; फ्लोट 2 'टेस्टरी / अब' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'अब' (लंबाई = 3) 'वजन' = & gt; फ्लोट 2 'टेस्टुरी / एसे' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'एसे' (लंबाई = 3) 'वजन' = & gt; फ्लोट 2 'टेस्टुरी / आरडीएक्स' = & gt; सरणी 'लेबल' = & gt; स्ट्रिंग 'आरडीएक्स' (लंबाई = 3) 'वजन' = ...

javascript - Determining the difference between new Object and new fn -

आप new object और new fn के बीच का अंतर कैसे निर्धारित करते हैं आप __ प्रोटो __ या Object.getPrototypeOf मौजूदा पर निर्भर नहीं हो सकते, क्योंकि वे IE या Opera में नहीं हैं। समाधान, fn , जैसे instanceof fn का स्थिर रूप से उपयोग नहीं हो सकता है। अपना खुद का Object.getPrototypeOf लागू करना ठीक है। जरूरी नहीं है: यह अच्छा होगा यदि आपका समाधान अन्य फ़्रेमों से ऑब्जेक्ट के साथ काम करता है और फंक्शन सीरियलायज़ेशन का उपयोग नहीं करता है। यहां कुछ उदाहरण बेस कोड से शुरू करने के लिए: var fn = function () {}; Fn.prototype = {}; Var x = नया एफएन, वाई = नया ऑब्जेक्ट; एफ एन = नल; // निषेध करने के लिए स्थिर संदर्भ fn // अपने पहचान समारोह को परिभाषित समारोह यहाँ है नया ऑब्जेक्ट (obj) {}; अलर्ट (isNewObject (x)! == isNewObject (y)? "Pass": "fail"); मुझे पूरा यकीन है कि आप ईएस 3 में ऐसा केवल मानक समर्थन के साथ नहीं कर सकते , और यहां क्यों है: x और y सृष्टि को देखें। var fn = function () { }; Fn.prototype = {}; Var x = नया एफएन, वाई = न...

cocoa - Archiving and Unarchiving results in Bad Access -

I am having trouble setting up a model object in which to maintain the user's visual status in the simple graphics application Sealier can be made in the iPhone I am trying to pass those properties to the model objects and to save the background color and the frame of all the existing layers on the screen which implements the NSCoding protocol and then in an NMTTABEER, the owner of the App Rep Then I store the array with NSKeyedArchiver and store it in NSUserDefaults. Each collector's background collector's property is converted to UIColor so that it can be encoded for collection by model object. I feel that I am inadvertently unselecting the array or not reorganizing the position correctly with an unstable array when I try to use the UIColor object stored in the model object, then give me an EXC_BAD_ACCESS get. I thought that this is probably a bug with UISCLOR object encoding, so dragging values ​​with CGColorGetComponents function from CGColorRef and trying to ...