Posts

Showing posts from April, 2014

html - Sticky footer elements not aligning -

Image
Really easy issue is fished around the site, nothing is working. There is a sticky navigation at the bottom of my site that does not stick below! It is not respecting the rules of my height and is overflowing with no relation. I have tried: Cleanfix Overflow Table display I tried everything I knew honestly I am aiming for visually: css / html / demo .fn {width: 100%; Height: 100%; Maximum-height: 41px; Bottom: 0; Left: 0; Status: Completed; Background color: #fff; } .fn ul {text-align: center; Margin: 0; Padding: 0; List style: none; }. Fn li {display: inline-block; } .fn A {display: block; Padding: 10px 5px 10px 30px; Text-decoration: None; Font-family: "ralve", without-serif; Font-size: 1.15em; Alphabets: 0.05em; Color: # 000; } .fn First {margin-right: 45.5px; Background image: URL (http://s28.postimg.org/f3f2a8mnd/fi2.png); Repeat Background: No Repetition; Background-position: left center; Background-size: 25px 25px; Top: -14px; Status: ...

java - How to parse the below json using Google GSON library? -

This is my Jason response that I'm getting from the server, {"awards ": When I'm trying to use the code below it @ Serialized Names (" Award ") Personal User Award [] Award; Public class UserAwards {} This is giving me the following exception: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT But the line 1 column at 247 is STRING. Please help me find out how I can parse it. Check this if you are not able to do Jason for the object. Import java.util.ArrayList; Import java.util.list; Import javax.annotation.Generated; Import javax.validation.Valid; Import com.google.gson.annotations.Expose; @ Generated ("org.jsonschema2pojo") Public Category UserAwards {@Expose @Valid Private List & lt; String & gt; Awards = new arreelists & lt; String & gt; (); Public listing & lt; String & gt; Award () {Return Award; } Public Zero Set Award (List & lt; String & gt;...

object - Making a class act as string in Python when you have both str and unicode -

Disclaimer: I'm using Python 2.6 for very awkward reasons. This is what it is. I am trying to act as a string in the form of an object such as: class setting (str): def __new __ (cls, value , Source): Return super (setting, CLS) .__ new__ (CLS, value) def __init __ (self, value, source): self.value = value self.source = source It works very well clearly;) But: I need to support both Unicode and Str object. So what I would like to do is expand the buststring unfortunately, for completely logical reasons; Just does not work by changing the beststring to Super Class and returns the error: Typure: the bassstring type can not be institute Any idea how can I go about fixing this? Thank you. :) OK, sorry, but this code is awful, it's hard to understand, any Underlying class subclassing (such as str, file) is generally a bad idea, especially in production code. What I would recommend is a general approach, creating a square with two variables and overriding a...

c++ - Usefulness of `rand()` - or who should call `srand()`? -

पृष्ठभूमि: मैं rand () , std :: rand () का उपयोग करता / कोड>, std :: random_shuffle () और वैज्ञानिक गणनाओं के लिए मेरे कोड में अन्य फ़ंक्शन अपने परिणामों को पुन: उत्पन्न करने के लिए, मैं हमेशा स्पष्ट रूप से यादृच्छिक बीज निर्दिष्ट करता हूं और इसे srand () के माध्यम से सेट करता हूं। हाल ही में जब मैंने यह सोचा कि जब भी अपना पहला उपयोग - srand () कॉल कॉल के बाद किया गया था - lazily srand () P> मैंने एक में भर दिया है, लेकिन मुझे जवाब मिला: पहले तब libxml2 आरंभ करें लाइब्रेरी से यह पूरी तरह कानूनी कॉल है आपको उम्मीद नहीं करनी चाहिए कि कोई अन्य srand () को कॉल नहीं करता है और मैन पेज कहीं नहीं कहता है कि srand () का उपयोग करने से कई समय से बचा जाना चाहिए यह वास्तव में मेरा प्रश्न अब है यदि सामान्य नीति यह है कि हर लिबिलिटी को srand () पर कॉल कर सकता / सकती है, और मैं इसे यहाँ और वहां भी कॉल कर सकता / सकती हूं, मुझे वास्तव में यह नहीं पता है कि यह कैसे उपयोगी हो सकता है । या फिर रैंड () कैसे उपयोगी है? यही कारण है कि मैंने सोचा, सामान्य (अलिखित) नीति य...

Reduce the length of callout line in Pie chart Sencha touch -

Image
Below is a code for pie chart in my Touch Touch app. The issue in front of me is that whenever a chart is displayed If the place is not enough for all the labels, then there are callout lines and labels, but then I want to reduce the length of these callout lines, they are just fine because they do not fit my screen and the labels will be cut off Edit - Image Two charts have the same code and it is placed in the hbox {xtype: 'polar', itemId: 'piechart', background: 'white', store: 'graphsstore', shadow: right, internal Padding: 25, // The following structure / interactions on the chart in a stock: ['to rotate'], color: ["# 115fa6", "# 94ae0a", "#A61120", "#FF8809" , "#FFD13A", "#A61187", "# 24Ad 9A", "# 7c7474", "# A66111"], // Legend Configure Legend: {S Location: 'top', // width: 100 hidden: true}, // description of actual pie ser...

android - How to set menu items to the left side of actionbar? -

Image
I am creating an Android application that contains an actionben and the actionbars are menu items of both sides, The menu item must be left on the left side and a menu item to the right of the actionbar. For this, I have created a custom layout and set it in the action bar. As shown in the image below But I just want to place the menu items on the left side and the second screenshot shows the action bar with the menu item This includes menu items in the taskbar. So, I want the plus button to put the menu item on the left as the screen shot on the left, but I do not want to use custom layout for it, Also, I should sort the font style. And put it in the center. Please help me I spent many hours on this. Thanks You must create a custom view for that For the options menu inflation can not be used. The theme of the style of activity. Set to AppCompat and do not use the noctionbar in the activity or app style. Create a custom_manu layout & lt ;? Xml vers...

Run different java code depending on the os (Windows/Android) -

I have a project that would be good to include code code between Java and Windows on Java. In fact, I am trying to instantiate the core class on the basis of my OS. Problems facing the problem I do not know how the error without the Android code windows in Java on Windows ... In an ideal world, Would like to use: ACLs class = FACTORY.GATE INSTAGENCE ("ACLISUS"); And on the basis of the factory OS, a new example of the right square will be returned. I do not know that I have understood Thank you very much! System.GetProperty ("Os.name") gives you the operating system that works on you . But Java in Android and Java in Java are really very different cases.

AngularJS $scope variable on window onclick -

I have a button, which shows a window to be clicked and hides the button when the button is clicked again is. I want to close the window even if some other location is clicked in the page. This is my code: & lt; A class = "btn dropdown-toggle multiselect-btn" ng-click = "! Content = content; contentClick = true" & gt; // To hide the div & lt; Div ng-class = "{'open': content}" & gt; Div content & lt; / Div & gt; I wrote the following window on the click code in the controller but it does not work. $ window.onclick = function () {if ($ Scope.contentClick) {$ scope.contentClick = 0; } And {$ scope.content = false; $ Scope $ Apply ();}} What is the correct way to do this? Can someone guide me in the right direction.Thank you Try it out, change your controller ID: window.onclick = Function () {var scope =. Angular.element (document.getElementById ('controller_id')) scope (); If (scope.contentCli...

html - Usability problems with empty tables -

I have a question about web applications related to tables, this is my use case: I have a view with more than 1 table, I mean, I have N & gt; The tables in the view are and each table has the title (for example, "photo list", "video list", "voice list"). Using Javascript, users are likely to change "view level" , I mean, the detail level of the scene. This means that by clicking on the various action buttons (Basic, Medium, Advance View), users can modify the amount of rows in each table , so that some tables may be empty Be (no rows). My question: What is the best utility practice to manage empty tables? When you identify the table which shows certain information that you can not hide, when They are empty, there is no data related to the empty table in any way, without showing at least. If you do not show the table, then your users probably do not believe that the data is empty, if you show it, they this is important. ...

ios - Xml + schema in swift -

about NSXMLParser , but I need to use all the data in the XML-document Is know I have read, that supports the strong NSXMLParser schema, I'm new in the development of iOS, you can show me a small example, how do I json You can parse the XML-document with the schema like the document; on jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData (self.data, options: NSJSONReadingOptions.MutableContainers, Error: Zero) NSDictionary As NSDictionary thanks I created this new simple and light XML parser for swift in swift -! You can use XML data to read like this :. go someValue = XmlDocument ["element"] ["child"] ["anotherChild"] value or you can use it like this To create XML string: go to document = AEXMLDocument () element = document.addChild ("element") element. AddChild ("ch Ild") document.xmlString // returns the XML string of the entire document structure I hope that helps.

c# - LINQ check string property for NULL in generating a ToList() -

I have this linen statement which successfully creates the list if the property is not fired Result. Adrenal (M_CTST.T.There (x => x.Property.Contains (Search)). ToList ()); However, if x.property is null, then it is errors, so I would like to try to check it for spaces and if it is not empty then proceed to making the list. I have tried, result.adrenent (m_CTS.Entity.Where (x => x.Property == zero? "": X.Property .Contains (Search) ToList ()). But also errors, what am I doing wrong? In advance thanks x.Property.Contains (search) / Code> a bool , so the other side of the turner operator should do this: x => X.Property == Tap? Incorrect: x. Property. Search (Search) Or simply: x = & gt; X Property! = Null & amp; amp; X.Property.Contains (Search)

php - Parameters in Behat 3 -

I have written a website with PHP in more than 40 countries. I started developing tests in Behat v3 with many features. done. Occasionally, I need to run a feature / suite on a specific country and specific server. For example, what do I do: php bin / behat --suite = mySuite --env = stg - country = America, IT, CA or the environment passed by such a parameter and country to retrieve the URL, I think it is not possible to have a bitter Behat and if not, what type of device can I use? Am I Thank you! Everything that goes beyond bin / behat is Behat specific. Yes, yes, this is not possible through the planning criteria. It is easily achieved with environmental parameters, which you can pass before running the script: ENV = "stg" COUNTRY = "US, IT, CA" php bin / Behat --suite = mySuite In your code, you retrieve them from $ _ server superglobal: $ env = $ _SERVER ['ENV']; $ Country = $ _SERVER ['COUNTRY'];

ruby on rails - Where to store total of all records? -

I have been created with all the projects app on the home page of my Rail Project Management app. This is very easy to achieve. Right now, I'm just doing this: & lt; P & gt; Total Project: & lt;% = Project.count% & gt; & Lt; / P & gt; However, I do not like the fact that every time a user sees the home page Is there a more effective way to store the store in a project total, eg a variable or a file? By the way, there is no need to be super-numeric for counting. I want to use it for marketing purposes. Thanks for any help. Application Controller in You: def project_count Rails.cache Fetch ('project_count') {Project.count} End helpper_method: project_count View in your: & gt; for termination etc.

VirtualBox for Android development -

I installed Android 4.3 with virtualbox and I want to use this machine to test some of my applications . The main reason not to use Qemu is that it did not run with the vboxdrv service; In fact, I can not stop the reasons for the service because many VMs have been opened to me. How can I do this? I have read on the Web that I know the Android machine IP address. is it true? how can I do this? thank you in advanced. You can try the emulator, it runs on VirtualBox.

python - Parse HTML and look for multiple classes and tags - most elegant way? -

वर्तमान में मेरे पास निम्न कोड है: author_name = soup.find (सच है, {{ "Class": ["लेखक", "लेखक-नाम"]}) अगर लेखक_नाम कुछ नहीं है: प्रिंट author_name.text अन्य: author_name = soup.find (rel = "author") अगर author_name नहीं है कोई नहीं: print author_name पाठ अन्य: प्रिंट "कोई लेखक नहीं मिला" मैं एक लेख के लेखक को ढूँढ़ने की कोशिश कर रहा हूं। इस प्रकार मैं वर्ग = "लेखक" , वर्ग = "लेखक-नाम" , आदि ... या rel = author जैसे प्रविष्टियों के लिए कक्षाएं देखता / कोड> और आगे आगे अगर मैं इसे जिस तरह से करता हूं, तो यह अलग-अलग अगर और else स्टेटमेंट में होता है यह मेरे लिए बहुत सुंदर नहीं लगता है, भले ही मैंने हाल ही में कोडन शुरू किया। क्या आप लोग मेरी मदद कर सकते हैं कि यह कैसे अधिक सुंदर ढंग से करें? आप उपयोग कर सकते हैं; ये आपको एक स्ट्रिंग में एकाधिक चयन मानदंड निर्दिष्ट करने देते हैं: सूप। चयन ('। लेखक, .author-name, [rel = "author"]') यह एक सूची का उत्पादन करता है, पाशन आपको...

cmd - PHP console does not echo -

OK it's really weird or I'm missing something when I run this very limited PHP script on CMD , So I hope he will be 0, but when I repeat the last two lines of code. . Nothing is displayed. & lt ;? Php $ test1 = 0; Resonance $ test1; $ Test2 = 0; # $ Test1_weight = 0: # $ test2_weight = 0; ? & Gt; Is there some rule against declaration of variable after the resonance statement? "post-text" itemprop = "text"> $ test1_weight = 0: - & gt; " : " to " ; "

.htaccess - htaccess temporarily unavailable for specific folder -

After I have a specific folder for which I want to trigger a 503 response (maintenance) The rest of my website should be accessible. Can it be easily done in these? I could browse the web but only find out the information about how to do this for the entire website. ErrorDocument 503/503.php RewriteEngine RewriteCond% {REMOTE_ADDR}! ^ 123 \ .456 \ .789 \ .000 RewriteCond% {REQUEST_URI}! At /503.php$ [NC] RewriteCond! ..% {REQUEST_URI} \ (css | gif | ico | jpg | js | png | swf | txt) $ RewriteRule * - [R = 503, L] PS: I also tried to find a more general tutorial on htaccess and such stuff so that I can learn the basics and understand things myself but whatever I found snippets and snippets and more Were snippets any suggestions? After "text" itemprop = "text"> You just need to appear above the / folder / code. Htaccess where you want 503 custom pages to appear otherwise your code looks ok. Just make sure that /503.php is present.

c++ cli - how to return byte array , uint value from c# dll, dll called by c++/cli -

I am writing AC # DLL which will compute and generate: - -byte Array [byte array] - [2 byte error code] -Open [true / false for success / failure] This function will be called by the C ++ / CLI project. The function can return only one value, but I need these 3 values ​​after executing the C # function. What will be the function prototype in C # and how it will be called by C ++ / CLI code. Thank you in advance Maybe you outside modifier You can use. Zero Mimethith (outside byte [ba], outside short code, Bowl success) {...} As call is, the call will be : Array & lt; System :: Byte & gt; ^ Ba; Int 16 code; Bull success; MyClass :: MyMethod (BA, code, success); I just tested. Hope it helps.

css - Aligning HTML special charaters bottom relative to parent -

So I'm building a website for a client in WordPress and in the class Full stops are full stops on some titles but the font used by them is round . I have solved this problem with a short code '[stop]' and will return the following code: & lt; Span class = "square-stop" & gt; & Amp; # 9632; & Lt; / Span & gt; This is an HTML square icon I is wrapped in a span for style. But I think align below with text. See an example here: & lt; H1 & gt; This is a title of some type & lt; Span class = "square-stop" & gt; & Amp; # 9632; & Lt; / Span & gt; & Lt; / H1> Use the following CSS to align class : h1 {status: relative; } .square-stop {font-size: 0.7em; Status: Completed; Bottom: 0; }

rethinkdb - Do shorter JSON keys make smaller NoSQL documents? -

For some time I have been confused about it. Rethinkdb is schema-less, so the way it stores information (or any other database's storage method), does a small JSON key make small documents? {"avg": 312} vs {"average": 312} thanks Yes, since the RethinkDB does not include the field. View

c++ - Why is returning a reference to a function local value not a compile error? -

निम्न कोड अनिर्धारित व्यवहार को आह्वान करता है। int & amp; Foo () {int बार = 1234; वापसी बार; } जी ++ एक चेतावनी जारी करता है: चेतावनी: स्थानीय चर के संदर्भ: ??? ??? बार ??? लौट आए [-वेटर्न-लोकल-एडीआर] क्लैंग ++ भी: चेतावनी: लोकल वेरिएबल 'बार' के साथ जुड़े स्टैक मेमोरी के संदर्भ में वापस आ गया [- क्यों यह एक संकलन त्रुटि नहीं है ( -error को नजरअंदाज कर रही है?} एक स्थानीय चर के संदर्भ में क्या मान्य है? संपादित करें जैसा कि बताया गया है, युक्ति यह सुसंगत है। तो, ऐसा कोड क्यों नहीं रोकता है? मैं कहूंगा कि यह प्रोग्राम को बनाने की आवश्यकता है दुर्भावनापूर्ण (जो है, यह एक संकलन त्रुटि बनाते हैं) मानक को बहुत कम लाभ के लिए जटिल बनाते हैं। जब आपको ऐसे मामलों का निदान किया जाएगा, तो आपको बिल्कुल सटीक रूप से वर्तनी होगी, और सभी संकलक उन्हें लागू करना होगा। यदि आप बहुत कम निर्दिष्ट करते हैं, तो यह बहुत उपयोगी नहीं होगा। और कंपाइलर्स शायद पहले से ही चेतावनियों को फेंकने के लिए जांचते हैं, और असली प्रोग्रामर -Wall_you_can_give_me -error के सा...

php - MPDF document and Image DPI problems -

Background: I am trying to render a business card at 300 dpi using the MPdF library. The document has an image background, which should be filled with canvas and after that various text elements have been overlapped. Dimensions: PDF document is set to 91 mm x 61 mm and is in landscape format. $ pdf = New MPDF ('utf-8', array (91,61), 0, '', 0, 0, 0, 0, 0, 'L'); I have a resolution set in this form as config; $ this-> dpi = 300; $ The-> - i I have created an image in Photoshop, even on 300dpi in the same dimensions as the card (91 mm x 61 mm). I have tried to add an image to a picture using markup as a mark: $ html. = '& Lt; Div style = "position: absolute; left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%" & gt; & Lt; IMG style = "width: 100%; height: 100%" src = "/ property / image / bg.jpg" & gt; & Lt; / Div & gt; '; When a PDF document is displayed, the ima...

C socket - connection refused at the second try -

I am creating a server / clint, but I have a problem if I boot the server and the client for the first time, So ever works fine then I close them, I boot them in a few seconds, and I get an e "connection denied" error in the client I always boot the server first, and the client After here the code is DoLogin 2 with reading and writing 2. The feat What's wrong with this code? server.c int main () {int ds_sock; Struct sockaddr_in my_addr; Ds_sock = socket (AF_INET, SOCK_STREAM, 0); Memset (& my_addr, 0, sizeof (my_addr)); My_addr.sin_family = AF_INET; My_addr.sin_port = htons (25000); My_addr.sin_addr.s_addr = INADDR_ANY; If (bind (ds_sock, (structure sokadar *) and my add, size (my_addr)) client.c int main () {int ds_sock; Ds_sock = Socket (AF_INET, SOCK_STREAM, 0); Int rate; Straight soccer_year; Eaddr.sin_family = AF_INET; Ed. Sin_port = htons (25000); Eaddr.sin_addr.s_addr = inet_addr ("127.0.0.1"); Rate = Connect (DS-SOC, (Structure SOCADAR ...

c# - Stop visual studio 2013 from repositioning braces on new line? -

When I enter, it takes place of braces how can I stop it? I want VS After writing an introductory brace, it is asked to automatically add the closing brace, but I do not want it to enter the brace. How can I go about doing this? There is no such setting which I know about leaving it the line you typed (Since most groups have to set coding style standards that insert openings brace, always be on the same line or should always be on the new line). You can get "forget" VS which is done with a criterion by transferring the cursor to the outside of the brace block. So if you choose Options> & Gt; The formatting settings were checked (so it will normally be bred on the next line) You can open the right arrow, the left arrow, the eater (i.e. finally move the cursor over the previous brace) to be on the same line Get the brace, then take it back between the braces, then enter a new line). Not what you wanted, but it's best I can think.

How to compare two strings in scala? -

I want to compare two strings in Slálla. For example, My strings are: Scala Java Scala Java c ++ scala c ++ I string I want to compare scala c ++ = scala java // false scala C ++> = Scala Java C ++ // false Sky C + + = Scala c ++ // true In Scala you can see the == scala> "Scala C ++" == "Scala Java" res0: Boolean = false mark & ​​gt; "Scala C ++" == "Scala Java C ++" Race 1: Boolean = false scale & gt; "Scala C ++" == "Scala C ++" Rage 2: Boolean = True == The method is defined in anyRef class. Since the methods first check for zero values, and then call the method equal to the first object, to see if two objects are equal, you do not need to check the special tap; "test" == Rick Reset: Boolean = False See more ""; Boolean) For reference types, == is treated as the alias of java.lang.Object with the par method. Originally defined as the...

uitableview - Need index path.row for textfield -

I am using the xib file with the label on the left and the textfield on the right. I'm using this xib in the UI tableview whenever I click on the text field (on the right), then the row value is required. I'm able to get line values ​​on line values ​​(labeled), but not on textfield. Please help. Thank you. Why do not you try with Tedfeld tagging? That is, give tag to textfile and done from textfield.tag and use it wherever you want.

c# - Converting string to DateTime safely -

I have a string that came from a database, but I'm not sure it will be a valid date time I'm trying to validate that it is empty, Then if I'm not empty, then I want to change it safely to datetime because I'm not sure that a line [ One "]. ToString will be a valid date time output.limitExpiryDate = line [" a "] == DBNull.Value? Date time.Now : "Something to convert here"; Do anyone have any ideas? you datetime typers : output.limitximetida = dateTime.Now; date timeout ExpiryDate; if (line ["a"] ! = DBBL.value and datetime. TryParse (line.field & lt; string & gt; ("A") ExpiryDate outside range) output.limitExpiryDate = limitExpiryDate; One tap was the appropriate datetime column which you can use to tap Types can support: DateTime? Range ExpiryDate = line.field & lt; DateTime? & Gt; ("a"); If (limit expired. Haas value) output. LAMID EXPIRIDDET = BORDER EXPIDIDATE. Value...

node.js - Javascript deoptimization -

I'm not sure what is wrong with this code I Src is a Uint8Array object, which Is greater than 0. function makeImageFromChannel (src) {var image = new Uint8Array (src.length * 4), i = 0, index = 0, value = 0; Console.log (src.BYTES_PER_ELEMENT) for console.log (src.map) (i = 0; i & lt; src.length; i ++) {value = src [i] | 0; Image [index] = value; Image [index 1] = value; Image [index + 2] = value; Image [index + 3] = 255; Index = 4; } Return image; } Var vars = new Uint8Array (23034); For (var i = 0; i I can read several times in the terminal when I run this command node --trace_deopt --allow-natives-syntax script.js . [deoptimizing: start 0x36125ec63a21 makeImageFromChannel @ 13] translating makeImageFromChannel = & gt; Node = 59, height = 24 0x7fff5fbfe798: [top + 64] & lt; - 0x3feb15c04121; R8 0x3feb15c04121 & lt; Undefined & gt; 0x7fff5fbfe790: [top + 56] & lt; - 0x2bc986d 9ffc1; Rdi 0x2bc986d 9ffc1 & lt; A Uint8Array & gt; 0x7fff...

ios - APNS Push Notification - device token and keychain -

For my knowledge, once we get from APNS, we can not get it again. (The backup data will be called on didRegisterForRemoteNotificationsWithDeviceToken , except for a new device or computer, or to reinstall the operating system or any device token change at any time) Then, / P> At any time the device token changes, I will change the new tool token in the keychain to save it so that it disappears for other purposes (use token of the choice for UUID). Is this possible when the keychain data disappears, but the device token does not change? (If yes, then it will be moved to Registry foremutation device token has not been called again, and the last device can not retrieve the token.) Or the events allowed the keychain data to disappear (usually) changed the device token (or trigger didRegisterForRemoteNotificationsWithDeviceToken again)? In my trial, In the IPhone, the "Reset All Settings" key will not clear the data of the key and didRegisterForRemote...

BeautifulSoup import error in python 2.7 Windows 7 -

I'm new to Python and I'm trying to use the beautiful 4.3.2 package but I get the next error : Traceback (most recent call final): File "C: \ user \ name \ document \ netbusiness project \ python password \ src \ prueba.py", line 10, & lt ; Module & gt; Beautiful Soup import error from BS 4 import: No module named BS 4. Line 10: Beautiful from the BS4 import I uninstalled and restored it but it does not work I installed it via the setup py install I have my PC does not have other versions of Python. I When I write the same line in idle (Python GUI), then nothing Hearer only gives me an error Netbins. Here the answer is received. I had to change my import from "BS 4 Import to Beautiful Soup".

jquery - Display my score when countdown has ended -

This is probably a very newbie question, but I have a timer game that slowly goes down, When it goes down I am displaying scores on a game over page. As the score is linked to the timer, this score keeps displaying to each other. How do I stop it? var doUpdate = function () {$ ('countdown'). Each (function () {var count = parseInt ($ (this) .html ();) (count! == 0) {$ (this) .html (calculation - 1);} and {$ ('.overoverover h4 ') .Jodi ("You scocked" + score + "!!!") $ (' Gameover '). Show ();}}); }; // Schedule update for every once-set interval (doUpdate, 1000); Is there a way to create a listener who checks the count, so I do not have the append function in set interval, or possibly delete the second function in the SettterWill timer Thanks You need clear interval to do this. var timeoutev; Var doUpdate = function () {$ ('countdown'). Each (function () {var count = parseInt ($ (this) .html ()); if (count...

qtp - Type data into text box using HP UFT -

I want to set some data automatically in the text box and then press the UP button using HP UFT, But now the problem is that when I do it manually, a button is enabled and one button is disabled when I do the same thing with HP UFT. There is a screenshot for this: I think a button is only enabled when we enter data using key board. So how can I solve this issue? Please help me with it. Thanks You can enable an object using your basic properties Are there. Try it out. Browser ("Browser"). Page ("Page"). WebButton ("Button") Object.disabled = False

java - Is SpringMVC works on Single Thread Model or Multithread Model? -

I have confusion about single thread model and multithread model. If you mean "Does Spring MVC implement the javax.servlet.SingleThreadModel Interface?" It is not. The single thread model guarantees that "servlet handle only one request at a time." (From API Docs). It is usually managed by the servlet container, which will maintain a pool of servlet instances and will allocate for each incoming request. It is a rarely used model of execution, and the interface itself is disliked as Java Servlet API 2.4, no direct replacement. With Spring MVC, you should consider that your administrator has more than one request at one time, which makes it your responsibility to ensure that your processing thread is secure.

c# - Getting element by Id -

सेलेनियम, एनयूआईआईटी परीक्षण, सी #, विजुअल स्टूडियो। कैसे, सेलेनियम वेबड्राइवर में, मैं ढूंढ सकता हूं एक पृष्ठ स्रोत में तत्व जो निम्नलिखित जैसा दिखता है, और इसके & lt; p & gt; टैग में कुछ पाठ सेट करें: & lt; body contenteditable = "true" class = " Cke_editable cke_editable_themed cke_contents_ltr cke_show_borders "वर्तनी जांच =" गलत "& gt; & Lt; p & gt; & lt; / p & gt; & Lt; / body & gt; यह पृष्ठ पर मौजूद CKEditor घटक से शरीर टैग है (कोई मुख्य पृष्ठ & lt; body & gt; तत्व नहीं है) दरअसल, मुझे & lt; p & gt; तत्व में कुछ टेक्स्ट सेट करना होगा मेरे लिए क्या भ्रामक है, यह है कि कक्षा विशेषता जटिल है, जिसमें कई स्ट्रिंग्स शामिल हैं मुझे कमांड के बारे में पता है: driver.findElement (By.className ("some_class_name")); लेकिन इस मामले में इसका उपयोग कैसे करें और & lt; p & gt; एलीमेंट? यदि आप पी टैग को ऐसा आईडी देते हैं तो & lt; p id = "derp" &...

java - First try at lambda -

I tried to make my first lambda example but I can not find simple code to do this work. Import java.util.ArrayList; Import java.util.function.Predicate; Public square lambda {public static zero main (string [] args) {last string [] name = {"Wim", "Kian", "Dirk", "Emmanuel", "Frank", "Mica", "Anna" "Damien", "Alberto"}; Last string [] filteredNames = getNamesWithCriteria (names, (strings) -> gt; s.startsWith ("A")); } Private string [] getNamesWithCriteria (last string [] name, Predicate & lt; string & gt; predicate] {Final ArrayList & lt; String & gt; Filtered Name = New Arraylight & lt; & Gt; (); {String (name: name) for {if (predicate.test (name)} {filteredNames.add (name); }} Return (string []) filteredNames.toArray (); }} These errors I get: Lambda.java:8: error: ')' expected final string [] filteredNames = getNamesWithCriteria ( Name, ...

c - GTK+2 : how to make a configs and store them to apps -

I have created a simple text editor using c and gtk + lib, and now to store user configuration Want to use a configuration system. how can I do this? You want, a GLib API to store and retrieve application settings.

javascript - detect page jump to a specific element ID -

A user reloads the page after a certain action, and it adds a #someId The url URL will be localhost / panel / mypage.php # someId and as a default action, the browser will jump to an element with the ID of someId What would I do that instead of jumping to the right of jQuery using jQuery and then to the right of the #someId element it jumped up to 100px and a smooth scroll Is this possible? "post-text" itemprop = "text"> This is a hash change event of the 'window' document object that you absolutely need to catch this behavior You can use: Javascript solution: window.addEventListener ('hash change', function) (// smooth scroll code) ); JQuery Solution (v1.8 +): jQuery (window) .on ('hashchange', function () {// smooth scroll code}); Note: hash switch event triggers on the URL hash change (location.hash) Has not triggered hash convertible event going from www.example.com/about.html#first to www.exam...

accessibility - Can you conform to WCAG 2.0 if you offer an alternative full service via a helpline? -

डब्ल्यूसीएजी 2.0 चर्चा करता है, लेकिन इसका मतलब केवल वेब पेज है ?? | वैकल्पिक संस्करण की पुष्टि संस्करण जो कि निर्दिष्ट स्तर पर अनुरूप है, और सभी एक ही जानकारी प्रदान करता है और एक ही मानव भाषा में कार्यक्षमता, और गैर अनुरूप सामग्री के रूप में की तारीख तक है, और जिसके लिए निम्न में से कम से कम एक सत्य है: इस अनुरूप संस्करण को पहुंच-योग्यता पृष्ठ से एक्सेस-योग्यता समर्थित तंत्र के माध्यम से पहुंचा जा सकता है, या गैर-अनुरूप संस्करण केवल अनुरूप संस्करण से पहुंचा जा सकता है, या गैर-अनुरूप संस्करण केवल एक अनुरूप पृष्ठ से पहुंचा जा सकता है यह भी अनुरूप संस्करण तक पहुंचने के लिए एक तंत्र प्रदान करता है क्या फोन के द्वारा एक पूर्ण सेवा इस वैकल्पिक संस्करण मापदंड को कवर करेगी? वेब सामग्री और अधिक पहुंच योग्य बनाने के लिए सिफारिशों की। आप एक सुलभ समर्थन हॉटलाइन (या एक सुलभ प्रवेश द्वार तक WCAG 2.0 के अनुरूप नहीं हैं) आपके कार्यालय, या एक सुलभ फ्लायर, एक ?? |), क्योंकि डब्ल्यूसीएजी के दायरे को वेब सामग्री तक सीमित है यदि फोन सेवा आपकी वेब...

java - If Statement--related with making integers in percentages of other integers -

I have to write an if statement where I return the string "closed string" when int d is within 10% int e is . I have it now: public string game (double D, double E) {if ((d> = 95 * e) || (d & lt; = e * 1.05 )) {Return "close string"; } Other {return "other"; }} Examination case string game = game (100.0d, 90.0d); Println (game); Game = Games (100.0D, 99.0D); Println (game); Game = Games (100.0D, 100.0D); Println (game); Expected output Other closed string string closed Current Closed string closed string string Where's the fault? I'm not sure what you are asking, but I think you want it and its Rather than (a & gt; = .95 * b) || (A & lt; = b * 1.05) Any number can be because it will be less than 5% below B or 5% below it until it is a real number is. (a> = 95 * b) & amp; Amp; (A & lt; = b * 1.05) A only + or - 5%

javascript - FlexNav without -

The width of the top-level menu item I'm using is set to 20% in the demo, That's why it has been optimized for five top-level menu items. .flexnav li {. . . Width: 20%; } The top-level menu items in my menu have different lengths of texts and the child element (level 2) is widespread that their parents make the menu more flexible Trying to define the width of the top-level menu item is not necessary, but it does not work right without fixing it with the menu. Any ideas? Here is the code: When you set the calcItemWidths to true option, the plugin should calculate the width of the menu item.

javascript - Yii notify user about constraint violation -

I am using Yii, and I want to inform the user of the barrier violation while saving the database. But the way I go forward does not fix the problem. This is my code. Action: PublisherAContact ($ id) on public function action {$ model = new PublierAContact; If (isset ($ _ POST ['PublierAContact'])) {$ Model-> Set properties ($ _ POST ['PublierAContact']); {$ Model- & gt; Save (); } Catch (CException $ E) {Yii: app () - & gt; Classic Script- & gt; Register Script ('Publisher', 'Warning ("Deja Light)"); } $ This- & gt; Redirect (array ('view', 'id' = & gt; $ id)); } $ This- & gt; Render ('light connect', array ('model' = & gt; $ model, 'id' = & gt; $ id)); } But, along with it, I can not see the alert box in the browser. Can anyone help me fix it quickly? Instead of catching an exception, build your own obstacle check as a verification. This makes it easy...

javascript - Stop and Restart function for custom jQuery Slider -

I see a solution to restart and stop a custom jQuery slider. I have inserted the custom jQuery slider from here: I use the slider on the same page for three slideshows Have done Those three slideshows are inside three buttons, which play movies when they are active and show the slides inside the button, while the movie is playing. I want to reset (and stop) slideshows inside that button, when the second is active of those three buttons. For now, the slideshow starts inside a function called when the button is clicked. But it still needs to be reset, otherwise it gets stacked (and still). This is Bela's small code: var triggers = window.vorher.find ('. Fortschrittwrap .note'); Var images = window.vorher.find ('.notificationwrap.c_text'); Var lastElem = Trigger. Lanti-1; Var Target; . Triggers.first () addClass ('active'); (Images.hide ()) first () show). Function Slider Resigns (Target) {images.fadeOut (300) .eq (Target). FadeIn (300); ....

Does Windows 7 recycle process id (PID) numbers? -

I have this small test that is created and closed as a PID When a window is processed, it gets a PID, but when it is done, then I am checking a problem that has received my crazy and would like to ask you about it . The process closes, does the PID retire (such as the Jersey number of Star Baskettler) or is it possible for a new, completely unrelated process under PID released? Thanks Yes, process ID can be recycled by the system. Raymond Chen discussed this matter here: The process ID is linked to a value process object, and as long as the process object is still nearby, Even then its process ID will be. The process object remains as long as the process is still running (the process is first placed in its own context) or until someone is still handled for the process object. If you think about it then it makes sense, because as long as there is no handle for the process, wait for someone to wait for the exit to wait , Or they can call GetExitCodeProcess to get the ...

c# - What is the optimized way of finding count? LINQ or foreach? -

इस सवाल का पहले से ही एक उत्तर है: मेरे पास वस्तुओं की सूची है मुझे सूची में आइटम की गिनती मिलनी चाहिए, जो किसी विशेष परिस्थितियों को संतुष्ट करती हैं। मेरे पास दो विकल्प LINQ या foreach लूप हैं I मैं गिनती जानने के लिए एक LINQ क्वेरी लिख सकता हूं या फिर फोरेक का उपयोग करके वस्तुओं को पुनरावृति कर सकता हूं और कंडेन पर एक काउंटर सेट कर सकता हूं। मैं इसे करने का अनुकूलन तरीका जानना चाहता हूं कि क्या मैं गिनती को खोजने के लिए विदेशी भाषा या LINQ का उपयोग करता हूं। अग्रिम धन्यवाद। लिनक का गणना () विधि एक पाश , इसलिए यह वास्तव में कोई बात नहीं है जो आप उपयोग करते हैं एक स्पष्ट लूप शायद थोड़ी तेजी से हो, लेकिन मुझे नहीं लगता कि अंतर काफी बड़ा होगा, जिसे ध्यान में रखना होगा। मैं गणना (अंकुश) का उपयोग करता हूं क्योंकि यह अधिक पठनीय है। संपादित करें: मैंने आपके प्रश्न में इकाई फ़्रेमवर्क टैग नहीं देखा था, इसलिए मैं सोच रहा था कि यह Linq था वस्तुओं के लिए यदि आप एक डेटाबेस के विरुद्ध पूछताछ कर रहे हैं, तो गणना (संकेत) का उपयोग करके निश्चित रूप से तेज़ हो जाएगा; एक पाश का ...

asp.net - Differences between getting a value in a class with instance constructors and a class filled with const fields -

I have an example project that is a config class that I need to set my ID and key. public class configuration {#region Fields Private Static string partner = ""; Private static string key = ""; #endregion constantconfig () {// ???? Line Line Line Line Line Line Line Line Line ????a???? Configure your identity ?? Line Line Line Formula ??? // affiliate (starts with issue 2088) partner = ""; // Extra Code Key = ""; // One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ?? ?? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ?? ?? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ???? One ???? } #region Properties Public Static String Partner {Get {Return Partner; } Set {partner = value; }} Public Stable String Key {Received {Return Key; } Set {key = value; So} the methods in the second category can get my ID and key like ¼ ?? string _partner = Config.Part...

git - What is a shim repository? -

In the context of web programming, for example, when I search for "handlar" in the Bower Package Search page, the result is: "shim repository for handlebars.js" / P> I do not think "shim Repository "is a standardized word in web programming - how exactly is this project - in - describing the repository created as a stand-in for those popular third-party components Is. Those repositories are "in the sense that they optimize the release of those popular components in a standard format that components component targets to support package managers by component projects.

c++ - Clang linking error on Mac OSX -

I have a very basic C ++ program that I read on Mac OSX 10.9.3 G ++ can not be compiled using. Main.cpp #included "MyClass.hpp" int main () {MyClass :: MyClass obj = MyClass :: MyClass (); Return 0; } MyClass.hpp class MyClass {public: MyClass () ; Zero method (); Private:}; MyClass.cpp using the namespace "MyClass.hpp "Include my class; my class() { }; Zero method () {}; To compile it, I type g ++ g ++ main.cpp -o out As a result, I get: Undefined symbols for architecture x86_64: "MyClass :: MyClass ()", referenced from: _main in main- 2750ac.o ld: symbol (s) not found for architecture x86_64 clags: error: failed with linker command failure code 1 (use -v to view invitation) Then I Then go to g ++ main.cpp -o and get it: Apple LLVM RAN 5.1 (Clang-503.0.40) (based on LLBS 3.4 SSN) Goal: x86_64-apple-darwin13.2.0 Thread Model: POSIX "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoo...

sql - Convert date format in Oracle -

I have a date format 2011-01-06T06: 30: 10Z in Excel. Table. How do I get a share of the date from it? I.e. 2011-01-06 thanks try this: Select to cast (TO_TIMESTAMP_TZ (REPLACE ('2011-01-06T06: 30: 10Z', 'T', ''), 'YYYY-MM-DD HH: MI: SS TZH: TZM') Date in duplicate) from double )

Dynamic cases for switch statement (objective c) -

I hope this is a new question (I do not know). My problem is that I want to do something like this in Objective-C: switch (indexPath.row) {for (int i = 0; i & lt; value; i ++) {Case i: // break something; }} But I found that it is not possible, and clearly found a document that does not compile the program. Thank you very much for the help (there are still 2 lines I had forgotten earlier) It is not possible, case takes only const values ​​ but you use this macro for this purpose #define case (arg) if (__s__ == (arg)) #define __s__ = (s) for SWITCH (int) ;;) #define DEFAULT Example of use int value = 10; For (int i = 0; i

javascript - Animate DOM properties (scrollTop) using Web Animations -

, to be clear just about what we are talking about in any way, I can easily Wanted to scroll through. Using the jQuery Animate function it was always a non-brenner, but it seems that the web is not as easy as animation. Is there any way to use the Web Animation Timing function and apply them to a DOM property ( scrollTop ). The reason I am asking for is that I do not want to load the entire library in my entire application using a different technology / library to use my interpolation function. You can use to animate scrollTop , e.g. var a = new animation (L, function (time) {el.scrollTop = el.scrollTop + time * 500;}, 1000);

android - Titanium Build Error Invalid Device -

I recently updated my Android SDK to the latest available and since I try to make me The following error is found on the command line and my Samsung Galaxy S3: $ Titanium Build-P Android-T Device- C - Device-ID 6f01b9ae Titanium Command Line Interface, CLI Version 3.4.0, Titanium SDK Version 3.4.0.ga Copyright (C) 2012-2014, Epicylator, Inc. All rights reserved. [Error]: Invalid "- Device-ID" value of "6f01b9ae" For help, run: Titanium Support Build Anyone can try to get me this past? I am very stuck and would really appreciate some help. Thanks! Since titanium tooling uses Android's ADB to push your device, run first ADB device Verify that the device is seen by ADB and the ID which you are using matches. Second, -C and - Device IDs are the same flag and do not need to be repeated. These are: $ titanium build-p android -t device- c 6f01b9ae $ titanium build -p android -t device - device-id 6f01b9ae

ruby on rails - undefined method merge_wrapper_options -

I'm trying to use fake input for simple documentation here:. F.input: address, as: fake However, I get the 'option' merge_image option for # # This error is found even after restarting the area. Please help me fix it. Thanks. Overview example method merge_wrapper_options to SimpleForm :: Inputs :: Base class , But not until version 3.1.0.rc1 Here is the relevant source code for version 3.0.2 (no merge_wrapper_options ): version 3.1.0.rc1 Contrast this with: So if you are in v3.0.2 or earlier, you will not have it. But, no big deal, only the method itself defines to: code /app/inputs/fake_string_input.rb class FakeStringInput & Lt; SimpleForm :: Inputs :: StringInput # creates an original input without the value def input (wrapper_options = nil) without reading any value merged_input_options = Mrg_waprpriwartn (input_html_options, wrapper_options) template.text_field_tag ​​(attribute_name, nil, merged_input_options) end # meth...

javascript - Facebook tracking AND Google tracking Script -

I have Google tracking conversions now I also need Facebook pixel tracking. My Google head script looks like this: & lt; Script & gt; (Function (I, S, O, G, R, A, M) {i ['GoogleAnalyticsObject'] = R; I [R] = I [R] || function () {(I [R]. C = I [r] .q || []). Push (argument)}, I [R] .L = 1 * New date (); a = s.create element (O), M = S. ElementElementBitagname (O) [0]; a.async = 1; a.src = g; m.parentNode.insertBefore (a, m)}) (window, document, 'script', '// www.google-analytics.com/analytics. Js', 'ga'); GA ('Create', 'XX-XXXXXXXX-X' 'Auto'); Ga ('Send', 'Pageview'); & Lt; / Script & gt; My javascript call for Google looks like this: If (typeof GA! == 'undefined') {ga ('send', 'Event', 'blub', 'blub'); } Now I need to add Facebook tracking and I got this script from Facebook: How can I integrate Facebook code without removing Google co...

javascript - Custom returnURL not passing to Node.js Passport -

The second answer is here: I am using a custom URL passed from front-end Like: & lt; A href = "/ auth / meetup? Redirect = / chat / {{currentChatID}}" class = "btn btn-visit" & gt; & Lt; Span class = "FA FA-Meeting" & gt; & Lt; / Span & gt; & Lt; / A & gt; Where there is a redirection parameter, for example: ? Redirect = / chat / room1 and passport in: app.get ('/ auth / meetup', function (req, res, next) {Req.session.redirect = req.query.redirect; next ();}, passport.authenticate ('of meeting')); App.get ('/ auth / meetup / callback', passport.authenticate ('meetup', {failureRedirect: '/'}), function (rick, ridge) {res.redirect (req.session.redirect || '/ Profile / world / meeting '); delete req.session.redirect;}); req.query.redirect parameter is undefined , so it will not redirect to the specified redirect URL, how do I pass URL correct In a proper ...

Perl regex matches string differently when providing it as variable -

I got a question about regex matching in Perl. See the following code snippet: My $ r = '^ \ z'; My $ s = ""; $ R = ~ / $ s /? Print "match \ n": print "no match \ n"; Output: Match The following snippet prints: My $ r = '^ \ z'; $ R = ~ / "" /? Print "match \ n": print "no match \ n"; Output: No matching Why? Is this a Perl syntax thing that I do not understand? my $ s = ""; is identical my $ s = ''; or my $ s = q (); i.e. It draws empty string to $ s . $ r = ~ / "" / You are checking that there are two double quotes in $ r. To specify a pair of double quotes in $ s, my $ s = '' ';;

javascript - Always the same size of image on all screens -

I want the square image to always have the same size (including mobile, tablet) on any screen. So if I take the ruler and measure the image on any screen then it should be 5 mm for example. It should be in javascript. I wonder if the image size depends only on the DPI of the screen or depends on the screen too? If I have detected the DPI of the screen in Javascript (and if necessary, resolution), to calculate the size of any formula (or some javascript function), to always get the same results? In the end, am I image size in some units, what image is always the same? I asked the question here because it is connected to Javascript, if you think that it is more suitable for any other platform please tell me. / P> Thank you ... If I understand correctly, There is no way to image a certain full physical shape. You can define a width with full units like inches, centimeters or millimeters, but the rendered result is different from one screen to another. Each browser has...

php - Getting blob type Doctrine entity property returns data only once -

I use the theory to store odd data options / different bits in an array and it's serial in the database I am where it is stored as a Blob. Everything was working fine, till today I found that array twice and saw that it only gets the right value for the first time. Any repeated attempts return false, which gives failure / stream_ get_contents on failure. My best estimate is that the theory closes the stream after receiving the data, but it does not make much sense. I need to have data available during the entire request. I'm not an expert with streams: How can I get Blob data or block the stream several times? Principle unit and these methods: / ** * @ War resource * * @ORM \ column (name = "option", type = " Blob ") * / Private $ option; / ** * Set options * * @ Ultimate array $ option * * @ Return campaign * / Public function setopts ($ option) {$ this- & options; Options = serialize ($ option); $ This return; } / ** * Get options * * Re...

css - Sass with BEM, inherit selector -

मैं Sass 3.4.1 और BEM का उपयोग कर रहा हूं ताकि मेरी scss है: फोटो-ऑफ-द-दिवस (& amp; - शीर्षक {फ़ॉन्ट-आकार: 16px; }} और मैं चाहता हूं कि हर बार .photo-of-the-day पर कुछ हो जाए, यह आमतौर पर सीएसएस में बहुत आम है: । दिन का फोटो: होवर। फोटो का दिन - शीर्षक {font-size: 12px} यह बात है बीईएम का उपयोग करना यह एकमात्र तरीका है जो मुझे मिला और थोड़े बदसूरत लग रहा है .photo-of-the-day {& amp;; title} {font-size: 16px; } & Amp;: होवर {पृष्ठभूमि: लाल; / * यह बदसूरत है / / दिन का फोटो - शीर्षक {पाठ-सजावट: रेखांकन; }}} इसलिए मैं सोच रहा था कि मैं .photo-of-day चयनकर्ता का वारिस कर सकता हूं और इसे फिर से कॉपी से बचने के लिए हॉवर के अंदर का उपयोग कर सकता हूं चयनकर्ता। आदर्श रूप से कुछ ऐसा होगा: .photo-of-day {& amp; - शीर्षक {फ़ॉन्ट-आकार: 16px; } & Amp;: होवर {पृष्ठभूमि: लाल; & Amp; amp; - शीर्षक {पाठ-सजावट: रेखांकन; }}} या बीईएम के लिए अभिभावक चयनकर्ता को वापसी के करीब कुछ। क्या यह संभव है? यदि आप नेस्टिंग सब कुछ पर जोर देते हैं, तो सबसे अ...

java - How can I fill an Arraylist with inner classes? -

यह मेरा मुख्य वर्ग है: import java.util.ArrayList; पब्लिक क्लास मेन क्लास {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {ArrayList & lt; SecondClass.InnerClass & gt; सूची = नया अर्रेलिस्ट & lt; सेकंड क्लास। इनर क्लास & gt; (); List.add (नया सेकंड क्लास। इनर क्लास ()); // त्रुटि यहाँ (नीचे पढ़ें)}} यहां दूसरा वर्ग है: सार्वजनिक वर्ग द्वितीय क्लास {सार्वजनिक वर्ग InnerClass {}} पर मेन क्लास , list.add पर, मुझे यह त्रुटि मिलती है: प्रकार का कोई भी उदाहरण नहीं द्वितीय वर्ग सुलभ है द्वितीय क्लास प्रकार (उदाहरण के लिए, जहां x दूसरे क्लास का एक उदाहरण है) के एक आवधिक उदाहरण के साथ आवंटन को अर्हता प्राप्त करना आवश्यक है। मुझे InnerClass गैर होना चाहिए -static क्योंकि इनरक्लास को एक गैर-स्थिर विधि के लिए एक स्थिर संदर्भ बनाने की जरूरत है मैं सरणी सूची में तत्व कैसे जोड़ सकता / सकती हूं? स्थिर और गैर-स्थिर नेस्टेड क्लासेस के बीच अंतर को विशेष रूप से पढ़ना, और विशेष रूप से। यदि आप InnerClass एक स्थिर नेस्टेड क्लास बनाने का चयन करते है...

C++ mystical infinite loop -

I have just started learning c ++ after coding with java. The code below takes input from the user and validates the input. The first piece asks for the number of voters, which should be a positive number. If I enter a negative number the way I expect the program to behave, it prints the error message and asks for input again. However, if I enter any other character, like I get an infinite loop in any alphabet I ask for input, and print error message. What am I doing wrong? My code: #include & lt; Iostream & gt; using namespace std; Struct DataType {int numOfVoters = -1; Float prepsplug = -1; Float voting error = -1; }; Zero getUserInfo () {Data Data; While (data.numOfVoters == -1) {cout & lt; & Lt; "Enter the number of voters" & lt; & Lt; Endl; Cin & gt; & Gt; Data.numOfVoters; If (data.numOfVoters & lt; = 0) {data.numOfVoters = -1; Cout & lt; & Lt; "Invalid entry, please enter a number greater than zero." & ...