Posts

Showing posts from March, 2012

c# - How to make a map editor in XNA -

I have created an area that is generated from the height map file, where each pixel (black to white) Area Now, my question is how can such a map editor make any? I can think of two common methods: 1) Map editor highlights the map file and reproduces the terrain based on that file. 2) Map editor directly changes the corner in the map, and later on the savings process, it produces an altitude map based on those heights. Do you have any good tutorials or resources, how can anybody work? I do not know where it is starting from. Here's a great video in it what it can do and you can get the source code Are there.

How do I execute the same stored procedure in multi-times in MySQL or PHP? -

In my I got a solution to figure out which data was duplicated before the merge data. This is a MySQL stored procedure to check the data: drop process if check_user_files are available; DELIMITER \\ processing Create Chek_usr_failen (IN p_user_id INT, IN p_file_id CHAR (10)) If you already have available (SELECT then myTable WHERE user_id = p_user_id and File_id = P_file_id) 1 then myTable SET `file_status` = 0 where Ughr_aid = p_user_id and Update file_id = p_file_id; Sign in to my data (`user_id`,` file_status`, `file_id`) value (p_user_id, 0, p_file_id); end if; END \\ DELIMITER; To call the stored procedure: Call check_gers_files ('1', '12'); table [myTable] composition: auto_id user_id file_id file_status 1 1 12 1 2 3 12 0 3 1 17 1 4 4 31 1 5 1 41 0 6 4 31 0 7 1 18 1 8 5 11 0 9 1 10 0 And my problem is, to check and insert me There is multi-data at the same time. Eg: ('1', '12'), ('2', '14'), ('3', ...

how do you implement a wizard-like interaction in android? -

संभावित डुप्लिकेट: नमस्कार, मैं एंड्रॉइड डेवलपमेंट के लिए नया हूँ और मेरे पास एक बुनियादी सवाल है। मान लें कि मैं उपयोगकर्ता के साथ कई इंटरैक्शन से जुड़े एक विज़ार्ड जैसी इंटरैक्शन को लागू करना चाहता हूं जहां प्रत्येक इंटरैक्शन में मैं सूचना के पृष्ठ को प्रदर्शित करना चाहता हूं जिसके लिए उपयोगकर्ता प्रतिक्रिया देता है, और उपयोगकर्ता से कुछ और जानकारी प्राप्त करने के लिए अगले पेज पर आगे बढ़ें (प्रत्येक पृष्ठ का अपना मेनू हो सकता है) जब तक उपयोगकर्ता 'विज़ार्ड' के सभी पृष्ठों पर नहीं जाता। प्रश्न यह है , एंड्रॉइड में, विज़ार्ड और उसके सभी पेजों को एक ही गतिविधि हो सकती है या क्या जानकारी के प्रत्येक पृष्ठ को एक अलग गतिविधि की आवश्यकता है? प्रत्येक "पृष्ठ" एक अलग गतिविधि होनी चाहिए, क्योंकि इससे बहुत क्लीनर कोड (बनाए रखने में आसान) हो जाएगा। हालांकि, अगर "पन्नों" में से दो बहुत निकट से जुड़े हुए हैं, तो एक भी गतिविधि क्लास इंटरैक्शन पर कटौती करने में मदद कर सकती है।

C++ file output -

All, I'm not a programming fool, but the following code produces 0 byte files. I verified that the file name is correct, and files are created. I too went so far to read, write, and execute for all the files, and the files were reduced and specify that not only was made at all times, and still 0 byte files fstream fs; Fs.clear (); Fs.open (datafileName.c_str (), fstream :: out | fstream :: trunc); Std :: cout & lt; & Lt; DataFileName.c_str () & lt; & Lt; Std :: endl; (Int jdx = 0; gddx & lt; the vertical profile- pt> & gt; matching number breaks (LE); ++ zdx) {FS & LT; & Lt; (Ididx = 0; idx and lt; thermalarrere [idx] [zdx] Important parts of the code are missing. What is the dimension? The rest of the code looks good, so I wrote a small test application that writes [1-6] to in the file named demo.txt . #include & lt; iostream & gt; # Include & lt; fstream & gt; Namespace STD's Yoga; Int main () {fstream f...

Can I use the silverlight server control inside an asp.net mvc 2 page? -

टाइप करते समय मुझे यह नहीं मिल सकता & lt; asp: एमवीसी के साथ आप वेबफ़ॉर्म नियंत्रण का उपयोग नहीं करते हैं & lt; एएसपी: ... & gt; वेबफ़ॉर्म नियंत्रण द्वारा उपयोग किए गए टैग हैं Silverlight को किसी भी तरह से काम करने के लिए एक वेबफॉर्म नियंत्रण की आवश्यकता नहीं है, आपको बस अपने दृश्य में निम्न HTML जोड़ना होगा: वस्तु वस्तु = "objYourSilverlightControl" डेटा = "डेटा: एप्लिकेशन / एक्स -सिल्वेरलाइट-2, "टाइप =" एप्लिकेशन / एक्स-रिलिल्ट-2 "चौड़ाई =" 500px "ऊंचाई =" 500 पीएक्स "& gt; & Lt; param नाम = "स्रोत" मान = "../ क्लाइंटबिन / आपसिल्वेवरलाइट नियंत्रण। एक्सप" / & gt; & Lt; param name = "onError" value = "onSilverlight त्रुटि" / & gt; & Lt; param name = "background" value = "white" / & gt; & Lt; param name = "minRuntimeVersion" मान = "3.0.40624.0" / & gt; & Lt; param नाम = "स्वत: अपग्रेड...

What is the Scala equivalent of the `this` operator in Java? -

In Java, I usually start the field in a constructor like this: Private Double Actual; Private double fantasy; Public Complexes (double real, double fictional) {this.real = real; This.imaginary = Fictional; } Is there any way to do this in Scala for classes or objects? Something similar: Like the complex of the class (actual: double, fictional: double) {def re = real def im = / P> square compartment (actual: double, fictional: double) {def this =real def = .imaginary = imaginary} Edit: Whoops, I think I find confused methods with fields here. When you type in the scales you can automatically To make and start the real and imaginary , the class complex (real: double, imaginary: double) In case you this . No need to use

iphone - How to localize view in xcode4? -

Image
मैं xcode4 में अपने आईओएस प्रोजेक्ट को स्थानीय बनाना करना चाहता हूं। Xcode4 में यह बहुत सरल लगता है उपयोगिता साइडबार में एक स्थानीयकरण पैनल होता है जहां मैं भाषा जोड़ सकता हूं। कोई भाषा जोड़ना मुझे निम्न संरचना मिलती है: मैं एक बटन को स्थानीय बनाना चाहता हूं इसलिए मैं MainWindow.xib (जर्मन) खोलता हूं और बस बटन का शीर्षक संपादित करता हूं। लेकिन जब मैं अपनी डिवाइस या सिम्युलेटर दोनों पर अपना काम चलाता हूं तो मुझे अंग्रेजी संस्करण मिलता है, भले ही यह जर्मन पर सेट हो। समस्या कहां है? किसी भी विचार? उपकरण या सिम्युलेटर से ऐप हटाएं यदि आपने स्थानीयकरण को जोड़ने से पहले इसे लॉन्च किया है, तो अभी भी एक मेन विन्डो.एसीबी प्रोजेक्ट की जड़ फ़ाइल संरचना में है। अगर आप एक्सकोड फ़ाइलों से तैनात करते हैं तो केवल तभी जोड़ा जाता है, कभी भी नहीं हटाया जाता। तो आपके पास अब तीन फाइलें हैं। मुख्य विंडो। Xib de.lproj / MainWindow.xib en.lproj / MainWindow.xib और जब तक रूट फ़ोल्डर में एक फाइल आईओएस भाषा विशिष्ट फ़ोल्डरों में नहीं है।

android - myIntent.getStringExtra returns null? -

When I try to send the string with intentions while switching activities, I am having a strange problem. Here I will do the class 1: myIntent = new intent (SearchText.this, Search.class); MyIntent.putExtra ("search", spinnerselected); MyIntent.putExtra ("SearchText", input); StartActivity (myIntent); class 2: intends to myIntent = getIntent (); SearchText = myIntent.getStringExtra ("SearchText"); Spinnerselectednumber = Integer.parseInt (myIntent.getStringExtra ("searchx")); And by using debugger in second class, it is clear that there is a value in it. However the line myIntent.getStringExtra ("searchx") returns null . Why is that so? what spinner selected is a string? Since: API Level 1 > Description: get receive. Parameter: Name name of the desired item Returns: The value of an item previously added to putExtra () or tap if no string value was found. There are several ways...

android - Run a function over and over again -

I'm new to writing an app for Android. I have had the experience of writing programs in non object-oriented program language, but also want to learn this method of programming. I would like to start simple and do the following: a button and a vibrator press will be triggered in a specific method until the phone is pressed again I know if you say Are: vibrator.vibrate (pattern, 0); That this pattern will repeat. But for example I want to turn the screen on and off in that pattern. What would be the right way to do this? Thank you very much for your help. package com.trick-design.simple_prog; Import android App Importroid.os.Bundle; Import android.content.Context; Import Android.os.Vibrator; Import android.view.View; Public square simple_prog activity extends to {private long} pattern = {100, 100, 300, 100, 900, 1050}; Boolean vibrator_on = true; /** Called when the activity is first created. * / @Override Public Zero onCreate (bundled savedInstanceState) {super.onCrea...

html - Fade background color not working with javascript -

I am trying to paint a background that would color one color to white (or any color) in javascript Fade does, but my code does not work in firebug, the error is called this.countDown.bind function but I have defined the countdown as the function You can see in the code below. Please someone can show me that I am wrong. Here is my code: var fadingObject = {yellowColor: function (val) {var r = 'ff', g = 'ff', b = val.toString (16), newval = '#' + R + G + B; Return Nuval; }, Fade: function (id, start, end) {this.start = start; This.count = this.start; This.finish = Finish; This.id = ID; This.countDown = function () {this.count + = 30; If (this.count> = this.finish) {document.getElementById (this.id) .style.background = 'Transparent'; This.countDown = Zero; Return; } Document.getElementById (this.id) .style.backgroundColor = this.yellowColor (this.count); SetTimeout (this.countDown.bind (this), 100); }}}; HTML (if necessary): & lt; Di...

PostgreSQL schema design -

What is your preferred method of designing PostgreSQL schemata? Do you recommend using specific graphical design tools or just design schemas on paper and make everything by hand? You can also try To create an ER diagram I have a good experience with scripts, power architects for DDL management, can make LIBCbase XML directly from the ER diagram.

asp.net mvc - ASP MVC 3 support for multiple row editing -

I was wondering if ASP MVC 3 has in-built support for editing multiple lines? I'm getting some examples of ASP MVC 2, but nothing for V3 I am using Antif Framework 4 as a back-end assuming that you have a public class command {public listing & lt; OderLine & gt; Orderlines {receive; Set; }} Public class orderline {public entry id (get; set;} public bolt checked {get} set;} public int amount {get; set;} public int name {get} order or edit order Should be presented as a header and then a table with rows, where each line can be changed, or removed, and new rows can be filled. AS There is no built-in support for such things as P.NET MVC. There is support for models, views, controllers and some HTML helpers. You can apply whatever you want from the good looking grid components that allow CRUD data. You can check out or create. There is also a part of WebMetrics but it is something that I personally do not like and do not recommend Received but some prove it usef...

php - views_slideshow without using Drupal CMS -

I really want to use the same slide show script but without using Drupal. Do you think this is possible? Perhaps this script is based on another open source project, which I do not know? There are some javascript slideshow plug-ins Drupal's visual slideshow module uses jQuery Cycle plugin

ruby on rails - Attribute not being set -

मेरे पास मेरे उपयोगकर्ता में नया फ़ॉर्म: और lt;% = f.fields_for: प्रोफाइल, प्रोफाइल.न्यू करो | टी | & Gt%; & Lt; div वर्ग = "फ़ील्ड" & gt; & Lt;% = t.label: प्रकार, "क्या आप एक कलाकार या श्रोता हैं?" % & Gt; & lt; br / & gt; & Lt; p & gt; कलाकार: & lt;% = t.radio_button: प्रकार, "कलाकार"% & gt; & lt; / p & gt; & Lt; p & gt; श्रोता: & lt;% = t.radio_button: प्रकार, "श्रोता"% & gt; & lt; / p & gt; & Lt; / div & gt; & Lt;% end% & gt; मैं अपने प्रोफ़ाइल मॉडल का प्रकार विशेषता सेट करना चाहता हूं हालांकि, प्रकार सेट नहीं किया जा रहा है और यह शून्य के लिए डिफ़ॉल्ट है मैंने अपने प्रोफ़ाइल नियंत्रक में यह बनाने विधि बनाने की कोशिश की, लेकिन यह काम नहीं करती: def बनाओ @profile = Profile.find (params [: id]) अगर Params [: profile_attributes] [: प्रकार] == "कलाकार" @ प्रोफाइल.प्रकार = "कलाकार" एल्सीफ पैरामस [: प्रोफाइल_एडिटर्स]...

google chrome extension - Add CSS to pages through a CSS file -

I was thinking that it is possible to add css to pages via CSS file, similarly pages via JS to JS Adding to File (Symbolic) Therefore, I can only determine what the page will work on the CSS file and then it will be as effective as a subscript. I think it is possible to add css through the javascript file, but if possible it would be more convenient to do this instead. If this is not possible, then surely I have to use the material stuff, but before I deny any possibilities, first I would like to know I searched and I did not find any answer - I was looking for the wrong I am or it is not really possible. Chrome extensions have come a long way, however, unless someone knows me yes & amp; Thanks for not responding or any feedback. Your manifest file should point to a content script a In the CSS file , when a URL matches your selected URL field ... "content_scripts": [{"CSS": ["scrollbars. Css "]," matches ": [" http://ww...

.NET Encryption/Decryption with shared keyphrase only -

My goal is to encrypt a string that is agreed on a key-phrase and standard encryption scheme, send it to a third party And As I have dug more in NET classes for encryption (AES that I wanted to use) it became clear that it was more complicated than I was originally though. By limited amounts I understand that it is not enough to agree on shared key phrases. Both salt and an initial vector should be similar between encryption and decryption. Am I forgetting something? Is there a way to encrypt the desired text (using .NET) and can anyone else be able to decrypt using a shared key-phrase? I can not even depend on the person decrypting the message. Using .NET I was looking at a standard encryption method. For secure password-based encryption, you per message salt and initial Vector which is known for both sides. However, this is not a problem. Salt and IV should be prepared on the randomly sending side, and the destination should be sent with ciphertext (it is fine if s...

javascript - loading content with jQuery / Ajax -

I'm working on a small code snippet. PROBLEM: I click some buttons, click AJAX, click in the content in a single device. I can work it properly, with images and text, but can not load with CSS and JS. Example: Index Page: & lt; Input type = "button" onclick = "example_ajax_request ()" value = "click my!" / & Gt; | & Lt; Input type = "button" onclick = "example_ajax_request2 ()" value = "or me!" / & Gt; & Lt; Div id = "example-placeholder" & gt; & Lt; P & gt; Placeholding text & lt; / P & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; Function example_ajax_request () {$ ('# example-placeholder'). Html ('& lt; p & gt; img src = "image / loader.gif" width = "220" height = "19" /> '); $ ('# Example-placeholder') load ("fat.html") .; } & Lt; ...

conventions - Is it good practice to check for null and check object properties in the same if statement -

Is it good practice to check the blank and check the properties of the object in the same condition if statement? The following code: if (jamesBlunt! = Null & amp; amp; amp; amp; & amp; amp; amp; amp; ;;;;;;;;;;); JustialBad ()} {// do not buy your records} This special code is in Java and I know that expression has been evaluated from left to right So, technically, this null pointer will not make an exception, but in general it is a good practice in any language? I think = is a typo and you mean & Amp; Amp; :) To answer your question: It depends. Can it ever be empty for jamesBlunt ? If not, there would be better practice to do something like this: Zero is being purchased (artist jamesBlunt) {if (jamesBlunt == null) {new illegal execution exception ("James is not empty should be there ! "); }} If it makes sense for jamesBlunt , then your view is OK, assuming null and IsReallyBad means the same thing, that is, if they say diff...

java - Determine type of serialized object -

I need to send messages (the user requests the engine and the engine responds to the user) the flow is basically a socket + -------- + orderly request + -------- + | Server | & Lt; ==== Networks ==== & gt; | Client | + -------- + Sorted response + -------- + ^ ^ | Request / Feedback | Mouse / keys | Object VV + -------- + -------- + | Engine | | User | + -------- + + -------- + Now, it only makes sense to not change the aspect again I'm working on both sides, so I'm planning to use an object like this: / ** * A client requests * / intangibles applying UserRequest Serializable call service request.engine callback (this); * It will tell the engine what the request is, the engine will determine its response at that time. * / Abstract Engine Response Engine Callback (engine engine); } / ** * Engine has calculated a response. * / Abstract Class Engine Response Tool Serializable {/ ** * User feedback will call. User callback (this); * It tells the user what the e...

graph path in prolog -

I have created rules for getting the path of a graph with the defined edges: Graph (A, B). Graph (A, C). Graph (b, c). For example: Article (a, [a, b, e]), but now I need to do this. Graph (b, [c, d]). Graph (d, []). I had this: path (origin, destination, list): - path (origin, destination, list, [original]). Path (x, x, list, floating): - reverse (temporary, list). Path (Genesis, Dest, List, Temp): - Graph (Genesis, Difference), No (Member (Difference, Temp)), Path (Difference, Destination, List, [Inter | Temporarily]). And I know that the problem is in the graph (original, inter), but I do not know how to zoom it so that it can get inside the list, I have tried graph (original, [inter | _]) but obviously it only checks for the first one. Any help (even if this code is not) will be greatly appreciated. Assume the guided article: side (x, y) : - Graph (X, Nodes), Member (Y, Nodes)

java - AndEngine + Box2D on Android- how portable is it? -

I'm considering using AndEngine for a physical-based game on Android. Some of the examples (especially those on which I place my code) depend on box 2D expansion. I was surprised to know that this extension relies on the original code for its box 2D implementation, instead of using the JB2 / this limit will be used for Andenji's portability How is that Will this work on all Android devices? This non- ARM device like current In the Very rare x86 Netbooks with the ported Android version running.

javascript - Website Home Page With No Toolbar -

Is a snippet of JavaScript to open a home page without the toolbar. I do not want to open with a link with window.open () This is for a portfolio that I want to show a plain window. I can do with size - window.resizeTo () But I can not find any code to get rid of the titlebar & Amp; Menubar ... Thanks for any help :) I do not It looks like you can do this without using window.open () , and it will kill many pop-up blockers.

c# - Entity Framework 4 Returning KEY/Primary Key -

इकाई फ़्रेमवर्क 4 कुंजी / प्राथमिक कुंजी रिटर्निंग IA ???? m एक रास्ता खोजने की कोशिश कर रहा है एक कुंजी / प्राइमरी कुंजी को बिना मेरे पास करने के लिए एक संग्रहीत प्रक्रिया बनाने के लिए: बनाने की प्रक्रिया [dbo]। [UserRecords] (@ नाम varchar (10)) एएस - - MyTable (नाम) मूल्यों (@ नाम) में नए रिकॉर्ड INSERT डालें - अब नए डाले गए रिकॉर्ड के इन्वेंटरीआईडी ​​को चुनें SELECT SCOPE_IDENTITY () के रूप में आईडी हालांकि विज़ुअल स्टूडियो 2010 I मॉडल ब्राउज़र से फ़ंक्शन आयात जोड़ें का उपयोग करें और एक कॉम्प्लेक्स टाइप करें। फिर भी, हालांकि सी # मैं अपने कोड की जांच करने के लिए निम्न कोड का उपयोग करता हूं। SQL_DB_Entities डीबी = नया SQL_DB_Entities (); Var रिटर्न वैल्यू = डीबी.यूसर रेकर्स ("बॉब")। पहले (); Console.Write (ReturnValue.ID); Console.Read (); मैं बस आईडी वापस करने का एक बेहतर तरीका तलाश रहा हूं और यह भी बहुत यकीन है कि मुझे ट्रैक के नीचे लस्टर के लिए सिर दर्द का कारण नहीं होने जा रहा है। अगर आपको लगता है कि यह कुंजी वापस करने का सबसे अच्छा तरीका नहीं ह...

assembly - How do computers find modulus? -

क्या बिट वार ऑपरेशन के साथ कुछ अच्छा एल्गोरिदम है? अक्सर, एक प्रोसेसर पर मॉड्यूलस और डिवाइड ऑपरेशन एक ही बात है। उदाहरण के लिए, देखें यह इंटेल प्रोसेसर पर डिवाइड निर्देश के कार्यान्वयन है।

iphone - How to fix library bugs? -

I am using barcode ADI in my app, when I'm trying to create an app for testing on iPhone It shows the following error ... "not found for library- lardardode collect2: ld 1 came to the exit of the command Command / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / gcc-4.2 in exit code 1 If you have "code" in the barcode API related code in your code, "failed" Library (framework) not included Project is done, edited: Find your solution with the following solutions.

Video Played Counter in PHP -

I have a flash player in PHP page. This video recording plays. I play a specific video up to 3 times a specific video. I want to ban Please suggest, how can I know if a user has seen a special recording? Can I track the time of play played? There are a few ways that you can get it User ID, Video ID, Counting times and last played DB table to store the date, for example if you allow the user to watch the video 3 times a week, then a cron is run each day and remove the entries > OR End the song An AJAX player from a few seconds before being Send request, this is the assumption that you can request another AJAX player from the player at the beginning of the video, how many users have played it.

java - Better ways to find if both variables are true or both are false -

I have two variables that can either be true or false on the database for the presence or absence of some product ID This is done by query. Now I need to set another variable that will be true or false. This will be the correct value when both variables are correct or both will be false. This wrong value of one will be true and the other is false. Currently I keep using this statement if (v1 == true & amp;; v2 == true) result = true; Else if (v1 == incorrect & amp; v2 == wrong) result = true; Else if (v1 == true & amp; v2 == incorrect) result = false; Else if (v1 == incorrect & amp; v2 == true) result = false; Is there a better way to do this? I miss something very original, but I let it go: result = (v1 == v2);

objective c - Is it possible to get the current location of the friends by using their phone numbers in iphone sdk? -

I need to know that the current status of my friends is there any possibility of getting available for their phone numbers or open source? ? Any help would be appreciated. Thanks all, Manish. No, it is not possible unless you are a CIA.

I want to open up the Calendar application from an android application -

I want to open the Calendar app from the Android app. When I searched online, I found this code. But this does not work on Android 2.1 below. Is it possible to launch a calendar application with Android apps below 2.1? If possible, someone please help me with it. calendar tempCal = (calendar) mCalendar.clone (); TempCal.set (year, month, day); IntentCalendarIncentant = New Intent (); CalendarIntent.putExtra ("Start Time", tempCal.getTimeInMillis ()); CalendarIntent.setFlags (int. FLAG_ACTIVITY_REORDER_TO_FRONT; intial.FLAG_ACTIVITY_SINGLE_TOP); CalendarIntent.setClassName ("com.android.calendar", "com.android.calendar.AgendaActivity"); StartActivity (calendarIntent); I also suggest:

dictionary - How to reverse order of keys in python dict? -

यह मेरा कोड है: a = {0: '000000', 1: '11111', 3: '333333', 4: '444444'} i में: प्रिंट I यह दिखाता है: 0 1 3 4 लेकिन मैं इसे दिखाना चाहता हूं: 4 3 1 0 अतः, मैं क्या कर सकता हूं ? ऑर्डर की जाने वाली कुंजियां मनमानी हैं यह केवल एक संयोग था कि वे क्रमबद्ध आदेश में थे। & gt; & gt; & gt; A = {0: '000000', 1: '11111', 3: '333333', 4: '444444'} & gt; & gt; & gt; A.keys () [0, 1, 3, 4] & gt; & gt; & gt; सॉर्ट किया गया (a.keys ()) [0, 1, 3, 4] & gt; & gt; & gt; उलट (सॉर्ट किया गया (a.keys ())) & lt; 0x02B0DB70 पर सूची उल्लिखित वस्तु & gt; & Gt; & gt; & gt; सूची (उलट (सॉर्ट किया गया (a.keys ())) [4, 3, 1, 0]

Which book or blog for Facebook + PHP newbie? -

I want to develop a PHP app with Facebook integration. Any book / blog / sample you recommend? The features of the app are as follows: Only log-in Facebook user can access the app The app will post a status message on the user's wall on request (i The app is a survey, the answer to the record is linked to the user's Facebook ID Each Facebook user can respond only once App users Facebook sends a summary of the survey for email Thank you! Another only source I can recommend it Of course there is a possibility that you can not find some information there but there is no better starting point than this.

Regarding random function in asp.net c# -

Hi, I want random numbers for the questions I used random function in asp.net but repeats the question. How do I get repetitive questions? C#. Thank you. The problem with random is often the following: The following codes are often used A lot will return to the 'non-random' sequence for (int j = 0; j & lt; 100; j ++) {random random = new random (); Int i = rnd.Next (1, 5); Console.WriteLine (i); } One more of the following random numbers will be distributed: random rnd = new Random (); {Int i = rnd.ext (1, 5) for (int j = 0; j & lt; 100; j ++); Console.WriteLine (i); } A different approach to generate a random number can be obtained by Linq: var randomNumber = Enumerable.Range (1, 10). OrderBe (G = & gt; Guid.NewGuid ()). first (); This method first creates a list of numbers (1 to 10 in this example), and after that the list of orders creates a guide to manipulate this list so that first () random Be like I often rely on this method to g...

c++ - How to read a complete line from the user using cin? -

Here is my current C ++ code, I would like to know how write a line of code Is I still using cin.getline (y) or something different? I have checked, but nothing can be found when I run it, it works perfectly, apart from it, the word a is necessary for output to me instead of completely lines Is it I need help with whom? I have underlined it in the code. Thanks for helping #include & lt; Iostream & gt; # Include & lt; Cstdlib & gt; # Include & lt; Cstring & gt; # Include & lt; Fstream & gt; using namespace std; Int main () {char x; Cout & lt; & Lt; "Would you like to type in the file?" & Lt; & Lt; Endl; Cin & gt; & Gt; X; If (x == 'y' || x == 'y') {four or [3000]; Cout & lt; & Lt; "What would you like to write?" & Lt; & Lt; Endl; Cin & gt; & Gt; Y; Offstream file; File.open ("Characters.txt"); File & lt; & Lt; Stellen (Y) & lt; & Lt...

C# about Windows service -

What would be a small example with a Windows service and how to install it and run it? I have searched the Internet, but nothing on which I have tried was written on the initial method. Also, when I try to install it, the error keeps going up to OpenSCManager . Install on C: \ wINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ InstallUtil.exe then run InstallUtil.exe "c: \ myservice.exe" Go to services.msc and then locate and start your service

Input validation loop in C++ with strings -

I'm just learning C ++ (1 week experience) and trying to write an input validation loop The user asks "yes" or "no", I know this, but it is feeling that there is a better way to reach it. Here's what I came with: {Four floors [5]; // To store input in a string int test; // While testing in a Loop Cot & lt; & Lt; "Yes or no \ n"; Cin.getline (temp, 5); | (| (SRCMP (Temporary, "Yes")) || | (SRCMP (Temporary, "No")) // Checks the string if yes or no C & lt; & Lt; "Acceptable input"; // displays that if the string is not really yes or any other, / if not, then check the input validation loop {test = 0; While (trial == 0) // loop {cout & lt; & Lt; "Invalid, try again. \ N"; Cin.getline (temp, 5); // Yes or no attempt to get it again (! (Strcmp (temp, "yes")) || (strcmp (temporary, "no"))) / or checks the string yes or no test = 1 ; // check changes 1 so that the l...

ios - get some Error with creating and inserting object of array -

I am new to iPhone and now I am struggling to create and insert objects. I'll explain first here Here I have a tableview with some cell move which is going to my array, whose name is appDelegate.array1 I now see something in the table view cell I can change the value and now after that I want to include this new cell value in the same array app Delegate.array1. So how can I do this I tried to do it. - (void) ViewViewPaper: (BOOL) animated {[appDelegate.array1 addObject: indexPath]; [Reload tableview data]; } whether it is correct or not, if yes then why my application will end and if not, please give me the correct method to add an object to the array Note this point. 1) Check if your array is a mutant array ... then only you can add new items to the array at run time 2) What is the index path in your code, which is a bit confusing .. 3) To add an object you use these (or more) functions [yourArray addObject: your_object]; Or you can use [yourArray i...

gem - What does 'Don't know how to build task 'bootstrap' mean? -

I was trying to make merry while following the instructions. On the move 'Rake Mani', I got several warnings and a failure notice A sample of production is as follows: Warning: org / dynalang / dynalink / monomorphiccollect site. Class (org / dynalang / dynalink: monomorphiccollectite class.): Newer than the major version 51 50, the top version supported by the highest compiler, it is recommended that the compiler be upgraded. Note: Users use / override an excluded API or Java / Amar / SRC / Meg / Amar / Dunnbootstrap.java. Note: recompiled with exclute: exclusion for details. 4 Warning Building Jar: / Users / Pal / Dewi / Interesting / Amariah / Jawalib / Amarna- Bootstrap. Rack aborted! How to make the work 'bootstrap' is not known How should I start troubleshooting this? For example, which compiler should be upgraded, and how can it be done? This problem has been fixed by the master, so you should be able to master and just fine creation should do . ...

Haskell function signature and "Could not deduce" compiler error -

मैं एक Haskell पुस्तकालय लिख रहा हूँ जो Data.Vector 's का उपयोग करता है मैंने सफलतापूर्वक पुस्तकालय फ़ंक्शन को लिखा है, लेकिन मुझे नहीं पता कि उसमें हस्ताक्षर कैसे जोड़ना है। नीचे समस्या का उदाहरण देते हुए एक सरल उदाहरण है: आयात योग्य डाटा। वेक्टर। जेनरिक के रूप में वी - दो वैक्टर ज़िप करें और टपल टेस्ट के रूप में प्रथम तत्व लौटाएं :: (वी.एक्टक्टर VA, आंशिक ए) = & gt; V a - & gt; V a - & gt; (ए, ए) एक बी = (V.zip a ख) वी। का परीक्षण करें! 0 यह कोड निम्नलिखित संकलन त्रुटि का कारण बनता है: संदर्भ से (V.Vector va, fractional a) उत्पन्न नहीं किया जा सकता है (V.Vector v (a, a)) MyLib.hs पर `V.zip 'का उपयोग: 7: 12-20 संभावित सुधार:` परीक्षण' के लिए प्रकार के हस्ताक्षर के संदर्भ में जोड़ें (वी। वीक्टर वी (ए, ए)) या इसके लिए एक उदाहरण घोषणा जोड़ें (वी। वेक्टर वी (ए, ए)) `(वी।!) 'के पहले तर्क में, अर्थात्` (वी। ज़िप एबी)' अभिव्यक्ति में: (वी.ज़िप अब) वी।! 0 `परीक्षण 'की परिभाषा में: एक बी = (वी.जिप ए ख) वी। परीक्षा लें! 0 कोड का अनुपालन किया जात...

javascript - Rendering issues with parallax-effect -

I am trying to create a vertical effect using the window. But ScrollTop but I'm running in a rendering problem that looks like I'm getting an onscoll after a viewport is provided. As you can see (code attached) the movement of the box is irregular and choppy. Behavior is similar in all WebKit based browsers and Firefox. JavaScript Markup & lt; Div class = "red box" & gt; Apply for liability. & Lt; / div & gt; & lt; div class = "green box" data-paralax = "0.4" & gt; Konstantur adipiscing elite & Lt; / div & gt; & lt; div Arg = "blue box" data-paralax = "0.3"> Nam consectetur dolor. & Lt; / div> Thinking whether it is worth using a prefabricated one and not be "re-done"

Live calculation on jquery change -

We are using the following fields to calculate some. $ (document) .ready (Function () {$ ('.num'). Blurring (function () {var amount = parseint ($ ('# zodiac'). Val ( )) | Var openbal = parseInt ($ ('# openbal' ') .val ()); var disk = parseInt ($ (' # disk '). Val ()); var netpay = fees + open-cart || 0; $ ('#netpay'). Val (netpace);});}); And here is the html code & lt; Select name = "product" category = "product" & gt; & Lt; Option selected & gt; Select a product & lt; / Options & gt; & Lt; Options & gt; Product 1 & lt; / Options & gt; & Lt; Options & gt; PRODUCT2 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = "text" size = "30" name = "zodiac" square = "number" id = "zodiac" /> & Lt; Input type = "text" class = "num" name = "openbal" value ...

How to get the nearest marker to a know point in the visible map area with Google Maps API v.3? -

I have already read, but I have some regrets to apply in my situation because I have many markers (ATMs) ~ 5000, everyday). In my application, the user places his marker (it is called marker A) by clicking on the map or by address via geocode; I know that there is a marker in the specific scope of marker A. As I said, I can not start all the markers again, this is likely to kill the user browser, and if possible, to avoid AJAX requests to search in my database to love. Actually I insert markers on the map via Is there a way to search between markers in the visible area of ​​the map? After several research, I ended up with the recurrence solution (). To reduce the number of repeated objects, I divided into the state base (this time has been implemented), maybe in the future I can add more divisions. If it can be useful to someone else, my 'solution' means an array: places = {"this": ["Rome", "Venice"], "fr": ["...

c++ - Boost timer stopped working, because of the British summer time -

We've changed the time here in the UK this week. Since then, my Boost Timer has stopped working on my PC. What should I do here if I want to run 10 second timer: boost :: asio:: Io_service service; Promotion :: asio :: deadline_timer timer (service); Promotion: posix_time :: ptime time = boost :: posix_time :: microsec_clock :: local_time (); Timer.expires_at (time + boost :: posix_time :: time_duration (0, 0, 10)); Timer.async_wait (boost :: bind (& onTimeOut, boost :: asio :: placeholders :: error); Service.run (); Now that does not work, I was not waiting, but I hope it will take time in one hour and 10 seconds. To prove my point, if I do the following, it will end in 10 seconds: boost :: asio :: io_service service; Promotion :: asio :: deadline_timer timer (service); Promotion: posix_time :: ptime time = boost :: posix_time :: microsec_clock :: local_time (); Timer.expires_at (time - boost :: posix_time :: time_duration (0, 59, 50)); Timer.async_wait (boost :...

iphone - What is superView in this case? (Tabbar APP) -

I have a tabbar application with only one tab. Here are my didFinishLaunchingWithOptions : - (bool) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {OneDayViewController * oneDayView = [[OneDayViewController alloc] initWithNibName: @ "oneDayView" bundle: nil]; TabBarController.viewControllers = [NSArray arrayWithObject: oneDayView]; [Self. Window Adsview: TabBr Controller See]; [Self. Windows and knowledgeable]; Yes come back } any method OneDayViewController , I have this code: UIView * superView = [self.view superview ]; The question is: What is superView now? UIView? UIViewController or ... I do not know (sorry about that) P / S: I want to remove ask it because I OneDayView and would like to add Tabbar another scene. Thank you very much. You'll supervision tab BarController.view ... (Earlier I mentioned the window I was wrong ...) Post the code that is displaying / pushing OneDayV...

social networking - facebook code track users came to my site through it -

Is there a code that how many users come to my site via the Facebook share link? Your best bet is to do something on your site as Google analytics. This will list the references link.

web services - Tutorials and Materials for RESTful webservices with NetBeans -

Where can I find tutorials for creating tedious web pages using Netbeans IDE? And I want to learn from the basics of the restive services, and how advanced it is with RPC or SOAP based webservices, is there any reliable resource? I started with this tutorial of Netbeans and found that this is a good start point:

c++ - 64-bit program segmentation fault on HP-UX PA RISC -

I'm using 3 HP-UX PA RISC machine for testing A Palestinian Authority is failing on the machine, where others have to do this work. Note, even if the binary is executed with the version check, i.e. it prints the version only and exits and does not carry any other operation, even though binary division is making a mistake. What is the probable reason for the segmentation fault? It is important for me to know the root causes of failure on a box. As the program is working on 2 HP-UX, it seems that this is a environmental problem? I tried to copy the same type of code in the exam program (i.e., declare variables, print edition and exit) and build with it compilation option but it is working. Here's the GDB output for the program. $ gdb prg_us detected 64-bit executable. Includes / opt / Langoli / bin / GDB 64 HP GDB 5.4.0 PA-RISC 2.0 (Extended), HP-UX 11.00 and Target HPPA 2.0.0-HP-HPX 11.00 Copyright 1986 - 2001 Free Software Foundation, Inc. Hewlett-Packard Wildlife 5....

Write iPhone app in Windows XP -

संभव डुप्लिकेट: मैं विंडोज एक्सपी पर आईफ़ोन एप्लिकेशन कैसे लिख सकता हूं और डीबग कर सकता हूं? अगर आप विकसित करना चाहते हैं तो एंड्रॉइड पर स्विच करें () Win XP पर। या जाएं और (फ़्लैश) में विकसित करें।

mysql - What column data type should I use for storing large amounts of text or html -

I have a column in the table which was initially varchar (255) and due to some design changes Varchar 1536) = 1024 + 512 I will not search and index this area, does it make sense to store this value in a different data type other than the behavior, if you want to optimize it for display? Yes, it would be better if you store values ​​in " TEXT " Data types can For more information, please read. Regarding knowledge of storage requirements, you can read Hope it helps.

performance - PostgreSQL - Are BEFORE triggers more efficient then AFTER triggers? -

I read in a bus, before being triggered "more effective" before triggering: If you have no special reason to trigger before or after, then it is more efficient than before, because information about the operation is not saved until the statement ends. I do not know what this is true or what it means for me. Can anyone illuminate me? Is it just a homeopathic performance improvement? PostgreSQL of MVCC architecture, each operation Increases the amount of data recorded in the system, even DELETE . So if you need to check your input and if the check fails then roll back the transaction, you can do better before saving input data.

Python concatenation of variable and string -

श्रेणी में मैं (0, लेन (list4)) के लिए: ws.write (1, 0, datetime अब (), शैली 1) ws.write (2, 1, 1) ws.write (2, 2, xlwt.Formula ("A3 + B3")) wb.save ('example.xls') > मैं कैसे सामान्य (ए 3 + बी 3) 'ए' + मैं '+' बी '+ i' क्या यह सही है 'एक% (पंक्ति) d + B% (पंक्ति) डी '% {' पंक्ति ': 3} या ' एक {0} + B {0} '। प्रारूप (3 )

PHP random reorder of elements -

I am trying to randomize the order of a series of elements for a website homepage. We imagine there are 3 titles to display on this page. $ title1 = 'first title'; $ Heading 2 = 'second headline'; $ Heading 3 = 'third title'; We now want to display them on the HTML file but do not repeat one element in a random order and at any time. & lt; Html & gt; & Lt; Div id = 'titleholder1' & gt; [Randomly either $ title 1, $ heading 2 or $ heading 3] & lt; / Div & gt; & Lt; Div id = 'titleholder2' & gt; [Randomly either $ title 1, $ heading 2 or $ heading 3] & lt; / Div & gt; & Lt; Div id = 'titleholder3' & gt; [Randomly either $ title 1, $ heading 2 or $ heading 3] & lt; / Div & gt; & Lt; / Html & gt; In addition, this page should be repeated by $ title1 $ title2 or $ heading3 any time. Any ideas, wonderful edit. If we have more than one element, then what ...

android - How can i set theme at run time? -

Please do anyone know how to set the subject of runtime? How do I select a user and can set the theme in my app? you set setTheme (..) Before setContentView (...) and Super. Increase () and it should work fine

asp.net - Can the microsoft stack really not scale? -

Based on a recent article on MySpace, Microsoft is not able to easily scale the stack. Is this true? Is Microsoft Scam (asp.net mvc here) scaling an app built on almost impossible? Is PHP / LAMP Really Better Than Microsoft? Yes Microsoft stack can just fine-scale. You have to be the right set of skills to get a job. Unfortunately MySpace did not have access to proper resources due to the proper resources (or physical location, according to their article) and they blamed the technology stack.

ms access - Using MsgBox without pausing the application -

I need to display a message to the user i when I use this MsgBox , The program stops until the user removes the box. I want to know that there is no way to open MsgBox without pausing the program. Looks like you do not see any user input from MsgBox in this situation, your application Based on this, StatusBar can be an adequate option In Excel it's easy: application.StatusBar = "Please be patient. .. "Application. StatSbar = Aidon & amp; "Ka" & amp; ITotal & amp; "Done the item." To clear the statusbar when: Application.StatusBar = False In Access, The syntax is a little more complex:

java - Shifting from blocking to non-blocking I/O with javanio -

I customize this code to my real-time simulation to send an object, but I'm running after each other in exceptions Because this code is blocked, in nature how can this code be converted to block with Javanese / * * author * / import java.io.IOException; Import java.io.ObjectOutputStream; Import java.net.InetSocketAddress; Import java.nio.channels.ServerSocketChannel; Import java.nio.channels.SocketChannel; Public Class CleanSandler Runable {Private SIM Manager SM; Private ballstate ballstate = new ballstate (10, 5); Private serverSet channel channel ssChannel; Personal threads tRunSer = new thread (this, "servercreatectread"); Public stationary zero main (string [] args throws IOException {cleaners server = new cleaner (;); Server.startServer (); } Private Zero startServer () throws IOException {ssChannel = ServerSocketChannel.open (); SsChannel.configureBlocking (true); Int port = 2345; SsChannel.socket (). Dam (new InetSocketAddress (port)); // sm = new simanager...

python - py.magic in py.test 2.0.2 -

py.test 2.0.2 में, हम के स्थान पर क्या उपयोग करते हैं .magic.autopath ()। Dirpath () क्योंकि 'py.magic' को py-1.0.2 के बाद हटा दिया गया है os.path.abspath (os.path.dirname ( फ़ाइल )) // मूल निर्देशिका देता है मौजूदा फाइल का

PHP and fancy boolean -

There are problems with booleans in php, it would be very grateful if someone could explain why not Does $ var = "asdas"; // or if this (! Private ($ var) || ($ var &! Var)) {if (! Isset ($ var) || (is_bool ($ var)! = True & amp; Is_bool ($ Var)! = False)) {echo "is not boolean"; } Else {echo "This is a boolean"; } Output is always - & gt; "This is a bullion" Thank you in advance Thank you for your help, yes I know what I have done (school boy error). Solution $ var = "asda"; If (! Isset ($ var) || (is_bool ($ var) === false)) {resonant "this is not a boolean"; } Else {resonance is "boolean"; } The problem is here: (Is_bool ($ Var)! = True & amp; is_bool ($ var)! = False) is_bool () either returns Code> or False so that you are destroying the first echo . Change your code to: $ Var = "Dadas"; If (isset ($ var) and is_bool ($ var)) {echo ...

class - Serviceclient problem invoking operations which have extended classes as parameters -

ServiceQuality Issues which extends classes as parameters, Invoking I have Operation Input Which is exteded to class Xsd: Shema Sophactor FAC = Ombrustfacture.GetsSoAP11 Factory (); SOAPEnvelope envelope = fac.getDefaultEnvelope (); Omnemaspace Omnence = FAC. Crete namespace ("http://impl.service.mobile.boerse.com/", "enfo"); // // payload amelement method vs. = FAC. Creteomelment ("IIandexData", OMN); Recommendation value = FAC.CreateOemment ("Arg.Advite Type", OMN); Value.setText ("1"); Method.addChild (value); Importance value 2 = FAC. Creteomelment ("Arg 0 identification", omn); Value2.setText ("1"); Method.addChild (value2); Importance value 4 = FAC. Creteomelment ("Exit.net", OMN); Value4.setText ("1"); Method.addChild (VALUE4); Importance value 3 = FAC. Creteomment ("AG1", OMN); Value3.setText ("1"); Method.addChild (value3); If you have extended class pai...

generate MVC from existing sql database in rails -

I would like to know whether it is possible to generate all the MVC file from the existing database. Reverse action of scaffolding work. I need to answer . Thank you. Is this something you are looking for?

c# - WPF Create instances of controls defined in xaml -

I have a definite definition in xaml which is determined with a large number of properties which can be re- It is difficult to produce. Can I define control in xaml and somehow I can create an example in the code behind it? Another option is to create control as a resource with X: share = "false "Property If you want to get new examples at each resolution: & Lt; /UserControl.Resources> In the code: var myNewCtrl = this.FindResource ("MyControl") as a rectangle; // Usage Control

exchange of control between functions in C language -

निम्न परिदृश्य को ध्यान में रखते हुए: fn (1) कॉल fn (2), फिर fn (2 ) एफ एन (3) कॉल करता है, और अब एफ एन (3) को एफएन (2) के बजाय एफएन (1) के लिए नियंत्रण देना चाहिए और नियंत्रण फिर से वापस नहीं आना चाहिए। इसके बारे में मैंने गोटो से कोशिश की है, लेकिन गोटो फ़ंक्शंस के बीच काम नहीं करता है, इसकी केवल एक स्थानीय कूद है। मैं जांचना चाहता हूं कि कोई और तरीका है जो मैं किसी अन्य फ़ंक्शन पर नियंत्रण भेजने के लिए इस्तेमाल कर सकता हूं नोट: कोई वैश्विक वैरिएबल, फ़ंक्शन का सूचक इस मामले में काम करेगा ठीक है, ऐसा करने का सामान्य तरीका होगा: int fn3 () {वापसी 1; } शून्य fn2 () {यदि (fn3 ()) वापसी; ...} निश्चित नहीं है कि आप कुछ अधिक विशिष्ट, जैसे setjmp / longjmp की तलाश कर रहे हैं

MYSql multiple replace query -

मेरे पास यह अद्यतन तालिका SET उदाहरण = REPLACE (उदाहरण, '1', 'परीक्षण') जहां '1 $' रीगएक्सएपी उदाहरण है, इसलिए यह कोड "परीक्षा" के साथ "उदाहरण" फ़ील्ड में "1" के सभी उदाहरणों की जगह लेता है। मैं इसे 2, 3, 4 और इतने पर दोहराना चाहता हूं। लेकिन अलग पूछताछ का उपयोग करने में यह बहुत ही अक्षम है। क्या मैं इसे बस के साथ कर सकता हूं एक प्रश्न? धन्यवाद मातृशका-मार्ग; -) दोबारा जगह (उदाहरण, '3', 'परीक्षा'), '2', 'परीक्षा'), '1', 'परीक्षा')

iphone - Ad hoc distribution of my iPad app -

I have created an iPad app that I want to send to the other branch of my company. I have an .app file that I want to send it to. Does this partner have to do something special except to drop this file into iTunes and install it on the device? Does any item require a Mac with Xcode or how did I get it? I will not have a physical address on my device. EDIT: This is just a one-stop talk I only want to do some demos. You do not need Xcode or Mac to install the add-hoc-provisioned app for all your users ITunes is required. You need to send your UUIDs to your users, which you will need to register in Apple's provisional portal. Download the updated profile and make sure to link it when creating your app for distribution. I have heard of people, the safest option is to select "build and archive" from the build menu, it will create an IPA file that can be installed via iTunes. If you open the Xcode Organizer after building and archiving, then you can choose your...

Stopping onClick from returning the page top the top after jQuery events -

I have read a lot of posts about this issue, with great resolution, however, none of them Does not work in. This is my JS: $ (document) .ready (function () {$ ("a.tab"). Click (function () {$ ("Active.") RemoveClass ("active"); $ (this) .addClass ("active"); $ (". Ul."). Fade (); $ ("inside.");) Content_show = $ (this) .attr ("title"); return false; e.preventDefault ();}); $ ("A.tab, h4") .Fonfef ({Outlook: true})}); What am I doing? Update: Thanks for the help. Now I have the following, although it still does not work: $ (document) .ready (function () {$ ("a.tab"). Click (function ( E $ {"(active"). $ ("Active"), $ (this) .addClass ("active"); $ ("inside."). FadeOut ($) ($ ("(" "" ") ; Return false;}) // $ ("a.tab, h4) fontfix ({// outline: true}}}); anchor tag: & lt; a href = "#" title = ...

ruby on rails - Developing a RoR application with "levels" of difficulty -

I am creating an ROR application with different levels of "difficulty". The site is purposely designed to hack, so that students can better secure their web applications. At every growing level of difficulty, cleanliness / security checks will be slightly more advanced. As an example for SQL injection: Start - just insert ' and you break into RAW SQL Intermediate - The insert breaks in 'RAW SQL' , but some special words (such as drop, altter, etc.) are "blocked" ... Advanced - Username & amp; The password has been completely cleaned up, but unsafe for attacks from a different charset, etc. ... What is the best way to code it in pig? Right now, I am using a (horrible) pattern like: if level == 1 # code for the initial Elsef level == 2 # for the # intermediate code and advanced end Code for This happens several times :( What is the best way to apply this type of pattern? It seems like a good place to use capricading, using...

groovy - Grails informational messages -

Image
My Grails app displays information message for the user after the request process, these are usually either success messages: / P> User "John@example.com" successfully created or error message: Please check the verification shown below Fix Errors If I do a redirect after request processing I am then stored in the message flash scope. But if I call the render after processing the request, then I can not store messages in flash scope, because the message will be very much present for a request in a flash scope, therefore I'm not sure what is the best way to see these messages from the controller? An obvious option is to pass them in the model with just other data, but I like to keep these messages different from the "real" visual model, are there any alternatives? In the case of the example shown above, where I want to show an error message related to a command object, call it when I call it "Please correct ...." Code for, is i...

javascript - Most efficient way to re-use jQuery-selected elements -

I can visualize the correct answer based on theory, but I am just looking for some confirmation. I'm wondering what is the most effective way to reuse jQuery's selected element? For example: $ ('# my_div'). CSS ('background', 'red'); // Some other code $ ('# my_div'). Attr ('name', 'red div'); versus myDiv = $ ('# my_div'); MyDiv.css ('background', 'red'); // some other code myDiv.attr ('name', 'red div'); I think the second example is more efficient because the element #my_div does not have to be received more than once. Is it true? Similarly, it is more efficient to save $ (it) in a favor like 'obja', and then instead of using more than $ (this), 'obja' Reuse? In this case, jQuery is not being forced to find an element repeatedly, but it is being forced to convert it to a jQuery object [$ (this)]. So as a general rule of thumb, should any jQuery object be ...

Better control over where windows with cscope buffers in Emacs -

Amax is the editor of my choice, and I provide cscope intergration xcscope.el. Recently I had a flirt with Vim I decided to stay with AMX, but what I liked in VIM was that how can I control where my cisco window should be visible. Using Cscope_maps.vim () I get shortcuts that give Vim the open search results in the same buffer, a new horizontal or a new vertical partition. A cscope buffer in Emacs goes somewhere fashioned in a window, according to some rules I do not know my guess: if I have only one then a new window has been opened. If I have more, then the one I have been away from the longest is used. The only topic I have found is that which helps a little, but it does not make it nearer to the flexible as the key binding in the waist. Has anyone got a better cscope setup in Amex than provided by XCSPPail? I do not know the lip, so I do not know how hard it can be, how it works in Vim. How MACS 24 (not yet released) radically changed It is decided that which buffe...

javascript - edit box tinymce -

I have created a simple website, now when I click on my text on the website, I want to show the 'tinink box' I'm able to edit my current text. Is it possible and how can I do this with javascript / jquery? Another easy solution might be to use functionality which is already there Looks like you're looking for code plugin Click on a box opens and the user can edit the html source of the editor content. One of the alternate buttons has been written 'html' and it can be used to go into HTML editing mode. You can see it - to enable 6 places left from the top-right corner on your website, you will need to add the "code" to the plugins and "code" in the list of buttons.

image - C# reference comparison -

Do anyone know what can be wrong, when you have two system.Drawing.Image Organizations trying to compare? I have some IEnumerable & lt; Image & gt; Image. Using the Forfile (Path) method But the following code generates the result I can not quite understand: foreach (var image1 in images) {foreach (images in var image2) {if (image1 == image2) {// (do something!)}}} The thing is that (do something!) The part is never called. The debugger shows that the image object has a property named nativeImage , which I think is a raw memory pointer, because System.Drawing.Image is implemented using Marshalling. This memory pointer changes all the time and I think that some kind of cloning is here, but I do not understand what I really need to do. What I am doing is doing wrong and how do I System.Drawing.Image objects to a IEnumerable & lt; & Gt; to see if they are similar? Thank you. update var path = new list & lt; String ...

processor - ARM modes and why are there so many? -

I am currently reading / learning about ARM architecture ... and I was thinking that so many Why are the methods (FIQ, user, system, supervisor, IRQ, ...). My question is why do we need so many ways? What users and systems will not be sufficient? Thanks in advance. This is just an architectural decision, the biggest advantage of many methods is that they have some bank registers. With those additional registrars, you can write less complex exception ratios too . If you choose only two, then the USR and SAS are probably good as any option, but what will happen if you take exception? Normal ARM model is to go into exception mode, after the exception of the exception of the bank linked register, to which you want to return after solving the exception, in the exception mode, the processor position in the SPSR register Set to save and then jump on the exception vector, USR and SES share all their registers - using this model, every time you take an interval, then come Will blow o...

SMS message filter application in Java for Nokia Symbian S60 -

Enterprint = "text"> Write a small message filtering application for Nokia E51 (filter incoming SMS based on your content in a specific folder) Want to Java is easy to find. Is it possible for Symbian Series 60 phones via Java API? If so, do I have the exact SDK and equipment? PS: The app will be for personal use. It is not possible to use Java-ME; You can not access SMS Inbox in this way. However your goal is S60, so you have the option of using the local Symbian API or QT (not really difficult). For details of tampering SMS with QT, see.

c# - asp.net 2.0 book recommendation? -

My background: 1. I recently graduated from college (BS in CS) And working full time as a MOSS 2007 software developer for 7 months. I'm using asp.net 2.0 in any server-side code C # written. 2. I have mostly (Java, C) experience and have a strong assessment of OOP from college. What I'm looking for: A book on APP 2.0 that will help me understand the structure. If the code example is in C # or there is additional information about C # development, which is a plus, but my primary goal is to understand how the framework works. For example, I know that Page_Init Is called, page_load, etc., but how does it work internally? Any recommendations? I am currently looking at the following books: , Looking at the information given above, can someone limit my choice to me? I like Reviews for C # Best C #, but I'm not sure that it will provide enough information about asp.net for the other two titles, I suspect that they consider a lot of ASP.NET v1 But I have no such exper...