Posts

Showing posts from September, 2011

c# - Connecting SQL to FullCalendar -

मेरे पास इस लेआउट के साथ एक SQL सर्वर डाटाबेस है टेबल (Giftee int UserEmail varchar 100) बीडीएडेट दिनांक ()); मैं एक पूर्ण दिन का ईवेंट बनाने के लिए इसे पूर्ण कैलेंडर से कनेक्ट करना चाहता हूं। मुझे एक प्रारंभ और समाप्ति समय की ज़रूरत नहीं है मैं पूर्ण कैलेंडर के लिए "आईडी" और "शीर्षक" फ़ील्ड के रूप में "Giftee" मान का उपयोग करने की कोशिश कर रहा हूं। मैं "full date" के लिए "शुरुआत" तिथि के रूप में "BDayDate" का उपयोग करने का भी प्रयास कर रहा हूं। मैं संदर्भ के लिए इस पोस्ट का उपयोग कर रहा हूं मेरे पास एक Events.cshtml पृष्ठ है: @ {var origin = new DateTime (1970, 1, 1, 0, 0 , 0, 0); Var डीबी = डाटाबेस। ओपन ("टेबल"); Var zach = webSecurity.CurrentUserName; Var sql = "SELECT BDayDate, Giftee_Info से GIFtee WHERE UserEmail = @ 0"; Var परिणाम = db.Query (एसक्यूएल, ज़ैक); Var डेटा = परिणाम। चयन (x = & gt; नया {id = x.Giftee, title = x.Giftee, start = x.BDayDate.ToString ("yyyy-MM-dd...

android - How to stop keyboard from distorting ListView in Drawerlayout? -

Image
OK, so I have a friend list feature in a drawlist layout: As you can see, instead of looking at the upwards side, some methods of linear layout with the editors and buttons to push the list list upwards is needed. ? How can I achieve this goal Edit: As requested in my code & lt; RelativeLayout android: id = "@ + id / relative_layout" Android: layout_width = "240dp" Android: layout_height = "match_parent" Android: layout_gravity = "start" & gt; & Lt; ListView android: id = "@ + id / left_drawer" Android: layout_width = "300dp" Android: Layout_height = "Match_parent" Android: Layout_gravity = "start" android: background = "# 111" Android: ChoiceMode = "SingleChoice" Android: Divider = "@Android: Color / Transparent" Android: DividerHeight = "0dp" /> & Lt; LinearLayout Android: Layout_width = "Match_parent" Android: Layout_heig...

javascript - NodeJS "Error code: ERR_EMPTY_RESPONSE" -

Unable to load webpage because the server has not sent any data. Error code: ERR_EMPTY_RESPONSE My local nodjs setup is inadvertently unresponsive when I refresh my computer then it works fine but it keeps giving me the following message in my code Some things are wrong // dependencies var path = requirement ('path'); Var Express = Required ('Express'); Var http = Required ('http'); Var Mongos = Expected ('mongos'); Var passport = requirement ('passport'); Var localtrazage = requires ('passport-local'). Strategy; Var schemas = required ('./ schema / schema'); // main configuration var app = express (); App.set ('port', process.env.port || 3000); App.set ('views', __dirname + '/ views'); App.set ('visual engine', 'z'); App.set ('View Option', {Layout: Incorrect}); App.use (express.logger ()); App.use (express.bodyParser ()); App.use (express.methodOverride ()); App.use (e...

java - JavaDB Embedded -

I have seen many tutorials and after that, have reviewed some entries on stack overflow but I still can not understand I am also or even if I am actually watching, what is it? I want to know that Javascript is possible to make applications, whose associated database can be stored and distributed within the same jar or at least the same folder as the application, such as the user's Java There is no need to install anything except, and that is what I am called embedded Java DB. If someone uses a tutorial NETBEEN 8.0 I would be very grateful thanks.

python - Adding a calculated column to pandas dataframe -

I am completely new to Python, Pandas and programming in general, and I can not understand the following : I have reached a database with the help of Pandas and I have put the data in the data frame, DF. There are birthdays in one of the columns, in which the following forms can be: - 01/25/1980 (string) - 01/25 (string) - none (no type) Now, I A new column DF, which stores the age of people in the database. So I have done the following: def addAge (df): today = date.today () df ["age"] = None for index, line in df.iterrows ( =) None: if line ["birthday"] = none: if lane (line ["birthday"]) == 10: birthday = df ["birthday"] birthday day = dated date (int (birthday [6:]), int (Birthday) [: 2]), int (birthday [3: 5])) line ["age"] = today Year - birthday day. Year - ((today, month, today.) When you call iterrows () you are not receiving the copies of each row and the large dataframe can not be returned generally, you ca...

c# - Data type mismatch when inserting into table -

I'm having some issues with putting data called Microsoft Access Table in the order I The method that is listed has been created in my data access layer and called through a button click event in my presentation layer. The error I am getting is: The data type mismatch in the criteria expression The data access layer method: public static void processOrder (integer EmployeeID, integer TableID DATETIME, ORDERDATE DATETIME, orderBegin, bool orderStatus) {try {If (KaiConnection.State == ConnectionState.Closed) KaiConnection.Open (); OleDbCommand cmd = inserting new OleDbCommand (+ "???? values ​​(,,,,)", KaiConnection "[Order] (EmployeeID, [TableID], OrderDate OrderBegin, OrderStatus"); //cmd.CommandText = sSQLCommand; Cmd.Parameters.AddWithValue ("?", Employee ID); Cmd.Parameters.AddWithValue ("?", Table ID); Cmd.Parameters.AddWithValue ("?", Order Date); Cmd.Parameters.AddWithValue ("?", Commandben);...

c++ - Why does this code produce strange, unexpected output? -

Why can not I find the right results? I do not get the proper output of PX, although I have given it name as double, I'm getting some angry numbers-text mashup as a result. #include & lt; Iostream & gt; using namespace std; Int main () {double one = 0; Double b = 0; Double c = 0; Double x = 0; Cout & lt; & Lt; "Welcome to Lytis! \ NPlease enter one:"; Cin & gt; & Gt; a; Cout & lt; & Lt; "Please enter B:"; Cin & gt; & Gt; B; Cout & lt; & Lt; "Please enter c:"; Cin & gt; & Gt; C; If (a! = 0) {double d = (b * b) - (4 * a * c); } F (d == 0) {double x = - (b) / (2 * a); Double * px = & amp; X; Cout & lt; & Lt; "Solution x =" & lt; & Lt; Pixels; Cin.get (); } What am I missing? 1) does not compile your code (like d has not been declared) 2) "Number text mashup" strong> address of X (pointer) that you are printing. Use the dealer op...

php - WordPress Network Installation: How to get the ID of the site being viewed -

I have a network site installation with 4 different sub-sites using a subdirectory style: domain.com/ Ger, domain .com / fra, domain.com/esp, etc. All the above sites are using the same theme / templates. In one of my files, I want to add a pair of sites based on the lines of custom content. So I thought there should be a way to get the sub-site ID, when a user sees a page and then displays specific content for that sub-site. Like something, maybe: But I can not understand how the sub-site ID will get when the page is loaded. Any ideas will be highly appreciated. Use get_current_blog_id () - $ Blog_id = get_current_blog_id (); Switch ($ blog_id) {case 2: // content here ... break; Case 3: // Optional content ... break; Default: // is not matched up to Content ID ...}

DataTable LINQ Join C# -

मेरे पास निम्न टेबल हैं (डेटाटाबल): कॉलडेटा तालिका हड़ताल , MidPrice और PutData तालिका के साथ फ़ील्ड है कोड> और Midprice मैं> हड़ताल ABS (CallData.MidPrice - PutData.MidPrice) यहां मैं छवि यह LINQ संदर्भ में देखना चाहिए कि कैसे: वर परिणाम = (CallData.AsEnumerable में CallRow (से) में शामिल होने के PutData.AsEnumerable में PutRow () CallRow.Field करें & lt पर; पूर्णांक & gt; ( "हड़ताल") के बराबर होती है PutRow.Field & LT; पूर्णांक & gt; ( "हड़ताल") का चयन नए {ABS (CallRow.Field & LT; डबल & gt; ( "MidPrice") - PutRow। फील्ड & lt; डबल & gt; ("मिडप्रिस"))})। न्यूनतम (); हालांकि, अभिव्यक्ति ABS (CallRow.Field & LT; डबल & gt; ( "MidPrice") रेखांकित होता है लहराती रेखा से और संदेश कहता है: अमान्य अनाम प्रकार सदस्य घोषित। अनाम प्रकार सदस्य को सदस्य असाइनमेंट साधारण नाम या सदस्य पहुंच के साथ घोषित किया जाना चाहिए। कोई भी विचार है कि यह कैसे सही करने के लिए...

c# - Parse Abnormal Date Run to List<DateTime> -

If I have a short short and comma separated date string: July 23, 30, August 06, 13, 20, 27 or July 1, 15, 30, 14 August, 26, What would be a great way to pick and replace it What is the list of times? You can do this and with a bit of links: var input = "July 23, 30, 06, August 13, 20, 27"; Var dates = (matches from reg.x to matrix), matts (input, @ "(\ w +) (?: [\s,] + (\ d +)) +") in M. Groups, with Capture C [2] Str = m.Groups [1]. Value + "+ +" c.Value DateTime.ParseExact (str, "MMM dd", null)) .Oolist (); Note that if there is an invalid date, then it will throw an error.

How can I get an inner class's outer class's this in Java? -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब मेरे पास दो वर्ग हैं, बाहरी और इनर , और बाहरी में एक विधि है जो इनर लेता है इसे मान्य करने की आवश्यकता है कि यह आंतरिक स्वयं का एक है, और कोई भी इनर नहीं है जो कि एक और उदाहरण के अंतर्गत आता है मैं क्या करना चाहता हूँ अनिवार्य रूप से innerInstance.outer.this है, लेकिन इसके लिए एक खोजशब्द नहीं लगता है मेरी केवल एक अन्य अवधारणा getOuterThis () विधि इनर पर है, लेकिन मुझे इसका सहारा नहीं करना पड़ता। यहां सामान्य कंकाल है सार्वजनिक वर्क आउटर {सार्वजनिक इनर मिलेइनर () {...} सार्वजनिक शून्य उपयोगइनर (इनर इनर) {// यहां मान्य करें} सार्वजनिक वर्ग इनर { // क्या मैं इस से बच सकता हूँ? सार्वजनिक बाहरी getOuterThis () {Outer.this वापसी; }}}} मुझे नहीं लगता कि बाहरी.इस संदर्भ को स्पष्ट रूप से इसे उजागर करना जैसे कि आप कर रहे हैं हालांकि, आप संभवत: इनर क्लास को सत्यापन करते हुए पूरी तरह से बच सकते हैं: सार्वजनिक वर्ग बाहरी {सार्वजनिक इनर getInner ()} {...} सार्वजनिक शून्य उपयोगइनर (इनर इनर) {/ / भीतर की पुष्टि करें।...

javascript - How to post function in Codeigniter using jQuery? -

I have some problem in the jQuery post. I use Codeigniter, and when I try to post the function with jQuery I do it, so it does not work. Here is my view file: & lt; Div id = "dtk" & gt; & Lt; / DTK & gt; & Lt ;! - I want to get value from this element - & gt; & Lt ;? Php foreach ($ result- & gt; result as $ line) {? & Gt; & Lt; Input type = "hidden" name = "id_sesi" id = "idse" value = "& lt ;? php echo $ row-> id_sesi ;;>" & Gt; & Lt ;! - Get value from this element ID - & gt; & Lt ;? Php}? & Gt; And here is my javascript: $ (document) .ready (function () {$ (function () {setInterval (function () { var) Wkt = $ ( "dtk"). Html (); var ses = $ ( "idse"). Html (); $ .post ( 'admin / update', {dtk: wkt, id_sesi: ses}); }, 1000);}}); And here's my controller: function updates () {$ this-> Load-> Model ('$'...

java - I need to use a file to update/get High Score information -

Please help me try to access the program called "highscore.txt", then: 1: Write a new number in the file 2: Get the lowest value list of numbers in the file Please post code if you know how. *** NOTE: I am new to Java, so I hardly know how to use the file *** Edit: I got a code that I should believe that should work, but when I run the program it says the exception "main" java.util .InputMismatchException at java.util.Scanner.throwFor (Scanner.java:864) at java.util.Scanner.next (Scanner.java1485) at java.util.Scanner.nextDouble (Scanner.java): 2413) game.game. Main (game.java: 91) Java results: 1 The line is 84 - 94, and I'm here Security code. 84: Author wr = new FileWriter ("highscore.txt"); 85: Write. (Effort); 86: wr.close (); 87: Low = tries; 88: File file = new file ("HighType TX"); 89: Scanner inputfile = new scanner (file); 90: While (inputFile.hasNext ()) {91: numb = inputFile.nextDouble (); 92: If (numbed;...

selenium - How to change build class path in IntelliJ -

Image
I want to change my build path in my groovy / gradleproject cucumber project because I have a change From source to test to main (trust that this is possible) Even delete the build folder After and again tried to build the project, then it created a single square path and the error given below could be due to the class path problem. Groovyc: java.lang.NoClassDefFoundError: org / openqa / selenium / webdriver at java.lang.Class.getDeclaredMethods0 (Basic method) at java.lang. Class private.getDeclaredMethods (class.java:2531) at java.lang.Class.getDeclaredMethods (class.java855) org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode (Java5.java:328) version IntelliJ: 13.0.3 Gradle 1.9 Groovy: 1.8.6 Returns error when trying to add folder as content root Money Thanks

php - Connection to Local Instance of MySQL from Remote Server -

I have an IRC bot that collects some information and writes that information to MySQL DB. I am IRC locally Run an IRC boat locally, and also do an XAMPP server (latest version) for MySQL locally (my PC). I want to write this data with a remote messel db too. Unfortunately, my Fatko hosting will not allow me to connect remotely to my DB. So, I'm trying to connect to the XAPP setup on my local PC, which is from a PHP page running on my fat hosting, but I do not understand it. I have changed the bind address to 0.0.0.0 ... I have forwarded port 3306 to my firewall ... but I can not connect. I get this error: Message: mysql_connect (): The connection to MySQL server on 'Reading initial communication packet' has been lost, system error: 111 Thx for help ... I may be required to catch a stranger with something like this kind of thing.

c++ - How to insert the value of a variable in a char* -

I have mastered C # and I decided to start on C ++ to work on some personal things Have done Anyway, I want to know how to do this (C #) in C ++ For the (int i = 0; i & lt; 16; i ++) say ("[" + "+ i +"] idk "); Any and all help is appreciated, even if it is writing in the original C ++ also helps. You can also use stringstream s, #include & lt; Iostream & gt; # Include & lt; Sstream & gt; using namespace std; Int main () {Ostringstream OS; For (Int i = 0; I

Python Regex catch multi caps words and adjacent words -

I have a regex that does the following: Find a word that contains two or two More adjacent capital letters AE ("word of multi caps"); When possible, extend the match to another multi-caps word to the left and right sides, as long as more than three non-multi-million words are between each multi-caps word; And Increase the match to the left and right to include the sequence of 5 and 3, respectively, non-multi caps term. My regex catches the desired pattern but returns to many overlapping matches when there are adjacent multi-cap words, like AA BBD D below. Please help me to work your regedx as desired. This is my draft code: str1 = 'zzzz z11a bb dd ffdd gd df sdf ggf we aa ff dff' re.findall (r? (? =? (\: [^: [^ \:] [[\ S] +) {5} (?: [^ AZ \ s] * [as] [as] + (?: [^ \ S] [\ s] } {1,3}) * [^ AZ] * [AZ] [AZ] * (?.? [\ S] [^ \ S] +) {3} \ s)) ', str1) Actual output: Mail 1 - 'zzzz z11a bb dd f' match 2 - 'z j11aa bb ddff' match ...

C# TCP socket implementation not working, similar implemention in PHP does -

I have implemented a TCP customer in C # and PHP. Both connect to a TCP server / read port and server reception message. It works and put both implementation responses. After that both the clients send the data to the server. C # implementation throws an exception "System.IO.IOException: Read failure" System.Net.Sockets.SocketException: Operation timed out. "On reading the next response to the server. PHP implementation is working. C # implementation stopped working a few hours ago, I > How are you ending a message in C #? I had an issue like this, before that "\ r" was sorted by adding the serial. example byte [] outstream = encoding.ASCII.GetBytes (stuffToWrite +" \ r ");

java - I need to execute a AsynckTask object 5 times with an interval of 2 minutes -

I should send an event every 2 minutes (how do I do this) I am using the Ascend Task Class to handle background work and want to use my object to execute 5 times with a 2 minute interval. I have seen the previous answer and use thread (), try the timer, and wait, but nothing worked for me. Please help people private stable final scheduled ExeterService employee = Exporter. NewSingleThreadScheduledExecutor (); Some method of zero () {Runnable task = new Runnabal () {Public run with zero} {/ couple do ...}}}; Worker.schedule (work, 5, time unit SECONDS); ⋮} or if you want to use the timer You can view this post on Stackshowverflows

ios - Unable to Save Video to Camera Roll (Objective C) -

So I'm trying to complete it for some time, but unfortunately, of the solutions posted on the stack Nobody, or the people who tried to write myself, do the work. I am creating an application that allows users to take pictures and videos, and to save them to other users. I am using AWS services to save content. Although returning using YouTube using NSLog, YouTube shows the video when I copy / paste it in a browser, refuses to save it to the camera's roll, but saving the pictures works just fine. So far I have made the following efforts: - (minus) Image Picture Controls: (UIImagePickerController *) picker didFinishPickingMediaWithInfo: (NSDictionary *) info {if ([Media Type Ikwoltostring: (Ansstiing *) Kuttaipmovia]) {Ansdrael * movie URL = [information object Foreki: Uaimajepikantrolrmeediauarel]; Elasette Library * Library = [[Elsace Library Library] init]; [Library writeVideoAtPathToSavedPhotosAlbum: movieUrl completionBlock: ^ (NSURL * assetURL, NSError * error) {if...

python - How to invoke __repr__ of parent class? -

So the situation I want to solve is very simple to assume that I have a subclass C Which increases parents B and A . Parents b , and a each have their own __ repr __ methods. When I print out C , the method of parent a is always applicable, but I always use the parent B How can I do this? "post-text" itemprop = "text"> Assume that A is defined as: class A ( ): Def __repr __ (self): Return is defined as "this one is" and b is similarly defined: Class B (): def __repr __ (self): return is "it is b" while is defined as c : class C (A, B): def __init __ (self): pass or something similar. This will generate a from print A () , while for the B the same will generate this b . will print C () , as you describe, give this one is . However, if you only change the succession of C : class C (B, A): A and B def change order __init __ (self): Pass then print C () will give you this B . Simple a...

prolog - How to use list to record path from A to B? -

If I have a map with nodes 1,2, ..., n, then I know that I n1 to n2 , I can use the following code: path (1,2). Path (3,5). ..... get_to (A, B): - Path (A, B). Get_to (A, B): - Path (A, C), get_to (C, B). But how can you record the path of A to b and show it? First of all, we get the right of vocabulary: Direct connection between nodes (often called) is called edge. And the whole path is called path. Here is the first attempt: path (A, B, [A, B]): - edge (A, B) path (A, C, [A, B | VS]): - edge (A, B), path (B, C, [B | VS]). Note that the list can now be used to determine all the paths of a certain length. ? - Length (P, 10), Path (A, B, P) Or even all paths, sorted by length: ? - Length (P, N), Path (A, B, P). The price of this publicity is that this final query does not end. There are ways to fix this, but they are not straight forward.

Isolate part of the memory to be used only by specific code in C++ -

The story below is what I am playing with, in which there is an excellent syntax for defining grid grammar and using it Very easy. I was completely happy with it until I found mysterious segfaults with the parser generated. Some research has detected the problem in one of the Helper functions generated: YY_LOCAL (zero) yySet (Yycontext * yy, char * text, int count) {yy-> __val [count] = yy- & gt; __; } This function always count & lt; 0 is the use of negative indices on the array array is called undefined behavior. As I think that the megars are allotted to the peg / leg, which gives the correct indicator in another array, pointing backward from the array. This is actually a very bad code, but it works well most of the time. However, in some other parts of my program, some allocation memory blocks and everything emphasizes forces at different places for the segment. I doubt that the use of peg / leg due to this problem is malolk and my program uses new one, but...

c# - LINQ methods executing sequence -

Image
I am reading a book about C # in the advanced level. And, now I am reading this part: Operation behind Linux query methods - which implement representative-based syntax. So far, I have where , select , leave , SkipWhile , Read about low , methods while taking the and Defferred and instant execution and Iterator s that comes back by some of these methods. is a sample of deferred performance execution model by which CLR ensures that the value will be removed only when it is needed from the IEnumerable-based information source. When a link operator uses deferred execution, then the CLR uses the related sequence, such as the original sequence, ingenious, or selector (if any) in an iterator, which will be used when the information is originally toListmethod Or use the ForEachmethod manually or the built-in GetEnumerator and MoveNextmethods in C #. Now these two examples are taken: IList & lt; Int & gt; Chain = new list & lt; Int & gt; () {1, 2...

c# - Insert list of values into a SQL Server table with stored procedure -

How can I get a list of column data in a stored procedure? My stored procedure is optional functions [dbo]. Start in the form of dbo.Group (id, name) values ​​(@ ID, @ name) SELECT 0 END START CATCH SELECT 1 END CATCH END GO @ id int, @ Name as Navkararak (50) Code> I want to pass in the table like this data to be inserted @ id = 1, 2,3,4,5 @ name = 'Test1, test2, test3, test4, test5' and as a result ID name 1 test1 2 "test2" 3 test3 4 test4 5 test5 A "List" or "Array" in SQL Server ..... Table Therefore, if you are on SQL Server 2008 or new (you have not specified), then the table's table by using the table-value parameters feature of SQL Server In the stored procedure - To match your input parameters, create a table type TYPE IdNameTable as table (ID INT, named NVARCHAR (50)); Go - Change your stored procedure to accept such a table type parameter. Alternative process [dbo]. [Register] Start as VALUE IdN...

c++ - STL analogue in Fortran -

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

python - Why does Popen hang when used in Django view? -

In one of my Django's views, I need to start an asynchronous task that seems to end in minutes Could. Since the celery + message queue would be an overkill for this task, I used the subprocess. Papen is used to create a sub-process like this: args = ['python', SCRIPT_PATH, "& amp;"]; Try: Subprances Popen (Algs, Stdaut = Sbproses Kpeepii, Stederr = Sbproses. Piipii) except # sync calls to return Actiteepiarpispakshn ( "Job Submit") I NGN + run my Dijengo app When I start the server and leave the session open, the code above works fine. But when I close the shell session, the code stops and the pop is hanging in line. I think it's about stdout / stderr arguments, but I do not know how to make it work to change it. ========= Edit =========== I do this in the script: I used Selenium WebDriver + To load a Web page and submit a form, in this process, selenium or phatcoms write for standard output or standard error. When I start the gun...

javascript - performance of angularjs ng-click inside ng-repeat -

This is a doubt of a verified problem, but .. .. I have worked with knockoutjs for some time And there was a display problem for binding many people - a better way to use a lot of jQuery to handle them .on ('click', ...) Now when I do diving angularjs within my ng-repeat ng-repeat and inside of this second i have some button ng-click .. ; Ul & gt; & Lt; Li ng-repeat = "l in collection" & gt; & Lt; Button ng-click = "someFn ()" & gt; Click me & lt; / Button & gt; & Lt; Button ng-click = "someFn2 ()" & gt; Click me & lt; / Button & gt; & Lt; Button ng-click = "someFn3 (L)" & gt; Me & lt; / Button & gt; Click; & Lt; / Li & gt; & Lt; / Ul & gt; Does not it make too many event bindings? Or somehow can adapt angular? It is hardly an adaptation in this case, what will happen if you have many nested ngreipets against whom optimization should be done? In f...

erlang - How to do ejabberd cluster load balancing the right way? -

I installed a cluster (node ​​1 and node 2) through the following steps in the same domain (talk.example.com) Have done I tested the cluster with two clients, which are connected to different nodes' IP (not the domain talk.example.com). But I want to know if I want to add the client to the DNS record (talk.example.com) to distribute the client in the cluster, not the IP for the nodes in the cluster? DNS round robin? I do not know whether this work for the same client if different IPs come back for the same client, because XMPP protocol is static. Or Linux Virtual Server? I've never done this before. I have read, but which node frontend (which will connect the client)? You must load either the DNS balance or the balloner, such as the haproxy or both. DNS is actually the simplest but remember that this SRV record is _xmpp-client._tcp. {Your domain} should be balanced, not your actual domain.

paypal - Get Server Callback about Payment Status when using Checkout Button with Non-Business Account -

I often use the PayPal Express checkout button to take money from friends using the HTML form shown below. Can PayPal ask me to call a specific URL on my server whether payment has been processed or not? I have implemented PayPal Express several times using a PayPal Business account. However, I do not have a personal account business account, so I can not use the API. I have read about the update API immediately and tried to do it, but it is not said for any reason. & lt; Form action = "https://www.paypal.com/cgi -bin/ webscr" method = "post" target = "_ top" & gt; & Lt; Input type = "hidden" name = "CMD" value = "_x click" & gt; & Lt; Input type = "hidden" name = "business" value = "MY_PAYPAL_EMAIL" & gt; & Lt; Input type = "hidden" name = "lc" value = "de" & gt; & Lt; Input type = "hidden" name = "item_name...

javascript - Gmaps.js add/remove markers from array -

When a user clicks on a checkbox, I would like to show or hide some markers I am using it and The code responsible for this is: // Check that the user wants to display the interest dollar ("# poi"). Click (function () {var poi_markers = [], if ($ ("# poi"). (': Check')) {// Get points of interest and give them $ .jax ({type: "post ", Url:" / (data, function (key, value) {poi_marker = {marker: {lat: value.latitude, lng}: Value.longitude, icon: '/images/marker-sight.png', infoWindow: {Content: value.name}} poi_markers.push (poi_marker);}); console.log (poi_markers); map.addMarkers (poi_markers);}})}} and {map.removeMarkers (poi_markers);}}) Sample JSON: [{"name": "Biskera Negra", "Latitude": "45.640981", "Longitude": "25.587723 "I get this error in firebug:" Without exception: a E Latitude or Latitude is not defined. " What am I doing wrong? / div> ...

Symfonys 2 app_dev.php gives a blank page while app.php works perfectly -

I'm trying to start a new project with Symfony2, I'm a simple hello controller from the world beginning: class extends the default controller controller {public function index action () {$ name = 'world'; $ $ --- ($ MyointextBundle: Default: index.html.twig), return the array ('name' = & gt; $ name); }} See: {% extends ":: base.html.twig"%} {% block entity%} hello {{name} }! {% Endblock%} When I open the site via app.php everything is fine, but app_dev.php opening is nothing in the blank, white page APA main error log, nothing in the vhost error log and app / log / dev.log is also empty. What's wrong? Ap_dev works only when testing on the same server, which means that you can use your WAMP / XAMP etc. Are on To open the app_dev.fpp, open it and reduce it: if (isset ($ _ server) ['HTTP_CLIENT_IP']). Isset ($ _ SERVER ['HTTP_X_FORWARDED_FOR']) || In_array (@ $ _ SERVER ['REMOTE_ADDR'], arr...

Android application with two application buttons -

I'm new to Android development. Currently, I'm building an Android app that has two launching icons. The first icon to launch the application's configuration portion. The second icon will be executed on the basis of the configuration. The configuration will not be frequent activity. But launching another icon would be too much to get results based on configuration. / P> As I can see that most apps have a single launch icon Is there a way in Android that can fit my needs? Thank you. This can work. In your manifest file (AndroidManifest.xml): & lt; Application Android: Hardware Expected = "True" Android: Label = "@ string / app_name" Android: Icon = "@ drawable / ic_launcher" & gt; & Lt; Activity Android: name = "MainActivity" Android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt...

Android: WebView Scroll Animation -

I'm implementing an app that contains some content to show in the webview so far I have been using the object animator I am getting smooth animation of scrolling webview content. The problem I am facing now is that it is working fine for the first and second pages and scrolls are demanded but when I want to scroll to the third page, So I think that it is starting scrolling from the first page, then the other goes, and then in the third place, I want that I do not want to do that webview should maintain its scroll position and Must scroll Tman if (incre & lt; = total pages) {incre ++; TotalNumberofPages = totalNumberofPages + incre; // view.loadUrl ("JavaScript: PagesSolol (" // + incre * view.getWitth (+ + ")"); ObjectAnimator anim = ObjectAnimator.ofInt (see, "scrollX", 0, incre * view.getWidth ()); Anim.setDuration (4000); Anim.start (); // view.scrollTo (incre * view.getWidth (), 0); Anim.addListener (New AnimatorListener) {@Override...

elasticsearch - Kibana dashboard doesn't display logs -

I'm a total newbie for elastisearch who is trying to finish this tutorial: I followed the steps but Kibana Dashbora remains empty, that is, no data is being sent to it. The only logs I want to send logs are the data of syslog. I tried to check what is wrong and found that when it is entered in the browser: http: // localhost: 9200 / _aliases? Beautiful Returns only: {} Next and I came to know that with index or index There is some (the cold can not understand the difference) and most likely I do not have a config file correctly. My question is, should the file be rewritten? Am I missing something special? Any resource that will help me understand more?

php - Doctrine always only looks at the owning side of a bidirectional association for updates -

I know which side and the inverse side is the master, but I can not understand the following: Since the principle always looks for the owner of bidirectional collaboration for updates, it is not necessary to write that the inverse collection of bidirectional one-to-many or many-many associations has been updated. is. This knowledge can often be used to improve performance by avoiding the collection of derivative collections. The following code is also from the doctor: & lt; ? Php // This code is from DOC / Remove elements $ user- & gt; GetComments () - & gt; Remove Element ($ comment); $ Comment-> SetAuthor (zero); $ Em- & gt; Flush (); So the above code is redundant? I can remove the association with the comment (owner) party: // This is my code $ comment-> set is blank (empty); $ Em- & gt; Flush (); Am I right? Or can you provide any examples? Thanks! Edit: I found great details of "placing a colleague for changes". Al...

javascript - How to isolate CSS divs? -

मुझे एक निकाली हुई html सामग्री (एचटीएमएल ही, कोई जे एस नहीं) को पतन / विस्तारित डिवेल में विस्तारित करने की आवश्यकता है, लेकिन निकाली हुई सामग्री 'वैध' हर समय नहीं है और इससे अधिक समापन divs होना चाहिए, इस प्रकार यह मेरे UI के divs को बंद कर देता है और UI को तोड़ता है क्या इस समस्या का कोई भी समाधान आइफ्रेम को छोड़कर है? शायद इस तरह की सामग्री को संसृत करने के लिए जेएस लाइब्रेरी। मैं AngularJS और बूस्टअप का उपयोग कर रहा हूँ मुझे लगता है कि यह शेडो डोम का उपयोग कर भी किया जा सकता है लेकिन मुझे यकीन नहीं है कि यह कैसे काम करता है / किया जा सकता है, इसलिए मैं सोच रहा हूं कि छाया डोमेन का उपयोग करने वाले किसी भी विस्तार / संक्षिप्त प्लग इन का उपयोग कर रहा है। आप एक ऑफ-पेज डिवा बना सकते हैं, एचटीएमएल पार्सर को सब कुछ का ख्याल रखना और तब फिर से तत्व का आंतरिक एचटीएमएल लेते हैं और अपने पृष्ठ में डालते हैं: var div = document.createElement ('div'); Div.innerHTML = '& lt; div & gt; & lt; / div & gt; & lt; span & gt; एच & lt; / span ...

java - Collection.sort(arraylist) in a function sorting another arraylist -

Say, I have created an array list in (public square class 1 [string array []) double> new1 = new arreelist & lt; double & gt; (); Then I will assign this array to a function (public constant Passing zero main (string error []) biggest value (list1); This is the function for example: Public Stable Double The Largest Value (List & quot; Double & gt; Su Chi) {Collections.sort (list); return list.get (list.size () - 1);} I pass it in a function so that it is expected Will list only the list but not list 1 but list 1 is also sorted, and I do not understand why this is why, please explain to me why this is, and what is the solution to this error? In the context of only list when you pass it as argument In areas so both list indicates and list1 same List . A good rule of thumb is not to modify the object passed in a method, so I will make a copy inside the method: public stable double largest value (list & Lt; double & gt; li...

Go: error variable reassigning, proper use? -

I'm confused about re-combinations of the err variable for errors in C. For example, I am doing this: err1: = some () checkErr (err1) str, err2: = SomethingElse () checker err2 err3 : = Something () Check ARR (err3) But I'm always losing track of it and I have millions of worthless fault variables that do not need, for which I do not need it, and It makes the code messy and confusing. But then if I do this: err: = some () check array (error) str, err: = SomethingElse () checkErr (err) err: = Some () checks ARR (error) ... it gets annoying and says err is already assigned. But if I do this: var err err err = something () checkErr (err) str, err = SomethingElse () checkErr (err) err = SomethingAgain () Checker (error) ... This does not work because str should be assigned with : = Am I missing something? you 'almost' ... again to the left of : = Need to have at least one new variable conversion variable. But if you do not declare ...

javascript - jquery autocomplete 'Disable' show all terms -

Hey nobody can let me out of this problem .... I successfully build the jquier autocomplete function, But my problem is that the autocomplete suggestion shows all available labels showing autocomplete results that do not match the search term. I mean this is showing all the available labels. Is there any solution to show their only matching labels? Here is a Java function. Any help would be appreciated happily thanks ( work (request, response) {$ .ajax ({Url : "Availabletags.json", data type: "Jason", data: {word: request.term}, success: function (data) {response ($ .map (data.stuff, function (item) {return {label: Item.label, value: item.value}}}))}}}}}, minnumber: 2, select: function (event, y } {$ (Event.target) .val (ui.item.label); Window.location = ui.item.value; return back;;}})}}} Edit: - This is Jason File {"stuff": [{"label": "dragon", "value": "example .com"}, {"label": "Test...

javascript - Counting number of objects within a field of mongodb -

console.log (game.game प्रश्न); उपरोक्त कोड आउटपुट: [ऑब्जेक्ट, ऑब्जेक्ट, ऑब्जेक्ट]। मैं किसी तरह वस्तुओं की संख्या की गणना करना चाहता हूं। जब मैं कोशिश करता हूं console.log (game.gameQuestions.count ()); कंसोल आउटपुट: डेप से अपवाद को पुन: कंप्यूट फ़ंक्शन: प्रकार एरर: अपरिभाषित फ़ंक्शन नहीं है इसके अतिरिक्त अगर मैं कोशिश करता हूं: console.log (game.gameQuestions.length ()); कंसोल आउटपुट: डेप से अपवाद को पुन: कंप्यूट फ़ंक्शन: प्रकार एरर: संख्या फ़ंक्शन नहीं है कैसे क्या मैं किसी ऑब्जेक्ट के भीतर ऑब्जेक्ट्स की संख्या की गणना करता हूं? माँगोडब से एक लाया हुआ दस्तावेज़ सिर्फ एक जावास्क्रिप्ट ऑब्जेक्ट है किसी भी जादू के बिना लागू game.game प्रश्न एक सरणी है, इसलिए इसमें एक संपत्ति होगी लंबाई एक सकारात्मक पूर्णांक है, जो आपकी पिछली त्रुटि बताती है। यह काम करना चाहिए: console.log (game.gameQuestions.length);

android - Display object into spark list? -

How can I show general objects in SPARC list? I'm trying to chat, such as Whatsapp, where the user can send emoticons, pictures and videos. Thank you. You need to use custom item renderer. / Li>

bash - what's the correct way to pipe input to a program's internal command line? -

I'm trying to automate the installation of Sqoop 2 . Assume that sqoop-server is installed in the IP address 1.2.3.4 . I want to set the IP of that server on sqoop-client Manually, to do this, I would: sqoop2 sqoop: 000 & gt; Set Server - Host 1.2.3.4 How do I do the shell using the pipe and echo ? I have tried set server - host 1.2.3.4 | Sqoop2 but it did not work much. Read from many interactive programs stdin . Let's say this is the case for sqoop2 , as you suggest that you can use the pipe. But you just forget to use the echo command command: echo set server - host 1.2.3.4 | Sqoop2 Set the output of the above code echo as the input to sqoop2 . Another option sqoop2 & lt; & Lt; & Lt; "Set Server - Host 1.2.3.4" There is a third option to use. Very useful if you have to send several commands: sqoop2 (In the above, you can issue as many commands as you want, which ends before the EOF marker her...

php - Wordpress Two themes with same name -

I would like to develop a wordpress theme, a main development trunk for small changes and a branch for the next page release. Is using. So I checked my SVN trunk directory in wp-content / themes / themename-trunk and wp-content / themes / themename-branch . The theme is then chosen by the user-based plugin. Now, WordPress uses the CSS comment to display the name of the theme. Obviously, WP does not use the directory name for the difference between subjects internally; I definitely do not want to change the name line in style.css beacause otherwise it will cause disturbances in my SVN files and easy switching impossible will do it. Do you have another strategy for Combining WP's theme development with a multi-programmer SVN environment without maintaining a second WP installation? Have you tried using the Custom 1.8 client with custom? e.g. Set the $ themename $ keyword in the theme's CSS for the theme name and specify the keyword in "wp-content / the...

assembly - Why is Microchip XC8 writing .as file that complicated? -

I am setting the code below, then the second, then the third and end, the fourth bit of the TRIS register . Why is the generated assembly code that ... strange ? Good to know: Data collection of microcontrollers that has been compiled for the code is divided into several banks, in the status code 6 and 7, status code 5 and 6 in status register, Only accumulated in 0-5 OPCDs. 6 . Specific question: 6 (134) ^ 080 : this 6 , which detects TRIS on that particular bank compiler bus (6) or (134) write Why not? Is it just to clarify that TRIS Bank is not on 0, or is there any other reason? + (0/8) : 0 the state of the bit in that position, 8 the total number of that bit In my view, this expression does not serve any purpose because the result is always a fraction, never an integer. Therefore, it does not contribute to ad count. (0) & 7 : (0) stands again for bit position, but whose purpose is to create a binary- and with 7 works, I'm not clearly...

c# - When do we need to create our own custom dependency property? -

I am quite new to the Silverlight and therefore, after going through more than a dozen articles on dependency properties, I still A little confused, when do we need to explicitly make our custom dependency properties? Those technical terms on those articles have made me very confused. Can anyone tell me the scenario when we need to use a text box when we need to make a DP? If this is only for binding, then we can easily do something else in the videollege to bind the text, but why do we need to make the DP our own? I'm a bit confused please help me with an example As a rule of thumb: you never need to make any any in your ViewModels> DependencyProperties . Explanation: You are using control to write from your view, those controllers need to be dependent because their values ​​are databinding (When the concerned property is not a DP then a data-binding will not work) but the source of that value is not required to be a DP (even if it is double bond). So your ViewModel ...

https - Nitrous port 3000 SSL & rails configuration -

I have a nitrous box, I am developing an app with Rail 4. I use preview port 3000 (SSL) to use the app. The box responds to https: // # {name}. # {Zone} .nitrousbox com port 3000 / wow while using SSL settings! Just what I wanted but this means that * _url path assistants fail - because they expect that the site should be "http", not "https". Create a simple rail app, click on "New # {thing}" "Save" and you do not get a URL with the URL, not https - so there is a 400 error in your face, for some Working to work if only rewriting proxy server and * _url assistants were coordinated Apache server forced to https ("config.force_ssl = true" in config / environment / develop.rb) Is generating a redirect loop. I think this is because the request is translated back to the rail as a HTTP, which then gets the HTTPS proxy, which is received at HTTPS proxy, is sent back to the HTTP server, and again on HTTPS, etc, etc. Is directed. So...

c++ - Installing Qt Creator 3.1.2 on Ubuntu 14.04 LTS -

I have found and the method of setting Ubuntu on 14.04 LTS is. Which one is more reliable (less recently installed bugs)? Manual method offers 64 bit installation. What if I install using PPA method? Will 64bit version be installed in 64 bit Ubuntu? Can not I expect some problems if not? Which updates itself with Ubuntu? Is GCC 4.9.1 supported? I think the Qt manufacturer is connected to KDE in any way. Do I have problems while using Qt Creator with Ubuntu Integrated with Kubuntu? Personally I'm always downloading the latest QT manufacturer version and manually it's my Home Directory Install in There is no need to use just a few external repos as a manual installation, it is easy and you actually know what you get. Qt creator is not connected to KDE, you can run it properly on desktop environment of choice. There are QT platform plugins that allow strict integration in some environments, but it's nothing to worry about and simply just works ...

sql server - SQL to display and order by converted date -

Is it possible to use SQL to display dates in a new format? Sort by dd-mm-yyyy and then convert to date? I tried to do something like: Select convert (varchar (10), [date departure], 105) AS [departure from date] It is still sorted by VARCHAR (varchar (10), [date departure], 105) DESC It is not working on MS SQL Server. Order from unchanged date: SELECT CONVERT (varchar (10 ), [Date Departure], 105] AS [departure from Date] Departure date from [Date Departure] DESC You still have the actual date even if you have your selection list In a different format, the date is selected. In addition to this, the column has been named [date time] so that order by clause, I do not think that I will have the nickname order by clause against the column real field name, you would think that whenever you apply , Then referring to the column names aligning the actual field names are referring to aliens. So if you order through a column that you give the nickname that has a name s...

magento - UPS returns blank rate -

I have configured UPS method in my Magento site. The problem is that when I am using the following address as outlined: Country: United States Area / State: California Zip / Postal Code: 90034 and in destination: area / state: California zip / postal code: 94301 Its fair value comes back. Region / State: Ontario Zip / Postal Code: L6R2E7 Region / State: California Zip / Postal Code: 94301 The return method with all shipping 0 values. If anybody encounters this problem, please help me thanks Try debugging. Go to that shipping method and enable debug mode. Once enabled, go to the cart page and click on the estimate rate. Now check ftp var / log /, log file, you will get more information about what your error is.

Python, Unicode, and the Windows console -

When I try to print Unicode string in a Windows console, I get a Unicode encoding error : The 'charmap' codec character can not be encoded .... Error I believe this because the Windows console does not accept Unicode-only characters. What is the best way around this? Either way I would like to have Python automatically instead of failing in this situation? Can I print? Edit: I am using Python 2.5. Note: @Leserve Answer with Karelson Checkmark is outdated (since 2008) is more relevant today (6 January 2016). note: This answer is out of date (since 2008) please be careful Use the solution below! Here is a page that gives details of the problem and the solution (search the page wrapping sys.stdout in an example for the text): There is a code excerpt from that page: $ python -c 'import system, codec, locale; Print sys.stdout.encoding; \ Sys.stdout = codecs.getwriter (locale.getpreferredcoding ()) (sys.stdout); \ Line = u "\ u0411 \ n...

java - NoSuchMethodError when using jersey 2.0 -

Image
I am using Jersey 2.0 and I am getting the following exception when requesting: SEVERE: Standard Defrager. Imposing java.lang.NoSuchMethodError: com.google.common.collect.Sets.newIdentityHashSet () Ljava / util / Set; . Init & gt; Org.glassfish.jersey.model.internal.CommonConfig & lt at (CommonConfig.java:215) org.glassfish.jersey.server.ResourceConfig $ in the state & lt; Init & gt; Org at (ResourceConfig.java:107) .glassfish.jersey.server.ResourceConfig & Lt; Init & gt; (ResourceConfig.java:338) on org.glassfish.jersey.servlet.WebComponent.createResourceConfig (WebComponent.java:373) on org.glassfish.jersey.servlet.WebComponent. & Lt; Init & gt; (WebComponent.java:259) javax.servlet On org.glassfish.jersey.servlet.ServletContainer.init (ServletContainer.java:167) org.glassfish.jersey.servlet.ServletContainer.init (ServletContainer.java:349). GenericServlet.init (GenericServlet.java:160) org.apache.catalina.core.StandardWrapper.initServlet (Stand...

php - Concatenating characters/numbers to represent variables in Javascript? -

I have three PHP variables in this script which I want to use to get javascript for testing purposes. $ Q1, $ Q2 and $ Q3 respectively I want to output all of them to Que and their index (1, 2 and 3) together for loop one by one. East. If I want to produce $ Q2 at the second instance for parse, then it should be like 'Q' + i, where I am 2. See below: & lt ;? Php error_reporting (E_ALL); Ini_set ('display_errors', 'on'); $ Q1 = 'Q1'; $ Q2 = 'Q2'; $ Q3 = 'Q3'; ? & Gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script type = "text / javascript" & gt; Var Q1 = "& lt ;? Php Print ($ Q1) ;? & gt;"; Var Q2 = "& lt ;? Php Print ($ Q2);? & Gt;"; Var Q3 = "& lt ;? Php Print ($ Q3) ;? & gt;"; For (var i = 1; i & lt; = 3; i ++) {warning (eval ("Q" + i)); } & Lt; / Script & gt; ...

java - How to set JPanel fixed size such that the JScrollPane (scrolling) appears? -

I am working on a bit code with jfram with specific dimensions containing jpnl . Here is my code: import javax.swing *; Import java.awt. *; The public square is spread across the ScrollPane JFrame {public ScrollPane ({{super ("title"); Set layout (new border layout ()); SetSize (320,240); JScrollPane scroller = new JScrollPane (new drawingpan); Scroller.setPreferredSize (new dimension (320,240)); (Scroller); SetDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); SetVisible (true); } Private Class DrawingPane JPanel {public DrawingPane () {super (); SetSize (640,480); Set minimum size (new dimensions (320,240)); }} Public static zero main (string [] args) {new scrollpane (); }} Even with the minimum size set for JPanel , scrolls do not appear All components are responsible for determining the preferred size, so layout managers can work properly. When doing custom painting, you must override the getPreferredSize () of your custom component to return the dimension...

android - How To Include OsmDroid in Eclipse Project -

I try to include osmdroid as a library in my eclipse Android project. When I run it: RUN time exception no resource was found If I make changes to the library How do I want to include OSDDods?

javascript - Getting non scrolling height of the viewport -

I want to know the current view port or the height of the screen that is currently shown, this means that if some parts of the page If it has not been shown due to being overflowing, then it should not be included in it. All of the following gave me similar results, including scrolling / non-visible areas - $ (document). height (); $ (Windows) .height (); Document.body.clientHeight; Can anybody please tell me how to know the height of the current visible area of ​​the document in JS or JQ? I can not find your problem $ (window) .hit () To scroll down, you should return the height of the viewport, leaving anything you need, if you take a look at it, you will read: // The height of the browser viewport is $ (window) .height (); // HTML Document returns the height of $ (document). height (); An option is using window.innerHeight . But it returns the same as the $ (window). To get the height of the screen, you can use the screen.height () to height () to me . Th...

Combine for loop with timing events in javascript -

I have this code: for (i = 0; i & lt ; 3; I ++) {var interval = set interval (function () {warning (i);}, 2000); } What I would like to achieve is that every 2 seconds displays 0 times, then 1 and finally 2. Instead of waiting me enough Is there a 3 alert to display number 3, before my code is wrong? OK, this problem has more than one solution (again) but, first Why Your code does not work properly. Your code: for (I = 0; i .. Basically it means that it will be done by three seconds after two seconds for fasting as fast as the three setInterval calls Will give in the form. So basically, all your calls actually run fast after 2 seconds, only a few milliseconds or less between them. In addition, setInterval means that unless the clearInterval is called with the variable, it will be called. In other words, your code does not execute the alert, because you are never calling clearInterval . In the end, your alert (i) will always display the value of...