status

How do I set a Jabber status with python-xmpp?

风流意气都作罢 提交于 2019-12-10 15:54:40
问题 How do I set a GChat or jabber status via python? Right now I've got this: import xmpp new_status = "blah blah blah" login = 'email' pwd = 'password' cnx = xmpp.Client('gmail.com') cnx.connect( server=('talk.google.com',5223) ) cnx.auth(login, pwd, 'botty') pres = xmpp.Presence() pres.setStatus(new_status) cnx.send(pres) It executes, but the status is not updated. I know I'm connecting to the server successfully, as I can send chat messages to others. What am I doing wrong here? 回答1: You

Getting account 'locked' status in SQL Server

冷暖自知 提交于 2019-12-10 14:56:20
问题 I want to unlock one account in SQL Server. Before unlocking I have to check whether that account is locked or not. I want to unlock only if the account is locked. Is there any SQL query or stored procedure to get the "Locked" status of SQL user? 回答1: Posting Answer on Behalf of Alex K. SELECT LOGINPROPERTY('loginname', 'IsLocked') 回答2: Do you mean a login name that has Login: Denied ? If so you can: SELECT is_disabled from sys.server_principals WHERE name = @loginname 来源: https:/

“untrusted server certificate” on iPhone

两盒软妹~` 提交于 2019-12-10 14:45:44
问题 I am writing an iPhone application and I would like to connect to a 'HTTPS' server to get some information. However, I get the error in the console which is NSUnderlyingError = Error Domain=kCFErrorDomainCFNetwork Code=-1202 UserInfo=0x3e95cf0 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “example.com” which could put your confidential information at risk."; } How can I trust the certificate and get the http status code 200 The

operating printer with php socket programming

青春壹個敷衍的年華 提交于 2019-12-10 11:27:21
问题 How can I operate printer with socket program only. As I tried cups, IPP with php, and printer_open function in windows but my concerns is not to depend on platform like Linux, window etc. it should be platform independent. Below is the code which is creating socket to printer. Code is not optimized but it is successfully printing the text. Only problem is that I am unable to check the printing job status. <?php $host = "printer_ip"; $port = 9100; //default listening port for printer $message

Get posts on a friend's wall using the Facebook API

一笑奈何 提交于 2019-12-10 10:12:21
问题 I'd like my Facebook app to take the ID of the user using the app, and find posts made by that ID on the wall of one of their friends (I'd prefer an example with an individual ID rather than iterative through all friends). I figure there's a good possibility that both users will have to provide permissions to the application to do this, and that's fine. I would prefer posts made directly on another user's wall, as well as any comments made on the target user's status updates / own wall posts.

collect2: Ld returned 1 exit status build make error

落花浮王杯 提交于 2019-12-10 06:18:17
问题 Compiler: Qt Language: C++ This program is just not for me haha, this is the third time I've had to ask for help, and it's driving me crazy (thank you everyone for being so patient and helpful with me) I tried running my program (again for the millionth time) Since I can't get the ostream sorted out, I commented out all the cout functions in my main so I could deal with the rest of my code. But when I try to run it I get collect2: ld returned 1 exit status in my build issues. I switched to

How to get notification authorization status in swift 3?

北慕城南 提交于 2019-12-08 15:07:14
问题 How can I check UNUserNotificationCenter for current authorization status in iOS 11? I've been looking for a while and found some code but it's not in swift 3 and some of functions were deprecated in iOS 10. Can anyone help? 回答1: Okay I found it: let center = UNUserNotificationCenter.current() center.getNotificationSettings { (settings) in if(settings.authorizationStatus == .authorized) { print("Push authorized") } else { print("Push not authorized") } } code by: Kuba 回答2: When getting the

iPhone/iOS Status bar not hiding in Xcode project

两盒软妹~` 提交于 2019-12-08 14:56:11
问题 Hi I have tried the following but am unable to remove the status bar from my application: Set status bar is initially hidden to YES in plist 'Hide during application launch' to ticked in Project General settings Set status bar to 'none' in the interface builder file controlling view controllers Set [UIApplication sharedApplication].statusBarHidden = YES; in app delegate. All these used to work fine in the 100 applications I did before but I made a recent xcode upgrade.. Is there some other

Facebook Graph API, how to get facebook online friends list? [duplicate]

末鹿安然 提交于 2019-12-08 11:42:33
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Facebook online friend I am using the Facebook Graph API and I was wondering if there was anyway to get a list of all the users and their current online-status (i.e Online or Offline) in one call? Now i'm able to get list of users from Hash book Example, in that return JSONArray don't have any object related to this online-status. EDIT : now i'm using this query for getting friends list query = "select name,

iOS 7 Status Bar Turns Black When Overriding UINavigationBar

人走茶凉 提交于 2019-12-08 08:19:17
问题 I am subclassing the UINavigationBar so that I can override the drawRect method. However, when I do so in iOS 7, the status bar becomes completely black. No text at all. In iOS 6 it doesn't have that problem; the status bar is where it should be. - (void)drawRect:(CGRect)rect // status bar goes pitch black { [super drawRect:rect]; } If I comment out this method, the status bar returns. How can I get the status bar back? UPDATE Apr 15, 2014 I tried to set the status bar to something else using