w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
ShareThis shares an incorrect URL
ShareThis has a tweak where you can add: expr:st_title='data:post.title' expr:st_url='data:post.url' to each button, forcing the share buttons to share the link in the post instead of the link in the broswer. The code would look something similar to this: < span class='st_twitter_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> < span class='st_facebook_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> < span class='st_googleplus_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> < span class='st_linkedin_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/> That should also solve the image issue too.

Categories : Misc

Offer discount if user shares my app
According to the Google+ buttons policy: "Publishers may not promote prizes, monies, or monetary equivalents in exchange for Google+ button clicks." You probably should not be incentivizing users to perform shares.

Categories : Android

samba shares seen in windows, but cannot connect
Add the following to your [global] section: guest account = nfsnobody map to guest = bad user And your public share could look something like: [Backups-Rhonda] path = /raid1/rhonda writable = yes guest ok = yes public = yes force user = root force group = root create mask = 666 directory mask = 666 security mask = 666 force create mode = 666 Make sure to restart the samba service.

Categories : Misc

Groupwise shares in R data frame
Assuming mydf is your dataframe, you can use: mydf$VALUE/ave(mydf$VALUE,mydf$FAC1,FUN=sum) An example, since you haven't given us data: mydf <- data.frame(FAC1=rep(letters[1:3],each=3),VALUE=sample(1:10,9)) mydf$SHARES <- mydf$VALUE/ave(mydf$VALUE,mydf$FAC1,FUN=sum) > mydf FAC1 VALUE SHARES 1 a 6 0.3529412 2 a 8 0.4705882 3 a 3 0.1764706 4 b 4 0.1904762 5 b 10 0.4761905 6 b 7 0.3333333 7 c 2 0.2500000 8 c 1 0.1250000 9 c 5 0.6250000

Categories : R

How to get shares count for a Photo in Facebook?
Instead of GET /ID use GET /POST_ID to get the shares count (if >1). You'll get the result as- "shares": { "count": x } Note- the Post ID is generally: USERID_PHOTOID ORPAGEID_PHOTOID

Categories : Facebook

curl on a page which shares url with other pages
If all of your Box activity occurs within your admin account then you shouldn't need to log users in at all. You can simply store the access/refresh token pair for your admin account and use this to authenticate your Box requests. If you are touching another user's data, then automating button clicks during the OAuth login/authorization process is really not cool.

Categories : PHP

Unable to connect to windows shares
I'm not sure if this helps in your case, but it works for me: The 3rd parameter to the SmbConnection should be (I think) the client_machine_name, so I pass there what I get from socket.gethostname(). I'm not using the sign_options and is_direct_tcp I just leave the default values. This works for me with both samba and windows shares (I just have to pass a different port number sometimes). Here is the code I use: class Smb(object): def __init__(self, username, password, server, share, port=139): # split username if it contains a domain (domainusername) domain, username = username.split('\') if username.count('\') == 1 else ('', username) # setup data self.domain = str(domain) self.username = str(username) self.password = str(pas

Categories : Python

Shares from facebook fan page to show 'via' appname
That will be done when the shares are actually done by your real app. You cannot add 'via my_app_name' on your own. For example: If you play a level on Angry Birds, and get a new high score. It will be saved there and the app name will be saved, or when you upload or post a new content on Twitter or Tumblr, you will see that there is the name of app too. Otherwise facebook just lets you edit your 'feeling...' 'in...' 'with...' but not 'via...'. Create an app: You can create the app, and then use it to share content! You can check out there developer documents to let your app share content from web or facebook on your timeline! This way, users will see your content being shared 'via my_app_name'. Bravo! Once done! It will automatically do the job for you to show the 'via...' thing. E

Categories : Facebook

An answer to the 'how to get Facebook shares and likes of some URL ?' questions
To get likes and shares counts, I use FQL instead of the Graph API (even though I am actually using the Graph API to send the query). But this is not enough : to be able to do so, I had call the rawurlencode() function on the URL I want to get data about. Otherwise, I'll keep getting errors. So, this likes(), the function I am using to have the counts : function likes($url) { $url = rawurlencode($url); $json_string = file_get_contents("http://graph.facebook.com/fql?format=json&q=SELECT%20share_count,%20like_count%20FROM%20link_stat%20WHERE%20url='$url'"); $json = json_decode($json_string, true); if (key_exists("data", $json)) { if (is_array($json["data"])) { if (array_key_exists("0", $json["data"])) { return intval($json["data"]

Categories : PHP

How to query for the number of shares of a Facebook event URL?
Well, I believe you can't get this until you are the owner of this post. If you were the one who created this post on facebook or one of the admins of the page which is linked to (http://www.facebook.com/events/385623724876261) event then you would get the shares count. Try fetching the information from the admin's access token or the one who created this event. If that doesn't work out for then the last thing you can do is try fetching this piece of information from page access token (which belongs to a page). Let me know if you are still not able to get this piece of information even after trying with Post Owner's token, Admin's token and lastly Page Access token. Cheers, Reno Jones

Categories : Facebook

Is it possible to show combinined social likes & shares?
I would suggest you to look into Sharedcount api if your requirements are not to get Live data every time, this works greate in Jquery. You can also make individual request to each api(Via PHP, as google and twitter does not allow Cross Domain) - create a wraper class call, this will calculate individual counts over you server. Similar Implementation - http://www.saladappstore.com/page/social-analytics

Categories : Javascript

Retrieve 'date and time' for Facebook shares and likes?
Sorry, but what you want to achieve is just not available through the present Facebook APIs. The data regarding to likes and shares that you can retrieve about the post is just limited to array of likes with just id and name and shares array with count

Categories : PHP

Running unit tests in VS2012 from network shares / within VM
Used task manager to see what process was running the tests and found it was vstest.executionengine. Found the relevant config file "vstest.executionengine.x86.config" and added the following to the <runtime> section <loadFromRemoteSources enabled="true"/> Visual Studio 2012 C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDECommonExtensionsMicrosoftTestWindow Visual Studio 2013 C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDECommonExtensionsMicrosoftTestWindow

Categories : C#

Python/Facebook-SDk How to get shares count for a photo posted on a page
You need to use the post id which should be of the form pageid_postedid. For example for this photo https://www.facebook.com/photo.php?fbid=10151690351123254&set=a.100690783253.87226.80329313253&type=1&theater The id of the photo is 10151690351123254 The id of the page is 80329313253 The post_id is 80329313253_10151690351363254 So then you can request the shares as 80329313253_10151690351363254?fields=shares { "shares": { "count": 4435 }, "id": "80329313253_10151690351363254", "created_time": "2013-06-19T18:02:31+0000" } Or in your case in Python something like fb.request(path='/80329313253_10151690351363254', args={'fields': 'shares'})

Categories : Python

Java - sending a message to WebSphere message broker and its altering my message
How are you reading the message after it is received? are using readUTF method? If you have used writeUTF while sending a message, then you must use readUTF method retrieve the message body after receive. The "n" could actually be the length of the XML message as, in UTF string, the first two bytes indicate the length of the string that follows.

Categories : Java

Message queue with GLIB {issue in receiving message back after posting}
There's an awful lot of copy/paste of the GQueue API, mixed with some new functions using a "channel" parameter, but named the same way as real GQueue functions, which is a terrible idea. Finally, it seems the error is at the very end of the block of code you gave us. You call PendMessageQ, but you have posted no data in that queue. Hence, you try to get pop a value from that queue, but only get a NULL pointer, which you try to copy. And you get a segmentation fault in the memcpy for that. Next time, use a debugger to find that out, and please provide a code that compiles, which was not the case here.

Categories : C

Vim print diagnostic message into message buffer AND prevent "press Enter to continue" prompt
Well, this is cool. I looked at this documentation: :echo-redraw A later redraw may make the message disappear again. And since Vim mostly postpones redrawing until it's finished with a sequence of commands this happens quite often. To avoid that a command from before the ":echo" causes a redraw afterwards (redraws are often postponed until you type something), force a redraw with the :redraw command. Example: :new | redraw | echo "there is a new window" The undesired prompting is really Vim trying to be nice, so if we just tell it what we want, everyone's happy! Applied it to the plugin (redraw | echom ...) and it works a charm.

Categories : Vim

Showing message from "return json(message)" of action in previous jquery dialog after posting its form
You need to use preventDefault first inside the click handler, otherwise the default action (submitting the form) will proceed. $("#SubmitButton").click(function (e) { e.preventDefault();

Categories : Javascript

PHP mail returns true (Message accepted for delivery), but the message is not sent
That isn't all of the information from mail.log. You're seeing that the local server did accept your email, but it doesn't mention trying to send that email off to GMail. You could check the mail that is queued for delivery with $ mailq from the commandline. Chances are there are a few more lines in that log file with more information though.

Categories : PHP

How do I send a message to a WSO2 Message Broker from a Node.js client
WSO2 Message Broker supports Advanced Message Queuing Protocol (AMQP) v0.91. I haven't tried this myself, but you should be able to use a Node.js client to connect with WSO2 MB. See amqp.node project at GitHub. You can connect with WSO2 MB using the AMQP connection URL. See the "Sending and Receiving Messages Using Queues" doc to understand how AMQP connection URL can be specified to connect with WSO2 MB. I hope this helps! Thanks!

Categories : Node Js

Include pre-encoded protocol buffer message within outer message
There is no a clean way, but there are a few hacky ways. One is to define a second message like this: message RawOuter { repeated bytes inners = 1; // ... same fields as Outer ... } RawOuter is identical to Outer except that the inners repeated field has been changed from type Inner to type bytes. If you populate inners with the encoded instances of Inner, then serialize the RawOuter, you get exactly the same result as if you had built an Outer with the parsed verisons. That is to say, the wire format for a nested message is identical to the wire format for a bytes field containing the serialization of that nested message. This is one of those funny exploitable quirks of the protobuf encoding. This hack has some problems, though. In particular, it doesn't work well if you'

Categories : C++

Spring form binding - use IllegalArgumentException message as error message
You might want to check BindingErrorProcessor used by WebDataBinder. There you can implement your own custom logic for translating exceptions to validation errors. Notes: You should implement your own exception (to be able to distinguish it from IllegalArgumentException thorwn by other components). You can initialize WebDataBinder with your custom BindingErrorProcessor within your @InitBinder method (or set specific WebBindingInitializer to your handler adapter).

Categories : Spring

UInavigationcontroller Global Alert Message (like WhatsApp incoming message)
UINavigationBar is a subclass of UIView, so you can add subviews to it. And you can access it via the navigationController property on any of the view controllers or from wherever you have the UINavigationController retained. Just add your notification subview and remove it after a delay.

Categories : IOS

SMS Message with multiple recipients - Android message sending limit
Multiple recipients count as multiple SMS messages and will add to your quota. Basically you dispatch a message for each recipient, and this discussion suggests that this limit seems to be imposed the SMSDispatcher.

Categories : Android

UIAutomation - Check the message in Alert and compare it with expected message
You're so close! You've got the parentheses and brackets backward in your line. Do it this way: target.frontMostApp().alert().staticTexts()[1].value(); That way, you are calling the staticTexts() method on the alert to get the element array and then using the bracket syntax to get the second element.

Categories : IOS

MVC 4 "Bug" Parameter Object Named "Message/message" will not be Deserialized
I guess you have a property called Message on your UserValidation class. This confuses the model binder because it first tries to match the posted values with the parameter names and only after that it moves to match the properties of the complex parameter types. In your case it sees a Message key in your posted data so it tries to match your whole UserValidation message parameter which will fail so the whole binding process stops and you get the null. I've only found some unofficial mentioning of this "feature": Default Model Binding: ActionMethod Parameter name must not equal Model Property name? MVC3 - Model Property Name and Action Parameter Name - Fight! So just use a different parameter name and it will work fine.

Categories : C#

Creating a File-Like Object from email.message.Message
cStringIO was made specifically for this purpose. You can use StringIO if you need multiple encoding schemes,but cStringIO is MUCH faster. Example usage: import cStringIO test = cStringIO.StringIO() test.write("test") test.getvalue() >>> "test"

Categories : Python

How in c++ create message similar to snprintf and just change value in message?
The "canonical" C++ way is to use stringstream, something like this: std::string somefunc(int number) { std::stringstream ss; ss << "You need " << number << " more coins"; std::string str = ss.str(); return str; }

Categories : C++

Posting BASE64 image and message via js API message is not UTF-8 encoded
We are posting a BASE64 image to a user album together with a status message No, you're posting the decoded binary data. Don't do that. Get rid of this line: imageData = Base64Binary.decode(encodedPng); and instead upload encodedPng as base64 data. Assuming the API is designed to handle base64 data, it should be fine. If it's not, and you really do need to upload the binary data, you shouldn't try to do that using form-encoded text.

Categories : Javascript

Is it possible for a message producer to get acknowledgement of message receipt from activemq?
Hope this would help to resolve your concern http://wso2.com/library/articles/2013/01/jms-message-delivery-reliability-acknowledgement-patterns/

Categories : Wso2

protobuf message holding reference to another message of same type
I think this would do the trick: message Player { required string handle = 1; repeated Player neighbors = 2; } I compiled the definition with protobuf-c and it seems to be working.

Categories : C++

Extract Message-id from Message Header Grails
The message id is the first element of a mail header. So a way to achieve this is to output the e-mail content in a String and then extract the message-id using a regex (example done in Java but you can do the same using Groovy regex). String id; String mailToString; Pattern p = Pattern.compile("Message-ID: <(.*)>"); Matcher m = p.matcher(mailToString); if(m.find()){ id = m.group(); }

Categories : Java

Typed in message breaks when receiving a message
You have to approach the problem as a concurrent problem. In your case, the console is a shared resource and what is happening is that the thread of the receiver is using it while is still "taken" by the sender. You can add a lock that protect the print statements, you can find details about it here: http://docs.python.org/2/library/threading.html#lock-objects

Categories : Python

Create a batch script to find the error message from output file, if error message found it has to run a java program
you can try this: find /i "ERROR" pdm_webstat.txt >nul 2>&1 && ( echo "ERROR" found REM run your Java program here ) || ( echo "ERROR" not found REM command if "ERROR" not found )

Categories : Batch File

PHP: Comment reply system with quotes. How can I display the parent (quoted) message to the child (reply) message
<?php $first_comment = new stdClass; $first_comment->cid = '1'; $first_comment->message = 'this is the first message'; $first_comment->parent = '0'; $second_comment = new stdClass; $second_comment->cid = '2'; $second_comment->message = 'this is the second message'; $second_comment->parent = '0'; $third_comment = new stdClass; $third_comment->cid = '3'; $third_comment->message = 'this is a reply to the first message'; $third_comment->parent = '1'; $comments = array ($first_comment, $second_comment, $third_comment); //print_r($comments); foreach ( $comments as $c ) { if($c->parent != 0) { echo "#". $c->cid . " ". $comments[$c->parent-1]->message . " "; echo $c->message; } else { echo "#". $c->cid . " ". $c->message .

Categories : PHP

ArgumentError: An SMTP To address is required to send a message. Set the message smtp_envelope_to, to , cc, or bcc address
The error message is not about the SMTP envelope, but about the sender: An SMTP To address is required to send a message the rest is just a generic message. Something in your testmail@mymailaddress.com is not working. Do you use a real, working address? If not, try with one.

Categories : Ruby On Rails

Can not catch over >1000 message when server send over 1000 message at a time nodejs udp
Node.js is subject to the limitations of the underlying operating system. The operating system puts limits on the number of outstanding handles that can be concurrently held by a process. It's likely that you're exhausting the number of available file descriptors. I recommend using connection pooling to reduce the number of file descriptors that your applications attempt to consume. So instead of trying to send 1000 things at once, limit your program to a pool of say 100 connections at a time. There are several connection pooling libraries available through npm - one popular choice is poolr.

Categories : Node Js

Parsley.js - Messages (data-error-message and data-type-number-message)
You should be using data-required-message instead of data-error-message for the "Port is required" message. Also, you may want digits instead of number if this is for a port-number field.

Categories : Validation

Does a win32 application have one message loop? Or is it one message loop per window?
From About Messages and Message Queues: Applications with multiple threads can include a message loop in each thread that creates a window. Note that a messsage queue CAN support multiple windows... The second parameter of GetMessage is the handle of the window you want to watch messages for. If NULL then all the windows of the thread. As a second note, it is possible to create a message queue without windows (at least from Windows 2000 onward). It is described in the documentation for PostThreadMessage: In the thread to which the message will be posted, call PeekMessage as shown here to force the system to create the message queue. PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE)

Categories : C++

Public Message Queue Exception : Message Queue Exception : Queue does not exist or you do not have sufficient permissions to perform the operation
Thanks to Brain, after his comment, I checked the security options on MSMQ, then I recognize that even if the users has permission to access, the computer accounts has not! When I gave access permission to computer accounts, application run well.

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.