On textboxes in Android, onLongClick reveals a contextual menu that has the copy/paste methods. Is there any way to add another option (say, "copy to [insert application here]")?
It's trivial to do it within my application's contextual menu because I can just override onLongClick. My "copy to [insert application here]" method, however, would only work in my app's contextual menu; not in the default messaging's text selection contextual menu, for example.
Thanks!
Update Date: 2012-05-20 17:08
Searched Times: 0
I'm trying to create an abstraction where I can listen to change events of a redis collection and have the key, value passed into a callback. I was wondering if it would be possible to do this with Lua scripting on the newer versions.
Thanks!
Update Date: 2012-05-20 17:07
Searched Times: 0
I'm trying to get Facebook to publish a read action using php but I've coded it wrong totally and need a little help:
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
<?php
curl -F 'access_token=MY ACCESS TOKEN' \
-F 'article=echo 'echo curPageURL();' \
'https://graph.facebook.com/me/news.reads'
?>
The second part is that bit I can't translate into PHP properly. I've no idea where to start as I'm a novice with php and only just learning the Opengraph API.
Update Date: 2012-05-20 17:07
Searched Times: 0
I have a custom XML file that configures a monitor in a webpage.
<monitor name="My Monitor" refresh="600" style="SideBySide">
<description>Example of two monitors displayed side by side</description>
<widget name="MyFirstWidget" style="TableStyle1"/>
<widget name="MySecondWidget" style="TableStyle2"/>
</monitor>
In my Monitor.aspx page, the above xml file is parsed (according to the name of the monitor passed in the query string) and the final Page is rendered.
The SideBySide stylesheet will apply to the entire page because it is part of the monitor. In my code I inject it into the page <head>.
For each widget (which are UserControls), I also inject the style into the <head>, however, at the moment both MyFirstWidget and MySecondWidget styles will affect each other because they are both global in scopr. This is not what I want, I need the styles to be totally independent.
Can anyone think of a way to do this is a generic way. ie, the styles will be used for many different widgets therefore I can't had code anything in the stylesheet that would apply only to a particular widget.
Update Date: 2012-05-20 17:06
Searched Times: 0
So here is my first ultra beginner computer programming question in C.
I need to set it up so that someone can type in their full name on the input. Here is part of the specs -
"You'll have to do a little thinking to figure out how to get the printed names lined up with all the other columns. The first hint is that it involves joining strings together, something called concatenation. Give it a go, and if you can't figure it out, look at the next document in this folder; it contains additional hints. Part of the purpose of this assignment is to implicitly teach you concatenation. Do NOT use tabs (\t) and make sure your C/C++ editor does not produce tab characters.
Do NOT use gets() in this program. Use scanf() for inputting the interactive information. If you try to use gets(), you may get VERY frustrated.
In essence, all numbers appearing in the report should be right-justified and decimal-aligned. All numbers appearing in the summary should appear without leading spaces (other than the one which normally separates the number from the previous word). Hourly wage amounts CAN be less than 10.00, so be very careful with your formatting. The sample output can appear correct, but you can still be docked a half-point if things don't align properly with hourly wages under $10.00."
Additional hints:
"You may assume that the employee name is always two names, a first name and a last name separated by a space. Also assume that there are never any spaces within a first name or within a last name. This allows you to use two scanf() calls instead of one gets() call. gets() would introduce some oddities that make things not work correctly later down the line.
You may also assume that neither name exceeds 10 characters in length.
The input from the Process another employee? question should be a single character. Assume that N or n will stop the loop, but that any other character will continue the loop."
Anyone know how to do this? When I use gets(which he says not to do), the loop screws up on the 2nd time around and it asks for the name and salary all in one line. And if I try to use 2 scanf statements, I get a crash or only 1 of the names input.
I was thinking the only way to do it is by outputting the names to a text file, then reading them in again. But is there some other way? I'm not allowed to ask for the names individually. A user might type a full name with one space, as it says in the specs.
Update Date: 2012-05-20 17:06
Searched Times: 0