Posts

Showing posts from June, 2013

delphi - How the compiler treat procedure/functions inside procedure/functions -

Some processes or functions are written in a different way, such as: function Foo : Maximum Marks; Var A: string; Process bar; Start A: = '2'; // code end; Start A: = '1'; times; Results: = Streets (A); End; In this example, all variables declared in the FU function can be cut inside bars, how is the context shared? The calling scope passes through its internal process as a hidden parameter to its frame pointer. The internal process can then use this hidden indicator to access variables in the external process.

java - Why doesn't TimeZone.getTimeZone() throw an exception -

Why is not an invalid time zone id given to the method? Instead, "GMT Zone returns if given IDs can not be understood". What is the logic behind this decision? I'm not sure of the argument, but they have provided you a getAvailableIDs ( ) With the method to allow you to ensure that your time zone is vaild, they mention it in Javadok: You repeat through all supported time zone IDs To getAvailableIDs can use the method. You can choose a supported ID to get time zone. If the time zone does not represent one of the ID you want, a custom time zone ID can be specified in a timezone

vb.net - Detecting a radiobutton change -

I have around 50 radio boots on one form and if I want to make a statement for every one, changes, those groups Not a part of the box. How can I find out that some radiobutton has changed and then the name can be written in any other variable? You can always set a check-change for all 50 radio boots for the same event handler Events This is an example by code: Private SubOnChange (sender as system object, and system.AventARG) dim RB = CTP (sender, radio button) Console.Publication (RB. + "RB check.tostring) handles sub-private sub form 1_load (System object, as in the form of sender and in the form of a system.) My Labad Adhanger M. Radiotebut 1. Checked , Know on change adah Ndler m. Radiobuten 2. checked, know-off change, and so on ..... 'and all I have done this via code and for long the code has been Do not use the designer to avoid the radio button. Check-Change, Radiobutton 2. Checked Change .......

powershell - Export csv spits out length only -

I can only get length when exporting to CSV, how it should be done properly. $ redo = import-CSV c: \ temp \ testimport.txt | Group-Object Email | Foreach {"{0}, {1}" -f $ _ Name, (($ _GroupForch {$ _.Group}) -Join ',')} $ redo | Export-CSV c: \ temp \ test.csv -NoTypeInformation # "length" "46" "59" "110" "47" "149" "38" " 69 "" 32 "" 62 "" 29 "" 49 "" 31 "" 27 "" 48 "" 55 "" 42 " Exports-CSV with the properties expects an object (or list of objects), while your command generates an array of pipeline strings. If you feed this array in Export-CSV , then CMDlet takes the properties of each given item (which is only length for strings) and output those properties Writes in the file. You need to create a list of items with the desired properties, such as: import-csv c: \ temp \...

Erlang Tuple to String -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब क्या कोई रास्ता है एक टपल को एक स्ट्रिंग में कनवर्ट करें? मेरे पास निम्न सूची है: [{atom, 5, program}, {atom, 5, प्राप्त}} {निल, 5}] मैं इसे निम्न स्ट्रिंग में परिवर्तित करना चाहता हूं: "{atom, 5, program}, {atom, 5, प्राप्त}, {निल, 5} " मैंने एर्लांग का उपयोग करने की कोशिश की है: सूची में प्रत्येक तत्व पर tuple_to_list, जो देता है ए = [atom, 5, program] अंततः, मैं "{" ++ A ++ "}" किसी भी विचारों को कैसे जोड़ सकता हूं कि मैं इसे स्ट्रिंग में बदल सकता / सकती हूं? शब्द = [{atom, 5, program}, {atom, 5, प्राप्त}, {शून्य, 5}]। सूचियां: समतल (io_lib: प्रारूप ("~ p", [शब्द]))।

c# - Removing a specific Row in TableLayoutPanel -

I have TableLayoutPanel that I add rows to the program. The user is basically stole a property and then displayed in the table with some controls. I think I have a general understanding problem here and I will try to explain it. Each control has a 'Delete' button in each row. This button should delete the row I have inserted in. What I did is add an eventholder to the button and sets the current line number. deleteTalent.Click + = (Sender, E) => ButtonClickHandler (numberOfRows); Code of handler: Private Zero button click the handler (int punctiquity) {int count = rowCount - 1; For (int i = count; i I watched it for hours and played around. But I did not get a clean cleaning solution I also makes C # I am very new to A new line that is complete function here: private void addBalanceItems (ToolStripMenuItem item) {int numberOfRows = balanceTable .RowCount; If (numofofo> gt; 1) {sansable.roastile.ed (new system .indo.org.formstyle (system.indo.form.sy...

bdd - JBehave Vs FitNesse -

If your system is basically crunting a number, that is, a set of large inputs is given, then a process on them Run, and then emphasize the output, which is a better framework for this? By 'big input', I mean we need to enter data for many different, related organizations. In addition, there are many outputs that we do not get a number at the end If you are talking to people through different instances, then JBHOV is probably very good. If you compare the list of numbers and compare the input with the output, then fitness is probably better. However, if you do not talk to other gods and anyone else, then use plain old junit. The less abstractity you have, the faster you will have to walk and it will be easy to maintain.

php - Request handling in Zend Framework 2 compared with request handling in Zend Framework 1 -

Image
itemprop = "text"> The Bible "Zend Framework 1.8 Web Application Development" in Z Framework 1: Handling ZF1 request by Keith Pope is described as follows: The process can break like this: A request is made and the request object is created. The route startup event is removed. The router processes this request. The route shutdown event has been removed. The dispatch loop startup event has been removed. The dispatch loop has started. The Preset event has been removed. The Dispatcher Calls the Action Controller. The action controller writes the Response object. The post dispatch event has been removed. If there is any action left to call, then go to Step 7. The dispatch loop shutdown event has been removed. The response is sent back. Is it still applicable to the request in Zend Framework 2? If not: What's new? What does the new schema look like? The flow of the request in ZF2 differs from ZF1, because ZF2 MVC is an ...

php - How do I get around ini_set disabled when trying to autoload -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं एक वर्डप्रेस लिख रहा हूँ प्लगइन जो रावेन का उपयोग करता है, जो निम्न तरीके से autoload का उपयोग करता है: ini_set ('unserialize_callback_func', 'spl_autoload_call'); Spl_autoload_register (सरणी (नया स्व, 'autoload')); हालांकि, प्लगइन के कुछ उपयोगकर्ता अपने होस्ट प्रदाताओं द्वारा अक्षम कर चुके हैं, और प्लगइन सक्रिय होने पर एक त्रुटि फेंक दी गई है: चेतावनी: ini_set () सुरक्षा कारणों से अक्षम कर दिया गया है ... क्या इस मामले में इनआईआईसेट का उपयोग करने के लिए कोई रास्ता नहीं है? मुझे लगता है मेरा असली प्रश्न यह है कि यदि spl_autoload_register का उपयोग करते समय आवश्यक है या नहीं? बताता है कि spl_autoload_register () । का उपयोग करते समय आपको शायद unserialize_callback_func को सेट करने की आवश्यकता नहीं है।

How to query request object in Facebook graph API explorer? -

I have a request ID and I want to get the Request ID object. When I write a request id in the graph API Explorer, I get: "Get an unsupported request." How to do this? I like the requested items at the end of this example: Thanks! Edit My code: First of all, I enter it in my browser: https: / /www.facebook .com / dialog / apprequests? APP_ID = APP_ID & amp; Message = Facebook% 20Dialogs% 20are% 20so% 20easy & amp; Redirect_uri = http: //www.example.com/response Then after checking the response in Chrome, I can see it under string parameters: Request: 600744979955487 from [0]: 6025656 to [1]: 630243457 from [2]: 100002049936 from 997 [3]: 100003709530244 These are the IDs of friends whom I sent the request And request id I use this data graph to create this request in my explorer / 600744979955487_6025656 I also tried : / 600744979955487 Both returns: {"error": {"message": "Get unsupported Request ...

html - Amature javascript referring to a text file -

& lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; // यूआरएल से डेटा प्राप्त करें ... index.html? PageTitle, YOUTUBE_ID var DATA = window.location.search.replace ("?", ""); // आसान अभिगम और एक्सपेंबिलिटी डेटा के लिए एआरआरई में दर्ज करें = डेटा। (","); // पृष्ठ का शीर्षक document.title लोड = आंकड़े [0] // IFRAME एसआरसी दस्तावेज़ लोड होने के बाद अद्यतन window.onload = समारोह () {var यूट्यूब = document.getElementById ( 'यूट्यूब'); YouTube.src = "http://www.youtube.com/embed/"+DATA[1]}; & Lt; / स्क्रिप्ट & gt; ........ & lt; div class = 'content' & gt; & Lt; iframe id = "YouTube" width = "853" height = "480" फ़्रेमबॉर्कर = "0" स्वीकार्यलस्क्रीन & gt; & Lt; / div & gt; मुझे यह कोड ऊपर मिला है, जिससे मुझे यूआरएल में यूजर इनपुट के आधार पर मेरी वेबसाइट्स एम्बेड किए गए वीडियो को बदलने में मदद मिलती है। हालांकि मैं यूआरएल एक नंबर करने के ...

java - Change an array to a string without creating a string -

I want to complete: string [] beef = new string [3] ; Beef [0] = "water"; Beef [1] = "chicken"; Beef [2] = "paper"; String empo = Arrays.toString (beef); If (empo.isEmpty ()) {empo = "nothing"; Println (EMPO); } Else {System.out.println (empo); } without creating a string. Something like this: string [] beef = new string [3]; Beef [0] = "water"; Beef [1] = "chicken"; Beef [2] = "paper"; Arrays.toString (beef); // Beef changes only on a plain string if (beef. Iseti ()) beef == "") {no = "nothing"; Println (beef); How about going about this? You can not. JAVA is another type of language that means that you have to tell that when you declare it (strong typing), then what type of thing will you be, and you type that ) Can not change it anytime after. You just create a new string

ssl - Sense of secure cookie over HTTPS -

What does it mean to encrypt cookies (secure cookies) for HTTPS? As far as I know the complete request in HTTPS is encrypted, do we need additional encryption of cookies? It relies entirely on your security model For some reasons you still have to encrypt the cookies Why is it needed: Do you care whether a user of your app receives the content of the cookie? In other words, do you store that thing internally and should not be told to the user? Do you care that the user tamper with the contents of the cookie? Depending on how you do it, encryption can be a way of obtaining loyalty protection. (Of course, there are other ways too.) What are the results of the disclosure of cookies? If it is a carrier token, whether it is encrypted or not, will not make much difference, but if there is valuable data in it, then an encrypted attacker may access the browser's stored cookies in some way (regardless of It's an attack on the actual system of attacks or browser host...

c++ - Using any buffer to store any data, with placement new and memcpy -

It's a while that I'm reading documents about alignment, aliasing, padding and placement new, but still not me Be sure to solve this problem - this is the first time that I am facing a memory issue at this level, so I do not believe. The problem is: I have a buffer, an array of data that uses some type typeT , such as typeT buff [N]; Inside that buffer, I have to store some other data, type typeU at the beginning of buff . Let the element of the of of , which is equal to or equal to M element of type is. EDIT: This problem depends on the data type, but my question is normal, and hold for POD and non-POD. But you can assume that non-POD is just POD type aggregation, there is no dynamic memory to copy, and all the data is within the bytes of the sizeof (typeX) structure. That's it, Do not worry about the deep / shallow transcription . I am more interested in this matter where typeT and typeU are different alignments Question 1 : (The most i...

How to detect which submit button is clicked in jquery -

If I have 2 forms on my button, then can be detected as to which clicked In Jquery? & lt; Input name = "submit" type = "submit" value = "button1" & gt; & Lt; Input name = "submit" type = "submit" value = "button2" & gt; It is constantly returning "button1" warning ($ ("input [name = submit]"). Val ()); You do not need unique IDs to use your supplied HTML : $ ("input [type = submit]"). Click (function () {warning ($ (this) .val ());}); Edit I believe that you should rename on one of the buttons

blackberry - Turn off/on network programmatically -

I'm trying to access network status to turn it off or on. I have already written the code to get the position of the network using RadioInfo , but I can not understand how to turn them on / off I have created the radio And Radioinfo in the API, but I can not find the API that allows me to control the network. Here's my code to get the network status: Personal Boolean GetRadInfo () {if (RadioInfo.getState () == RadioInfo.STATE_ON} {Back true;} Other {return false; }} Is there any idea how to close / close? Solved I radio. Detective or f (int);

c++ - Create is_primitive or is_inheritable template -

I would like to create a template that checks whether a class type is primitive or not (int, four, float, float ** *, Ect ...). The reason for this is preventing another template from attempting to increase the preference and causing a compile time error. So far, I have something on the lines of this: #include & lt; Typeinfo & gt; Template & lt; Typename T & gt; Straight is_primitive {const constitutes constant values ​​= std :: is_fundamental & lt; T & gt; :: value; }; Obviously this is the right result from the I_fundamental right now I would like to add add_pointer, remove_reference, ect ... so that all those additional modifiers can touch as input classes. What are all the evictions required to make as rude as possible? Alternatively, the solutions like the following will be equally excellent: template & lt; Typename T & gt; Struct is_inheritable {const static value = value; }; But I am pretty sure that the set of ineffective class...

php - How to retrieve information from database and display in table? -

यह मेरा php कोड है । & Lt;? Php session_start (); विदेशी मुद्रा ($ _ POST AS $ key = & gt; $ val) {$ _SESSION [$ key] = $ val; } Mysql_connect ('localhost', 'bikec_user', '4348 @ टीएक्सस्टेट'); mysql_select_db ( 'bikecats_database'); $ Cnetid = $ _ पोस्ट [ 'cnetid']; $ Cpassword = $ _ पोस्ट [ 'cpassword']; $ Cnetid = स्ट्रिप्सलाशस ($ cnetid); $ Cpassword = stripslashes ($ cpassword); $ Cnetid = mysql_real_escape_string ($ cnetid); $ Cpassword = mysql_real_escape_string ($ cpassword); $ Sql ​​= "चुनें RentalID, BikeID, RentalStartDate, किराए पर लेने से RentDendDATE WHERE CUSTTxStateNETID = '$ cnetid'"; $ परिणाम = mysql_query ($ sql) या मर (mysql_error ()); $ पंक्ति = mysql_fetch_assoc ($ परिणाम); $ Rentalid = $ पंक्ति [ 'RentalID']; $ Bikeid = $ पंक्ति [ 'BikeID']; ? & Gt; यह html कोड है यह उस क्वेरी को प्रदर्शित करना चाहिए, जिसे डेटाबेस से प्राप्त किया गया है, लेकिन किसी कारण के लिए ज...

Bash here docs <<- skipping leading blanks -

मैं यह कर सकता हूँ: declare foo -r -d "& lt; & lt ; - 'ईओएफ' - & gt; - & gt; सोपड़ा ला पाना - & gt; - & gt; (जहां - & gt; एक टैब का प्रतिनिधित्व करता है) प्रमुख टैब को तब अनदेखा कर दिया जाएगा। क्या & lt; & lt; - को छोड़कर / अग्रणी space s, न सिर्फ टैब s को छोड़ने के लिए इस्तेमाल किया जा सकता है? उद्धरण के लिए इस रूप में, सभी प्रमुख टैब वर्ण (रिक्त स्थान नहीं! ) हटा दिया जाएगा। शीर्ष स्थान, या अग्रणी टैब-और-रिक्त स्थान को हटाने के लिए कोई प्रावधान नहीं है। (मेकफील्स के वाक्यविन्यास प्रतिबंधों को याद करें, और आप ठीक हो जाएंगे।)

iphone - Update current song name AVPLayer Xcode -

Image
I want to update the current song name in this photo. I do not know how to call her and need to show the image. I am now using AVPlayer. I would like to know how to do it Undefined symbols for architectural armv7s: "_ MPMediaItemPropertyTitle", referenced from: - PlayViewController.o in [PlayViewController playPressed] MPNowPlayingInfoCenter * infoCenter = [MPNowPlayingInfoCenter defaultCenter]; Infocenter.nowPlayingInfo = [Nascundary Dictionary with Object Endease: @ "My Title", MPMDITP Property Title, @ "My Artist", MPMDITP Property Artist, Nil]; Did you #import Did & lt; MediaPlayer / MediaPlayer.h & gt; In this class? Is the Media Player Framework connected to your project?

sql with an array -

Can this loop be done in SQL? ID number as ID id = "01" id = "02" as idle id (0 to 2) Select ID number as a dim number from data sheet 1 to data WHERE Data = Number Next Number Data Format: Data 01 01 02 03 04 Code> IN : Select data from sheet 1 WHERE data IN (1, 2);

twisted python separation of data between protocols -

A new protocol is created each time the connection is created, but I can create two types of data sharing between two types Seeing. In short I have defined a class that will use for each protocol state JSONCollector (): char_buffer = StringIO.StringIO () ... def Process_data (self), data): ... self.char_buffer.write (char) Protocol it immediately class JSONProtocol (protocol.Protocol) : Def __init__ (self): self.json_collector = JSONCollector () def data received (self, data): self.json_collector.process_data (data) self.transport.write (str (self)) However each connection seems to get the same example of the JSONCollector Land, when I added the following statements to obtain the data. Self.transport.write (str (self.json_collector.char_buffer)) self.transport.write (str (self)) I get the following: Connection 1: 0x 968ae2c String IO.StringIO Example & gt; 0x969036c & gt; Connection 2: string IO.StringIO example at 0x968ae2c & lt; Chief . JSN Protoco...

objective c - javascript enum auto-increment? -

ओबजेसी में मैं इस तरह enum का उपयोग कर सकते हैं: टाइपिंगफ़ enum {STATE_A = 1 , STATE_B, STATE_C, ...... STATE_KK = 100, STATE_FF, ...... STATE_XXX = 99999} राज्य; प्रत्येक चर के मान स्वतः बढ़े हुए हैं (पूर्व के मुकाबले)। लेकिन जावास्क्रिप्ट में, मुझे इसकी आवश्यकता है: वारा राज्य = {STATE_A: 1, STATE_B: 2, STATE_C: 3, ...... STATE_KK: 100, STATE_FF: 101, ...... STATE_XXX = 99999} आप देख सकते हैं कि मुझे प्रत्येक varible के लिए सभी मान निर्दिष्ट करने की आवश्यकता है और यह वास्तव में बीमार है जब आपके पास बहुत सारे वैरिएबल मिले और यह तब भी बीमार हो जाता है जब आप एक वैरिएबल को बीच में डालने का प्रयास करते हैं ताकि आपको खुद से पूछना पड़े यह मूल्य होना चाहिए ???) मैं जे एस के लिए काफी नया हूँ और वास्तव में जानना चाहता हूं कि अगर जेएस में एएनयूम का उपयोग करने का एक तरीका है, जैसे अन्य भाषाओं जैसे ओजजेसी जैसा मैंने उल्लेख किया है। इसकी बदसूरत, लेकिन आप ऐसा कर सकते हैं: / P> var i = 1; Var राज्य = {STATE_A: i ++, STATE_B: i ++, STATE_C: i ++}

android - How can I steady the compass? -

I am making a compass for Android and I have to do this work, but there is a flaw in reading it at some degree Continuously changes, even if the device does not move. I know that this is due to magnetic distortion with the sensor, but how can I still make my app responsive, when the user continues, how many variations do not show the user still, then how do I form a more stable compass Can I give Have you tried implementing a low pass filter?

c++ - mock method with 11 parameters with gmock -

I'm using gmock to mimic my dependencies in legacy code with one of 11 parameters in the class The method is when I tried to use MOCK_METHOD11_WITH_CALLTYPE to mock, then I found that this macro is not present. Gmock supoort only up to 10 parameters What do you suggest for this? Do I apply this method with the dummy body? Or copy & amp; Extension of macro? Thanks! PS, I do not need to test this method anymore, but there is a need to do this in the future. Best regards, Problems in ways with more than 10 parameters The sign can be that I can suggest an alternative solution which will help in your specific case, but that can be a good idea besides jokes. Take several parameters that are understood as a group, and collect them in one structure, then give an example of that structure in the form of logic of the method. So instead of 11 arguments, you can have 3 or 4. It does not help you with your fake library problem, it can improve the usefulness of your class, becau...

event handling - How to relaunch the application which is exited by home button press in android? -

I have an Android app in which I only want to exit the application back press. I mean if the user clicks on the Home button, I want to exit the app but after a specific time I want to launch the app. How to get it? If you want to restart the application then you can start a service service You can start your activity using code: intent dialogIntent = new (getBaseContext), myActivity.class); DialogIntent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK); . GetApplication () startActivity (dialogIntent); When you press the Home key, you can set a flag and check in the service to ensure that the application is in the background so that the activity is not unnecessarily reused. Ho. This link may be helpful for you:

uibutton - Disabling a button in iOS -

The key does not exist in the dictionary, so I have to disable a button I have used the UIButton's setEnabled functionality, but The image that is set by default is still visible. The code looks like this: if ([self.InfoDictionary objectForKey: buttonexist]) {[button 1 set Translated: Yes]; } And {{button 1 set is enabled: no]; } The image still appears when running in the simulator, but some guidance is required. Action on enabled = yes button property. Enabled = No Prevents the action being executed on click of the property. If you want to hide the button, then you hidden as property yes or vice versa. Second way to hide alpha property to 0 (invisible) or 1 (visible) / html>

iphone - Forward geocoding and zoom to fit multiple locations -

The following is the code that I used to load Nkshavlokn I - (zero) getLatLongCoordinates: (NSString *) addressStr firstNameTitle: (NSString *) firstNamesTitle lastNameTitle: (NSString *) lastNamesTitle {Mkepoint annotations * Anoteshnpoint = [[Mkepoint annotations Elok] init]; [Geocodar GOCADEdressString: Addressor Stretching Handler: ^ (NSARA * Placemark, NSER * Error) {Sfi. Placemark = placemark; CLPlacemark * placeInfo = [placemarks objectAtIndex: 0]; MapCenter.latitude = placeInfo.location.coordinate.latitude; Mapcenter.longitude = placeInfo.location.coordinate.latitude; [Annotationpoint setcordinate: map center]; [Annotationpointrayedobject: annotationpoint]; AddAnnotation = [[[MyAddressAnnotation alloc] initWithCoordinate: mapCenter Title: firstNamesTitle sub-title: last Namtitl] Atorelejh]; AddNnotation.firstNameTitle = FirstnameTitle; AddNnotation.lastNameTitle = Last name change; [See map add symbol: connective]; }]; } I Method [self Jhumtofitmapanoteshn: mapView ...

java - how to change view of date picker and display like calender in datepicker in android? -

** Develop daily expenditures in Android ** See nearby Android apps where users can select a date from the date picker. In my application I used the date field in the activity. So I want to design my own date picture as a calendar view. I want to show as Detector ... 1) First image 2) Second image I spent daily I'm developing the application like ... so if anyone knows to develop a stylish datepicker in Android. See in this example You can get whatever you want to change the background of You can copy the code below and click on the button intent = new intent (main Activity. This, simple Calvivarvavavashakti class.); StartActivity (i); and the Android manifest file for SimpleCalendarViewActivity. Add this theme. It will display in the form of a dialog. I check it Android: Theme = " @Android: Style / Theme dialog. "

friendly url - ASP.NET WebForms FriendlyUrlSegments does not contain a constructor that takes 0 arguments -

मैं ASP.NET 4.5 WebForms में FriendlyUrls के साथ एक साधारण परीक्षण कर रहा हूं, Foo.aspx हो जाता है / फू / (यह काम करता है )। जब मैं यूआरएल को यूआरएल से नियंत्रण में लाने के लिए FriendlyUrlSegments विशेषता का उपयोग करने की कोशिश करता हूं तो मुझे यह त्रुटि मिलती है: 'Microsoft.AspNet.FriendlyUrls.ModelBinding.FriendlyUrlSegmentsAttribute' में कोई निर्माता नहीं होता है जो 0 तर्क है कि [FriendlyUrlSegments] त्रुटि है: सार्वजनिक व्यक्ति GetPerson ([FriendlyUrlSegments] int id) {वापसी People.Find (p = & Gt; पीआईआईडी == आईडी); } मैंने NuGet से FriendlyUrls को अपडेट करने की कोशिश की है। अपनी पद्धति को इस प्रकार लिखें: सार्वजनिक व्यक्ति GetPerson ([मित्रतापूर्ण युग लिखित (0)] int? Id) {लोगों को वापस। (पी = & gt; पीआईआई == आईडी); } [मित्रतापूर्ण यूआरएल] विशेषता URL के पृष्ठ के बाद शून्य-अनुक्रमित सेगमेंट का उपयोग करता है उदाहरण के लिए, यदि आप / हैलो / एफू / बार / ... का अनुरोध किया है और आपका पृष्ठ हैलो.एपएक्स है, तो [मित्रतापूर्ण यूआरएल (संख्या) (0)] ...

android - how to call an activity which extends the baseactivity -

I am writing an activity class like the following to the public class's headerfooter activity Enhances {Public Zero on Crate (Bundled Saved Instance) {Super. Contents (Saved Instance State); SetContentView (R.layout.headerfooter); }} and I'm expanding another class from the headerfooter class extends the public class home headerfruit {@Override on public zeros Create (bundle savedinstenstate) {super .onCreate (savedInstanceState); ViewGroup vg = (ViewGroup) findViewById (R.id.lldata); ViewGroup.inflate (Home.this, R.layout.home, vg); }} How to call extended classes from the base class on the listitemclick event If I try the following code Intent I = new intent (headfactor, this, home class); StartActivity (i); I'm getting an exception Tell me how to call Extended Class from my main category. Exception Description: 03 - 21 07: 17: 44.173: E / AndroidRuntime (1522): Severe Exception: Chief 03-21 July: 17: 44.173: E / AndroidRuntime (1522): java.la...

smarty - How do I execute my PHP script by calling it on another PHP script? -

I want to execute a php script in the background by calling it to another file. For example: you have two files file1.php & amp; File2.php. Start execution of file2.php in file1.php Note: Without using the included statement in file1.php I think you can use this PHP function but you want it for very intriguing desires :)

java - Global key binding throughout the whole application to open chm file on ctrl+h -

I am trying to open a chm file in the Java program. Now when I hit Ctrl + h anywhere in the program, I want to open this CM file. I am using the follwing code to open the Chm file and it is working in the project to open the file Ctrl + h . public square test project {public static zero main (string [] args) {try {runtime.getRuntime (). Exec ("hh.exe path of chm file / abc.chm"); } Hold (Exception preceded by {System.out.println ("exceptioin is", pre;); }}}} Most methods of adding main bindings do this on a per-baseline basis So, you have to create binding for all your top-level windows, maybe even the dialogue, which will be very annoying. So you have to catch events in some central locations in the hijacked dispatch system. In the form of an argument with a logical listener, the first argument and the second appears to be. The listener should need notify all keystrokes in such a way that you insert them and inspect them whether they are ...

jquery - Change UI tab according to URL pattern -

I am using the Jquery Ui tab framework. I want to change the selected tab in the URL pattern in the browser such as www. Xyz.com/#tab1 or www.xyz.com/#tab2 I got an alternate solution using me $ ("# tab") Bind ('tabsselect', function (event, UI) {window.location.href = ui.tab; However, this tab is selecting anchor, but in fact the tab Do not change and I actually press the Enter key to change the tab. Where is the point where I am wrong and can indicate the change so that tabs change the url pattern. I To apply, use the following code $ (document) .ready (function () {$ ("#tabs") .tabs ({beforeLoad: f Quision (Event, UI) {ui.jqXHR.error (function () {ui.pan.html ("This tab could not be loaded. We will try to fix it as soon as possible.");}) ;}}); $ ("# Tab"). Bind ('tabasselt', function event, UI) {window.location.href = ui.tab;});}); HT mL code & lt; Div id = "tabs" & gt; & Lt; Ul ...

c# - How to test an async void method -

Please consider the code as shown below. By calling GetBrands, property brands will be assigned with appropriate data. Public class brands view models: seeModelBase {Private IEnumerable & lt; Brand & gt; _brands; Public IEnumerable & lt; Brand & gt; Find Brand ({return _ Brands;} set {SetProperty (Ref _brands, value);}} public void Async GetBrands () {// ...... Brands = Wait _dataHelper.GetFavoriteBrands (); //. .....}} but if I think it's shown below, the test failed. how do I wait for async calls under GetBrands method? [TestMethod] public void AllBrandsTest () {BrandsViewModel viewModel = New BrandsViewModel (); viewModel.GetBrands (); Assert.IsTrue (viewModel.Brands.Any ());} here The simple answer is: it in async not create null . Actually, never some async null is not created until it is fully event does not work as -handlr. things that async null are lost OK are the things that you want it for your test (And possibly for your act...

show website header and footer in the pdf file in datatables -

I am experiencing problems when I add the headers and website footers of my website to my PDF file I am trying. I can download a PDF file using the Datatable default plugin. But in the PDF file I want to show the header and footer of the website in the PDF file. My code is: "sdom": 't & lt;' Clear '& gt; ("Siegated": "PDF", "Bifuter": true}, {"sx": "print", "seoofo": "" sextends ":" csv " "," SButtonText ":" Save in CSV "," Bifuter ": Incorrect}]} Please help me in advance. I did this. I modified the SEF file of the data bars and added custom headers and footers to my PDF. I added a header and footer text You still Oi need help so I ping.

underscore.js - filter using underdescore.js -

var data 1 = [{"year": 2000, "country": "Madagascar", "country_id" : "Economy Statistics"}, "Group": "Economic Statistics"}, "Economic Statistics"}, "Economic Statistics"}, "Year": 2005, "Country": "Madagascar", "Country_ID": 847, "Year": 2000, "Country": "Madagascar", "Country_ID": 847, "Group": "Economic Statistics"}, {"Year": 2005, "Country": "Libya", "Country_ID": 846 "Group": "" Demographics and Social Statistics "}, {" Year ": 2008," Country ":" Libya "," Country_ID ": 846," Group ":" People "Demographic and Social Statistics"}, {"Year": 2005, "Country": "Libya", "Country_ID": 846, "Group": "Demographic and...

c# - System.UnauthorizedAccessException was unhandled by user code in simple code -

I got this exception in very easy code and I'm running it with elevated privileges around it. This is in SharePoint 2010 Private Zero ChangeVersioningOnDocumentLibrary (SPListItem item, SPItemEventProperties property, SPSite site) {string sitename = item [MeetingsCommon.Constants.FIELDS_TEXT_TITLE_NAME] .toString (); . String prefix = items [MeetingsCommon.Constants.FIELDS_TEXT_TITLE_NAME] .ToString () substrings (0, 2); Bool Isconfirmed = Aitmktaksonomifieldwlusgivenvlua (Proprtijkaftrproperthys, Mitingskmonkkonstentskfailds_mitingstatus_nam, Mitingskmonkkonstentsktrmvlua_mitingstatus_knfrmd, 1033); Bool Ispublised = Aitmktaksonomifieldwlusgivenvlua (Proprtijkaftrproperthys, Mitingskmonkkonstentskfailds_mitingstatus_nam, Mitingskmonkkonstentsktrmvlua_mitingstatus_pblisd, 1033); If (isConfirmed) {SPSecurity.RunWithElevatedPrivileges (delegate () {(SPWeb using web = site.OpenWeb (prefix + "/" + sitename)) {if (web.Exists) {web.AllowUnsafeUpdates = true SPList agenda...

Android Action bar Sherlock show actions items in dropdown always -

Image
I have set up three action items that connect the AMS to Menu XML like: & Lt; Menu xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item android: id = "@ + id / menu_share_app" Android: icon = "@drawable / share_ab" android: showAsAction = "collapseActionView" Android: title = "@ string / menu_share_app" /> Android: Android: showAsAction = "always" Android: title = "@ string / menu_say" /> Android: Android: showAsAction = "collapseActionView" Android: title = "@ string / menu_settings" /> & lt; / Menu & gt; I want to show the search object alwys and the other two in a dropdown, I created the showcase as a "collapse actionview", but I can not find a dropdown. Here's the sample photo of what's expected thanks! :) I just changed the code and the order. & lt ;? Xml version = "1.0" encoding = "...

liferay - Dont run job when it is allready running -

I have a job set in liefair, for example, if this job is going on every 5 minutes and fulfilling it It requires more than 5 minutes What I have seen is that the job will start right now, this can cause problems for me. Is it not possible in any way a job, when it is going on completely? * Use of cramps 6.0.6 thanks Try LockLocalServiceUtil and its methods lock () , unlock () and isLocked () . Something like this: Try {if (LockLocalServiceUtil.isLocked ()) {return; } LockLocalServiceUtil.lock (); // your work} finally {LockLocalServiceUtil.unlock (); } The lock is stored in the database, so there will be no problem in the cluster environment.

asp.net unpublishing -

After I hosted that folder on a server, but my project code was broken I placed a web in my folder Application published. Now I will republish (unpublish) my application from the published folder I have my aspx page I'll see the CO code. I can see You do not have the option of unpublishing code. When you work on the project before publishing to project the copy of the project, while publishing ur code changes in DLL. There is no way to recover ur code from DLL.

How to get all the id from JSTREE -

I am trying to collect every node ID from JSTREE so that I can get maximum ID. I think this is straightforward .... Any answer is appreciated Thanks! var ids = []; $ ('.jstree-leaf'). Each (function () {ids.push ($ (this) .attr ('id'))});

iphone - App crashing due to event store changed? -

I searched because I did not find any exact answer for this. I am implementing my event kit app. I am implementing programs for the creation of events, but I am not specifying a calendar there. Then I'm using EKEventViewController to edit my events. I have to show the Libraries tomorrow as well as this calendar. Every time I edit the second or third frame of the event, or delete the event, my app crashes, it is saying that the event store has changed. I can not solve this problem. There is a crash log. Excluding the API due to an exception exception is' NSInvalidArgumentException ', Reason:' - [__NSArrayM EventStore changed:] : 0x1fc7f040 thanks sent to unknown selector for example > I got the answer to myself ... if anyone is facing the same situation..then you go here .. You have to set up representative representative of the place, zero and your problem Or will be resolved. Cheers Sanjay

c# - transaction locks in MySqlHelper class -

I am going to call mysql db in my .net code and for this i mysql.data.dll . In my scenario I used the MySqlHelper class but in this scenario there are two inputs and I want to record commit if only if both are correctly inserted otherwise I rollback want internal boolean addcutomer (customer c) {string sqlCustomerQuery = "tab controller value (" + + c.barcode + ", '" + c .custxml + "''); Int results = MySqlHelper.ExecuteNonQuery (connectionString, sqlCustomerQuery); if (result> 0) {string sqlProjCustomer =" tab_pr Insert in oject_customersVALUES ('"+ c.barcode +' ','" + c.ProjectID + "')"; MySqlHelper.ExecuteNonQuery (connectionString, sqlProjCustomer); Back true; } And false return; } My question: How can I return to this scenario? I found that can be used to do this & amp; Rollback How can I use it if I am going to use it? Or what is another way to do this? We can create ...

extjs - Sencha Touch 2 - Creating a list with static views -

Image
I have followed the documents given by Senka and have made themselves a list of items, conversion to Naviwiewview and The following details page This is a multiple-solution and is described with the picture below: With this solution I can send the title of the item in the list to the description, and write something like this: [code ] 'Ext.define' ('Navigation. Overview.President Details', Extend: 'Ex. Penile', xtype: 'presidentdetail', Config: {styleHtmlContent: true, scrollabe: Vertical ', headline:' description ', tpl:' hello {firstName}! '} }); `[/ Code] It seems that I can not use the statement in this code, so I can specify which item I click on, depending on what content I want Then my question is how do I create another persistent perspective in it? Can I make 1-to-1 relationships instead? (See image below) How does anyone know how to achieve this? I am currently using MVC and it is currently the "min...

knockout.js - knockout recursive mapping issue -

This post is a follow up on this. I have updated the following code: viewModel.getQuotesSuccess = function (result) {var myCoverQuotesViewModel = function (data) {var itself = this; Ko.mapping.fromJS (data, {}, self); Self. Children = ko.observableArray (ko.utils.arrayMap (data.Childs, function (c) {new myCoverQuotesViewModel (c);})); Self.selectedChild = ko.observable (); Self. Showcill = ko.computed (function (selected) (self) selected hair () & self. Selected hair (). Hair (length) gt; 0;}); Var mapping = {'covercotes': {create: function (option) {new myCoverQuotesViewModel (options.data); }}} Ko.mapping.fromJS (Results, Mapping, View Modell); Label: 'test', hair: [{id: 2, label: 'child1'}]]}}; In short, I have an array of covercots, in which each element has an array of covercots (or so on). I have a problem with this mapping, the child's observation array, when calling: return myCoverQuotesViewModel (options.data); for the main o...

Unable to query MongoDB database with node.js and Mongodb package -

I can not query my MongoDB database by node.js and mongodeb package. I have successfully sorted 2 objects: var mongo = require ("mongodb"); Var host = "127.0.0.1"; Var port = mongo.Connection.DEFAULT_PORT; Var db = new mongo.db ("node-introduction", new mangu. Sir (host, port, {}), {secure: true}); Console.log (host); Db.open (function (error) {console.log ("we are connected", + host + ':' + port); db.collection ("user", {w: 1}, function (error, archive) { Console.insert ({id: "1", name: "foo bar", twitter: "flubber", email: "info@nfoobar.com"}, {w: 1}, function () {console.log ("successfully fu bar inserted");}); collection.insert ({id: "2", name: "bar foo", twitter: "bar_foo", email: "info @ Tbarfoo.com "}, {w: 1}, function () {console.log (" Successfully fired times ");});});}); Everything is fine, there is no error...

php - Magento - Single Custom Product Attribute with Array of Values -

There is a need for Magento to provide me an Orange Custom Product feature, which will list all its values Outputs. The basic premise is a list of product materials ... On a per product basis we need to enter water, salt, colors (for example) - and for this it should be presented as a list in the front end. My argument has been made to use the standard text field attribute so far, values ​​separated by commas in the back-end have been entered and then use that string as that array. Is used to try, so that I can use foreign currency to make an unmarked list. So far, I can resize the entire string as a list item, but the string is interpreted as an array of my personal values ​​so far I have been stumped! See below ... The content of the text field field has the value of "water", "salt", "color" - except for quotation marks and commas only that the list is for an array Will be prepared. & lt ;? Php $ ingredientsArrayContent = $ this-> Get...

How to Cancel Datagrid selection changed event in WPF? -

I know that before this question has been asked, but I can not find what I'm looking for. Private Zero DataGrid 1_SelectionChanged (Object Sender, SelectionChangedEventArgs e) {if (oOrdItem.ItemNo == 0) {e.Handled = true; MessageBox.Show ("Please save items", "save"); Return; }} Even if I call e.handed = true; This will select the DataGrade line I dataGrid1.SelectedIndex = 1; Do not want to call because it will trigger the re-selection event. I also have dataGrid1.UnSelectAll (); Have tried any other way to cancel selections? Do you think of an alternative implementation? I am thinking of a check method before changing binding and SelectedItem . One illustration: & lt; DataGrade ItemSource = "..." selectedEystem = "{Binding Selected Entry}" /> and the underlying VM may look like this: public class sampleVM: seeModelBase // assuming that you use this kind of base class Are {Private Objects} Selected Entr...

symfony - Parameters as array in Yaml in Symfony2 -

I am doing what works fine: parameter: array_name1: [ A, now, what should i do in PHP $ array_name3 [1] = array ("a", a, a, c, d] array_name 2: [x, y, a, b] parameter: array_name3 [1]: [1, 2, 3] array_name3 [2]: [A, B, A, B, A, B, C] array_name3 [3]: [x, y, z] / Code> ... which does not work at all. I do not believe in anything. How do I define multi-dimensional arrays in Yaml (Symfony2) ? try this code> Or if you want to associate it with: parameter: array_name3: 1: [1, 2, 3] 2: [a, b, c] bla: [x, y, z ] Or if you want more -

C# Outlook Add-On: Check Calendars Availability -

I am working on the add-in for Outlook using C # and I have the availability of the calendar (mine and the other '). I tried to use GetSharedDefaultFolder (), but it works only with those who gave me special permission, even though all the calendar of my company can be viewed by others (we are the subject of the appointments and Can see time) Can I get these information anyway? Thank you. Edit : I want to emphasize that my problem is with GetSharedDefaultFolder () instead of GetDefaultFolder (). (Otherwise see 'Calendar.) Also, Against full access to, able to investigate the availability of others' calendars. Do not access folder directly - Use the recipient. Fribbous or AddressableGetFreedius

Use of Minimum and Count in sql -

Can you use minimum (count ()) to find the smallest number of entries Or is there a way to do this? You can use this method, select minutes (COP) from SELECT COUNT (colName) cnt to group name GROUP BY ...) s

osx - Combine linux commands into one output -

I lay some files in a markdown parser, and want to pre / ap-pen a head / leg-ar I am currently, I do this with some commands but want to do it with a liner. Here is the command that I want to add to ... cat `find ... -name" * .md "-type f` | This produces between my document, so I would like to do something like this ... cat head.template (Find cat ... Try to group "source" commands like this: {/ strong> {cat header_part; Cat 'find ... `| Marked ; Cat footer_party} & gt; Output_file Thanks, on the backtext $ () like this: {cat header_part; Cat $ (Find ...) | Marked ; Cat footer_part) & gt; Output_file

copy - Bash how can rename a file saved into a variable? -

How can I do this: I have a file, eval.txt has been saved in a variable, which I call timestamp_evale. Txt filetosend = / home / cft / eval.txt file name = $ (echo $ filetosend | cut-d '/' -f4) // only to get the name Add a timestamp for the name of $ = $ (date +% Y% m% d) filename = $ {DATE} _ $ {filename} // name I $ filetosend How can I change the name I found this solution: DATE = (date +% Y% M% d) mydir = $ (echo $ (dirname) $ A)) myfile = $ (counterclocker $ (basename $ a)) myfile = $ {DATE} _ $ {myfile} filetosend = $ mydir / $ myfile cp $ a $ Filetosend The easiest way to do it: mv /home/cft/eval.txt / home / Cft / $ ( Date "+% Y% m% d") _ eval.txt

java - Input stream reader- read method return wrong value -

This can be a very simple or old silly question, but it is completely different for me, I have a semi-descending pyramid pattern Has written a program that is in this way. 1 2 1 2 3 1 2 3 1 2 3> 1 2 3 4 1 2 3 4 5 I know it is very easy, I do not want to do it using the scanner / code> and integer.parseant () . I'm trying to do this with BufferedReader and InputStreamReader . So when I execute the following code of my main method then there is input in 5 digits. It reads it as 53 when I print it. I do not know why this is happening. But when I got 'Integer. It uses precision ('breadline ())' method, so it gives accurate output. It should be done when reading the int value in the way of reading. Please clear it. int num1; Buffettder br = new buffed reader (new input striker reader (system.)); System.out.println ("insert the html value of num1"); //num1=Integer.parseInt (br.readLine ()); Number 1 = br.read (); Println (number1); For ...

web-safe fonts in Flex 4 -

I need to customize the style of the Flex app in a given HTML / JS / CSS Web App style. The problem is facing the font "How can I set such a rare font in Flex" Vardana, Geneva, without-serif "? Embed the font (s) in your compiled code so you can trust them They do not need that customers are present on the machine. More information:

Passing a Javascript variable as model for a PartiaView in ASP.NET MVC -

मेरे पास एक आंशिक दृश्य है जिसे एक मॉडल प्राप्त करना चाहिए: @model MiniSIGEweb.Models .स्ट्यूडेन्टव्यूमोडेल और मेरे पास यह मॉडल है कि जावास्क्रिप्ट वेरिएबल viewModel.selectedStudent : & lt; script & gt; Var viewModel = kendo.observable ({डेटा स्रोत: डेटा स्रोत, चयनित स्टूडेंट: {}, /*...*/}); /*...*/ & lt; / स्क्रिप्ट & gt; मैं कैसे इस चर को आंशिक दृश्य में पास कर सकता हूं? @ html.partial ("_ edit.Mobile", / * यहां मुझे चर * /) मुझे यकीन नहीं है कि यह महत्वपूर्ण है लेकिन मैं StudentViewModelClass को जोड़ रहा हूं: सार्वजनिक वर्ग StudentViewModel {public long Id {get ; सेट; } [आवश्यक] सार्वजनिक स्ट्रिंग नाम {get; सेट; } [आवश्यक] [रेंज (1, 100)] सार्वजनिक नल योग्य & lt; int & gt; आयु {प्राप्त; सेट; } [आवश्यक] सार्वजनिक स्ट्रिंग कोर्स {प्राप्त करें; सेट; } [आवश्यक] [प्रदर्शन (नाम = "स्कूल")] सार्वजनिक स्ट्रिंग स्कूल का नाम {get; सेट; } [आवश्यक] सार्वजनिक स्ट्रिंग सिटी {प्राप्त करें; सेट; } [आवश्यक] सार्वजनिक स्ट्रिंग देश ...

java - Create a file in tomcat -

I delete a Tomato Java web application. I want to create a file to store some JSN data in it. How do I create this file and how will this file be created? Enter the public Zero (User Profile profile) {JSONObject jsUser = profile.asJSONObject (); {String path = profile.getUsername () + ".json"; Flamewriter filewriter = new fir (path); FileWriter.write (jsUser.toJSONString ()); FileWriter.flush (); FileWriter.close (); } Hold (IOException e) {e.printStackTrace (); }} How do I create this file ... Use standard Java I / O library to create and write files; Just like you can use a FileWriter. ... and how will this file be created? To decide where you want the file to be. However, you have to beware of the possibility that someone may delete your web service due to filling the file system or typing stuff on top of some (important) existing file these concerns You need a good strategy to deal with, but it will depend on the purpose of these files and the cir...

windows - IOCP loop termination may cause memory leaks? How to close IOCP loop gracefully -

I have a classic Iocp callback that regulates I / o pending requests, executes them, / P> struct MyIoRequest {OVERLAPPED o; / * ... other parameters ... * /}; Bool is_iocp_active = true; DWORD WINAPI Worker Procurement (LPVOID LPPRAM) {ULONG_PTR dwKey; DWORD dwTrans; LPOVERLAPPED io_req; While (is_iocp_active) {GetQueuedCompletionStatus (handles) lpParam, and dwTrans, and dwKey, (LPOVERLAPPED *) and io_req, WSA_INFINITE); // Note, I could use GetQueuedCompletionStatusEx () ^ ^ ^ and set it to // in the qualified status, so I can wake the thread with an ACP request from another thread! Printf ("Request an I / O"); // [process i / o request] ... // [request request] destroyed_request (io_req); } // [clear some stuff] return 0; } Then, I'll be somewhere in the code: MyIoRequest * io_req = allocate_request (... parameter ...); ReadFile (..., (overlapped *) io_req); And it just works perfectly. Now I have a question: Do I want to close the IOCP queue immedi...

Scala: "val" as identifier possible? Linking to java library needs it -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मेरे स्केल कोड में, मैं एक जावा लाइब्रेरी का उपयोग कर रहा हूं जो ऑब्जेक्ट को "वेल" नामक एक सार्वजनिक विशेषता से परिभाषित करता है: सार्वजनिक वर्ग XYZ {public int val = ...} क्या इस विशेषता को स्कला में प्राप्त करने का कोई तरीका है? आप बैकटीक्स का उपयोग कर सकते हैं वे किसी भी स्काला कीवर्ड (या प्रतीक) की राखी गई स्थिति को निकाल देते हैं। val foo = new XYZ foo.valval देखें।

shell - automate input procedure to a binary file -

I have a binary file on UNIX, which is executed when the user asks for input. The input of this binary file has been given manually. I want to automate the process, because I already know the input. I can not modify the binary file. How can I do it? Is it also possible with the shell script or ant target? Simple input redirection can work: $ binaryFile & Lt; & Lt; EOF Input Line 1 Input Line 2 Input Line 3 EOF If you need some complex, look in the package.

glob - Perl: How capture the outputs of Expect.pm? -

I wrote a piece of Perl code to create an SSH key using expect.pm. Can make code key as expected but I do not know how to capture fingerprint from the output. Expect to use; My $ passwd = "abcdefg"; My $ keyfile = './mykey'; My $ cmd = qq / ssh-keygen -t RSA-B2048-C "My comments" -f $ file /; Print "\ nCMD: $ cmd \ n \ n"; My @ output; My $ session = hope-gt; Spawn ($ cmd) or die "Error calling external program: $! \ N"; As long as ($ session-> expect (5, "Enter passphrase (not left for a passphrase):")) {}; Print $ session "$ passwd \ r"; As long as (@output = $ session- & gt; hopefully (5, "enter the same passphrase again:")) {}; # Capture the output print $ session "$ passwd \ r"; $ Session- & gt; Soft_close (); My $ i = 1; Do my $ E (@Edit) before (if ($ E) {print "$$$$" = $ i, type \ $ e: # "ref ($ E)" #, the value \ $ e: # $ E # \ n ";} Else {print...

coldfusion - cfajax jquery javascript -

I am using a luxury dumpifier on the input input field. It is not working. I have javascrippt in an included file and have a save function so that I can use cfhtmlhead, the Dev Tool console shows me an error;

objective c and cocos2d allocated object managment -

I'm wondering how I would implement the transition between scenes in the best way. In my app, there is class2 in ccscene1 in class1 , and ccscene2 . When I am creating a transition from scene 1 to scene 2, there are several allocated examples on the View 1 Init method, that when I revive this scene, I want to be released every time. I'm thinking how I can implement Scene 1 so that all allocated frequencies (and some of them server TCP connected) will not be repeated twice, but only on the first launch, and still during all the visual changes Stay valid. One solution: Set a global flag and set it to 1 on the first launch of the delegate, according to the check it is the first launch on the init method of view 1, and the object Allocates to. / P> When I leave Sequence 1, will this object remain valid when I come back? (To say that I'm not releasing them)? The main goal is to not connect each infection to the server, and keep a representative example on...

c# - A generic error occurred in GDI+ again -

Text after " I understand, this message means (what needs to be thrown for unmanaged resources), but in reality I do not understand why this happens in my case: System.Drawing.Image imgAnimaha, imgNoanimaha; (Using System.Drawing.Image img = Image.FromStream (file)) (using System.IO.Stream file = thisExe.GetManifestResourceStream ("WindowsApplication1.img.noanimaha135.gif")) {{imgNoanimaha = (System .Drawing.Image) img.Clone (); }} (Using System.Drawing.Image img = Image.FromStream (file)) using {.image = {} (System.Drawing .image) img.Clone (); }} PbDiscovery.Image = imgAnimaha; In this case I got "a general error in GDI" + Why solve and how to solve? PS If I will write the following: pbDiscovery.Image = imgNoanimaha; This works correctly I really do not understand where and which unmanaged resource is not resolved ... The problem is that of Image.Clone (), as: (System.Drawing. Image img = Image.FromStream (file)) {imgAnimaha = (System....