Posts

Showing posts from January, 2014

Cannot get suggestions when importing Python file from another folder (Wing IDE) -

Image
I have a python file called caller.py which is located on C: \ Temp. I have two other Python files: located in C: \ Temp and testlib.py in the local_testlib.py : C: \ Temp \ MyLibs. I am trying to import both files in Wing IDE Pro Import imported sys.path.append (r'C: \ Temp \ MyLibs') into testlib # # C: \ Temp \ MyLibs # local_testlib Import #: # Temp #check Suggestion by Wing local_testlib Get suggestions as a list of variables etc from file testlib. # No suggestions get print printlib.myvar #get variable value printed OK I get suggestions for local_sthibit only, nothing for the testlab (see picture below). I have access to variables in testlib.py (though it is imported properly) however. What adjustments should I have to make this work? This may be changed to carry local path modifications in our source analysis, although modifying sys.path in general is not a good way to work because pair Paths can screw up other modules you import later if they are try...

Which javascript function like parsefloat that takes the locale as parameter? -

समस्या: मुझे यह इनपुट मिला: "23,234.34 "निम्न-स्थान" के साथ " , लोकेल =" यूएस-यूएस " मुझे यह परिणाम चाहिए: 23234.34 नंबर var में। तो मैं parseFloat का उपयोग करता हूं लेकिन यह फ़ंक्शन पैरामीटर के रूप में कोई स्थान नहीं लेता है, जब मैं "23,234.34" स्ट्रिंग का उपयोग करता हूँ, फ़ंक्शन रिटर्न नंबर नहीं (एनएएन)। यदि ($ ('इनपुट # फीसमाउंट')। Val ()! = '') {$ Funding = {fee राशि: पार्सफ़्लॉट ($ ('इनपुट # फीसमाउंट')। Val ()), अधिग्रहण रजिस्ट्रेशन: $ ('इनपुट # रजिस्टरआईड ') .वल (), अधिग्रहणकर्ता: $ (' चुनें # अधिग्रहणकर्ता ')। Val ()}; क्या आप एक फ़ंक्शन जानते हैं जो मेरी मदद कर सकता है? यदि आप केवल यूएस प्रारूपों के साथ काम कर रहे हैं, तो आप केवल string.replace (/, / g, '') का उपयोग कर सकते हैं। अन्यथा, आप इस लाइब्रेरी का उपयोग करना चाहते हैं:

PHP Session lost half way through buying process -

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

html - set three header div's 25% 50% 25% Horizontally -

I want to set 25% 50% 25% of the horizontal horizontally, show them three The header is placed in the divider's head, with the same CSS, but div is displayed vertically. Checked the previous answers that I could not get the lead, please give me an instruction. Thanks HTML code: & lt; Div id = "header" & gt; & Lt; Div id = "header-left" class = "div-border" & gt; & Lt; H6 align = "center" & gt; Image holder & lt; / H6 & gt; & Lt; / Div & gt; & Lt; Div id = "header-middle" class = "div-border" & gt; & Lt; H1 align = "center" & gt; Dashboard & lt; / H1> & Lt; / Div & gt; & Lt; Div id = "header-right" class = "div-border" & gt; & Lt; H6 & gt; & Lt; Span & gt; & Lt; Period style = "row-height: 24px;" Id = "around border" & gt; & Lt; B & gt; Profile | Help | A...

bitbucket - Git pull/clone a branch -

I just need to get files from a specific branch. I have tried some commands, but this whole repo Ends to draw, instead of just a few files, I need to draw from a specific branch to a directory. git version 1.7.1 if you get an error: Git clone git@bitbucket.org: name / name.git -b mv_LookbookAddition --single-branch means That you need 1.7.10+ (June 2012), using, or for Mac for it. But you will get complete history of the branch (if that branch is made from master , then you will get all commands from the master You can try the --depth option only to get past earnings from a single branch and combine it git clone git@bitbucket.org: name / name. git -b yourBranch --single-branch --depth 10 this is your clone repo will be shallow repo, which is why you need. see .

jQuery Mobile multi-page application. How to check if history.back() is possible without leaving the application? -

In my jQuery mobile multi-page application, is it possible to check that there will be a page in history.back () application? I have a link on a sub-page, which I want to execute history.back () if it refers to any subpopulation in the application or just explicitly linking the application from the main page otherwise I want to do something like this if (canbaback) {$ .mobile.back ();} and {$ .mobile.changePage ('# main '};} On the initial load of the app, a flag is stored in the history state Objects on the document Kat Current: $ (function () {history.replaceState ($. Extension (history.state, {root: true}));}; Since then, whenever we want to check that we can go back, just see that the flag that we set is in the current history state object. If so, we are on the starting page and can not go back: function canGoback () {Return! (History.state & amp; history.state.root); } HTML: & lt; A href = "javascript: if (canGoback) {$ .mobile....

javascript - AngularJS - Using ternary operators and filters within a binding -

मेरे पास वर्तमान डेटा बाध्यकारी है: {{myAccount.Balance}} मुझे लगता है कि कुछ फ़िल्टर लागू किए गए हैं: {{myAccount.Balance | फिल्टर 1 | हालांकि, जब मैं बैलेंस शून्य से कम है, तो मैं नीचे त्रि नारी ऑपरेटर का उपयोग करना चाहता हूं (फिल्टर के बिना): {{MyAccount.Balance & gt; 0? मैं अपने फिल्टर 1 और 2 को भी ऊपर कैसे इस्तेमाल कर सकता हूं? Div class = "post-text" itemprop = "text"> आपको कोष्ठकों में उन्हें लपेटने की ज़रूरत है () प्राथमिकता लेने के लिए {{(myAccount । बैलेंस & gt; मेरा खाता। बैलेंस: मेरा खाता। शेष + 'शून्य') | फिल्टर | फ़िल्टर 2}}

Android: How do I get string from resources using its name? -

मुझे UI के लिए 2 भाषाओं और मेरी संसाधन फ़ाइल res \ values \ Strings.xml : & lt; स्ट्रिंग नाम = "tab_Books_en" & gt; पुस्तकें & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Quotes_en" & gt; उद्धरण & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Questions_en" & gt; प्रश्न & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Notes_en" & gt; नोट्स & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Bookmarks_en" & gt; बुकमार्क & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Books_ru" & gt; क्नीगे & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Quotes_ru" & gt; चिट्स & lt; / string & gt; & Lt; स्ट्रिंग नाम = "tab_Questions_ru" & gt; वोप्रास & lt; / string & gt; & Lt; स्ट्रिंग नाम = "टैब_ोट्स_आरयू" & gt; Заметки & lt; / string & gt; & Lt; स्ट्रिंग नाम = "ta...

mongodb - Error on return a Future[Boolean] from a for in Scala -

I am writing the application 2.3.2 in Scala. I use reactive Mongo as a driver. My mongodab database I have a collection called "recommendation.tagsSimilarity", which has the value of similarity between my tags, where a tag is in the form Is: "category: attribute". An example of a document is as follows: {"_id": ObjectId ("5440ec6e4165e71ac4b53a71"), "id": "10912199495810912197116116114-10912199581091219711611611450", "tags 1 ":" 10912199495810912197116116114 "," tag1Name ":" myc1: Myattr "," tag2 ":" 10912199581091219711611611450 "," tag2name ":" myc: myattr2 "," eq ": 0} A domain represents an element of the matrix of nxn dimensions, where n is the number of saved tags. Now I have created a collection called "recommendation.correlation", on which I save the connection between "category" and a tag. To...

node.js - Mongoose: assign field of type 'array of Strings' -

I am using an array of stars to save emails: var user = New schema ({// other field ... email: [string]}); Saying that this area may have trouble updating, Email 1 and Email 2 are values ​​I get from viewing: It works well: user.emails = [email1, email2]; User.save (); // fields are updated, all good and this is not the like: user.emails [0] = email1; User.emails [1] = Email2; User.save (function (err, savedUser) {console.log (savedUser.emails); // Updated array [email1, email2] // But if I now get the user, then over the changes in the 'Email' field Will not done }); But, oddly, it works: user.emails = [email1]; User.emails [1] = Email2; User.save (); // user.emails == [email1, email2]; Can anyone explain why this is happening? It is not well documented, That you are triggering to detect Mongoose's field change so that it knows that the array has been modified and saved. Directly an array element has not been modified in its square bracket th...

rest - RESTful: How to perform different actions on the same url? -

As far as I know, according to the calm guidelines, each URL represents a resource or a group of resources. And actions should be kept as logic Assume that we have a group of resources called 'user', and if I want to register another user, then the API can be : POST / user HTTP / 1.1 host: www.example.com User Name = & lt; Username & gt; And password = & lt; Password & gt; & Amp; Email = & lt; Email & gt; & Amp; Age = & lt; Age & gt; Now if I want to unregister a user, then unregistered APIs: The method is still POST , URI still / user , the argument can be user name = & lt; Username & gt; And password = & lt; Password & gt; & Amp; Cause = & lt; Reason & gt; In this situation, two APIs share the same URL and method with different logic, and I think that this is not a good design. So the question is: What is the good design against this situation, is it easy to separate the two different a...

javascript - Ratchet Push.js Not Pushing -

At the top of CodeIngniter I have created a PHP app, which works by transferring the controller to the controller (.php files). From one static page to another (.html files) Problems: Links refuse to work. I'm not sure whether this is even a problem, and this is the only exception than the source code - I'm calling a .php file instead of .html file . Before you ask - on my system, bookNav is a viable controller, clicking a viable view is being loaded on it. Besides - I can see that the snippet here is actually working. I'm trying to debug it - how does the snippet send a link here, while not equals on my server? Here is my last HTML file: & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Project & lt; / Title & gt; & Lt ;! - Including shaft CSS + JS + custom CSS! - & gt; & Lt; Meta name = "viewport" content = "...

java - AsyncTask status doesn't state to FINISHED -

Issue: AsyncTask does not state when the state is finished, but after the code is executed in doInBackground () The application works slowly after starting this work, it is too long) I need to be refined what have I done? Thanks Code (Shortcut): MyTask MT; Class MyTask Async Task & Lt; Zero, zero, zero> {Int myProgressCount; @ OverEride Protected Zero at PreExecute () {super.onPreExecute (); Toast. MakeText (DeviceUARTContext, "Probe Start Progress Bar", Toast. LNNHHLANG). Show (); } @ Override Protected Voice Doine Background (Zero ... Parameter) {// Function Return of the Code; } @Override Secure Zero on postexec (zero result) {super.onPostExecute (results); Toast. MakeText (DeviceUARTContext, "onPostExecute End Progress Bar", Toast.LNGTH_LONG). Show (); Toast. Make text (DeviceUARTContext, "asynctask status:" + mt.getStatus (), toast .LENGTH_LONG). Show (); // here should be mt.getStatus () "finished"}} ReadDataBut = (butto...

Const methods to access private data members in C++ -

My project is here I have several other errors but I'm sure I'm not trying to redefine the string Was anything before asking it. Invalid Player :: Exposure () const {cout & lt; & Lt; "\ N Player's Name:" & lt; & Lt; GetName () & lt; & Lt; "\ N Grades:" & lt; & Lt; GetGrade () & lt; & Lt; "\ NG.P.A." & Lt; & Lt; GetGPA () & lt; & Lt; Endl; } The problem is here, I get access violation, this is a method when keeping display cnt or it is a valid code and my problem is elsewhere and it is not caught. Is Debugger? // The types of well-changed gates are required to be changed; Player :: GetName () const {return m_name;} const int Player :: GetGrade () Const (Returns M_Grade;} Const Double Player :: GetGPA () const {return m_gpa;} More relevant code, so I have learned that to read a private data member with a const method like this, you have to "promise" two constants to...

c# - Initializing a dictionary with anonymous objects -

I'm trying to do the following. Private Stable Dictionary & lt; Int, object & gt; MAPS = New Dictionary & lt; Int, object & gt; {{1, new {1, 2, 3}}}; It does not work as I expect, so I am pretty sure the issue is that I am using anonymous items. It is believed that I do not want to create a new type for my things and still want to keep all the mapping in the same dictionary, what should I do? I have seen but now is a little date, so I am hoping that there is something new for this in the structure. Try it if you want an array of value to int s in the form of. Private Stable Dictionary & lt; Int, object & gt; MAPS = New Dictionary & lt; Int, object & gt; {{1, new [] {1, 2, 3}}}; Or if you want an unknown class private static dictionary & lt; Int, object & gt; MAPS = New Dictionary & lt; Int, object & gt; {{1, new {a = 1, b = 2, c = 3}}}; or better yet do not use object int or list int int for coll...

glsl - OpenGL 4: Stitched tesselation patches dont fit together -

Image
The issue is resolved, see below for improvement Im I am trying to implement TDM's "Sespap" (see here) with rectangular patch, tocellation and custom level expansion. Unfortunately I can not get the correct gl_LessLevelOuter . There are some small holes between the patch I made Skybox Red to emphasize the error. I use glDrawArraysInstanced to attract 64 x 10 * 10 patch and rearrange them in the peak shader around the position of the camera: #version vec3 in_Position; Out vc3 ex_Position; Layout (standard 140) Uniforms Uniforms {layout (line_comb) matte 4mvp; Layout (line_comb) mat4 vp; Vec3 CameraPos; Float time; VC3 Sun; }; Const float patch size = 10; Const int patchCount = 64; Zero main () {ex_Position = in_Position; Ex_Position.xz + = patchSize * vec2 (gl_InstanceID% patchCount-patchCount / 2, integer (gl_InstanceID / patchCount) -patchCount / 2); Ex_Position.xz + = patchSize * floor (cameraPos.xz / patchSize); } Then I calculate the level of det...

javascript - GoogleMaps - multiple markers with multiple colors -

I'm trying to create a good Google map on it with some markers. I have found some really solid solutions in the web, which covers almost every thing: D. I want to paint the pin / marker on the map. Well, tried to do one thing, but unfortunately, something went wrong: (so you will not see the map, but all the codes are) // Markers with multiple markers = [['Marker_name', 51.113882, 17.070474],]; This part is responsible for showing many markers, can I somehow define the color of the marker (I know that this is possible, because I use the tutorial to mark all the marker colors Change, but I want to say that we call 4-5 different color markers)? The code is a part of the custom information box for each marker, so maybe this can be done :) Thanks! You can use something like this: var marker = [['Starter', 51.113882, 17.070474, 'icon1.png'],]; and change your constructor to: [...] marker = new google.maps.marker ({status: position, map...

html - Center align multiple buttons with Bootstrap 3.2.0 -

I know a lot about the center of this question has been called a button or a div, but for one i The answer can not find multiple buttons / divs I have a few sections in my design that require 2 or 3 buttons to be a combine center with a 10px margin between them, I also need them to cross 2 columns. I have already been using that paste the code below and hopefully one of you can tell me where I am making a mistake, thanks & Lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "colonel-lg-2 black-lg-offset-3 seconds-1-btn" & gt; More & lt; / Div & gt; & Lt; Div class = "col-lg-2 sec-1-btn" & gt; More & lt; / Div & gt; & Lt; Div class = "col-lg-2 sec-1-btn" & gt; More & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; @MixenBTNS {background: $ yellow; Color: $ cream; Font weight: 700; Font-size: 1.3 AM; Text-transform: u...

ReSharper conflict with Stylecop over using directive order SA1210 SA1211 -

Style code 4.7 Rules SA1210 and SA1211 need to be used to sort in alphabetical order. I have participated in the conflict between the rules of style and the applicable sort of rushper: case-sensitive Razor displays insensitive type in case of 8.2 directions, while case rules for stylecaps require a sensitive type of case. Therefore, I ran into a strange case (not my own) with the following instructions due to bad name space selection (not mine): AB Use common; Using Ab.Utility; Contracts first ctrl-E-F; But due to the difference between AB and AB, the rule requires utility for the first time. I have saved it by removing the stylecaps rule and have just given the rearrangement of Rusharp to the government. Undoubtedly the namespace should be reprocessed, but I do not have this option. Any other opinion about handling other methods besides closing the style code? Close the StyleCop rule seems like the best answer, to see the order, ReSepar and StyleCop There is no need...

In Twitter API How to check a tweet has been deleted on twitter if I check it via a Tweet id saved in my database -

I have used the Twitter API to bring Tweets with a special hash tag and all data stored in my database. I am currently working in the main PHP The API is working fine, thanks for Twitter The problem now comes with the deleted tweets In fact, when the record of 100 latest tweets comes on my AJAX file, then I store them directly in my database, now with a flag view = "y" I want to be responsive to any tweets stored in my database Remove from twitter account Ha will be automatically set = "N" visible in your database. I searched a lot on the internet but I got no respect. Please answer me and ask me if more information is needed. Thanks for the overflow pile for a good community. The only way to do what you are suggesting is to run some process that Reads the tweets from your database and can check to see if they are still. You call and provide it a comma-delimited list of 100 tweets and then compare your return value to your criteria to see if the ...

c# - GetNextFireTimeUtc() returns null while trigger takes place in the futre -

I am trying to delete all the triggers that end because quartz.net is triggered when it crashes Will never be left at all. So I would like to know the next fire time of my triggers and if they do not have any, then they will end and they should be removed. But now I see that even a trigger in the future gives null for its next fire time: string expression = "0 26 13 17 10 2015 "; DateTimeOffset? NextFireTimeUtc = TriggerBuilder.Create (). WithCronSchedule (expression) Build () GetNextFireTimeUtc (); As is my verb expression for 2015. But nextFireTimeUtc returns null . Just ran into this self, "until the trigger in the return scheduler is added Not guaranteed to be valid. " So make sure you run ScheduleJob (...) to get 'GetNextFireTimeUtc ()'.

algorithm - Given 3 sorted arrays A, B, C and number S, find i, j, k such that A[i] + B[j] + C[k] = S -

I just learned how to solve it in O (n ^ 2 log n) For each A [i]: For every B [J]: If A [I] + B [J] + C Birrinary Search (The time taken to handle every AR is the same): S - A [A] - B [J]] == S: Returns (I, J, K) To fix this, O (n ^ 2) to improve the time or the above algorithm? if arrays are non-negative, * you * all 3 arrays are s => [N] & gt; S [Aidx] + B [BIDX]> S Similarly,

wso2carbon - wso2 api manager wso2 BAM -

Tables are created but the data is not populated. Follow the steps below I am looking at the link given below on wso2carbon.log TID: [0] [AM] [2014-10- 16] 20: 15: 50,544] error {JG.Modiles.Stext.YUG: JAG} - Java.Lang NullPointException: Null {JiggyModials.Statistics. Use: Jig} TID: [0] [AM] [2014-10-16 20: 15: 59,210] error {Jajir.media.txtics.usage: jge} - java.lang Neo Pointer Exception: Rickle {JGG.Modi.Stetics.jz: JG} TID: [0] [AM] [2014-10-16 20: 16: 01, 473] Error {JG.Modiah.Statix.Jez: JG} - Java.lang Neo Pointer Exception: If there is no activity on the empty {jgg.module.statistics.jes: jge} Please: 1. Create API Activity 2. Wait for 10 minutes to run the BAM analysis scripts 3. Again try to access the data through the API Manager

colors - Colored output in netbeans console with ansicodes -

I am trying to get a color output in my Netbeans output window. The ANI-output and the Windows console work perfectly in Linux. Although not in the IDE Is there any way to do this work in Netbeans's output window? According to this, this should work, but it is not in my current Netbeans 8.0.1 installation (neither Linux nor Windows). Any sign on how to do this? I am using Netbeans 8.0.1 on Windows 7. I tried to escape ANSI, and it works. Example: string greenBold = "\ 033 [32; 1m"; String reset = "\ 033 [0 m"; System.out.println ("first" + green + "green" + reset + "after");

angularjs - Angular Directive isolated scope not updating -

I created this angle command that works up to a point. {'Image:': 'Picture', 'Source': '@ Source', 'Application' }, Replace: true, template: ' through it Being told: album-art pictures = 'picture' l Bomb = '{{album.title}}' source = '{{Default}}' class = "pull-left art"> Picture is an array, the title of the album is clear and the source is set to a default image in the main app controller. The problem is that when a loop Is found in: function, scope.source is set, but the template {{source}} is not updating the reference. Any help would be greatly appreciated. Thanks OK, I can remove the separate scope and instruct the heir to the parent area I'm giving permission. / P> Bus initiated by: & lt; Album-album = '{{album}}' & gt; & Lt; / Album-art & gt; or & lt; Album-Art Album = '{{album.title}}' & gt; & Lt; / Album-art & ...

WPF Progressbar Rectangle -

Image
मैं निम्नलिखित ProgressBar शैली का उपयोग कर रहा हूं: & style; Style TargetType = "{x: प्रकार प्रोग्रेसबार}" & gt; & Lt; सेटर संपदा = "खाका" & gt; & LT; Setter.Value & gt; & Lt; ControlTemplate TargetType = "{x: प्रकार प्रोग्रेसबार}" & gt; & Lt; ग्रिड मिनहाइट = "14" मिनव्यूथ = "400" पृष्ठभूमि = "{पृष्ठभूषा पृष्ठभूमििंग}" & gt; & Lt; बॉर्डर x: नाम = "PART_Track" कॉर्नररेडिया = "2" बॉर्डरछाचना = "1" & gt; & LT; Border.BorderBrush & gt; & Lt; ठोस रंग ब्रश रंग = "# एफएफएफएफएफएफ" / & gt; & LT; /Border.BorderBrush> & Lt; / बॉर्डर & gt; & Lt; सीमा x: नाम = "PART_Indicator" कॉर्नररेडियो = "2" बॉर्डरटिकनेस = "1" क्षैतिज एलाइन्मेंट = "वाम" पृष्ठभूमि = "{अग्रभूमि अग्रसारण TemplateBinding}" मार्जिन = "0, -1 0,1" & gt; & Lt; ग्रिड क्लिप टूबॉन...

css - cursor:pointer on pseudo element IE -

I am implementing a close button on an element containing text with CSS. The close button is generated from the pseudo-element with the content: 'X'; . I need a cursor to become an indicator on that "X", so I used it: cursor: indicator; It works fine in Chrome and Firefox but it does not work in Internet Explorer (tested on IE11 Window 7). (test in IE) I have also tried with cursor: hand , But it does not solve the problem. How can I make the cursor a pointer while hovering over "X", but not on the text of the div? Relevant code: div {font-size: 2em; Status: Relative; Display: inline-block; } Div :: Before {content: 'X'; Cursor: indicator; Display area; Text-align: OK, & lt; Div & gt; Some text & lt; / Div & gt; - edit - I know that a child or brother in the markup Creating and implementing the cursor: indicator; This will work but I would like to reduce the markup and use the pseudo-el...

java - Creating jar from command prompt giving error -

I wrote this example as an answer from this link, "To create a jar file from the command prompt I have tried "but I am getting the error 'No Main Manifest Attribute, in Holorold.' ' . What will be the problem? help please. I have explained in the same way. Instead resolve by using 'jar cfe HelloWorld .jar hellohold hello'd.class' key' jar Cfl hallowold. If manifests.txt helloall.class' Thanks guys !!

magento - In Mage_Customer what role does <fieldsets> have? -

मैं बस उत्सुक हूँ अगर & lt; customer_account & gt; टैग & lt; fieldsets & gt; किसी भी भूमिका या Magento के पुराने संस्करणों में उपयोग किया गया है। जैसा कि मैं देख सकता हूं, जब ग्राहक बनाते हैं, तो गुण ग्राहक कोड में customer_form_attribute तालिका से $ customerData = $ customerForm- & gt; निकालने डेटा ($ this- & gt; getRequest ()) से जोड़ा जाता है ; और $ customerForm-> कॉम्पैक्ट डेटा ($ customerData); मुझे पता है कि अन्य मॉड्यूल में उपयोग किया जाता है, लेकिन ग्राहक के लिए मुझे इसकी उपयोगिता नहीं मिल पा रही है । आम तौर पर & lt; fieldsets & gt; बहुत उपयोगी फ़ंक्शन का हिस्सा हैं । मैं खुद को लगभग हर दिन उनके साथ काम करता हूं। विशेष रूप से, Mage_Customer_Model_Resource_Customer_Collection में यह फ़ंक्शन है: / ** * नाम को जोड़ें चुनें * * @ परत Mage_Customer_Model_Resource_Customer_Collection * / सार्वजनिक फ़ंक्शन addNameToSelect () {$ fields = array (); $ ClientAccount = Mage :: getConfig () - & gt; getFieldset ('ग्राहक...

SQL Calculated field selected values -

मेरे पास एक एसक्यूएल व्यू कॉलम्स आईडीएक्स, DATE, सिग्नल, VALUE के साथ हमारे पास SIGNAL1 से SIGNAL10 मुझे क्या चाहिए कि दैनिक आधार पर एक गणना की गई कॉलम को निम्नानुसार गणना की जाती है: compval = SIGNAL7 * SIGNAL8-SIGNAL9 अन्य कॉलम मूल मानों को बनाए रखता है यह कैसे करें? आप एक और दृश्य बना सकते हैं या सिर्फ इस दृश्य को अपने दृश्य में जोड़ सकते हैं: दृश्य v_view को चुनें v। के रूप में बनायें *, (SIGNAL7 * SIGNAL8-SIGNAL9) के रूप में first_view v से CompVal;

objective c - is there any way in obj-c to hook into application delegate methods -

समस्या है :। मैं जैम SDK का उपयोग () मुरब्लाड एसडीके मंच-विशिष्ट प्लगइन्स (अपनी शब्दावली में विस्तार) लिखने का अवसर प्रदान करता है। प्रत्येक विस्तार को स्थैतिक-पुस्तकालय के रूप में संकलित किया जाता है और मुख्य तैनाती उपकरण के साथ मुख्य अनुप्रयोग (लोडर में उनकी शब्दावली) से जुड़ा हुआ है। मुख्य आवेदन के सूत्रों का कहना खोला नहीं कर रहे हैं, इस प्रकार हम / ओवरराइड एप्लिकेशन प्रतिनिधि तरीकों को लागू करने के लिए कोई क्षमता है। मैं (Upsight एसडीके के माध्यम से रिमोट पुश नोटिफिकेशन के प्रबंध पूर्व के लिए एक विस्तार की जरूरत है पीलेहेवन)। आईओएस 8 आया और रिमोट पुश नोटिफिकेशन पंजीकरण के लिए कुछ अतिरिक्त प्रयासों की आवश्यकता है। विशेष रूप से, didRegisterForRemoteNotificationsWithDeviceToken और didRegisterUserNotificationSettings लागू किया जाना चाहिए सवाल कर रहे हैं । कैसे क्या मैं स्टैटिक लाइब्रेरी (मुख्य एप्लिकेशन के स्रोतों के लिए कोई पहुंच नहीं) से ऐप्लिकेशन के प्रतिनिधि तरीकों में शामिल कर सकता हूं? विचार थे : 1) श्रेणियों का उपयोग करना मैंने UIApplication वर्ग ...

Can't get Scala to recognize commons-logging-1.1.2.jar -

I am running a program for which commons-logging-1.1.2.jar needs to be used. When I try to compile it using: scalac-classpath ~ / jars / hasoop-core-1.2.1.jar: ~ / jars / commons-logging-1.1. 2.jar:. HDFS_Test.scala I get an error that says: Warning: class org.apache.commons.logging. The login was not found - Released with a stub. I know that the classroom is in jar, but it still is not able to find it. What can I do wrong with any idea? One word misleading, in , CLASSPATH = ~ / jars / hasoop-core-1.2.1.jar: does expansion of the tilde -logging-1.1.2.jar scalac after the colon of ~ / jars / commons ... should work, but if you want to use command line logic then you have to extend it by hand. (My source is here)

Remove hardcoded file path from java program -

I have created a simple Java program in which I am creating a text file and reading the data written in it. The problem is that I do not want to hardcode the path of the file because I have created an installer package for my program after the development of the application that allows users to install it on that system. Now the problem can be installed anywhere in the same way as a user (i.e. in C, D or E Drive) and in those cases I get the filenoutfound exception exception. My code - this is the code that I am using to create and write some text in the text file. Forforter file = new flumerwriter ("e: \\ TextFile.txt", is true); BufferedWriter Author = New BufferedWriter (file); Author.write (input); Write.newLine (); Write.close (); This is the code that I am using to read text from the text file. Flemmer reader = new file reader ("e: \\ TextFile text"); Buffer Data = New Buffettder (Read); I have another file for which I hardcode the path of th...

c# - How to distinguish 'Role' interfaces from 'Result' interfaces? -

This issue often comes to me in my coding that I am surprised that I can get very little references to it, and The value of ideas and ideas of other people will be worth it. I define several APIs, which I work for frameworks, and the APIs that I want to break within the larger domain model, almost completely interfaces (meaning, in my case, C #interface) included. I think that we want to differentiate between the interfaces twice, again and again. In the absence of the search for any more widely used words, I define these two as follows: The purpose of the 'role' interface is by the objects outside the API To implement, so that those objects can be used as logic for methods defined in the API 'Results' are implemented by the objects inside the interface API And APIs Make available in other parts of the system. Object is intended to define the result interface instead of restricting the outside world to the object to eject it. For them. Tho...

swift - Authentication with Uber API using NSURLSession -

I am using NSURLSession to use JSON data. How do I update the following code to validate and pass parameters (server token, latitude and longitude) I have a server token and client ID and a secret ? urlPath = "Enter" https://api.uber.com/v1/products "let url = NSURL (string: urlPath) go session = NSURLSession.sharedSession () function = session. DataTaskWithURL (URL, completionHandler go: {data, response, error -> if (not valid for error = zero) {println (error)} else {know jsonResult = NSJSONSerialization.JSONObjectWithData (data, options: NSJSONReadingOptions.MutableContainers , Error: zero) as NSDictionary println (jsonResult)}}) task.resume () On, you need to include the token as an HTTP header According to the documentation. NSMutableURLRequest * request = // Set up the rest of the request [request set value: [@ "token" stringbapping string:

regex - MySQL RLIKE repeating character end position -

I have done my due diligence and are still stuck. I have a situation where I need to find out where the last existing letter is in a search string, check to see what is behind that character, I think I have to use RLIKE to do this Needed, but maybe there is another way. Example table. Column content string: MSH | Content | More |||| PID | Accessories Morestuff | Morestuffofanotherlength || Wejustfollowedablank | Morestuff2 || ^ 1 ^ ||| .. ||||| .. | || How should I count 19 pipes after the keyword PID, then see if the next letter is not (can be greater than 19 pipes, or there may be less And do not blow me out if you do not have to see the 19) I know that I can use the LOCATE function to find my starting position, after PID, it is not sure How to pass that status into expression in the events of 19 To start counting. Beyond the initial position Partial regexp i.e. looks like '\ (. + \) Pid [|] {19}' in pspad, I can not find it in Mysql messy So either the syntax...

tsql - How to Pivot on caption? -

I am trying to pivot the rows in columns with Tsql and also end the tap. How do I do this? My current query: IF OBJECT_ID (N'tempdb .. # test_data ') Tap drop table #test_data Table #test_data (question_caption varchar (max), [0] varchar (max), [ Enter the #test_data value ('q1', 'abc', tap, faucet, zero) * #test_data value 'Q2', enter varchar (max), [2] varchar (max), [3] varchar (max), [3] Enter the #test_data value ('q3', tap, tap, 'd', null) in the form of the #test_data value ('q4', tap, tap, tap, 'jacqual'), tap, tap, 'df', tap, null) In the form of PivotTable output ([0], [1], [2], [3]) for question_caption, select #test_data from smoke (maximum [0]) * : question_caption 0 1 2 3 q1 ABC tap nail faucet Q2 faucet DRF cord faucet Q3 Nail faucet Nail Q4 Nail nail null JQUAL What do I need: q1 Q2 q3 q4 aBC def ghi jkl How can I get this? The error in the above query is: Message 265, Level 16...

java - What is the compile group, name etc...? -

मैं निम्नलिखित विधि आविष्कार में आया हूं: निर्भरता {समूह संकलन: 'commons- संग्रह, 'नाम:' कॉमन्स-संग्रह ', संस्करण:' 3.2 '} खैर, निर्भरता (क्लोजर क्लोजर) में परिभाषित और उपरोक्त कोड सिर्फ इसकी घोषणा है लेकिन Groovy बिंदु के बंद होने वाला शरीर क्या है? समूह संकलित करें: 'कॉमन्स-संग्रह', नाम: 'कॉमन्स-संग्रह', संस्करण: ' 3.2 ' इस कथन के groovy बिंदु से: संकलन समूह: 'कॉमन्स-संग्रह', नाम: 'कॉमन्स-संग्रह', संस्करण: '3.2' सिर्फ एक सामान्य मानचित्र है। यह बिल्कुल उसी तरह से काम करता है: प्लगइन लागू करें: 'java' - विवरण के लिए देखें।

php - What's the best strategy to emit XML using Twig Templates? -

I want to use the templates templates for XML output However, I could not find any arguments to avoid text ( HTML escaping is different from XML encoding) Is there a filter error that I can use? Are there any additional things to think about?

php - PHPExcel outputing different files in different servers -

Recently I had to change my application to another server and everything was fine, but I used to have files using XLSX PHPExcel The server compared a good file to a new file since XLSX is just a zip file, so I made it unexpected to compare them. There was no difference then, I compared them to Notepad ++ and the binary string on both is different. I think there is something like that with encoding, but I'm actually lost here. Useful Information Header: -> SetWarwer ("End: Mon, 26 July 1997 05:00:00 GMT") - & gt; SetRAF Header ("Final-Modified:". GMDAT ("D, D MYH: i: s"). "SetRawHeader (" Cache-Control: No-Cache, Must-Modify ") - & gt; Satvideo (" Pragma : "No-cache") -> SetrWader ("Content-Type: App / vnd.openxmlformatsofficedocument .spreadsheetml.sheet") - & gt; setRawHeader ("Content-Disposal: Attachment; File Name = \" {$ file} \ "" -> gt; SetrWeder (...

javascript - how to judge which button has been clicked using there className instead of ID -

I have 100 buttons in a table, but the name of the same class is different but different IDs C-1, C -2, ...., cn & lt; Input type = "button" class = "btn-c" id = "c-1" value = "ADD" & gt; How do I know which button is clicked using their classname and whithout & lt; Input type = "button" ... onclick = "call_function (this);" For simplicity, says that I want warning (button id); Click on any of the 100 buttons If you have a lot of buttons, it It is understood to use the event delegation: $ ('table'). ('Click', '.btn-c', function () {warning (this.id); // will click on the button ID}}; Performance approaches This is an optimum approach because you only force an event handler in parent element and get benefit from child element eventbulbling. UPD. This is a The pure JavaScript version of the code is: document.getElementById ('Table'). AddEventListener ('c...

swift - Programming for iOS 7.1, and using a UIAlertView, will this work for iOS 8.0 as well? -

I'm programming an app with Swift, and I'm targeting iOS 7.1 as the least, and I've noticed that UIAlertView has been deprecated in iOS 8. Does this mean that I should only use UIAlertView to display a warning in my app? Should I use some code that is running the version of iOS, and use UIAlertController for iOS 8 based on the version of iOS run, and Then UIAlertView if they are running iOS 7? Editing: I should add that UILartView works on iOS 7 and 8, but I'm just wondering if I should just use UILartView for both, or they have an investigation And instead of running UILART, if they are on iOS 8. I know that since its use of the new API, it is best practice, so I am curious if it is only an issue to use both UILartview You should do it in any way. It does not matter unless it works. If your app supports many iOS versions and a certain API is only deprecated then some apps are in supported iOS versions, then there is no problem using the old API (...

ios - Swift, NSOperationQueue.mainQueue(): update data in operation during operation is running? -

I recently downloaded background file in iOS project, and when the file download starts, updated block by seeing progress Has been started NSOperationQueue.mainQueue (). AddOperationWithBlock () Method: func URL session (Session: NSURL session, download task: NSURLSessionDownloadTask, written WrititeData bytes: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) { If totalBytesExpectedToWrite == NSURLSessionTransferSizeUnknown {println ("Unknown Transfer Size"); } Else {Data = getDBInfoWithTaskIdentifier (downloadTask.tasIdentifier) ​​NSOperationQueue.mainQueue (). AddOperationWithBlock () {data.db_info.downloadProgress = Float (totalBytesWritten) / Float (totalBytesExpectedToWrite) inf = data.db_info.indexPath let's cell = self-answer tableView.cellForRowAtIndexPath (NSIndexPath (forRow: data.index, insection: 0)) SettingsTableViewCell cell .downloadProgress.hidden = in (data.db_info.downloadProgress as false cell.downloadProgress.setProgress, ani...

jquery - Stop page from jumping to top on click with if else -

I have a button that is toggling my menu (# menu-toggle) when the user clicks on the button So the page jumps on top tried it but it is not working: $ ('# menu-toggle'). Click (function) ($. 'Rap, nav' gt; ul, .rope & gt; container: first-child '). ToggleClass (' push '); event.preventDefault (); if ($ ($ '' ('$' ''. '' ('$' ''. '' '' $ '' ('' Wrap ''). Css ('position', 'fixed'); $ ('rape & gt; container: first-child> div: first-child' Here is my html: SlideUp (500);} and {$ ('. Rap'). CSS ('position', 'relative');}}) & lt; button id = "menu-toggle"> gt; id = "new-toggle"> gt; & lt; / span & Gt; & lt; / div & gt; & lt; / button & gt; Button ID = "search-toggle" & gt; & lt; / button & gt; Any help would be appreciated. ...

Sqoop is not using all the specified mappers -

I am using Hadoop data from Oracle using Sqoop in the Oracle table, I have around 2 million records with the primary key Which I am providing as a field by dividing. The job of my class is getting completed and I am getting the right data and the job is running for 30 so far all the good. When I look at the output file, I get the first file round 1.4 GB, the second file is approximately 157.2 MB and the last file (20th file) is approximately 10.4 MB, while all other files from 3 to 19 There are 0 bytes. I'm setting 20-meters because I want to run 20 mapers for my work. Here is the sqoop command: sqoop import - Connect "CONNECTION_STRING" - some "SELECT * FROM AND \ $ CONDITIONS" --split-by.id --target-dir / Output_data -m 20 Note: My Any ideas? > / Div> to ... If the real value for P is the Rimi key completely It is not distributed in its own limits, then it can be the result of unbalanced work. - split-by can be used ...

scalatra < squeryl < select ALL | Always -

I want to read the elements from the database and return them as a JSON object. The scalet is set to return the JSON database chema has been created. Find ("/") {inTransaction {list (from (MassTournamentSchema.players) (s) = & gt;)}}} I get the following error: "Any session is not bound to the current thread, should be created through a session session .create and usually this error occurs when a transaction / Intrusion is executed outside the block. " I want to correct it so that something like" session.create "can be added. Can not really be in the right way. Can anyone help Skeltra-Nob? : -) I think your comment is on the right track. InTransaction block will be bound by a JDBC connection in a thread's local variable and start the connection on it if there is no selection on the same thread, then you will see an error that you receive two things that I recommend that you try Are: Start your transaction later from the l...

java - How to make a Loaded Dice -

I am creating a square of this dice squared called loaded dice which will load a dice roll and a certain percentage 'Got some signals to create an aristlist and made it more than a number and made another and there Area is selected randomly, but it may be a cleaner way? > Public squares dice {/ /---------------------------------- - ------- // instance variables // ----------------------------------- - - - Private Arrestist & Lt; Die & gt; DieArray; // ------------------------------------------------ // Constructor // --------------------------------------------- - / ** * Default Constructor 2 6 Sided Dice * / Public Dice (Diareare = New Arrayist & # 39; Die & gt; (); DieArray.add (new die); DieArray.add (new die) );} / ** * Use an array list * / Public Dice (Arrelist Lieutenant; Dy> Some Dicks) of Direct Objects {dieArray.addAll (someDice);} / ** * 1 int #), Which is a 6-party * Dice * / Public Dice (Int. NumericOfidies) creates...

How to do a case-sensitive file search with PowerShell? -

जाओ- childItem -Path C: \ -फ़िल्टर CAPS * caps.txt मुझे यह सुनिश्चित करना है कि यह केवल CAPS.txt (या जैसे CAPS901918.जो भी हो ) पाता है मैंने इस तरह की अभिव्यक्ति के लिए फ़िल्टर पाइप करने के तरीके खोजने की कोशिश की है: {$ _। What_I_just_said_to_filter_on -like [AZ]} या दबाने परिणामों को प्राप्त करने के बाद आउटपुट, लेकिन मुझे कुछ भी नहीं मिला। पाइपिंग की कोशिश करें Get-Childitem से जहां-ऑब्जेक्ट इस तरह से: जाओ- Childitem -Path सी: \ | जहां ऑब्जेक्ट {$ _। What_you_want_to_filter-match "REGEX"} यहां यह वाक्यविन्यास के साथ है (धन्यवाद FLGMwt) जाओ- Childitem-Pat सी: \ | जहां-वस्तु {$ _। नाम -क्लिक "CAPS *"}

c3p0 - oracle connection encryption and connection poling -

I am using c3p0 pool but I could not find any information about linking properties, such as c3p0 below Connection pool configuration xml, any help will not be greatly appreciated that it is not supported, any options will be very good thanks oracle.net.encryption_client = required; Oracle.net.encryption_types_client = RC4_256; Oracle.net.crypto_checksum_client = Required; Oracle.net.crypto_checksum_type_client = MD5 In the end it is working, this same That's what works me. & lt; Bean id = "myDS" class = "com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method = "close" page: driverClass = "$ {db.driver}" P: jdbcUrl = "$ {db.url}" P: Acquisition = "1" page: idleConnectionTestPeriod = "60" p: maxPoolSize = "$ {jdbc.pool.size}" Page: Try Acquisition = "2" Page: MinPoolSize = "$ {pool.initialsize}" Page: testConnectionOnCheckout = "true" p: Favorite = ...

php - PhpStorm + Vagrant + Symfony2 -

I want to display Symfony2 page using the Hobo Box. If I turn on the charge box (desired), and use the ssh command "php app / console server: run", then I see the information "server http://127.0.0.1:8000 is running on "and if I website" 192.168.33.10 "or" 0 127.0.0.1 "or" 127.0.0.1:8000 "I'm going to the host machine In my bracket it has its main lines, so I can not see symfony2 site. Question: How properly configurable file configuration, which allows me to view the symfony2 site? file ... config.vm.box = "symfony-v0.2.0" config.vm.network "forwarded_port", Guest: 8000, Host: 80 config.vm.network "private_network", ip: " 192.168.33.10 "Configuration .vm.network" public_network "config.vm.synced_folder" ./ "," / var / www / ".... Add info: ==> Default: Increase shared folders ... Default: / var / www = & gt; C: / User / Wojtech / Phpstorm...

vb.net - Delete the file which contains a string in its name -

I want to delete a file if there is a word in it I might be able to find the file if it contains a specified word If the path is, then the string = IO.Directory.GetFiles (% AppData% & amp; "\ etc", "* Chrome *"), as dim path () Length & gt; 0 Then delete the file? What is the correct way to delete a file? This should be the job: slow path = IO.Path Select each FL file in FL.Contains (Filters) in Combine (Environmental.GETFolderPath (Environment.SpecialFolder.ApplicationData), "etc.") Dim Filter = "Chrome" Dim Files = IO.Directory.GetFiles (Path) IO.File.Delete (fl) Next

sql - sqlite count of distinct occurences -

Image
What is the best way to write an SQLLay query that will calculate the incidence of colc after selecting different cola? Select Cola, colB, colC from MyTable where in Cola ('121', '122', '123', '124', '125', '126', '127 ',' 128 ',' 129 '); Information Cola should be different. However close, these results are wrong. should return it: 123 a cat 1 124b dog 1 125 e serpent 2 126f fish 1 127g snake 2 (select cola, min (colB) colB, max (colC) from MyTable as colC where in cola ('121' , '122', '123 *,' 124 ',' 125 ',' 126 ',' 127 ',' 128 ', '129') Group by Cola Switch to TV. *, Coupled with c.colC_count (select, count (*) clc = tcol explanation: first subkey (inside with ) gets the desired result but calculates the value recurrence of each colc in the desired result without counting the column and this count is ret...

java - Screenshot of the full web page loaded into JavaFX WebView component, not only visible part -

I'm writing my first line of code after 2 years of managerial work, it's not time to read many docs, only There is a need to create proof of concept in a few minutes. So I have to work with JavaFX and need to provide functionality which allows to take a screenshot of the web page loaded in the webvive component. The problem is that I want a full screenshot of the whole page, not just the piece that fits in the current size of the current window. Here is a simple code that I use: WritableImage image = Browser.snapshot (new snapshot parametus (empty)); // browser javafx.scene.web.WebView file file = new file ("screenshot_fx.png"); {ImageIO.write (SwingFXUtils.fromFXImage (image, tap), "PNG", file); } Hold (IOException e) {e.printStackTrace (); } And it basically only captures what's visible on the screen. If the webpage needs to be scrolled - so I will not see the screenshot on the part. Please suggest moving forward try {robot pixelgrobe =...

How to add a file as attachment in Spring integraion Webservices outbound gateway -

I have a spring integration outbound gateway for web pages. By this time, I send a request in the XML format for web services . Now, I need to send a file as part of the request for web service. How do I do this? The bottom spring integration chain is the current configuration: & Lt; -; Integer This Spring Integration Series uses the first service name and headers of the service for the spring unity message called Operation Header: Header-Enricher & gt; & Lt; Int: header name = "# {XXXXXXXXX}" value = "test search" /> & Lt; Int: header name = "# {XXXXXX}" value = "searchbeatfastdifference" /> & Lt; / Integer: Header-Enricher & gt; & Lt ;! - WS Outbound gateway is used to make outgoing SOAP calls - & gt; & Lt; Integer-ws: Outbound-gateway id = "simpleGateway" destination provider = "testDestinationProvider" message-this = "testHttpsMessageSender" interceptor = "te...

Updating Raw Resources Without Updating APK on Android -

is a set of raw resources to me that what I know what he does with his Apike on Google Play a Is it possible to update these raw resources without the need for full APK updates? I think it's kind of strange request, but the general idea is that we want to allow for these resources JSON files to raw resources "dynamic" and change quite frequently. We think that will not only burden for us to constantly updated APK in Google Play, but also for our users: ( Thanks! J is it possible to update these raw resources without requiring updates to know what it all Apike is? is not possible. Although you can implement your own separate cache To welcome, your app downloads that can vote on their servers for updates JSON files. Your app can download while downloading Jason files using raw resources your code can see it Whether a copy is present or not, and if yes, then use it instead of using people in resources.

jquery - javascript regex for score -

Reggae for this type of marks are for students: 12.5, 99.5, 87, 1.66 Fields may be empty The maximum character length (.) Is 5 as follows: 99.99 between digits 0 and 100 I used it, but it does not work var rmark = / ^ \ d {0,1} \. (\ D {0,4}) $ /; Var txtS = $ (": text"); (Var i = 0; i / ^ \ d { 1,2} (\. \ D {1,2})? $ / And this means ... ^ - String \ d {1,2} from the beginning - 1 or 2 digits (- Capture Group which is not required - survived dot \ d {1,2} - 1 or 2 digits)? - String ps: If it is empty then / ^ (\ d {1,2} (at the end of the string) - this group is not required to be present \ . \ D {1,2})?)? $ / pps: If the range from 0 to 100 then / ^ (100 | (\ d {1,2}} (\. \ D {1,2 })? $ $ / Or you can test it here - play snippet $ (function () {$ ('Input'). Key (function () {var regexp = / ^ (100 ((\\\\\\\\\\\\\\\\\\\\ {1 , $ 2;)?)? $ /; If (! Regexp.test ($ (this) .val ()) $ (this). AddClass ('bad'); an...