Posts

Showing posts from June, 2012

c# - Why is this field declared as private and also readonly? -

निम्न कोड में: सार्वजनिक वर्ग MovieRepository: IMovieRepository {निजी केवल पढ़ने के लिए IHtmlDownloader _downloader; सार्वजनिक मूवी रिपोजिटरी (IHtml डाउनलोडर डाउनलोडर) {_downloader = downloader; } सार्वजनिक मूवी FindMovieById (स्ट्रिंग आईडी) {var आईडीयूआरआई = ... बिल्ड यूआरआई ...; Var html = _downloader.DownloadHtml (आईडीयूआरआई); वापसी ... पार्स आईडी HTML ...; } सार्वजनिक मूवी FindMovieByTitle (स्ट्रिंग शीर्षक) {var titleUri = ... build URI ...; Var html = _downloader.DownloadHtml (शीर्षकयूआरआई); वापसी ... शीर्षक शीर्षक एचटीएमएल ...; }} , और किसी ने इस दृष्टिकोण का सुझाव दिया मेरा प्रश्न यह है कि क्यों IHtmlDownloader चर केवल पढ़ने योग्य है? अगर यह निजी है और readonly , लाभ यह है कि आप इसे अनजाने में इसे उस कक्षा के दूसरे भाग से बदल नहीं सकते हैं, इसके आरंभ होने के बाद। केवल पढ़ने के लिए संशोधक यह सुनिश्चित करता है कि फ़ील्ड को केवल इसके आरंभीकरण या उसके वर्ग के कंस्ट्रक्टर के दौरान एक मान दिया जा सकता है। प्रारंभ करने के बाद कार्यात्मक रूप से कुछ परिवर्तन नहीं करना

iphone - When do you need to use a view controller? -

I am diving into iPhone development and am trying to see my head around one of my original ideas If you see an example of GL Paint on Apple Dev site, you will see a project that <... an app representative class a uiwindow subclass < / Li> and a uiview subclass and the uiview subclass applies all core graphics painting logic and possible to touch events The Creeper. My questions are ... Why is no visual controller implemented to handle that visual argument? Can you use a visual controller to implement that logic, or to implement it in the UIV sub-class? And finally, when you should use a visual controller to apply visual logic code? Thank you very much for your help! One view knows how to interact with the user. It knows how to display some data, how to manage events, and how to give feedback to the user. A visual controller knows what, but now how. It knows what data is displayed, and what to do in response to user action. A UIButan knows how t

garbage collection - Lua userdata gc -

Is it possible to capture the context of a lua object for a piece of leaked usager? (Like a table, or the second piece of user data?). In fact, what should I know: Can I create a piece of user data like this when GC runs, then user data can say: "Hey! I hold the references of these others Edit: Answer to lhf: Suppose I have: struct vertex {Double X, Y, z; } Straight quaternion {double w, x, y, z; } Now, I can: struct Foo {Vertex v; Quaternion q; } but instead I think that: struct bar {Vertex * v; Quaternion * q; } [i.e. Suppose, the Vertex & amp; Quaternion is actually a big piece of user data]. Now, suppose I have a LEA user function that takes UserDataVertex and UserDate Quaternion and creates a UserData bar (I do not want to use a UserDoq because I want to save space) - so I do not want GC-ED for UserData Vertex * * * * * * Quantanians * Is it possible to capture the reference of the object object for a piece of data user? No. A. Use

Android Assets - Unable to access -

Using this code, it should return a list of assets, but when I call the list method, the "source Not found, edit source search parse ... "with the message it crashes: @override Create a bundle savedinstancestate {public at zero} {super.onCreate (savedInstanceState) ; SetContentView (R.layout.main); AssetManager property = this.getAssets (); Try {// error occurs on the next line of the string [] l = assets.list (null); } Hold it (IOException E) {}} Use it instead: < / P> string [] arr = getAssets (). List ("");

perl - How can I conditionally insert lines when using Tie::File? -

How can I change this code to include missing lines without deleting the existing code? Tie my @ lines, 'tie :: file', $ fn or die "Could not tie the file: $!"; ($ My $ i = 0; $ i & lt; @lines; $ i ++) {If ($ ln_title == 0) {if ($ i Your requirements seem a bit unclear, so it's hard to tell What do you want. If you want to insert a TITLE "" line after the line instead of the (overwritten) line instead of the TRACK line < Code> TRACK line, then you can use the following in place of $ rows [$ i + 1] = ... : Splice @ line, $ i + 1, 0, 'TITLE' '';

c# - How to set a default value with Html.TextBoxFor? -

Simple question, if you use HTML Helper from ASP.NET Framework 1, then it's easy to set a default value The text box is because there is a surcharge Html.TextBox (string name, object value) . When I tried to use the Html.TextBoxFor method, my first guess was that it should not work: <%: HTML .TextBoxFor (x = & gt; x.Age, new {value = "0"})%> Should I stay with HTML.TextBox (string, object) for now? You can try it

Should I dive into ASP.NET MVC or start with ASP.NET Webforms? -

I'm planning to take Silverlight in the future. The possibility of going to Microsoft WPF Currently aiming to learn c 2.0 w / coco I already know the pros and cons of ASP.NET MVC versus ASP.NET webform. What I want to know is that what would be more "efficient" to know the above circumstances? By skillful I mean once learning a design pattern and then using it again. Objective C I think the MVC uses the approach? What about Silverlight? WPF? I will go to B & N tomorrow to take an ASP.NET book so that I have to make a decision between webform and MVC right now. Also, as a side question, it is true that ASP.NET webform is often used in large enterprises by freelancers / small companies and ASP.Net MVC. I believe that ASP.NET MVC is more, how the Web works as a workform, but that does not mean that someone should deform ASP.NET webforms and just use ASP.NET MVC I think you try to see both of them What should be your future plans, even though. As

drupal 6 - how to know if user is seeing home page or not? -

Today I'm coding some JavaScript, I need some images in it, only on my home page Br> How to know if the user is viewing the home page or not? Or do I do this with URL check? Is their duplicate function built into 6? in a page.tpl.php or similarly you can use $ is_front $ is_front: TRUE if the current page is the front page from:

Absolute URL Path for PHP Website -

I am working on a website in the CMS site. I have provided a link in my footer file eg. Blogs Php This page is like root, like "" When I go to other files such as the footer changes to "" link, "" blogs.php page stays on the path "". I tried different $ _SERVER [] variables but found no luck to get the above path "" means the name of the server with the directory where the project is currently running. Any person gets the idea of ​​how to do it You can use the full URL or try to rewrite your URL with a condition.

java - communication between remote servlets -

I have two web applications, which say App1 and App2. I want to call a service which is in App2 from servlet in App2. I am using the URL connection for this, I am able to pass the parameter for the servlet in App2 and I get feedback from the servlet as a straight Able to do But I want to send java objects from servlet in App2 and want to get them in the App1 servlet. How to get it? Depending on If those webpages are physically located on the same webserver in the same serviced container, then set it only as a request attribute and forward the request for another reference: request.setAttribute ("name", object); ServletContext app2 = getServletContext (). GetContext ("app2"); App2.getRequestDispacher ("servletUrl"). Forwarded (request, response); Other context objects will be able to get: object object = request.getAttribute ("name"); This requires only a server setting, which can be accessible by each other. How to do this

SQL Server: Is there a way to grant execute using GUI? -

Is there a way to execute execution permissions to use a role or user GUI (T-SQL)? I am using SQL Server 2008 SP1 check out. This is a part of the SQL Server Client Tools package, but it is also called a free version. Related resources:

iphone - UIWebView is zooming when I resize it. Can I tell it to stop doing that? -

I'm using UIWebView to display formatted text By the time I do not start resizing it works fine. When I start zooming it out and the font size is very large. Is it anyway to zoom or not reset? Try to set minimum zoomscale and max zoom scheme to Uiwebview 1.

ios - How to track how many times an iPhone app is opened? -

I am creating an iPhone app and want to track how many times it has been opened so that I am a user After working, after opening X number of X, I have thought about storing a variable in the core data, which is opened every time, but it looks like a garbage because it is a singleton data, and not Many examples of an object. What is the best way to store such data and to use it without slowing down the time of app opening? You can store it user default here: - (BOOL) Application: (UIApplication *) Application given FinishLaunchingWithOptions: (NSDictionary *) launchOptions {[self countOpen]; } - (zero) countOpen {int _coutn = 0; _count = [[[NSUserDefaults Standard User Default] ObjectForrechy: @ "Appointment"] Intavele]; [[NSUserDefaults Standard User Default] Set Object: [NSString stringFormat: @ "% d", _ count + 1]: @ "AppCount"]; }

.net - Two questions on ensuring EndInvoke() gets called on a list of IAsyncResult objects -

तो यह प्रश्न। नेट IAsyncResult डिजाइन पैटर्न और EndInvoke को कॉल करने की आवश्यकता के संबंध में है प्रश्न में पृष्ठभूमि मेरे पास कुछ कोड है जहां मैं संभावित रूप से कई असिंक्रोनस कॉल को किसी विशेष फ़ंक्शन से बंद कर रहा हूं और फिर इन सभी कॉल्स की प्रतीक्षा कर रहा हूं प्रश्न 1 मुझे नहीं पता है कि क्या कोई भी परिणाम वापस पाने के लिए endInvoke () का उपयोग करने से पहले समाप्त करें। जब तक मैं EndInvoke () को कॉल करता हूं और कॉल में से किसी एक कॉल में कोई अपवाद उत्पन्न होता है, तब तक कॉल में अपवाद का सामना करना पड़ता है और अपवाद एक एपीआई विशिष्ट अपवाद में लिपटा जाता है और फेंका जाता है ऊपर की ओर। तो मेरा पहला प्रश्न यह है कि यह सुनिश्चित करने के लिए सबसे अच्छा तरीका क्या है कि एसिंक कॉल का शेष भाग ठीक ढंग से समाप्त हो गया? क्या अंततः ब्लॉक है जो एंडइवोक () पर रहने वाले पर कॉल करता है आरम्भ किए गए कॉल्स (और आगे के अपवादों को अनदेखा करने) का सबसे अच्छा तरीका यह है? प्रश्न 2 दूसरे, जब मैं पहली बार सभी को बंद करता हूं एएससीसी कॉल मैं फिर कॉल करें <> कोड>

Azure storage - double decimal point ignored on save -

I have a value that is properly stored in an asset of an object, but when I have stored the Azure storage database, double values The database is stored to ignore the point (7.11000000003 is saved as 711). Apart from this, the property has been changed to 711.0. How can I solve this problem? The area is already set again in the class and database table. This problem can be caused by the use of culture stores if you have TableRow table inside Dev Storage db Take a look at the data, then the data is stored as XML, and use the decimal value dot as a decimal time period. Here is the dot thousand separator in Brazil. I edited the data store directly in DB, changed the dot to a comma (PT-BR decimal splitter), and the value was read correctly. This is strange, because if the value is correct when using the PT-BR decimal splitter, then it seems that Dev Storage is using my current culture setting. But why not culture is used when saving data? PS: Changing window locale in N-US has

javascript - onbeforeunload in safari does not run code server side -

On the browser closure or F5, I have to code something on the server side, for this, I have a button on the click of that button Which have written onclickclick and onclick functions. I have also written an incident on the window. And before a button. Click. (<)> My problem is that this button runs the code of the client side click function, although the server side code is not executed. This happens when I close the browser when I do F5. It works perfectly, it only happens on Safari, it works perfectly in FF and Mozilla. Safari does not allow or execute events that occur before Asynchronous AJAX requests, so it may very well be that your code is executed but this request is never released on the server. Synchronous AJAX requests are performed Go, so use them in the preload loader.

java - How to handle EntityExistsException properly? -

itemprop = "text"> I have two entities: Questions and preferred contactants When the first time the question is added to the favorite, the preferred contactor should be created. Consider the case of one use when two users try to add a question in favorites together - this will be caused by EntityExistsException entityManager.persist (counter) is called for another user. But the code below does not work because when EntityExistsException is thrown, the marker of the container will be sent as Rollback only and attempts to get back getFavoritesCounter (question) fails with javax.resource.ResourceException: Transaction is not active @Stateless Public Category Favorite Service Service Free Service Provider {... Public Zero AddToFavorites (Questions Questions) {Favorite Counter Count = GetCounter (Q); If (counter == blank) {counter = createconverter (question); } // rise counter} personal favorite quintetconverter (question question) {try {favoritesCounter

osx - VERY strange stack overflow in C++ program -

I wrote a program some time ago (Mac OS X, C ++, SDL, FMOD) and it was not good . But recently I wanted to extend my functionality and added some more code to it and now, when I run it and try to test new functionality, the program crashes with SIGABRT. On the function stack, I see looking at the debugger: _kill < kill $ UNIX2003 Lift __eber __stack_check_file AuditWarz & lt; - My function was revised As far as I know, "__stack_chk_fail" shows a stack overflow but this is not strange about it. In this function "odtworz", I have some code: ... koniec = 0; While (koniec == 0) {... if (mode == 1) {...} else if (mode == 2) {...} else if (mode == 3) {piesniOrkiestrowe [0] = '\ 0'; While (Pissiniorkistova [0] == '\ 0') {Losova Pines (); Char * piesnOrkiestrowa = szukajPiesniOrkiestrowej (); If (piesnOrkiestrowa! = NULL) strcpy (piesniOrkiestrowe, piesnOrkiestrowa); } Characters are now psezapple [25]; Sprintf (hippieplic, &q

css - How to stop body background displaying between two tables in Iphone Safari -

The following markup, seen in Safari on Iphone and Ipad, shows the body background color for 1 pixel between both tables. What is it and how do I stop it? & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcription // N" http: //www.w3 org / TR / xhtml1 / dTD / xhtml1-transitional.dtd "> HTML xmlns =" ​​http : //www.w3.org/1999/xhtml "> gt; Top & gt; Title & gt; Title & lt; / title & gt; & lt; Meta http-equiv =" Content- Type "content =" text / html; Charset = UTF-8 "/> Style type =" Text / CSS "& gt; Body {background: # 000;} Table {background: #ffffff; width: 50px; border: 0; margin: 0 ; Padding: 0;} gt; body & gt; & lt; table range = "0" cellpadding = "0" cell area = "0" & ​​amp; Gt; & lt; tr & gt; & lt; tt & gt; & lt; / td> & lt; / tr & gt; & lt; / table & gt; & lt; table range = "0&q

c++ - How does compiler understand the pointer type? -

How does the C ++ compiler understand the indicator type? I know that the pointer is the size of the OS (32 or 64) of the word. So does it store some information about 32 (or 64) types of bits? Just because you can not have an indicator on one type and assign that point to another point with another type. An indicator is usually just a memory address on x86 based architecture (about other architecture do not know). Compiler implement type protection with various pointers in compiling time - as it does not make any point-to-ar to specify point-to-er, for example, especially when the objects There are different shapes to point out (so you can grab random memory if you access them) You can explicitly override it and reinterpret_cast & lt; T & gt; , or static_cast & lt; T & gt; Can assign any other pointer to any pointer with other types of artists such as and dynamic_cast & lt. ; T & G; (The latter two are generally recommended due to being 'safe&

java - Place variable one context up in Eclipse JDT -

I am looking for the Eclipse JDT refactoring tool which I will quickly if ( ...) {Object x = Blobble; } to object x; If (...) {x = blabble; } // Here insert code by using x but I can not find it. Is there anything like that? no However, you can use it "Split Variable Declaration" Refactoring (CTRL + 1 gives a list of potential refactoring options on declaration) and declaration using cut / paste or drag and drop Instead of moving.

Why did I get this error : java.lang.Exception: XMLEncoder: discarding statement Vector.add()? -

My Java program would look like this: public class Biz_Manager {static Contact_Info_Setting Customer_Contact_Info_Panel; Fixed XMLEncoder XML_Encoder; ...... zero Get_Customer_Agent_Shipping_Company_And_Shipping_Agent_Net_Worth_Info () {XML_Encoder = new XMLEncoder (New BufferedOutputStream (new FileOutputStream (Customer_Contact_Info_Panel.Contact_Info_File_Path))) try {; XML_Encoder.writeObject (Customer_Contact_Info_Panel.Contacts_Vector); } Hold (exception e) {e.printStackTrace (); } Finally {if (XML_Encoder! = Null) {XML_Encoder.close (); // & lt; == Error here, line: 9 45 9 XML_Encoder = null; }}}} // ================================= ====================================== Public category Contact_Info_Setting offers extension JPanel ActionListener, KeyListener, ItemListener {public static last long serialVersionUID = 26362862L; ...... vector & lt; Contact_Info_Entry & gt; Contacts_Vector = new vector & lt; Contact_Info_Entry & gt; (); ......} /

iis 7 - How do I add a servlet to an existing website with IIS7 and Tomcat6? -

I have successfully configured IIS7 and Tomcat6 with isapi redirector. I can get my servlet from Tomcat instances And I can also do my own servlet running from the local host. Tomato supplied works fine for examples How do I add servlet to existing web sites? I tried to add a virtual directory to my website, in the same way I did the default website, but I get 404 errors You should not add anything to that directory or root. The proper way to do this is to create your servletlet and package them in a war file. It will give your project your domain / context and keep your servlet apart from others. Given this, you have to tell the IIS how to redirect the request for your new reference to Tomcat.

sql - Determine caller within stored proc or trigger -

I am working with a insert trigger inside a Sibbes database, I know that I know that I can directly or I can use @@ netlight to determine whether the second trigger or process is being called as a result. There is no way to decide when nesting is deeper than level 1, who has acted due to triggering? For example, was inserted directly into the table, it was inserted by another trigger and if so, who As far as I know, this is not possible. Your best bet is to include as a parameter for your stored functionality as mentioned, this will make your code more portable because any method used will depend on a database-specific call. The link was specific to SQL Server 2005, not anymore, but I think that you are too much in the same boat.

oop - Why Is Java Missing Access Specifiers? -

Does anybody understand why Java is missing: An access specifier that class And all the subclasses, but not by the other classes in the same package? (Protected-minus) An access specifier that allows class, all classes in the same package, and all classes in any sub-package? (Default-plus) An access specifier that currently adds classes to sub-packages to entities with permissions allowed to enter? (Protected-Plus) Wish I had more options than Safe and Default, especially, I am interested in Protected-More Options Say I'm trying to make an object I want to use a builder / factory pattern class with many links of other objects. Constructors are all default on objects, because I want to emphasize that linking is done properly, for example using a factory class. I want to put factories together in the sub-package together and all that they are doing immediately - it seems like a cleaner package structure just for me. No, at present. I have to put builders in the pack

c# - Delaying LINQ to SQL Select Query Execution -

I am creating an asp.net mVC site that uses SQL from LINQ. In my search the method that has some necessary and some optional parameters, I want to create a LINQ query while testing the existence of those optional parameters . Here's what I think: using (var db = new dbDintIntext) (IQueryable & lt; Listing & gt; Query = null; // Required parameter query = db.Listings.Where (l = & gt; L.Lat> gt; = form.bounds.extent1.latitude & amp; l.Lat & lt; = form.bounds.extent2.latitude) handles ; // Optional parameters handle if (numStars! = Null) query = query.Where (l = & gt; l.Stars == (int) numStars); // Other parameters ... // execution query (what happens here?) Var results = query. Toolist (); // Check the process ... Is this implementation "bundle" to where section and then perform bundle query ? If not, how should I implement this feature? Besides, is there anything else that I can improve? Thanks in advance. Yes, the qu

graphics - How to create a dashed line rounded rectangle in Flex? -

How do I create a rounded rectangle with a horizontal line? I have seen many routines that pull their straight lines, but nothing for spherical rectangles. Used (maybe still) there is a great AS2 / 3 library for this , But I can not find it. It looks very promising: /

How to do inline paste from system buffer in Vim? -

सिस्टम बफर से एक पंक्ति में चिपकाते समय foo (someVal, & lt; कर्सर यहाँ है & gt ;, someVal3); यदि मैं "* पी मुझे फू (कुछ वैल, कुछ वैल् 3); & lt; pasted text & gt; यदि मैं "* पीआई मिलती है और चिपकाए गए पाठ & gt; फू (कुछ वैल, कुछ वैल् 3); लेकिन मैं चाहता हूं foo (someVal, & lt; चिपकाए पाठ & gt ;, someVal3); मैं जो परिणाम प्राप्त कर सकता हूं, उसे मैं कैसे प्राप्त करूं? संपादित करें अगर बफर में @ अमरदीप संदिग्धों के रूप में एक नई पंक्ति है, तो क्या कोई तरीका है जिसे मैं इसे अनदेखा करने के लिए कह सकता हूं? आप सम्मिलित मोड में & lt; C-r & gt; * टाइप कर सकते हैं और फिर < कोड> & lt; बीएस & gt; ट्रेलिंग न्यूलाइन को हटाने के लिए।

&& operation in actionscript -

"bitmap" is zero in the following code, even if it is why? Get BitmapHight () for Public Function (if (_bitmapHeight == 0 & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; Amp; tap = null) _bitmapHeight = BITMAP.bitmapData.height; return_bitemap; P> If the BITMAP is empty then that line of code should never be done. Try this: get a bitmap (public) function (if (_bitmapHeight = = 0 & amp; amp; amp; amp; amp; amp; null; = null) {trace ("null with called"); _bitmapHeight = BITMAP.bitmapData.height;} PS _bitmapHeight;} What does 'called redundant' ever know?

multiple dependent android projects in eclipse -

I just started playing with Android Dev and Java + Eclipse is quite new to me. I have made simple projects and used my device But managed to run it. Now I want to make simple games (most of them actually) and I would like to use a shared code base for all of them (game loop, initialization, etc.). The problem is that I do not think how to do this correctly I've made the Android project with all the basic things called Engine, which I want and works on this device. Now I tried to create a single project called mygame in the same workspace, Mygame's main square (activity) MyGameApp, which gets from the engine app (the main activity of my engine project) that gets it from the activity I added the engine project in the properties in mygame Build Path tab in the required projects. The problem is that when I try to run this project, it crashes to find My MyMameApp class on MyNameFoundException. Any help (or indicator of some articles that tells how this is done) is greatly

Configure email notification in Hudson -

I am trying to configure Hudson to send an email if a person fails in building that has The broken build is divided on SVN. Question Is it possible to do this, and if Hadadan how do I configure it to do this? If you want some people to receive an email, whenever a build is broken or fixed, even if the reason for the failure, add your email address to the receiving fields. You do not need an email-at-plugin to do this, but this plugin gives you more control over the email format and content.

jqgrid - How to change the header height in jQuery grid? -

I have a jQuery grid with 5 columns. My column name is very large, so I did something similar in my jQuery grid Defined: & lt; Br / & gt; Customer BiData In my jQuery column I see "information about" but I can not see "Customer Biodata". How do I set the header height? If you are referring to jqGrid, then it seems that the fix is ​​a CSS tweak article: .ui-jqgrid .ui-jqgrid-htable th div {height: auto; Hidden flurry; Padding-right: 4px; Padding-top: 2px; Status: Relative; Vertical-align: text top; White Location: Normal! Important; } Edit: As found in the comments, it seems that there can be in some versions of jqGrid! Important flag on the height rule (and possibly other?). So if you think the above CSS does not work, then why it might be height: Auto! Change the above rules to include important and it would be nice to go.

What's the best way to handle the same shortcut in WPF and WinForms controls? -

मेरे पास मुख्य विंडो पर निम्न कुंजीयन के साथ एक WPF अनुप्रयोग है: & lt; कीबिंग कमांड = "कमांड्स: एडिट कॉमांड्स। यून्डो" जेस्चर = "सीटीआरएल + जेड" / & gt; & Lt; कीबिंग कमांड = "कमांड्स: एडिट कॉमांड्स। रीडो" इशारे = "सीटीआरएल + वाई" / & gt; यह कमान कमांड शॉर्टकट को ठीक बनाता है हालांकि, उन सभी स्थानों पर जहां मैंने WinForms टेक्स्ट बॉक्स या अमीर टेक्स्ट बक्से को एम्बेड किया है, मैंने उन शॉर्टकट का उपयोग करने की क्षमता खो दी है। यदि मैं उपरोक्त बाइंडिंग को निकालता हूं, तो WinForms शॉर्टकट्स काम ठीक कर देता है। मैं इन WinForms और WPF दोनों में शॉर्टकट का समर्थन कैसे कर सकता हूं? मैं एक सामान्य विधि को पसंद करता हूं क्योंकि इस समस्या से कई अन्य कमांडियों को एक ही कुंजीबाइंडिंग को प्रभावित करने की संभावना है। मुझे आश्चर्य है कि आप अंतर्निहित कमांड का उपयोग क्यों नहीं कर रहे हैं: ApplicationCommands.Undo , और ApplicationCommands । ( Ctrl + Z और Ctrl + वाई हो सकता है कि सभी लोकेलों में डिफ़ॉल्

Is it possible to query the Magento database and display product attributes outside Magento? -

I am creating a site that needs to display certain product information from the Magento database, Magento intallation I can find out on page / site I know that the information is displayed twice, but I would like to avoid site duplication of content and pull from the same source, from the same source, Magenta product database. Is that correct? Has anyone done this? The entire magento will be very easy to pull in the engine in its external page [the rest of the magenta Contrast] is very easy to do. All you have to do is: // Load the Magento Core ('Magento', the actual path ('/ var / www / magento /')); require_once (MAGENTO. '/app/Mage.php'); $ app = Dana :: app (); Now you can use any of the Magento Objects / Classes like you are inside Magento and receive your properties $ product = Mage: : GetModel ('catalog / product') - & gt; Load (1234); $ Product- & gt; GetSku (); $ Product- & gt; GetYourCustomAttribute (); et

c++ - How to avoid integer overflow? -

निम्न C ++ कोड में, 32767 + 1 = -32768। #include & lt ; iostream & gt; Int main () {short var = 32767; वर ++; Std :: cout & lt; & lt; वर; std :: cin.get (); } क्या कोई भी गलती के बिना "var" को 32767 छोड़ने का कोई तरीका है? हां, वहां है: यदि (var & lt; 32767) var ++; वैसे, आपको लगातार कोडक को कूटकोड नहीं करना चाहिए, numeric_limits & lt; short & gt; :: max () में परिभाषित & lt; limits & gt; < आप एक फ़ंक्शन टेम्पलेट में इस कार्यक्षमता को आवृत कर सकते हैं: टेम्पलेट & lt; class T & gt; शून्य increment_without_wraparound (T & amp; मान) {यदि (मान & lt; numeric_limits & lt; T & gt; :: max ()) मूल्य ++; } और इसे इस तरह प्रयोग करें: छोटा var = 32767; increment_without_wraparound (वर); // एक छोटा नाम चुनें!

NSThread vs. NSOperationQueue vs. ??? on the iPhone -

Currently I am using NSThread to cache images in another thread . [NSThread detachNewThreadSelector: @selector (cacheImage :) toTarget: Object with self: image]; Alternatively: [self display selector Inbackground: @Selector (cash image :) with object: image); Alternatively, I have NSOperationQueue NSInvocationOperation * invOperation = [[NSInvocationOperation alloc] initWithTarget: Self Selector: @ Can select selector (cache image) object: image]; NSOperationQueue * opQueue = [[NSOperationQueue alloc] init]; [Octuion operation: inoperation]; Is there a reason to switch away from NSThread ? GCD is a fourth option when it is released to the iPhone, but unless there is a significant performance gain, I stick to the ways that work in most platforms. Based on the advice of @John-Eric, I went with a NSOperationQueue / NSOperation subclass solution. it works very well. The NSOption class is flexible enough so that you can use it with inoculation, block or custom

syntax - writing "%d" in a printf C -

इस कोड के लिए सही सिंटैक्स क्या है: यह है: printf ("printf (\ "\% D \",% s); ", some_var); या printf ("printf (\" %% d \ ",% s);", some_var); या कुछ और? दूसरा एक % d को printf द्वारा परिभाषित किया गया है, सी भाषा नहीं, इसलिए आपको इसे प्रिंटफ़ %% के साथ बचाना होगा, कोई वर्ण बच नहीं। एक चरित्र से बच अनुक्रम के साथ एक और अधिक जटिल उदाहरण: printf ("printf (\" %% d \\ n \ ",% s); \ n", some_var);

multithreading - What is the diff. between a thread/process/task? -

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

How to pass a random User/Pass (for Basic Authentication) with JMeter? -

I am using Jmeter to test an API. I have got set up the Basic Authentication - It's working well. Now, I'm trying to make credentials random JMM cross wire Therefore, in two ways I know that I can do this. Add a custom HTTP header (via a HTTP header manager element ) and then in random areas (i read from csv file Is set) Use the HTTP Authorization Manager element and pass in the username and password. Now, if I try and use the above method (1), then I need to create the following headers / data: - Authorization: Original & lt; Some Base 64 Encoded String Formats Username: Password & gt; like. Authorization: Original ONXXOnBH3MX Only simple. But the value of that header is not exceeding in the wire :( I can add any other header type and it is crossed in the wire .. Hmm .. ok then .. try Method (2). / P> Now it works .. But I can only do hardcode in the username and password. I can not see that I use the username VARIABLE (i.e. $ {

Local and global variables in javascript -

Today, I started to start a page code that encouraged users to select their PC specs, And the code is followed & Lt; Br / & gt; CD-ROM & lt; Input type = "checkbox" name = "chkCD" value = "CD-ROM" /> & Lt; Br / & gt; Zip drive & lt; Input type = "checkbox" name = "chkZIP" value = "zip drive" /> & Lt; / P & gt; & Lt; P & gt; Select the processor speed you need & lt; Br / & gt; & Lt; Input type = "radio" name = "processor" value = "3.8" /> 3.8 GHz & Lt; Input type = "radio" name = "processor" value = "4.8" onclic = "click the processor unavailable_online" /> 4.8 GHz & amp; Lt; Input type = "radio" name = "processor" value = "6" /> 6 GHZ & lt; / P & gt; & Lt; Input type = "button" name = "btn check" value = "check

php - A way to search form table in MySQL database -

I saw a way to scan the database for a specific table. For example, I have: Database: system_ultimate table: system_settings and let us know, that no one knows the exact name of the table. He only knows how it is related to something like settings ? How can he search for that table name? I understand, people who usually know what they develop, but I try to stay away from direct communication with the table using MVC and I name. I am here. I know that I can use the Show Tables to see all the tables; show the '% settings' tab as shown;

jquery - fancybox encoding issue -

I am using fancybox.net for my light box. It works great with images but when I use the iframe option, I'm having trouble with encoding. I use Hebrew and English and Russian on my website when I use UTF-8 on the iframe page, I get an intersection instead of Hebrew letters. When I convert to ISO-8859-8, I am Hebrew but inverted, and goes Russian: ?????? Formula Any ideas? My website is UTF-8 and everything works great .. except for fancybox: (

unattended install of binary python packages (modules) for windows -

Is there no sensible way to install scripted binary dragon packages for windows? Unfortunately, it seems that many essential Windows Python packages such as pywin32 and py2exe are not available in the form of exe only (and as far as I know there are scripts). Easy_install / pip also does not work as they apparently only find the source package and then try to compile locally, which is not clearly unsatisfactory. Am I missing something? You can download pywin32 source code and then create it as a MSI file itself So you need setup tools (only for construction) The same process should work for all Windows-compatible packages. HTML

Separation of presentation and business logic in PHP -

I am programming my first real PHP website and wondering how to make my code more readable for me . The above book introduces three ways to isolate logic and content: Include files function or class API Template system I have not chosen any of these yet, because it takes some time to wrap my brain around these concepts, though, some of my code Hybrid is made because I just copy and paste it and change it as I Go. On the presentation side, all of my pages have these general elements: Header, Top Navigation, Sidebar Navigation, Content, Right Sidebar and Footer. A work-based example in the book illustrates that I can have these display functions that handle all the presentation instances. Therefore, my page code will look like this: display_header (); Display_navigation (); Display_content (); Display_footer (); However, I do not like this because in the examples given in the book, these print statements meet with HTML and PHMM: echo " & Lt; tr bgcol

ruby on rails - form select not saving to the database -

& lt;% = f.label: प्रकार% & gt; & Lt;% = f.select (: प्रकार, ["मूल", "प्रिंट", "अन्य"])% & gt; मेरे पास एक फोटो मॉडल है और फ़ॉर्म में एक ड्रॉप-डाउन सूची जोड़ दी गई है, जब विकल्प चुना जाता है, सही पैरामीटर पारित किए जाते हैं लेकिन यह डेटाबेस में सहेजा नहीं जाता है मैंने इसे चूम लिया है और एपीआई को देखा है, लेकिन मुझे पूरा यकीन नहीं है कि मैं क्या कर रहा हूं। मेरे फोटो मॉडल प्रकार में एक स्ट्रिंग है। स्ट्रिंग को गलत फ़ील्ड प्रकार है? या कुछ और गलत है? मुझे शक है कि प्रकार जादू हो सकता है, यह आरक्षित शब्दों की विकी सूची:

asp.net - Any starter-kits/open source support center implementations out there? -

I want to implement a product support site in ASP.NET which will include at least one forum and the basis of knowledge ( questions to ask). Can you recommend some good starting points? Thank you Content management systems make jobs very fast if you are deployed very quickly with something from the minimum The amount of work required to do is a very popular and well-supported content management system that will be capable of handling any form and knowledge base without much difficulty. A knowledge base with DNN There is a tutorial for creating a site There is also a major CMS There is a list of additional content management systems got a super Awesome CMS browser Things are multi Easy to make you can sample different CMSs and likes and decide on them (yes, you can choose many) You want with direct basic optical functionality, I think its cats have meable

non static - Java Beginner Question : What is wrong with the code below? -

सार्वजनिक वर्ग फ़ंक्शन {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग अरिज []) {System.out.println (शक्ति ( 3,2)); Println (शक्ति (3,2)); Println (शक्ति (2)); } सार्वजनिक लार्ज पावर (इंट एम) {रिटर्न एम * एम; } सार्वजनिक लार्ज पावर (int m, int n) {लंबे उत्पाद = 1; के लिए (इंट आई = 1; आई & lt; = n; i ++) {product = product * m; } वापसी उत्पाद; }} कंपाइलर इस त्रुटि को प्रदर्शित करता है: - फ़ंक्शन.जावा <>: गैर-स्थिर विधि शक्ति (int, int) को एक स्थिर संदर्भ से संदर्भित नहीं किया जा सकता < / P> [संपादित करें] इंडेंटेन्ट चीज़ के बारे में क्षमा करें: / मैं इसे अब से ध्यान में रखूंगा। ठीक है, मैं सिर्फ स्थिर कीवर्ड जोड़ता हूं और यह अब ठीक काम कर रहे हैं यह स्थिर कीवर्ड क्या अंतर करता है? मैं जावा के लिए एक शुरुआत कर रहा हूँ और अभी तक क्या स्थिर है के बारे में नहीं पढ़ा है मुझे यकीन है कि इसे पुस्तक के और अध्यायों में पढ़ा जाएगा, लेकिन किसी ने मुझे एक विचार दे दो कि यह क्या करता है। धन्यवाद। थंब के शॉर्टकट नियम (बिना पूर्ण पृष्ठभूमि की व्याख्या) यह है कि स्थिर तरीके / फ़ंक

ssl - Is there a standard way to run a x509 key server? -

Is the name of a project / product that is standardized for HTTP to access / download x509 / SSL certificates is? I have seen RFC 4387 but those who apply it did not get it. Actually, I'm trying to set up a major server for an internal application. So less than implementing oneself, does anyone have any suggestions? This is the "standard" for an HTTP-accessible certificate repository, but I have never implemented it Most CAs that provide an HTTP repository do not use standard, machine-accessible interfaces. For example, Verisign provides a certificate store for certificates which it releases to American government employees, and makes it accessible through a form-based web application. For machine interfaces, "everyone" uses LDAP, more importantly, while LDAP-enabled clients are normal, I've never seen a client application that supports an HTTP interface is. What are you planning to do with the HTTP repository?

Adding a query string to a hyperlink in a asp.net data grid (c#) -

Hey, I have a hyperlink column I want to add only one query string in the URL, it's a string pass located in the first column of the same row Have to do. Let me know if you need more information. Edit Thank you Also, if you do not mind it may be useful if I have the primary key of the object limited to that line instead of the string in the first row is. Would it be difficult to do this? Either will work fine. Got it. I added code to the databend function for the added grid. hyperlink link = (hyperlink) e. Ro Seals [5]. Control [0]; Link.NavigateUrl = "~ / viewDocuments.aspx? Id =" + current.ID;

How can I filter these Django records? -

I have a set of dijongo models as shown in the following diagram (reverse relationships names shown in yellow bubbles ): In each respect, there can be 0 or more items in a person . Additionally, the slug field (unfortunately) is not unique; Multiple person records can have the same slug field originally, these records are duplicates. I want to get a list of all records that meet the following criteria: At least one all duplicate records with the entry (which is the same slug)> or at least one Audio or at least one episode or at least one article . So far, I have the following query: Person.objects.values ​​('slug'). Anotate (num_records = count ('slug')). Filter (num_records__gt = 1) This group records all by slag , then adds a num_records attribute that says How many records are calculated, but no additional filtering is done (and I do not even know that this will work right anyway, because there is a set of duplicate records, some

mysql - Get number of posts in a topic PHP -

How do I display the number of posts on a topic like a forum? I used it ... (how much naBocha): function numberfost ($ n) {$ sql = "SELECT * FROM posts WHERE topic_id = '". $ N "'"; $ Result = mysql_query ($ sql) or die (mysql_error ()); $ Count = mysql_num_rows ($ result); Echo number_format ($ count); } Loop of listing topics: & lt ;? Php $ sql = "SELECT *" topics subject to ORDER subject_id ASC limit $ $ starting, $ range "; $ Result = mysql_query ($ sql) or die (mysql_error ()); While ($ line = mysql_fetch_array ($ result)) {? & Gt; & Lt; Div class = "topic" & gt; & Lt; Div class = "theme-name" & gt; & Lt; P & gt; & Lt ;? Php echo $ row ['topic_title']; ? & Gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "subject-post" & gt; & Lt; P & gt; & Lt ;? Php Echo NumberFopost ($ line ['topic_id']); ? &

c# - What concerns should I have when instantiating a .NET component in a VB6 application? -

I just read through MSDN 2002 article, to get a basic understanding of calling net object calls from VB6 code Is called for. However, I am still wondering if I am worried about referencing .NET objects from VB6 and if that article was written 8 years ago, then there is some new information. In our specific implementation, we need to add a component for both VB6 and a Classic ASP (VB script), which will apply the discount rules of the items in the shopping cart. I was planning to write the solution in NET and then calling the component from our VB6Ap. However, we are concerned that the related methodology barriers can be used to translate our ADO recordets into simple types, to convert the NATT component to work in the immediate form, then the ADO record set Can translate back into done. I hope that the performance and code maintenance will yield benefits from ADO recordsets and use the NAT to yield any cost, but I'm not sure; Nor am I aware of other concerns which slow down

validation - Spring - Populate form field with error message -

I have a Spring 2.5 application and I have many forms where I perform various verification. I have no problem completing this recognition and displaying errors on the page next to the appropriate form input. I was thinking that I can put the error message in the form value instead, so that it is just And error path = "*" cssClass = "error" & gt; Can be displayed in the input field instead of Tags I tried to set the value in Valuerator class and I think it is set to Long while setting in session, but the value does not appear on the page in the field is. For example, I have a control page such as: & lt; Form: input path = "user name" cssClass = "textinput" cssErrorClass = "textinput-error" /> In the validator, I tried to set the user name in the object: Validation High .rejectIfEmptyOrWhitespace (errors, "user name", "error. Field -required "); // This value does not appear on the page user.set

SQL Server Data Import with a "lookup" -

I have two databases, on two different SQL servers (trying to consolidate both). This is my setup, and I am trying to import from Server1: Order2 from the Order table: Order table. Server1 Database1 Order (ID, Customer Name, Date Order) Server 2 Database 2 Customer (ID, Name) Order (ID, Customer ID, DateOrdered) As you can see, Database 1 has D-normalized data, and database 2 has similar data, properly normalized. I'm doing SQL Server importing into database 2, the client table pops up, and there is a match between Server1.Database1.Orders.CustomerName and Server2.Database2.Customers.Name Will happen. What happens to me during the import, is the "Viewed" field based on the value of the Customer Name field in Customer Data Agency, then insert it into my new order table. I am able to connect to both servers via SSMS, and I am trying to import as a data source through "SQL Server Native Client 10". Update It appears that I am not going to be ab

ASP.NET TextBox verses input type="text" behavior -

I notice with ASP .NET if the server side control textbox is used with autopostback, Postback) will not submit forms when form type, which differs from the behavior for plain old HTML pages. Okay, I can set autopostback to get the behavior I want after the entry key However, autopostback will also be submitted (or postback) when the typed text does not end with entering, but the focus has changed (Ie with tabs or mouse clicks), which is different from plain old HTML pages. In relation to text input, to behave like a plain old HTML page, ASP.NET How can a page, regardless of the key enter or a change in focus? There is some additional setup work, see this article:

xml - PHP DOMElement::getElementsByTagName - Anyway to get just the immediate matching children? -

Do you have a way to get immediate children, just by calling for the Claims: Millenniums Bitagnet? For example, I have an XML document in which the class element is I element in that category has sub-category elements (which have the same structure), such as: & lt; Category & gt; & Lt; ID & gt; 1 & lt; / Id & gt; & Lt; Name & gt; Top level category name & lt; / Name & gt; & Lt; Subcategory & gt; & Lt; ID & gt; 2 & lt; / Id & gt; & Lt; Name & gt; Sub-category name & lt; / Name & gt; & Lt; / Subcategory & gt; ... & lt; / Category & gt; If I represent a top level category, then $ topLevelCategoryElement-> GetElementsByTagName ('id'); Will return a list with the nodes for all the 'id' elements, where I want only one top level any way to do this without using XPath? I do not have to scare you have to walk through the kids again or use XPath. ($ N = $ parent

jQuery Validation addMethod - Check if same domain -

I am trying to check if the URL belongs to the same domain, which is the validation of the jQuery Edemath. Even what I have achieved so far, but it does not seem to: jQuery.validator.addMethod ("domain", function ( Value, element) {return.optional (element) || /^http:\/\/testsite.com/.test(value);}, "URL is not match."); Validate $ ("# Url_form") ({Rule: {url: {required: true, url: true, domain: true}}}); understood. There may be a better way of doing this, but it worked for me: jQuery.validator.addMethod ("domain", function (value, element) {return.optional (element )} /^(http:\/\/www..https:\/\/www\.|http:\/\/|https:\/\/)testsite.com/.test(value);}, "URL must be on the same site domain");

Linux synchronization with FIFO waiting queue -

What are the locks in Linux, where the waiting queue is FIFO? It sounds like such an obvious thing, and even then I found that pthread mutexes are not FIFO, and semaphores are not apparently even FIFA (I'm working on kernel 2.4 (homework) ... Is there a lock with FIFO's waiting line in Linux, or is there an easy way to create one with the current system? There is a way to create a simple "ticket lock" line, pthreads primitives Is built on. This should give you some ideas: #include & lt; Pthread.h & gt; Typedef structure ticket_lock {pthread_cond_t cond; Pthread_mutex_t mutex; Unsigned long queue_head, qi_tail; } Ticket_lock_t; #defined TICKET_LOCK_INITIALIZER {PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER} canceled ticket_lock (ticket_lock_t * tickets) {unsigned long queue_my; Pthread_mutex_lock (& ​​amp; ticket> mutex); Queue_me = Ticket-> Qi_tail ++; While (queue_me! = Ticket-> Qi-head) {pthread_cond_wait (and ticket-> c

debugging - How can I capture GNUMake differences between two directories -

I have a difficult issue with gambling, when I'm made from the parent directory, something is different and the build of make all It does not necessarily and fails, but if I do the CD in the directory and fix it to make it. How can I tell the difference between these two runs GNUmake? There should be some variables set in the parents who break the child, but I need help finding them. If you are running create from the root directory to create the text "> > , then try make foo. If it fails, make -n foo.o to see both the directories ( print instead of to execute them) Try to run / code> what it is doing differently if it succeeds, it is also not trying to create foo.o , when run from the parent directory ; Make-N can put some light, and as the last resort build-d will give you a flow of information about the decision process, why is doing this That's what it's doing. Here is an easy move to see the value of the variable. Place this rul

sql server - Does Microsoft Access use the PK fields for anything? -

Ok this is talking weird, but I've got an app that has an access front with a SQL Server backend End is I am in the process of writing a new front for this, but ... I need to continue using access front end for a while, even after I have been deployed at the end of my new front Can go. That's why the existing access app and both of my new apps should be able to access and work with data. The problem is that database design is a nightmare, for example, some simple parental-child relationships have the overall primary key of 4 and 5 parts, like relationships. I would really like to remove these PKs and add them to unique obstacles or anything else, and add a new column for each. In these tables ID is called, which is just an identity. If I convert PK and FK into more manageable areas in these tables, then what are the problems facing the Access app? What do I mean, does the use of meta data from entry tables (PK and FK info) in such a way that it will break the app to r

c# - Where do I handle asynchronous exceptions? -

निम्नलिखित कोड पर विचार करें: class Foo {// उबाऊ भागों निजी TcpClient सॉकेट छोड़े गए ; सार्वजनिक शून्य कनेक्ट () {socket.BeginConnect (होस्ट, पोर्ट, नए एसिंक कॉलबैक (cbConnect), quux); } निजी शून्य cbConnect (IAsyncResult परिणाम) {// blah}} यदि सॉकेट के बाद एक अपवाद फेंकता है आरंभ करें कनेक्ट वापस और < कोड> सीबीकनेक्ट कहलाता है, वह कहां पॉप अप करता है? क्या यह भी पृष्ठभूमि में फेंकने की इजाजत है? एसेनच प्रतिनिधि के लिए अपवाद हैंडलिंग का कोड नमूना मैं समझता हूं कि TcpClient पैटर्न के समान होगा। सिस्टम का उपयोग कर; सिस्टम का उपयोग करें। समय। Remoting.Messaging; कक्षा कार्यक्रम {स्थैतिक शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {नया प्रोग्राम ()। चलाएँ (); Console.ReadLine (); } शून्य भागो () {कार्रवाई का उदाहरण = नया एक्शन (लड़ी पिरोया); IAsyncResult ia = उदाहरण.बीजिनइनवोक (नया एसिंक कॉलबैक (पूर्ण), रिक्त); // विकल्प # 1: / * ia.AsyncWaitHandle.WaitOne (); कोशिश {example.EndInvoke (ia); } पकड़ (अपवाद पूर्व) {Console.WriteLine (ex.Message); } * /} शून्य थ्रेडेड () {नया

c# - Getting USB Storage Device Instance ID (unique ID) programmatically -

Whenever a user plugs a USB mass storage device, how does the device instance ID (unique ID) of that specific device get receive? Hold WM_DEVICECHANGE from any window handle by registering for device change notifications. DEV_BROADCAST_DEVICEINTERFACE dbd = {sizeof (dbd)}; Dbd.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; Dbd.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; RegisterDevice Notification (HWND, and DBD, DEVICE_NOTIFY_WINDOW_HANDLE); The lParam of WM_DEVICECHANGE can be inserted on the DB 07DEVTYP_DEVICEINTERFACE. Note - When plug in a device you can get multiple WM_DEVICECHANGE notifications, just filter and duplicate ignore at the arrival event LRESULT WndProc (HWND hWnd, uint uMsg, wParam wParam, lParam lParam) {switch (Hwnd) {case WM_DEVICE_CHANGE:. {PDEV_BROADCAST_HDR pHdr = zero; PDEV_BROADCAST_DEVICEINTERFACE pDev = NULL; PHDR = (PDEV_BROADCAST_HDR) lParam; Bool fDeviceArrival = (wParam == DB T_DEVICEARRIVAL); If (fDeviceArrival) {if (pHdr & amp; a

objective c - Passing Object value to UIView -

यहां कोड देखें @interface StaticView: UIView {properties * prop; } @ प्रॉपर्टी (बनाए रखना) गुण * प्रोप; @end और मैं इस दृश्य को कोड के माध्यम से संलग्न कर रहा हूं [super viewDidLoad]; StaticView * sView = [[StaticView alloc] initWithFrame: CGRectMake (0, 0, 320, 480)]; SView.prop.glowIntensity = 0.85f; [Self.view addSubview: sView]; लेकिन StaticView के मेरे drawRect विधि में मैं हमेशा prop.glowIntensity = 0.0000 प्राप्त कर रहा हूं - (शून्य) drawRect: (CGRect) rect {NSLog ( @ "% एफ", प्रोपोग्लोआईटीेंसी); } यहाँ मेरी गुण है। @interface गुण: NSObject {UIColor * bgColor; यूआईसीलोर * अग्रसंरक्षक; फ्लोट ग्लो इन्टेंटासिटी; } @ प्रॉपर्टी (बनाए रखना) यूआईकोलोर * बीजी रंग; @ प्रॉपर्टी (बनाए रखना) UIColor * foreColor; @ प्रॉपर्टी फ़्लोट ग्लो इन्टेंटासिटी; - (शून्य) initbgColor: (UIColor *) बीजीसी अग्रदूत: (UIColor *) एफसी ग्लोइन्टेन्टीेंसी: (फ्लोट) जीआई; @end यहां कार्यान्वयन है properties.m #import "properties.h" @ कार्यान्वयन गुण @ संश्लेषण bgC