Error Upgrade Jquery.min into Jquery.1.9
I try this code in jqueri.min1.2.js Work but in Jquery.1.9.js not Work
//SubmitComment
$('a.comment').livequery("click", function(e){
var getpID = $(this).parent().attr('id').replace('commentBox-','');
var comment_text = $("#commentMark-"+getpID).val();
if(comment_text != "Write a comment...")
{
$.post("add_comment.php?comment_text="+comment_text+"&post_id="+getpID,
{
}, function(data){
$('#CommentPosted'+getpID).append($(data).fadeIn('slow'));
$("#commentMark-"+getpID).val("Write a comment...");
});
}
});
Ouput on console "Uncaught Error: Syntax error, unrecognized expression:"
Help me please...
Sunday, 18 August 2013
Android: How to set a custom view for single choice alertdialog?
Android: How to set a custom view for single choice alertdialog?
You are the droids I have been looking for!
Fellow droids..
I'd like to change the title in a Single choice alertdialog to a custom
title. I know I can use dialog.setCustomTitle(View view) but that doesn't
seem to have any effect.
Also, I'd like to replace the radiobuttons with a custom button that I
created.
How can I do this? I'd rather use an alertdialog because of it's
simplicity, than create my own listview or gridlayout.
Help is much appreciated. Thanks!
You are the droids I have been looking for!
Fellow droids..
I'd like to change the title in a Single choice alertdialog to a custom
title. I know I can use dialog.setCustomTitle(View view) but that doesn't
seem to have any effect.
Also, I'd like to replace the radiobuttons with a custom button that I
created.
How can I do this? I'd rather use an alertdialog because of it's
simplicity, than create my own listview or gridlayout.
Help is much appreciated. Thanks!
Why .slice always delete the last element
Why .slice always delete the last element
In the javascript, there are two arrays:tags[] and tags_java[]. I use
.splice to delete certain items, which of the same index in the two
arrays. The tags[] works fine, but tags_java doesn't, it seems always
delete the last item. here is the javascript and the jsfiddle link.
var tag = $(this).text();
var index = $.inArray(tag, tags);
tags.splice(index,1);
tags_java.splice(index,1);
In the javascript, there are two arrays:tags[] and tags_java[]. I use
.splice to delete certain items, which of the same index in the two
arrays. The tags[] works fine, but tags_java doesn't, it seems always
delete the last item. here is the javascript and the jsfiddle link.
var tag = $(this).text();
var index = $.inArray(tag, tags);
tags.splice(index,1);
tags_java.splice(index,1);
SocketServer no modules are getting import
SocketServer no modules are getting import
I want to create a SocketServer on my mac.
However it seems to be some problem with the packages. When I try this
sampling code found here it raises attributeerror.
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
"""
The RequestHandler class for our server.
It is instantiated once per connection to the server, and must
override the handle() method to implement communication to the
client.
"""
def handle(self):
# self.request is the TCP socket connected to the client
self.data = self.request.recv(1024).strip()
print "{} wrote:".format(self.client_address[0])
print self.data
# just send back the same data, but upper-cased
self.request.sendall(self.data.upper())
if __name__ == "__main__":
HOST, PORT = "localhost", 9999
# Create the server, binding to localhost on port 9999
server = SocketServer.TCPServer((HOST, PORT), MyTCPHandler)
# Activate the server; this will keep running until you
# interrupt the program with Ctrl-C
server.serve_forever()
The error :
Traceback (most recent call last):
File "/Users/ddl449/Projects/visualization/SocketServer.py", line 1, in
<module>
import SocketServer
File "/Users/ddl449/Projects/visualization/SocketServer.py", line 3, in
<module>
class MyTCPHandler(SocketServer.BaseRequestHandler):
AttributeError: 'module' object has no attribute 'BaseRequestHandler'
I do not know if that has to do that I am running on Mac. My python
version is:
2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
I want to create a SocketServer on my mac.
However it seems to be some problem with the packages. When I try this
sampling code found here it raises attributeerror.
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
"""
The RequestHandler class for our server.
It is instantiated once per connection to the server, and must
override the handle() method to implement communication to the
client.
"""
def handle(self):
# self.request is the TCP socket connected to the client
self.data = self.request.recv(1024).strip()
print "{} wrote:".format(self.client_address[0])
print self.data
# just send back the same data, but upper-cased
self.request.sendall(self.data.upper())
if __name__ == "__main__":
HOST, PORT = "localhost", 9999
# Create the server, binding to localhost on port 9999
server = SocketServer.TCPServer((HOST, PORT), MyTCPHandler)
# Activate the server; this will keep running until you
# interrupt the program with Ctrl-C
server.serve_forever()
The error :
Traceback (most recent call last):
File "/Users/ddl449/Projects/visualization/SocketServer.py", line 1, in
<module>
import SocketServer
File "/Users/ddl449/Projects/visualization/SocketServer.py", line 3, in
<module>
class MyTCPHandler(SocketServer.BaseRequestHandler):
AttributeError: 'module' object has no attribute 'BaseRequestHandler'
I do not know if that has to do that I am running on Mac. My python
version is:
2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Javascript debugging: pause on click event
Javascript debugging: pause on click event
I'm debugging a web page and want a way to pause the JS execution of an
oonclick handler of an element, where I don't really know who is the
handler or when is the handler being registered.
Is there something like a pause button (such as in Visual Studio) on any
of the browsers debuggers that pauses the JS execution once a user event
is triggered?
Thanks
I'm debugging a web page and want a way to pause the JS execution of an
oonclick handler of an element, where I don't really know who is the
handler or when is the handler being registered.
Is there something like a pause button (such as in Visual Studio) on any
of the browsers debuggers that pauses the JS execution once a user event
is triggered?
Thanks
Consecutive uppercase letters regex
Consecutive uppercase letters regex
I'm trying to use regex to find 3 consecutive uppercase letters within a
string.
I've tried using
\b([A-Z]){3}\b
as my regex which works to an extent.
However this only returns strings by themselves. I also want it to find 3
consecutive uppercase letters nested within a string. i.e thisISAtest
Any help would be appreciated. Thanks
I'm trying to use regex to find 3 consecutive uppercase letters within a
string.
I've tried using
\b([A-Z]){3}\b
as my regex which works to an extent.
However this only returns strings by themselves. I also want it to find 3
consecutive uppercase letters nested within a string. i.e thisISAtest
Any help would be appreciated. Thanks
Saturday, 17 August 2013
Where two or more values match condition?
Where two or more values match condition?
I have been asked this question;
You list county names and the surnames of the representatives if the
representatives in the counties have the same surname.
and I have the following tables;
***REPRESENTATIVE***
REPI SURNAME FIRSTNAME COUNTY CONS
---- ---------- ---------- ---------- ----
R100 Gorege Larry kent CON1
R101 shneebly john kent CON2
R102 shneebly steve kent CON3
I cant seem to figure out the correct way to ask Orical to display a
surname that exists more then twice and the surnames are in the same
country.
I know how to ask WHERE something = something, but that's doesn't ask what
I want to know.
I have been asked this question;
You list county names and the surnames of the representatives if the
representatives in the counties have the same surname.
and I have the following tables;
***REPRESENTATIVE***
REPI SURNAME FIRSTNAME COUNTY CONS
---- ---------- ---------- ---------- ----
R100 Gorege Larry kent CON1
R101 shneebly john kent CON2
R102 shneebly steve kent CON3
I cant seem to figure out the correct way to ask Orical to display a
surname that exists more then twice and the surnames are in the same
country.
I know how to ask WHERE something = something, but that's doesn't ask what
I want to know.
Subscribe to:
Posts (Atom)