tag:blogger.com,1999:blog-16317745080618712922024-03-05T08:19:07.638-08:00bgoodr's Random Notesbgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-1631774508061871292.post-6764742859196118012015-02-28T23:05:00.000-08:002015-02-28T23:07:27.213-08:00How to fix AT&T Mobile Transfer problem with Wi-Fi blocking phone to phone transfers<br />
I recently switched cell phone carriers to AT&T so as to upgrade my aging Android smart phone to a newer model. When at the store, the sales rep installed their Android app called AT&T Mobile Transfer (<a href="https://play.google.com/store/apps/details?id=com.att.mobiletransfer">Google Playstore Link</a>) on my old phone and on the new phone and began a transfer of data from old phone to the new phone. Since I had a lot of data on my old phone, we cancelled the transfer, so that I could continue the transfer from my Wi-Fi network at home.<br />
<br />
However, when I got home and connected both phones to my Wi-Fi network, and attempted the transfer again, the app running on the new (receiving) phone displayed the following error:<br />
<blockquote class="tr_bq">
<br />
Connection Issue<br />
Cannot connect. Your Wi-Fi provider<br />
is blocking phone to phone transfers. Please choose a different<br />
Wi-Fi and try again.</blockquote>
<br />
Here is a screenshot of that error:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3j5PnOtgy7eqh1HfEPrShE2z9NAdrbvv9fI40N2cWxHQV2XGA-OESSt2QnSKfJwP7N2qFhxAUukdWZjykUd3aVDBbR0FV7Za-taMd8u9jW-DxEOJcamsZVcevwSst3i1aTq3p9manmYj/s1600/Screenshot_2015-02-28-21-15-39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3j5PnOtgy7eqh1HfEPrShE2z9NAdrbvv9fI40N2cWxHQV2XGA-OESSt2QnSKfJwP7N2qFhxAUukdWZjykUd3aVDBbR0FV7Za-taMd8u9jW-DxEOJcamsZVcevwSst3i1aTq3p9manmYj/s1600/Screenshot_2015-02-28-21-15-39.png" height="266" width="320" /></a></div>
<br />
I called the AT&T technical support. The technical support rep said that the Wi-Fi should be configured for peer-to-peer connections. My router is a NETGEAR Genie Nighthawk R7000, and so I first looked at the UPnP setting, and found that it was selected. So both the technical rep and I were puzzled by why this would not work.<br />
<br />
After I got off the phone, I dug a bit more in the configuration and discovered that there is a Guest Network page that has an option:<br />
<br />
<blockquote class="tr_bq">
Allow guests to see each other and access my local network</blockquote>
<br />
The normal wireless network I have configured (not this so-called "Guest Network") <b>does not have</b> this setting.<br />
<br />
When I enabled the Guest Network, and connected both phones to this network, but <i>without</i> enabling the above option, I still got the error message. But when I enabled the above option and reconnected the phones to the Guest Network the error message went away and the transfer started.<br />
<br />
This fixes the immediate problem, but it is quite puzzling that this special option was <b><i>only</i></b> available on the Guest Network, and apparently there is no way to enable this on the other "networks" in this router.<br />
<br />
Below is a annotated (side-note: using the handy <a href="https://addons.mozilla.org/en-US/firefox/addon/nimbus-screenshot/?src=api">Nimbus Screenshot Firefox Extension</a> ) screenshot of the NETGEAR Setup/Guest Network page where the above option is to be found:<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuShenVg0wFGsxePtuE4St-EPFW-RoVxRamTqrcYb2dsKr19lXktpEcPQrKl75EWIN8sQ9jyd2TwNP1JyEhUc_R2F-Yc29l5W4co48iQ9CSCb5nnHKWwPB14vrD6ARBCQVvY5ipA66lu9V/s1600/screenshot-192+168+1+1-2015-02-28-22-16-49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuShenVg0wFGsxePtuE4St-EPFW-RoVxRamTqrcYb2dsKr19lXktpEcPQrKl75EWIN8sQ9jyd2TwNP1JyEhUc_R2F-Yc29l5W4co48iQ9CSCb5nnHKWwPB14vrD6ARBCQVvY5ipA66lu9V/s1600/screenshot-192+168+1+1-2015-02-28-22-16-49.png" /></a></div>
<br />
<br />
<br />
<br />
Router <span class="desc">Firmware Version was: V1.0.4.18_1.1.52</span><br />
<br />
<br />bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com3tag:blogger.com,1999:blog-1631774508061871292.post-27042774449222489222013-03-02T09:28:00.000-08:002013-03-02T09:28:04.998-08:00How to switch from Google+ Photos back to Picasa Web Albums Looking for how to find the secret link to a photo inside Google+ photos? This is what I found:<br />
<br />
The Google+ view of the Photos did not allow me to find the secret link to a given photo within an album. The other interface which I believe is called Picasa Web Albums does. <br />
<br />
Here is how to get back to the original Picasa Web Albums interface that has that feature: Use this special link to display the Picasa Web Albums interface, not the Google+ interface:<br />
<br />
<a href="https://picasaweb.google.com/lh/myphotos?noredirect=1">https://picasaweb.google.com/lh/myphotos?noredirect=1</a><br />
<br />
Here is I stumbled upon it:<br />
<br />
<ol>
<li>Login to your Google Account.</li>
<li>Go to <a href="http://support.google.com/picasa/answer/157000?hl=en&ref_topic=1689652">http://support.google.com/picasa/answer/157000?hl=en&ref_topic=1689652</a> </li>
<li>Scroll down until you see "Picasa Web Albums". </li>
<li>Notice it says "Looking for a simple way to get photos from your camera and computer on
the web? Google's Picasa Web Albums provides 1GB of free storage that
makes sharing your photos a snap. Visit <a href="http://picasaweb.google.com/" target="_blank">http://picasaweb.google.com</a>."</li>
<li>Click on <a href="http://picasaweb.google.com/" target="_blank">http://picasaweb.google.com</a>.</li>
<li>Wait for a little bit. At the top of the page that is loaded you will see a message that <span style="background-color: yellow;">disappears after a few seconds/minute</span>: "Click <a href="https://picasaweb.google.com/lh/myphotos?noredirect=1">here</a> to go back to Picasa Web Albums". A screenshot is shown below.</li>
<li>That link goes to <a href="https://picasaweb.google.com/lh/myphotos?noredirect=1">https://picasaweb.google.com/lh/myphotos?noredirect=1</a>.</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBYHrw6gv45EVvvu1JSIL7gvBIgryZSgD7WCkQ0lD_Ch0p5KGVJFlFCsGSxnFf8rEqlRH8SCOG8Q1Ak-igypurtFehnhC3yqfxZQUPMUvH1FChAwdemQuOgveEUC1e8PK-1iwF2qYyCvPS/s1600/screenshot.1925.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBYHrw6gv45EVvvu1JSIL7gvBIgryZSgD7WCkQ0lD_Ch0p5KGVJFlFCsGSxnFf8rEqlRH8SCOG8Q1Ak-igypurtFehnhC3yqfxZQUPMUvH1FChAwdemQuOgveEUC1e8PK-1iwF2qYyCvPS/s1600/screenshot.1925.png" /></a></div>
<br />
<ol>
</ol>
bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-30307984320252544142013-01-26T12:31:00.001-08:002013-01-26T12:55:14.462-08:00RaiiCaps with GCC: error: cannot declare ‘::main’ to be a templateThe idea of the raiicap class is described at
<a href="http://minorfs.wordpress.com/2013/01/18/raiicap-pattern-injected-singleton-alternative-for-c/">RaiiCap pattern: Injected Singleton alternative for C++</a>. However, the
version of GCC I am using is affected by a bug (<a href="http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01512.html">[Bug c++/24449] Unable to declare friend main() from class template</a>) that prevents using the raiicap idea directly without code modifications.<br />
<br />
Below is an attempt at a workaround:<br />
<br />
<script class="brush: cpp" type="syntaxhighlighter"><![CDATA[
#define MAIN_IS_THE_FRIEND
#ifdef MAIN_IS_THE_FRIEND
int main(int argc, char *argv[]);
#else
int mainSurrogate(int argc, char *argv[]);
#endif
template <typename T>
class raiicap {
public:
#ifdef MAIN_IS_THE_FRIEND
friend int main(int argc, char *argv[]);
#else
friend int mainSurrogate(int argc, char *argv[]);
#endif
private:
raiicap(){}
};
class Resource {
private:
int _memb;
public:
Resource(raiicap<Resource> const &) :_memb(24) {
_memb--; // <-- do something with some resource here
}
};
#if ! defined(MAIN_IS_THE_FRIEND)
int mainSurrogate(int argc, char *argv[])
{
// ... Process argc/argv here ...
raiicap<Resource> instcap;
Resource inst(instcap);
return 0;
}
#endif
int
main (int argc, char *argv[])
{
#ifdef MAIN_IS_THE_FRIEND
raiicap<Resource> instcap;
Resource inst(instcap);
return 0;
#else
return mainSurrogate(argc, argv);
#endif
}
]]></script>
When <span style="font-family: "Courier New",Courier,monospace;">MAIN_IS_THE_FRIEND</span> is defined above, we fail the compile on GCC (version 4.6.3) with:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> /usr/bin/g++ -g -fPIC -Wall -Werror -Wsynth -Wno-comment -Wreturn-type test.cpp -c -o test.o</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> test.cpp:13:41: error: cannot declare ‘::main’ to be a template</span><br />
<span style="font-family: "Courier New",Courier,monospace;">
make: *** [test.o] Error 1</span><br />
<br />
But if we
undefine <span style="font-family: "Courier New",Courier,monospace;">MAIN_IS_THE_FRIEND</span> then the
compile succeeds.<br />
<br />
This may or may not prevent malicious intent: In practice, these classes
will likely be defined in header files, which can be included in other translation units, and exploited. For instance, it might still be possible for someone
to define their own file static version of <span style="font-family: "Courier New",Courier,monospace;">mainSurrogate</span> in
their own translation unit, and use it in that other translation unit to instantiate instances of
<span style="font-family: "Courier New",Courier,monospace;">Resource</span>. However, this may just be
enough to keep the majority of developers within the bounds of the original intent.
bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-76875701615845383452012-10-06T20:46:00.000-07:002013-01-06T10:09:04.316-08:00Gmail RTM BookmarkletI am evaluating the <a href="http://www.rememberthemilk.com/">Remember
The Milk</a> task management system. They have a <a href="http://www.rememberthemilk.com/help/answers/quickadd/firefox.rtm">bookmarklet</a>
that does not provide (as of 2012-10-06) a way to record the URL of
the page the task was added from. I played around with the
mobile versions of the bookmarklet posted to <a href="http://www.rememberthemilk.com/forums/tips/3133/">Using the
mobile Add as a generic Quick Add tool including all fields</a> forum
thread and could not get it to work. So I based my own on a modified copy of the original <a href="http://lifehacker.com/190122/gmail-this-bookmarklet">Gmail
This!</a> bookmarklet and edited it to create a message body with the
fields I needed, including the URL off the current web page. <br />
<br />
This bookmarklet opens up a new Gmail compose window and adds the required info to the body of the message. It appends a note for both the document title and the
current selection. You can then manually add additional
text into that note which is typically what I need to do to provide
extra info about the task.<br />
<br />
I left the Due field blank, as I know I will
have to type that in anyhow. This is different from what the <a href="http://www.rememberthemilk.com/help/answers/quickadd/firefox.rtm">standard
RTM bookmarklet</a> as it expects you to highlight text of a date
and/or time as the Due date.<br />
<br />
This is just GMail compose window, so there is no auto-completion of existing Tags, which is something the original bookmarklet does that mine does not. I don't miss that much as I know what my tags are, which are kept to be short names.<br />
<br />
Here is the bookmarklet text:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">java_script:popw='';Q='';rtmMail='<span style="background-color: yellow;"><span style="color: red;">CHANGE_THIS</span></span>';x=document;y=window;if(x.selection)%20{Q=x.selection.createRange().text;}else%20if%20(y.getSelection)%20{Q=y.getSelection();}else%20if%20(x.getSelection)%20{Q=x.getSelection();}popw=y.open('https://mail.google.com/mail?view=cm&tf=0&to='+encodeURIComponent(rtmMail)+'&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent('T: '+Q+'\n')+encodeURIComponent('D: \n')+encodeURIComponent('U: '+location.href)+encodeURIComponent("\n---\n"+document.title+"\n"+Q+"\n"),'gmailForm','scrollbars=yes,width=680,height=510,top=175,left=75,status=no,resizable=yes');if%20(!document.all)%20T%20=%20setTimeout('popw.focus()',50);void(0); </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span><br />
How to install:<br />
<ol>
<li>Select the text above and copy it to the clipboard (CTRL-C typically).</li>
<li>Right mouse click on the Firefox toolbar, and select <b>New Bookmark</b>.</li>
<li>Select the Link field, and paste the link text (CTRL-V typically).</li>
<li>Remove the underscore character from "java_script".</li>
<li>Change the "<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="background-color: yellow;"><span style="color: red;">CHANGE_THIS</span></span></span></span>" in the pasted text of the bookmarklet to be your <b>Inbox Email Address</b> (see <a href="https://www.rememberthemilk.com/services/email/#inbox%20Inbox%20Email%20Address">How to</a>). </li>
<li>Change the <b>Name</b> field to be GMail RTM.</li>
<li>Click <b>Save</b>.</li>
</ol>
To use, highlight a part of a web page, and click the GMail RTM button on your toolbar. Make any required changes and click Send.<br />
<br />
(The platform and browser version I used: 32-bit Firefox 15.0.1 running
on 64-bit Debian Linux (Testing).)bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com2tag:blogger.com,1999:blog-1631774508061871292.post-70903094121864603732012-05-27T09:56:00.001-07:002012-05-27T09:56:24.042-07:00Raspberry Transplanting Procedure<h3>
Overview</h3>
<div class="content">
<br />
Below is the procedure I followed to transplant raspberries. This is a consolidation of various sources I found on the web (links are included). Primary sources were posts on <a href="http://ehow.com/">http://ehow.com</a>.<br />
<br />
<div class="section">
<h3>
Equipment needed:</h3>
<ul>
<li>Garden gloves sturdy enough to deal with thorny raspberries.</li>
<li>Hand shovel or similar.</li>
<li>Garden shears for cutting the suckers roots.</li>
<li>Garden stakes for locating where the holes will go.</li>
<li>Tape measure to measure off the distances.</li>
</ul>
</div>
<div class="section">
<h3>
Procedure</h3>
<ul>
<li>When to transplant: This should be done in <a href="http://www.ehow.com/how_5175204_propagate-raspberry-plants.html">the 2nd year</a> after the plant has grown. Transplant <a href="http://forums2.gardenweb.com/forums/load/fruit/msg0713391214034.html">raspberry volunteers</a> in April and
May (see <a href="http://forums2.gardenweb.com/forums/load/fruit/msg0920002521367.html">volunteer plants</a>). Dig them up and move them when they have just begun to leaf
out, with a few small leaves emerging. If possible, transplant
during overcast weather, at the beginning of an overcast period, so
the transplant will get 2 or 3 days to develop roots before the sun
comes out. If transplanting during the summer months, use a
sun shade for several weeks to provide the plant with reduced
sunlight.</li>
<li>Locate the destination holes for the transplants
(<a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">Select a full-sun location</a>) by marking them with some stakes. Make
the line east to west to maximize sun exposure during the
summer. Space holes 3 feet apart to prevent the spread of disease,
and rows <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">8 to 12 feet apart</a> (note that one web page said spread
them <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">2 feet apart</a>). Destroy any <a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">perennial weeds</a> growing near the
destination holes including any wild raspberry or blackberry
plants, because they can spread disease to your plants.</li>
<li>After the first frost, <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">in early spring</a>, identify the healthiest red
raspberry plant from which to draw <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">suckers</a>. Look around the base of
the mother plant for suckers (<a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">choose strong suckers</a> with healthy
roots), which are also known as daughter plants: find the
<a href="http://www.ehow.com/how_2277198_raspberry-plants-they-great-gifts.html">off shoots</a> from your main plant or plants that are popping up from
the soil around the main plant. Put garden gloves on, because you
will be working around the red raspberry's thorny canes. Use garden
shears to snip roots that connect the daughter plant to the mother
plant (It may be necessary to <a href="http://www.ehow.com/how_2277198_raspberry-plants-they-great-gifts.html">scoop</a> some of the dirt away to find
the root of the plant). Be careful to preserve a soil ball around
the daughter plant's root system. When you find the roots, dig the
plant out from that point. As you will see, some of the roots are
actually part of your main plant. Go ahead and dig or
<a href="http://www.ehow.com/how_2277198_raspberry-plants-they-great-gifts.html">cut away from</a> those roots, as it will not harm your plants.</li>
<li>Be sure to loosen the soil around and under the raspberry sucker to
remove it from the ground with its roots attached. Raspberry roots
are shallow, growing no deeper than 10 inches. If you drive your
spade into the ground to a <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">depth of 1 foot</a>, you should be able to
take the baby bush out completely with its roots.</li>
<li>Dig out transplant candidates after the <a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">last spring frost</a> and
<a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">submerge their roots</a> immediately in a <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">bucket of water</a> to keep the
roots from drying out (but only if you are not going to transplant
them immediately).</li>
<li>Take care to <a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">remove all old canes</a> from bushes to be transplanted.</li>
<li>Plant one raspberry <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">seedling per hole</a>.</li>
<li>In the destination holes, insure to <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">dig holes as deep</a> as the
daughter roots, and twice as wide as they are deep. Insure that the
holes are large enough so that roots will not be crowded and an
<a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">inch or two deeper</a> than roots were growing previously (see also
<a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">Set plant in a hole</a>).</li>
<li>Fill holes with water and let them drain halfway down.</li>
<li>Use a shovel to <a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">tamp down</a> the soil over the top of the newly
transplanted red raspberry plant, <a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">being sure to cover roots</a>. This
is so that any water remaining in the hole will not leave a
<a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">dry air-space</a> when it drains out.</li>
<li>Trim all canes to <a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">6 to 8 inches long</a> (new small plants created by
<a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">tipping can remain untrimmed</a>). The reason is because
"<a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">trimming back transplants</a> may result in decreased fruiting the
first year but will pay dividends in healthy growth". Check again
that plants are solidly tamped in (i.e., do not leave
<a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">dry air-space</a>s). (An alternative is to <a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">snip off two-thirds</a> of
the cane with garden shears to help encourage root
development. Provide one inch of water. Consider planting at night
to help the plant adapt to its new location.)</li>
<li>Keep soil <a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">consistently moist</a> for at least a week, to help roots
establish in new soil. Continue keeping soil moist during any dry
spells until plants show solid new growth.</li>
<li>Do not immediately stake new plants; they must be trimmed and
<a href="http://www.ehow.com/how_7584736_stake-raspberry-plants.html">allowed to grow</a> new canes first. In fact, since they
<a href="http://www.ehow.com/how_7584736_stake-raspberry-plants.html">do best with a trellis system</a>, do the instructions in
<a href=""> </a><a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">installing a trellis</a> during the summer, or after the plants
grow a bit.</li>
</ul>
</div>
<div class="section">
<h3>
Tips & Warnings </h3>
<ul>
<li>Your transplant should begin <a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">producing berries</a> the following
summer.</li>
<li>To help maintain moisture, <a href="http://www.ehow.com/how_5775886_transplant-red-raspberry-plants.html">reduce weeds</a> and protect against the
harshness of winter, maintain six inches of mulch around your
transplant year round. I ended up using lawn grass cuttings piled up high enough so that the suckers and other weeds cannot grow (just let the yard trimmings decompose around the plant which I believe will act as fertilizer for the raspberry bush).</li>
<li><a href="http://www.ehow.com/how_4969339_transplant-raspberry-plants.html">Trimming back transplants</a> may result in decreased fruiting the
first year but will pay dividends in healthy growth.</li>
<li>The University of Maine recommends <a href="http://www.ehow.com/how_6675876_replant-red-raspberry-plants.html">installing a trellis</a> to support
raspberry canes (They <a href="http://www.ehow.com/how_7584736_stake-raspberry-plants.html">do best with a trellis system</a>). Providing a
place for the canes to climb reduces disease, improves fruit
quality, and makes it easier to harvest the berries.</li>
</ul>
</div>
</div>
<span class="link"><a href=""></a></span>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-44265275344559843952012-05-19T20:47:00.000-07:002012-05-19T20:47:08.773-07:00Batch Image Resizing from the GIMP command-lineThe following TinyScheme (Script-Fu) script resizes one or more image files as specified with a file glob, and writes the resized image files into an output directory:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">(define (scale-to-max-fileglob<br />
file-pattern<br />
out-dir<br />
newmax<br />
)<br />
(let* ((filelist (cadr (file-glob file-pattern 1))))<br />
(while (not (null? filelist))<br />
(let* ((in-file (car filelist))<br />
(image (car (gimp-file-load RUN-NONINTERACTIVE in-file in-file)))<br />
(drawable (car (gimp-image-get-active-drawable image)))<br />
(old-width (car (gimp-image-width image)))<br />
(old-height (car (gimp-image-height image)))<br />
(old-max (max old-width old-height))<br />
(new-width (round (/ (* old-width newmax) old-max)))<br />
(new-height (round (/ (* old-height newmax) old-max))))<br />
;; http://tinyurl.com/7bvura2 states "... because saving undo<br />
;; steps can be time and memory intensive" and so we don't<br />
;; care about undo operations for batch runs:<br />
(gimp-image-undo-disable image)<br />
(gimp-image-scale image new-width new-height)<br />
(let ((out-file<br />
(string-append out-dir<br />
;; Insert a slash character if<br />
;; not already at the tail-end<br />
;; of out-dir:<br />
(if (char=? #\/ (car (last (string->list out-dir))))<br />
""<br />
"/")<br />
;; Take the basename of in-file which may be a fully-qualified path:<br />
(car (last (strbreakup in-file "/"))))))<br />
;; The print function does not show output on standard<br />
;; output, so use gimp-message instead:<br />
(gimp-message (string-append " scale-to-max-fileglob: scaling "<br />
in-file " into " out-file<br />
" with these dimensions: "<br />
(number->string new-width) "x" (number->string new-height)))<br />
(gimp-file-save RUN-NONINTERACTIVE image drawable out-file out-file))<br />
(gimp-image-delete image))<br />
(set! filelist (cdr filelist)))))</span></div>
<br />
Store this into ~/.gimp-2.6/scripts/batch-resize.scm and the definition of <span style="font-family: "Courier New",Courier,monospace; font-size: small;">scale-to-max-fileglob</span> will load into all future gimp sessions.<br />
<br />
<br />
Example run: This was executed using GIMP 2.6 on a 64-bit Debian Linux machine. The "<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">script-fu-Warning</span></span>" is coming from the gimp-message function:<br />
<br />
<span style="font-size: x-small;"><br /></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">user@somehost:/tmp/images_dir$ <b style="background-color: #f4cccc; color: black;">time gimp -i -b '(begin (scale-to-max-fileglob "*.jpg" "outdir" 1000) (gimp-quit 0))'</b><br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-43-42_676.jpg into outdir/2012-05-19_16-43-42_676.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-44-35_210.jpg into outdir/2012-05-19_16-44-35_210.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-41-21_785.jpg into outdir/2012-05-19_16-41-21_785.jpg with these dimensions: 1000x562<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-44-02_760.jpg into outdir/2012-05-19_16-44-02_760.jpg with these dimensions: 1000x562<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-45-34_771.jpg into outdir/2012-05-19_16-45-34_771.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-43-15_141.jpg into outdir/2012-05-19_16-43-15_141.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-42-39_886.jpg into outdir/2012-05-19_16-42-39_886.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-45-13_128.jpg into outdir/2012-05-19_16-45-13_128.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-42-52_376.jpg into outdir/2012-05-19_16-42-52_376.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-41-49_429.jpg into outdir/2012-05-19_16-41-49_429.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-42-08_196.jpg into outdir/2012-05-19_16-42-08_196.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-41-54_552.jpg into outdir/2012-05-19_16-41-54_552.jpg with these dimensions: 562x1000<br /><br />script-fu-Warning: scale-to-max-fileglob: scaling 2012-05-19_16-42-34_497.jpg into outdir/2012-05-19_16-42-34_497.jpg with these dimensions: 562x1000<br /><br /><br /><br />real 0m16.179s<br />user 0m13.229s<br />sys 0m2.236s</span></span><br />
<br />
<br />
<br /><span style="font-family: inherit;">The above code was cobbled together from these sources:</span><br />
<ol>
<li><a href="http://christophercampbell.wordpress.com/2009/02/16/batch-image-scaling-with-gimp/">Christopher Campbell's blog: Batch image scaling with Gimp</a><span style="font-family: inherit;"> </span></li>
<li><span style="font-family: inherit;"><a href="http://c-cpp.r3dcode.com/files/GIMP/2/7.3/plug-ins/script-fu/tinyscheme/Manual.txt">TinySCHEME Version 1.40 Manual</a> is rather skimpy so you may desire to refer to <a href="http://docs.racket-lang.org/reference/index.html">The Racket Reference</a> instead.</span></li>
<li><a href="http://www.gimp.org/tutorials/Basic_Batch/"><span style="font-family: inherit;">Gimp Batch Mode Introduction</span></a></li>
</ol>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-85610830692232762812011-10-08T18:11:00.000-07:002011-10-08T18:11:14.996-07:00Developing Software Productively through selective automationHow do you increase your software development productivity over the long haul? Here's how:
Examine your daily task work to identify tasks that are amenable to automation, and then automate it. For me, this means to do the following:
<br />
<ol>
<li>Maintain a constant awareness of all of your development activities, specifically patterns of behavior or groups of actions that are repeated multiple times throughout the day.
</li>
<li>Of those patterns, identify the ones that are comprised of tasks that do not change regardless of the circumstances.
</li>
<li>Determine if those tasks are amenable to automation (some will, some won't). This excludes tasks that should be delegated to someone else to do.
</li>
<li>Schedule time to encapsulate the tasks in a software routine.</li>
<li>Make executing that routine mindless and effortless, by associating the execution of the routine to a new and unique combination of key-bindings in the main window of the primary editing tool you use (e.g. Emacs, Eclipse, Jedit, etc.).</li>
</ol>
Some may think that the "schedule time" item will eat into their productivity. However, I have found in practice that the time saved by automation will pay for itself over time. But there is one more benefit: Having a machine execute the tasks frees up your mind to think at a higher level of abstraction, in a given project.
Making a task mindless and effortless has the goal of not distracting your mind from the flow of adding, deleting, and moving code around. Any requirement to pull down menus, bring other windows to the front, type in and execute long command lines, etc., are distracting to the mental process of software development and should be gradually eliminated by delegating those tasks to push-button automation.
Therefore, as a software developer, those activities are best done right there in the text editing window itself, to be driven by carefully chosen key sequences that are easy to memorize. Below are some examples of tasks I discovered fit the above criteria, and that I could automate (this is specific to my focus on code development, but they could be generalized for other work domains):
<br />
<ol>
<li>When the cursor is on a full or relative path to a file somewhere on the filesystem, typing a keystroke to open the file in the text editor. Compare that to opening up a new window, moving the mouse cursor into that window, navigating a file browser to find the file or typing in the full path to the file in the file system. Think about how often that task is done in given developers work day.</li>
<li>When the cursor is sitting on a URL, typing a keystroke to open the URL in a browser. Think about how often you need to refer to reference material that is only on some remote web server somewhere.</li>
<li>When the cursor is sitting on a symbol whose definition you need to alter, typing a keystroke to drive your editor to view and edit that definition. Compare that with using a file search to find the definition, and filter out the false positives.</li>
<li>You need to go back to where you started when editing some code, so type a keystroke to go back to the place where you started. The idea here is that each time you navigate to a new view on some source, there is the equivalent of a "back" button in the form of a key sequence. This should be applicable for all types of navigation to some file, symbol, or web page.
</li>
<li>You need to reload your brain with the context after an interruption. The thing being automated away is the time wasted wondering where you left off, or clicking through various windows or views to answer that question. The solution is to track notes of decisions you are making in a searchable set of interlinked note files. This excludes writing them down on paper, since there is no search capability (and filing cabinets and other filing systems are yet another mental distraction). In my case, I use multiple text files that are interlinked (Muse mode in GNU Emacs). This also pays dividends later on when you need to refresh your memory on decisions that were made on the project done months later.</li>
</ol>
bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-56242823375550477822011-10-08T18:04:00.000-07:002011-10-08T18:04:20.875-07:00How to install Adobe Flash plugin versus Gnash under 32-bit FireFox 7.0.1 on Debian Linux<br />
<span style="font-size: large;">Overview</span><br />
<br />
<br />
Herein I show a step-by-step procedure to install
Adobe Flash plugin into Firefox, and remove the Gnash plugin which seems
to be buggy as of 2011-10-08. The version of Firefox I am using here is not the one that is installed using the Debian package manager, but the Firefox I downloaded directly from the Mozilla website.<br />
<br />
Provided below is <b>Procedure</b> followed by the <b>Backstory</b>.<br />
<span style="font-size: large;"> </span><br />
<span style="font-size: large;">Procedure</span><br />
<br />
<ol>
<li>Close down Firefox. </li>
<li>Do <a href="http://www.purpleslurple.net/ps.php?theurl=http%3A%2F%2Fkb.mozillazine.org%2FFlash#purp165">step 165</a> which states: "If you installed via apt-get/aptitude (Debian/Ubuntu): <b>sudo apt-get remove flashplugin-nonfree</b>"</li>
<li>Do <a href="http://www.purpleslurple.net/ps.php?theurl=http%3A%2F%2Fkb.mozillazine.org%2FFlash#purp167" name="purp167"><span style="color: purple;">step 167</span></a>:</li>
<ol>
<li>Type about:config in the address bar and press Enter. </li>
<li>Find the option
plugin.expose_full_path and change the value to "true" (double-clicking
the preference name will toggle the setting).</li>
<li>Type about:plugins and locate the flash plugin </li>
</ol>
<li>If you see the Gnash Shockwave plugin (you will see "gnash" somewhere in the pathname), then you need to continue below and remove it:</li>
<ol>
<li>Remove the gnash plugin from the Debian installation: <b>sudo apt-get remove browser-plugin-gnash gnash-dbg</b></li>
</ol>
<li>Install Adobe Flash plugin:</li>
<ol>
<li>Download the .tar.gz file from the Adobe website specifically for 32-bit Linux (I did this by disabling all Shockwave plugins, then browsing to YouTube, and then clicking on the link to the Adobe website to find the link specifically for Linux).</li>
<li>Into a temporary directory, extract the tarball via <b>tar zxvf thefile.tar.gz</b></li>
<li>Copy the file into ~/.mozilla/plugins/libflashplayer.so, overwriting any file that will be there.</li>
</ol>
<li>Reinvoke Firefox</li>
<li>In the Address field, type <b>about:plugins</b></li>
<li>You should not see any Gnash references under any Shockwave Flash entry </li>
<li>Test it out on a YouTube video:</li>
<ol>
<li>Browse to http://www.youtube.com</li>
<li>Right mouse click on the video and insure it does <u>not</u> say HTML5. If it does, keep looking for other videos that are true flash videos.</li>
<li>Right mouse click on the video and it should say "About Adobe Flash player <version>".</version></li>
</ol>
<li>Test it out on http://www.tfd.com/browser</li>
<ol>
<li>Click on the tiny blue speaker symbol to the right of the "browser" word in the definition. It should pronounce the word.</li>
<li>Right mouse click on the icon and it should also say "About Adobe Flash Player <version>".</version></li>
</ol>
</ol>
<br />
<span style="font-size: large;">Backstory</span><br />
<br />
I am using the Firefox version 7.0.1 that was downloaded directly from the Mozilla website, and not the one provided by Debian (i.e., I did not want the one rebranded as Iceweasel). I did this because I want to be able to upgrade Firefox using the
built-in Firefox upgrade mechanism versus be held up by the Debian
release schedule.<br />
<br />
<br />
<br />
<br />
I had recently upgraded my 32-bit laptop to use a recent version of Debian. I reused my existing Firefox installation that was installed into my HOME directory. Everything was working smoothly, until today when I discovered that clicking on the pronunciation icons for definitions inside the <a href="http://www.tfd.com/">http://www.tfd.com</a> site no longer played the pronunciation links, but Flash YouTube videos would play properly. This post shows what I did to fix the problem.<br />
<br />
This post pertains to Firefox 7.0.1 and not Iceweasel running on a 32-bit Debian system.<br />
<br />
From what I can gather, the main problem was that the gnash package was being used as the Shockwave Flash player and not the Adobe Flash player plugin. Why Gnash could not handle <a href="http://www.tfd.com/">http://www.tfd.com</a> I do not know.<br />
<br />
I discovered that there were two different kinds of flash plugin being referenced in my Firefox sessions. This may not be the underlying cause of the problem, but having both in the mix seemed wrong in concept, so this shows how I removed the Gnash plugin from my system, and install the latest version of Adobe Flash plugin.<br />
<br />
The key trick is to <a href="http://www.purpleslurple.net/ps.php?theurl=http%3A%2F%2Fkb.mozillazine.org%2FFlash#purp167" name="purp167"><span style="color: purple;">step 167</span></a> which states (grammar editing applied):<br />
<blockquote>
<ol>
<li>Type about:config in the address bar and press Enter. Find the option
plugin.expose_full_path and change the value to "true" (double-clicking
the preference name will toggle the setting).</li>
<li>type about:plugins and locate the flash plugin. </li>
</ol>
</blockquote>
I saw two flash plugins be displayed from the about:plugins page:<br />
<blockquote>
Shockwave Flash<br />File: <b><span style="background-color: yellow; color: red;">/home/brentg/.mozilla/plugins/libflashplayer.so</span></b><br />Version:<br />Shockwave Flash 11.0 r1<br />MIME Type Description Suffixes<br />application/x-shockwave-flash Shockwave Flash swf<br />application/futuresplash FutureSplash Player spl<br /><br />Shockwave Flash<br />File: <b style="color: red;"><span style="background-color: yellow;">/usr/lib/gnash/libgnashplugin.so</span></b><br />Version:<br />Shockwave Flash 10.1 r999.<br />Gnash 0.8.8, the GNU SWF Player. Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.<br />Gnash comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of Gnash under the terms of the GNU General Public License. For more information about Gnash, see http://www.gnu.org/software/gnash.<br />Compatible Shockwave Flash 10.1 r999.<br />MIME Type Description Suffixes<br />application/x-shockwave-flash Shockwave Flash swf</blockquote>
<br />
Setting the "plugin.expose_full_path" option inside about:config to true is what causes the about:config output above to show the "File:" lines highlighted above. That was the key information I needed, since with that file path, I could find out what provides the gnash plugin and remove the corresponding Debian packages:<br />
<br />
<blockquote>
brentg@bg1:~/Downloads/flash$ <b>apt-file search /usr/lib/gnash/libgnashplugin.so</b><br />browser-plugin-gnash: /usr/lib/gnash/libgnashplugin.so<br />gnash-dbg: /usr/lib/debug/usr/lib/gnash/libgnashplugin.so<br />brentg@bg1:~/Downloads/flash$ <b>sudo apt-get remove browser-plugin-gnash gnash-dbg</b><br />Reading package lists... Done<br />Building dependency tree <br />Reading state information... Done<br />Package gnash-dbg is not installed, so not removed<br />The following packages will be REMOVED:<br /> browser-plugin-gnash<br />0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.<br />After this operation, 369 kB disk space will be freed.<br />Do you want to continue [Y/n]? <b>y</b><br />(Reading database ... 116648 files and directories currently installed.)<br />Removing browser-plugin-gnash ...</blockquote>
I believe that the removal is required so as to prevent Firefox from even considering gnash as the plugin that handles Flash videos when using the Adobe Flash plugin is the one I had intended to use.<br />
<br />
I did try <a href="http://www.purpleslurple.net/ps.php?theurl=http%3A%2F%2Fkb.mozillazine.org%2FFlash#purp165">step 165</a> below but it turns out that I did not have the <b>flashplugin-nonfree</b> package(s) installed (but I left in that step in the procedure for completeness).<br />
<br />
<br />
bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-12663731374552749982010-11-28T13:44:00.001-08:002010-11-28T13:44:55.104-08:00YouTranscript for text transcripts of online videosIt's interesting what you stumble upon by accident. I ran across a project the author of <a href="http://letoverlambda.com/">Let Over Lambda</a> is working on, called <a href="http://public.youtranscript.com/">YouTranscript</a>. It is something I've wanted for a long time. It provides transcripts of some technically oriented YouTube videos. What I thought was really interesting is the way the web page for each video highlights the text as the video is playing, and each fragment of text is a clickable entity. For example, <a href="http://public.youtranscript.com/zs/887.html">6-Minute Memristor Guide</a>.bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-6506887203825944472009-08-14T09:04:00.000-07:002010-03-07T07:09:12.970-08:00Usage of SSH and VLCThis is a followup to an <a href="http://bgoodr.blogspot.com/2009/04/how-to-stream-avi-files-from-linux-to.html">earlier post about VLC</a> in order to elaborate a bit on how I use SSH in that context.
First, you need to insure that your SSH works properly from the local to the remote hosts. I am assuming that you know the IP addresses of both hosts here, and both machines are expected to be running Linux. To that end, insure that you can run this command to list files on the remote machine:
<!--
Read about textarea tag at
http://www.google.com/support/forum/p/blogger/thread?tid=0fd83bdce53300f1&hl=en
"textarea" does have scrollbars but you have to size them manually in
the code by specifying rows and cols explicitly in the blog html.
which is not what I want. But the "pre" tag is worse as it doesn't
provide scrollbars and shows links when I don't want them.
But the textarea tag doesn't work either. For each newline, it inserts
a <br/> tag! At least "pre" did what I told it to. Now only if I could
get scrollbars on a "pre".
Next trying http://vivianningyang.blogspot.com/2009/05/how-to-post-source-code-in-blogspotcom.html
but before I can do the above, I first have to manually word wrap the
source code below so that it at least shows correctly in the current
blog. The reason is that I am also in the process of fixing the color
scheme to match what I had before. So go and fix those colors in the
existing template, and then come back here and see how it looks. then
try the
http://vivianningyang.blogspot.com/2009/05/how-to-post-source-code-in-blogspotcom.html
idea.
-->
<pre>
echo ls -d .bash\* | ssh -X -Y "REMOTE_USER_NAME@REMOTE_IP_ADDRESS"
</pre>
You need to change "REMOTE_USER_NAME" to be the username on that remote host, and "REMOTE_IP_ADDRESS" should be the IP address of that remote host (I am using an IP address instead of a hostname to side-step questions discussion about how to set up DNS on your local network given the complexity of DNS).
When I do this from my Linux laptop to my Linux desktop, both of which are on my local area network, I simply see a list of files that match the ".b*" expression:
<pre>.bash_history
.bash_logout
.bash_profile
.bashrc
</pre>Note the backslash in front of the "*" on the command on the local machine, which avoids shell expansion on the local host.
If you are able to do that, then you should be able to use the same "echo" command to send vlc commands to the remote host.
You may or may not have a SSH agent running on your local system. I do, and it is called seahorse. If you are running GNOME on Debian Linux, it is likely to be available to you by running "seahorse" at a shell command prompt. That seahorse program is an interface to a daemon that runs in the background, handling requests for passwords and such, such that when you request a ssh connection to a remote machine, the seahorse daemon will display an X window dialog box that prompts you for the password for authentication. I'm not exactly sure as to how it determines the password to type in if you don't have a ~/.ssh/ directory setup. If you don't have a .ssh directory, I would encourage you to read up on Linux SSH tutorials on the web for more detailed info.
Second, you need to use the ssh command to send a VLC command to stream the AVI file back to the local host, and invoke VLC in GUI mode to receive the stream and display it. Below is the VLC commands I run from the local machine to (a) start the remote VLC session to stream it back, and (b) to start a VLC GUI session locally that will be the receiver:
<pre>LOCAL_IP_ADDRESS=you_must_set_this_value
REMOTE_IP_ADDRESS=you_must_set_this_value
# senderVLCCommand is the command we want to execute on the remote
# machine. I included the sed command that just adds " sender --> "
# to the front of every line so that we can see it on the local
# terminal. Note that although this is placed in the background
# (&), we will still see the "sender" output lines:
senderVLCCommand="vlc -vvv --sout \
'#std{access=udp,mux=ts,dst=${LOCAL_IP_ADDRESS}:1234}' \\\"$file\\\" 2>&1 \
| sed 's%^% sender --> %g'"
sshSenderCommand="echo \"$senderVLCCommand\" \
| ssh -X -Y \"${REMOTE_USER_NAME}@${REMOTE_IP_ADDRESS}\" sh &"
sh "$sshSenderCommand"
# Note spawn the local VLC session, which will read the stream. Note
# the port number used here in the sender and receiver sessions
# happens to be 1234 (chosen arbitrarily, as long as the number is >
# 1024 and not in use by some other process).
$receiverVLCCommand="vlc -vvv udp://\@:1234 2>&1 | sed 's%^%receiver -->%g' &"
sh "$receiverVLCCommand"
</pre>Both commands are put into the background. It has been my experience that this isn't a problem for the sender to start before the receiver starts, as presumably it will block waiting for a receiver to connect to the sender port before transmission starts. Note that for the second command, I use a sed command to prefix "reciever" so that I can monitor errors that occur (and will occur if you have network setup problems or corrupt AVI files, or both).
Word of warning: The position slider on the receiver GUI window does <span style="font-weight: bold;">not</span> work as you would expect it to. I have not yet found a solution, and would appreciate any comments as to a suitable fix.bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-76344783587017550532009-07-16T19:06:00.000-07:002009-07-16T19:06:10.154-07:00Emacs Blogger IntegrationI find editing text outside of Emacs very cumbersome. Editing HTML directly inside Emacs or any other editor is also very cumbersome. What I think I need is a way to edit certain types of markup from within Emacs but save it into some blogging "backend" such as Blogger.
What I have done so far is use the Mozex Firefox extension to edit text fields inside Blogger, and that is a big improvement, but it is still lacking: To see the rendered HTML, I have to switch between Firefox and Emacs, and I am still writing in HTML, versus a WYSIWYG view of the text.
Some possibilities that I may eventually investigate are:
<ul><li><a href="http://www.emacswiki.org/emacs/WebloggerMode">WebloggerMode</a></li><li>The <a href="http://code.google.com/p/e-blog/">e-blog package</a>.</li></ul>If anyone has any experiences with those, or can offer other alternatives, I would like to know.bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-42455900474563918312009-05-29T05:52:00.001-07:002009-05-29T06:08:39.751-07:00OverlapI found myself interested in the underpinnings of Zen Buddhism. That eventually led to my reading of <a href="http://www.sacred-texts.com/bud/chj/chj13.htm"><span style="color:GREEN;"><i>The Creed of Half Japan</i>, by Arthur Lloyd, [1911]</span></a>. In it, I found an interesting reference to "three modes of expression":
<blockquote>(<a href="http://www.purpleslurple.net/ps.php?theurl=http%3A%2F%2Fwww.sacred-texts.com%2Fbud%2Fchj%2Fchj13.htm#purp64" name="purp64"><span style="color:purple;">64</span></a>) In truth, there were, in germ, in the new Buddhism which was then coming into shape in the Indus valley, three modes of expression which must all be taken into account, if we would understand the Japanese Mahāyāna of to-day. They are not confined to Buddhism: they are found in Gnosticism, in Hinduism, in Christianity; they are, in fact, universals of religion. They may, for brevity's sake, be termed the Way, the Truth, and the Life; the appeal to the affections, the intellect, the spiritual imagination of Faith.</blockquote>
Eckhart Tolle said essentially the same thing (and I do not recall where and when), that each of those religions had such a mystical offshoot.bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-68553491700755761052009-04-18T10:28:00.000-07:002009-04-18T15:27:29.583-07:00Emacs Bootstrap TutorialThis tutorial is aimed to help users who need to know the very basics of invoking and learning GNU Emacs. It was written because many tutorials seem to overwhelm the reader with too much detail, causing them to give up on Emacs entirely because "it's just too complicated". This strives to give sufficient detail to get you started, but shows how to get more info later when it is desired, all within one Emacs session.
This tutorial presumes you have X windows up and running, and are not executing Emacs in text-only mode.<br><br>
<!-- <hr style="font-size:85%;"> -->
<span style="font-weight: bold;">Very important things to do before you start</span><br><br>
Be sure to disable your X window managers (GNOME/KDE) bindings of things like Alt-x (any letter, not just x, actually) so that they are allowed to pass to other X applications. This is because those key bindings come under heavy use in Emacs. If you don't do that, then the X window manager will process those keybindings, and not pass them on to the Emacs session.
Increase your type repeat rate. This will make it much faster to scroll around in Emacs buffers with C-n and C-p (explained below). Doing this should help the new user move around efficiently until they need to learn the more obscure key bindings that are useful in certain modes (such as ever so useful <span style="font-weight: bold;">C-M-u</span> binding inside C and C++ buffers).<br><br>
<span style="font-weight: bold;">Magic decoder ring for Emacs concepts</span><br><br>
The Emacs Manual that comes with (or should come with it unless they Linux distribution packages it separately) your Emacs has an abbreviated way of describing about key bindings that can seem strange to the new user:
<ul><li><span style="font-weight: bold;">C-n</span> means that you should hold the Control key down, press n, and then let go of both keys.</li><li><span style="font-weight: bold;">C-h m</span> means that you should hold down the Control key, then press h, then let go of both keys, and then press m.</li><li><span style="font-weight: bold;">C-h C-m</span> means that you should press and hold the Control key, then press h, release h, then press m and then release all keys.</li><li><span style="font-weight: bold;">M-x</span> to mean that you should press and hold the Alt key, then press x, and then release both keys. If you are a vi user making the transition to Emacs, you will find yourself hitting the Escape key (which isn't very efficient since it takes your left hand off of the keyboard), which is an alternative to holding down the Alt key.
</li><li><span style="font-weight: bold;">C-M-u</span> means that you should press and hold the Alt and Control keys together, then press the u key, then release all keys.</li></ul>When you start reading parts of the Emacs Manual (or the Elisp Reference manual), you will see references to the "point". The "point" is where new characters will be inserted into a buffer when you are typing interactively. The cursor will be blinking on a given character, and when you type a new character, that new character will push the character under the cursor to the right. This is similar in concept to how the "i" command in vi works.<br><br>
<span style="font-weight: bold;">Starting Emacs with nothing</span><br><br>
When you first start out, you will not have any ~/.emacs configuration file, and that is ok for now. For this tutorial, we will stick with this basic configuration that lacks a ~/.emacs file, because you can still learn a lot with the uncustomized Emacs session.
Invoke Emacs in a mode that doesn't load the ~/.emacs configuration file by typing (into a terminal window): <span style="font-weight: bold;">emacs -q</span>. What you should see in the X window that pops up is some text and maybe a picture of some strange looking animal. Some of that text is highlighted in blue and act as links that you can click on with your mouse (or navigate to with the cursor and hit Enter). This area of the Emacs window containing pictures and text is called a "buffer", and it is not associated with any file. I explain the concept of buffers later on in the <span style="font-weight: bold;">Emacs windows versus X windows versus buffers </span>section.
Only a limited number of keys are actually bound in this initial buffer. Hit the TAB key until the cursor is sitting on the Emacs Tutorial link, and hit the Enter key. A new buffer will be displayed that contains a tutorial that explains basic key navigation. Use C-n and C-p to move line by line up and down in that tutorial buffer until you read about the other keybindings.
Read through that tutorial enough to get comfortable with using the control key with other keys to move the cursor around in the buffer. Then type C-x C-f to open up a buffer on a new or existing file. Look for the prompt at the bottom of the window. That prompt is called the "minibuffer" and is used for prompts for things like file names, as well as the area to emit messages for errors and warnings. Enter in a path to a file name, backspacing over the previous file as needed, and then hit Enter.
Here is where you type in new text. Depending upon the mode you are in (a C file? A text file?), the coloration of the text will change. This is called fontification in Emacs, and is explained in the manual.
If you opened a file in some protected area, such as /etc, then when you start typing, a message will show up in the minibuffer stating that the buffer is read-only. That is because you lack the permissions to edit it.
How do you get to read the manual from inside Emacs? Type <span style="font-weight: bold;">C-h i</span>, then scroll down to the Emacs Manual. But there are other useful bindings that you will be using a lot as a beginner, explained next.<br><br>
<span style="font-weight: bold;">Useful Emacs key bindings</span><br><br>
Here are the bindings that I think are most useful to know about when you are first starting out. This is just the tip of the iceberg of key bindings available in Emacs. You can't learn them all right away, nor should you have to, so Emacs provides you with a way to discover more bindings as you see the need (<span style="font-weight: bold;">C-h b</span><span> and </span><span style="font-weight: bold;">C-h k</span>).
Here they are:
<ul><li><span style="font-weight: bold;">C-g</span> -- Get back to normal text editing if you find yourself stuck in some mode you don't understand.
<span style="font-weight: bold;"></span></li><li><span style="font-weight: bold;">C-x C-f</span> -- Opens (finds in Emacs parlance) a buffer that is visiting a file. You may or may not be able to edit and save the buffer to that file, depending upon the filesystems permissions.</li><li><span style="font-weight: bold;">C-x C-s</span> -- Save the current buffer to the file it is visiting. If the buffer is not visiting a file, you will be prompted for the file into which to save. Notice that this is not C-s which is what you would use in some editors, and that is intensional. Think about it! How often do you need so search around in the same text file for stuff, as opposed to saving? Most of the time, the more frequent operation is incremental search (<span style="font-weight: bold;">C-s</span>), and saving the buffer is less often (<span style="font-weight: bold;">C-x C-s</span>).
</li><li><span style="font-weight: bold;">C-x C-w</span> -- Write the buffer to another file.
</li><li><span style="font-weight: bold;">C-h b</span> -- Pops up a new buffer in another window (see <span style="font-weight: bold;">Emacs windows versus X windows</span> below for the Emacs definition of window versus the X Windows definition) that summarizes all of the keybindings in the buffer in which you typed <span style="font-weight: bold;">C-h b</span>. This is how you can find out all about the keybindings associated with a given buffer. Type <span style="font-weight: bold;">C-x o</span> to go to the other buffer (<span style="font-weight: bold;">C-x o</span> is explained below). Scroll down until you see something interesting, such as the binding for <span style="font-weight: bold;">C-a</span>, then hit the TAB key to position the cursor on the function name to the right of the key binding (e.g., for <span style="font-weight: bold;">C-a</span> it would be move-beginning-of-line). Then hit the Enter key. The window will change its buffer over to a new buffer specifically for describing the move-beginning-of-line function. In that new buffer, keep hitting the TAB key until you see the cursor sitting on the "back" link, then hit Enter. When you do that, you will be back into the buffer that summarizes the key bindings.
</li><li><span style="font-weight: bold;">C-h k</span> -- Typing this in any buffer will then cause Emacs to prompt you (at the bottom of the Emacs frame) to type in one or more key sequences until it determines a binding, and then displays a help buffer showing what that binding is bound to. Try it: In any buffer, hit <span style="font-weight: bold;">C-h k</span>, then type the letter <span style="font-weight: bold;">a</span>. A new buffer will likely show up displaying the function <span style="font-weight: bold;">a</span> is bound to (e.g., it most likely will be bound to a function called self-insert-command which is used for many of the letters such as a through z, punctuation characters, etc., but does not necessarily have to be bound). Try it again: Type <span style="font-weight: bold;">C-h k</span>, wait for the prompt, then type in <span style="font-weight: bold;">C-h k</span> again. The help for the <span style="font-weight: bold;">C-h k</span> key binding is then displayed. Notice how the help text also indicates what other keys or menus the function (e.g., describe-key) is bound to. Wouldn't you like to see that in Microsoft Word???? I would. Actually, I'd like to see Microsoft Word die a fiery death, but that is diatribe for another day. </li><li><span style="font-weight: bold;">C-x o</span> -- Moves the cursor into the other window inside the current Emacs frame. If there are more than two windows, then the cursor will visit all of them in turn, eventually landing your cursor in the first window you started in.</li><li><span style="font-weight: bold;">C-x 1</span> -- Makes the current buffers window take up the entire Emacs frame. I use this one quite constantly when I'm editing source code, where I want all the other clutter in the window to just go away (but without deleting any files or damaging any other buffers contents)!
</li><li><span style="font-weight: bold;">C-x 0</span> -- Makes the current buffers window disappear, leaving more real-estate for the other windows in the frame. The file that may or may not be associated with that buffer is not deleted or modified, nor is the buffer deleted, and you can see that buffer still exists by using <span style="font-weight: bold;">C-x C-b</span>.
</li><li><span style="font-weight: bold;">C-h i</span> -- Opens up a new buffer that is in Info Mode. That mode has many of the usual key bindings changed to ones more appropriate for reading and navigating around manuals not unlike you would see in a web browser, but focused on using the keyboard (and to a lesser extent, the mouse). Use <span style="font-weight: bold;">C-n</span> and <span style="font-weight: bold;">C-p</span> to move up and down in that Info buffer. It is here that you should see the <span style="font-weight: bold;">Emacs Manual</span> along with a few other manuals that have been published as info files, such as the <span style="font-weight: bold;">Elisp manual</span> which you will need to read for doing heavy customization work. Use the TAB key to move the cursor to a link in the Info mode, and then hit Enter to view that manual. Familiarize yourself with the special key bindings used in Info mode (there is an Info manual for this purpose there, too).
</li><li><span style="font-weight: bold;">C-s</span> -- Starts an incremental search. By incremental, I mean that each character you type will search for characters in the current buffer in succession (and those characters should form a consecutive chain of characters somewhere in the buffer). Type <span style="font-weight: bold;">C-h k</span> and then type <span style="font-weight: bold;">C-s</span> to find out what keys are to be used during the incremental search. After you find the spot in the buffer, hit Enter to terminate the incremental search. If you hit <span style="font-weight: bold;">C-g</span>, then it will return you to where you started the search. Note that if you want to match the end of a line, hit <span style="font-weight: bold;">C-j</span> while entering in other characters. Try to do that in vi!
</li><li><span style="font-weight: bold;">C-h C-b</span> -- Pops up a new buffer that displays a list of other buffers in your Emacs session. Select that buffer with <span style="font-weight: bold;">C-x o</span> and then use <span style="font-weight: bold;">C-n</span> and <span style="font-weight: bold;">C-p</span> to move the cursor to one of the lines showing a buffer you would like to view, and then hit the Enter key. See <span style="font-weight: bold;">What's productive and what is not</span> below for my take on why I think this, and the<span style="font-weight: bold;"> </span><span style="font-weight: bold;">C-h b</span> binding, are important features.
</li><li><span style="font-weight: bold;">C-h b</span> -- Prompts you for the name of the buffer to switch to. Use the Tab key repeatedly and then type the first letter of the buffer name you wish to visit, hitting Tab again as needed to complete the name. Once you have filled out the name completely, then hit the Enter key. The current Emacs window will switch its buffer over to that buffer you selected. This is similar to <span style="font-weight: bold;">C-h C-b</span>, but is to be used when you know part of the name of a buffer you want to visit (and is faster in that case).</li><li><span style="font-weight: bold;">M-x</span> -- Prompts you for an interactive Emacs command. Try it: Type <span style="font-weight: bold;">M-x</span>, wait for the prompt, then type <span style="font-weight: bold;">describe-key</span>, and then hit Enter. Then type the <span style="font-weight: bold;">m</span> key. What you should see is something like the self-insert-command function being described, but you could see something entirely different depending upon the mode of the buffer you were in when you first typed <span style="font-weight: bold;">M-x</span>.</li></ul>To take advantage of the power Emacs gives you, you will eventually want to invest time learning how to customize your Emacs to your work flow. And you won't be able to learn all of Emacs in two weeks, nor should you try to, as there is just too much functionality there. Just learn new info as you find the need.<br><br>
<span style="font-weight: bold;">Emacs windows versus X windows versus buffers</span><br><br>
Since Emacs can be used in a X terminal as well as a X window itself, the manual uses the word "window" to mean part of the main X window that houses a buffer. Emacs refers to the top level X window as a "frame".
In Emacs, X windows contain a single Emacs frame, and that Emacs frame contains one or more windows that divide up the Emacs frame into non-overlapping sections. Each of those Emacs windows will house exactly one buffer, and that buffer may or may not be associated with a real file on the filesystem. You can and should switch the buffer displayed in a given Emacs window as you see fit.
Contrast this with X Windows (and Microsoft Windows) overlapping windows approach. Emacs does it this way so that you don't fight the windowing system for control over the screen real-estate. You use key bindings such as <span style="font-weight: bold;">C-x 0</span> and <span style="font-weight: bold;">C-x 1</span> to manage them quickly and efficiently, with ruthless abandon, while leaving the top level Emacs frame alone. In fact, I maximize my Emacs window to cover the entire screen, and just use Alt-tab to switch to other top-level X windows such as Firefox when I have no other choice.<br><br>
<span style="font-weight: bold;">Emacs modes</span><br><br>
Emacs buffers are a concept that allows for different behavior depending upon the editing or viewing context: One example of this is that you can view a directory listing and do file operations in that listing from within a buffer. Another example is editing C++ files using special key bindings that make editing C++ files more efficient than if you used a plain text editor (e.g., the <span style="font-weight: bold;">C-M-u</span>, <span style="font-weight: bold;">C-M-n</span>, and <span style="font-weight: bold;">C-M-p</span> bindings explained later). Each of those different editing "contexts" is called an Emacs mode.
Buffers and files are different concepts in Emacs. The difference between a "buffer" and a "file" is that a buffer is a Emacs concept of a view that shows the contents of any arbitrary text or pictures. Some of those buffers may, or may not, be viewing real files on the filesystem. That is intensional because you can do various things in Emacs with special buffers that have key strokes bound in all sorts of wacky ways. That variation in key bindings from buffer to buffer really irritates the snot out of vi users making the transition Emacs. That annoyance abates when they receive Emacs Enlightenment, which is when they realize that they can rebind those keys to whatever they want and do all sorts of things that many folks believe Emacs shouldn't be doing at all.
Emacs buffers have one or more modes associated with them, so that the keybindings for that mode can be different from other buffers that have different modes. Contrast this with vi which has only two modes: one for inserting text and a command mode (excluding ex commands of course which is similar to <span style="font-weight: bold;">M-x</span> command entry in Emacs). For example, the Info mode will have special bindings that allow you to view manuals quickly, but editing a C++ file has radically different needs, and therefore, different key bindings. Read the Emacs Manual for a more in-depth description of major versus minor modes. The minor modes mixing and matching different key binding behaviors to get exactly the behavior you desire.<br><br>
<span style="font-weight: bold;">Customizing Emacs behavior</span><br><br>
Each of the keys that are likely to be useful to you are bound to functions that have either a C definition in the Emacs binary or are bound to functions defined in a dialect of Lisp called Emacs Lisp. 99.9999% of the time, you will want to alter the behavior of Emacs either by changing the binding over to some other Emacs Lisp function of your own making, or redefining an existing function. You might need to do one or the other depending upon the circumstances, but redefining existing functions should be a last resort since when you upgrade Emacs, as your redefined function will not get updated with any bug fixes. But, don't let that stop you from customizing the dickens out of your Emacs, as it is through that customization that you gain the power and productivity that other editors lack.<br><br>
<span style="font-weight: bold;">What's productive and what is not</span><br><br>
Don't use the Vi Emulation mode. It will just frustrate your efforts to get over the learning curve.
Most people drawn to Emacs are software developers or IT people that need to work with a lot of different files in different languages. You may find that navigating files and directories using file browsers such as Windows Explorer (in Microsoft Windows) or Nautilus (in GNOME desktop) can pollute your desktop with so many top-level windows, that you lose the forest for the trees, such that you end up spending a substantial amount of time hunting around for a particular window. In Emacs, you don't have to do that any longer: just use <span style="font-weight: bold;">C-x C-b</span> to get a list of buffers you have currently opened, and use your cursor to move to a given buffer, and hit Enter key to view that buffer in Emacs.
What is not efficient is having to move your hands off of the main keyboard area to use the arrow keys, the page up keys, or the mouse. This may seem odd to hear this, but when you become more productive at the keyboard, you do not want your software to waste your time by forcing you to move your hands away from the main area, or force you to look down at the keyboard to find where the Home key resides.
Did you learn the function keys on the first row of your keyboard in Touch Typing class? No? Why not? Because they aren't always in the same spot on all keyboards (and the same can be said for arrow and page up/down keys). Try not to use them to remain productive. You think I'm joking, right? Wrong. Yes, you can rebind the function keys in Emacs, and I did that for years before I discovered that I could remain even more productive without them. I found, in my case, that I would have to take my eyes off of the screen to find the F9 key, and man does that suck time away from doing real work when you have to do that operation 1500 times a day!
And don't even get me started about the mouse (too late!). The mouse can be a major time waster when you are working with text or documents 98% of the time. The only thing a mouse should be used for is in CAD and drawing applications, not for selecting text areas of the screen during text editing and navigation operations. Force yourself to learn to use the Emacs key bindings effectively, and leave the mouse for the still-retarded apps.
Still not convinced? Think about how many times you wished you could minimize window with a single keystroke, only to find out that you have to use the mouse, and then accidentally hit the [X] (kill window) icon at the top of the window, only to curse yourself for getting in a hurry. Yeah, that's right, you are in a hurry, which is what the keyboard is for. So, get a grip on that keyboard!<br><br>
<span style="font-weight: bold;">Navigating paren/brace/bracket-intensive languages in Emacs</span><br><br>
The descriptions of the bindings below do not really belong in a basic tutorial, but they are so important to editing source code that I have to mention them:
<span style="font-weight: bold;">C-M-u</span> -- This is useful in buffers that are visiting source code files for languages such as C and C++, Lisp, Perl, etc. that make heavy use of parentheses and curly braces. All it does is move <span style="font-style: italic;">up</span> (think "u" for up) one level of parenthese or curly brace. Other bindings that allow you to navigate around nested levels of brace are <span style="font-weight: bold;">C-M-n</span> (next) and <span style="font-weight: bold;">C-M-p</span> (previous). I tend not to use the C-M-d (down) binding for some reason.
I think there are bindings that do similar things for languages such as Python since there is a separate mode specifically for Python in Emacs.bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-41381220992052245272009-04-17T07:03:00.000-07:002009-04-17T07:09:06.395-07:00Google Transcoder for Mobile phones does not work on HTTPS URLs<a href="http://www.fourteenfloor.com/2006/08/06/google-transcoder-for-mobile-phone">Google Transcoder</a> does not work for HTTPS URLs. I tried to use it by navigating to <a href="http://www.google.com/gwt/n">http://www.google.com/gwt/n</a> and entering in this URL:
https://help.ubuntu.com/community/NautilusScriptsHowto
Only to see:
You have clicked on a link that Google will not reformat for your phone.
Click <a href="https://help.ubuntu.com/community/NautilusScriptsHowto">here</a> to go to the page directly.
Why the limitation?bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-46541896501434996432009-04-12T07:26:00.000-07:002009-04-12T08:19:49.402-07:00How to stream AVI files from Linux to LinuxThe <a href="http://www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc/">How To Stream Almost Anything using VLC blog post</a> was a great help, but the user interface in my version of VLC (0.9.8a, on both machines) was radically different from that post, and different from the <a href="http://wiki.videolan.org/Documentation:Streaming_HowTo">VLC streaming how to page</a>.
To initially control the VLC on the source machine (the server), you either have to understand the command-line syntax, or use the VLC GUI on the server machine (which requires, in my case, tunneling the X protocol from the server machine back to the receiving machine).
I followed the instructions in <a href="http://www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc/">blog post</a> up to where it instructs you to play the video using "Play Locally" mode to play the video on the server machine. But saw this message on the terminal window (and not in the GUI; why?):
<blockquote><span style=";font-family:Courier New;font-size:85%;" >[????????] x11 video output error: X11 request 145.1 failed with error code 10:
BadAccess (attempt to access private resource denied)
[????????] x11 video output notice: buggy X11 server claims shared memory
[????????] x11 video output notice: support though it does not work (OpenSSH?)
[????????] x11 video output error: X11 request 145.1 failed with error code 10:
BadAccess (attempt to access private resource denied)</span>
</blockquote>
Well, of course I'm running the server's VLC over a ssh session. I want to play the video on my local machine, and not have to have access to the physical console at the server end. So, I skipped the Play Locally part of the <a href="http://www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc/">blog post</a>, and proceeded with the rest of the instructions.
I finally got it to work, but with some modifications to the instructions in <a href="http://www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc/">blog post</a>. This is what I ended up doing:
<ol><li>Run ssh into the remote machine from the local machine, tunneling X protocol back to the local machine so that I can interact with the servers VLC GUI session.</li><li>At the remote machines shell prompt, invoke vlc. The key here is to invoke vlc from the shell so that you can see any errors in its terminal output, as the GUI doesn't do a good job of presenting errors.</li><li>Pull down the Media menu (this is different from whats on the <a href="http://www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc/">blog post</a>).</li><li>Select the Open File menu item.</li><li>Navigate in the Open dialog box for the AVI file, and single click on it so that it is highlighted, but don't click the Play button. This stumped me a bit, since the instructions indicate that there is some streaming button in the dialog box.</li><li>Look to the left of the Play button. You will see a smaller button that has a black downward pointing triangle (drop down button??). Click that and click Stream.</li><li>The Stream Output window pops up.</li><li>Put a checkbox beside RTP here. Then <b>also</b> select "Prefer UDP over RTP". In the Address field beside that the UDP box, enter in the IP address of the machine where you want to stream the video to, <b>not</b> the server machine.</li><li>Leave the rest of the panels unmodified.</li><li>At the bottom of the dialog box, click on Stream. You are now streaming the video. It is actually playing right now, but since you don't have the receiving end set up yet, you won't see it.</li><li>On the local (receiving) end, invoke vlc.</li><li>In that new VLC window, pull down the Media menu, and select Open Network.</li><li>In the Protocol pulldown, select UDP (not RTP).</li><li>Leave the IP address blank (another trap for the uninitiated; why does it work when it is blank?).</li><li>Wait for a few seconds, as there is some bit of delay here. For me the sound starts playing pretty quickly, but it took a few seconds before the window popped up.</li></ol>
<b>Problems</b>:
<ol><li>The VLC's <a href="http://wiki.videolan.org/Documentation:Streaming_HowTo">streaming how to page</a> is badly out of date. Yes, the documentation is now a wiki page, but I personally feel it is irresponsible for software developers (commercial or open-source) to make radical changes to their software packages GUI interface and <span style="font-style: italic;">not </span>update the corresponding documentation. Updating documentation a part of the software developers job role.
</li><li>The VLC's <a href="http://wiki.videolan.org/Documentation:Streaming_HowTo">streaming how to page</a> is too complicated for performing the basic user tasks such as streaming from one system to the other.
</li><li>There are panels in the Open Stream dialog box that are just begging to be adjusted, but you need to leave the rest of them unmodified for this case. I would have expected the F1 key to bring up a documentation page for that complicated dialog box that would then say something like "For basic streaming of AVI files, do not change any of those other boxes unless you know what you are doing". However, context sensitive help is apparently not implemented, which is a stumbling block for new users.
</li><li>Pause in the receiving machines VLC window does not work. Only stop works. You either have to use the web interface as indicated in the <a href="http://www.engadget.com/2005/11/29/how-to-stream-almost-anything-using-vlc/">blog post</a>, or switch back to the servers VLC window and operate it from there (which only works when you are tunneling X protocol over ssh so as to see the servers VLC window on the local (receiving) machine).</li><li>No matter what I tried, I could not get just the RTP to work, but had to also select "Prefer UDP over RTP". If you leave the port numbers all set to 1234, then you will get an "audio and video port cannot be the same" error on the terminal window where you ran vlc.</li><li>In the Address field beside the UDP check box, you are to enter in the IP address of the machine where you want to stream the video to, <b>not</b> the server machine. Another area of confusion, as I don't see anywhere where it is explained why that is the case. Must be obvious to the networking experts, but what about the majority of users? Besides, I don't see what the advantage is for RTP, as the UDP method seems to work just fine (well, there is a lag, but maybe that occurs in both protocols??).</li><ol>
</ol></ol>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com3tag:blogger.com,1999:blog-1631774508061871292.post-58412682716068607862009-04-04T08:58:00.000-07:002009-04-14T07:58:38.377-07:00Verifying OpenID works with Gmail, Blogger, and EviscapeI tried using an <a href="http://openid.net/what/">OpenID</a> to understand it more fully, and to see how well it works in practice. This initial foray involved <a href="http://www.gmail.com/">Gmail</a>, <a href="http://www.blogger.com/home">Blogger</a>, and <a href="http://www.eviscape.com/home/">Eviscape</a>, with <a href="http://www.blogger.com/home">Blogger</a> being the <a href="http://openid.net/what/">OpenID</a> provider.
My experiments (shown later on in this blog post) seems to work for the most part, with the exception of a few productivity problems:
<ol><li>Registration at new sites may (in the case of <a href="http://www.eviscape.com/home/">Eviscape</a>) require you to add a site-specific password that is not needed since <a href="http://openid.net/what/">OpenID</a> provides the authentication.</li><li>After having logged into the main web site that manages the <a href="http://openid.net/what/">OpenID</a>, ideally I should not have to even type in the <a href="http://openid.net/what/">OpenID</a> itself when browsing to the other site that is aware of my <a href="http://openid.net/what/">OpenID</a>. However, again in the case of <a href="http://www.eviscape.com/home/">Eviscape</a>, I did have to type in the <a href="http://openid.net/what/">OpenID</a>. It is a usability issue because the <a href="http://openid.net/what/">OpenID</a> is a long URI, which will be cumbersome to type in or retrieve from some other page or text file (especially in my case, since I <span style="font-style: italic;">know</span> I will not be able to remember it).</li></ol>From my experimental scenarios below, this is what I believe the main requirement is for <a href="http://openid.net/what/">OpenID</a>:
<blockquote>On a given browser session, when the user provides a single username and password, all other sites that are aware of that <a href="http://openid.net/what/">OpenID</a>, should not then prompt redundantly for any password. If the user closes down the browser completely, and restarts the browser, the user should be required to provide the <a href="http://openid.net/what/">OpenID</a> and associated password only once when logging into any of the sites previously mentioned, in that new browser session.</blockquote>Below, I am also using FireFox 3 running on 32-bit Debian Linux on an IBM R51 laptop:<br><br>
<span style="font-weight: bold;">Scenario #1 (Registration with <a href="http://www.eviscape.com/home/">Eviscape</a> prompted for an extra, unnecessary password)</span>:
<ol><li>Logout completely from <a href="http://www.gmail.com/">Gmail</a> and <a href="http://www.blogger.com/home">Blogger</a>, and close all tabs and windows in the browser to any those websites<b><sup>1</sup></b>.</li><li>Without being registered already with <a href="http://www.eviscape.com/home/">Eviscape</a>, register using the <a href="http://openid.net/what/">OpenID</a>.</li><li>At some point in the registration, it prompts for a new password, so give a <span style="font-style: italic;">different</span> password than the one associated with the <a href="http://openid.net/what/">OpenID</a> provider<b><sup>2</sup></b>. This is unexpected behavior since the registration should provide a way to specify that only the <a href="http://openid.net/what/">OpenID</a> usename and password is to be used, and not require the user to add a redundant password specific to that website.
</li><li>Finish registration.</li><li>Logout of <a href="http://www.eviscape.com/home/">Eviscape</a></li><li>Login to <a href="http://www.eviscape.com/home/">Eviscape</a>.</li><li>Type in the <a href="http://openid.net/what/">OpenID</a> into the <a href="http://openid.net/what/">OpenID</a> field.</li><li>The site then prompted for the <a href="http://openid.net/what/">OpenID</a> username and password. Supply the username and password.</li><li>The site is now authenticated, which is expected.
</li></ol><span style="font-weight: bold;">Comments: </span>Not once did I have to provide the <a href="http://www.eviscape.com/home/">Eviscape</a>-specific password that I was required to supply during <a href="http://www.eviscape.com/home/">Eviscape</a> registration. Hence, that <a href="http://www.eviscape.com/home/">Eviscape</a>-specific password is unnecessary and redundant.
I do realize that the<span> <a href="http://www.eviscape.com/home/">Eviscape</a> </span> login web page has text entry fields for the <a href="http://www.eviscape.com/home/">Eviscape</a>-specific username and password, as well as the <a href="http://openid.net/what/">OpenID</a>, so obviously they have to support both methods of authentication. But, given that I provided the <a href="http://openid.net/what/">OpenID</a>, <a href="http://www.eviscape.com/home/">Eviscape</a> should (during registration) offer an option to use the <a href="http://openid.net/what/">OpenID</a> username and password exclusively, thus avoiding the prompt to create the extra username and password.<br><br>
<span style="font-weight: bold;">Scenario #2 (Initially logging into <a href="http://www.eviscape.com/home/">Eviscape</a>, without being logged into any other sites, using my <a href="http://openid.net/what/">OpenID</a>)</span>:
<ol><li>Logout completely from <a href="http://www.gmail.com/">Gmail</a>, <a href="http://www.blogger.com/home">Blogger</a>, and <a href="http://www.eviscape.com/home/">Eviscape</a>, and close all tabs and windows in the browser to any of those websites<b><sup>1</sup></b>.</li><li>Connect to the main <a href="http://www.eviscape.com/home/">Eviscape home page</a> and enter in the <a href="http://www.blogger.com/home">Blogger</a>-provided <a href="http://openid.net/what/">OpenID</a>. </li><li>A new web page opens up requesting the Google account username and password<b><sup>2</sup></b>. Note that the Google account username is requested, and not the <a href="http://www.blogger.com/home">Blogger</a> account name. That makes sense given that my <a href="http://www.blogger.com/home">Blogger</a> account was set up to use my <a href="http://www.gmail.com/">Gmail</a> account name and password.</li><li>I enter in the Google account username and password. Supply the username and password.</li><li>The site then prompted for the <a href="http://openid.net/what/">OpenID</a> username and password. Supply the username and password.</li><li>The site is now authenticated, which is expected.
</li></ol><br><br>
<span style="font-weight: bold;">Scenario #3 (Does <a href="http://openid.net/what/">OpenID</a> login with <a href="http://www.eviscape.com/home/">Eviscape</a> seamlessly log me into <a href="http://www.blogger.com/home">Blogger</a>?):</span>
<ol><li>Do Scenario #2.</li><li>Open up a new browser tab, and browse to the <a href="http://www.blogger.com/home">Blogger</a> site.
</li><li>Notice no password prompt is given and that <a href="http://www.blogger.com/home">Blogger</a> shows that you are signed in. This scenario works as expected.
</li></ol><br><br>
<span style="font-weight: bold;">Scenario #4 (Does <a href="http://openid.net/what/">OpenID</a> login with <a href="http://www.eviscape.com/home/">Eviscape</a> seamlessly log me into <a href="http://www.gmail.com/">Gmail</a>?):</span>
<ol><li>Do Scenario #2.</li><li>Open up a new browser tab, and browse to the <a href="http://www.gmail.com/">Gmail</a> site.
</li><li>Notice no password prompt is given and that <a href="http://www.gmail.com/">Gmail</a> shows that you are signed in. This scenario works as expected.</li></ol><br><br>
<span style="font-weight: bold;">Scenario #5 (Does a <a href="http://www.blogger.com/home">Blogger</a> non-<a href="http://openid.net/what/">OpenID</a> login seamlessly authenticate <a href="http://www.eviscape.com/home/">Eviscape</a> via <a href="http://openid.net/what/">OpenID</a>?):</span>
<ol><li>I logout completely from <a href="http://www.gmail.com/">Gmail</a>, <a href="http://www.blogger.com/home">Blogger</a>, and <a href="http://www.eviscape.com/home/">Eviscape</a><b><sup>1</sup></b>.
</li><li>Connect to the main <a href="http://www.blogger.com/home">Blogger</a> login page and enter in the Google<b><sup>2</sup></b> username and password.
</li><li>Connect to the main <a href="http://www.eviscape.com/home/">Eviscape home page</a> and enter in the <a href="http://www.blogger.com/home">Blogger</a>-provided <a href="http://openid.net/what/">OpenID</a>.
</li></ol>Note that I did not have to provide the Google username and password, but only had to provide the <a href="http://openid.net/what/">OpenID</a> itself. This is mostly expected, however, it would be nice to not even have to type in the <a href="http://openid.net/what/">OpenID</a> itself, but that is probably asking too much.
<span style="font-weight: bold;">Footnotes:</span>
<ol><li>This forces these websites to not use existing authentication state that might be in the browser or on their respective servers.</li><li>My <a href="http://openid.net/what/">OpenID</a> provider is <a href="http://www.blogger.com/home">Blogger</a>, and <a href="http://www.blogger.com/home">Blogger</a> is managed by Google, so the <a href="http://openid.net/what/">OpenID</a> username and password is equivalent to the Google username and password.</li></ol>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com6tag:blogger.com,1999:blog-1631774508061871292.post-80311175024059068982009-03-28T11:14:00.000-07:002009-03-28T11:15:09.804-07:00Emacs Starter Kit<a href="http://technomancy.us/">Phil Hagelberg</a> has started a <a href="http://technomancy.us/119">starter kit for Emacs</a> development. I wonder if I should polish up my setup and publish it in some way. Some things to consider are:
<ol><li>I would need to separate my work-environment-specific customizations from general use.</li><li>I have my own personal Git repositories for maintaining copies of my Elisp setup on multiple machines. How does that mate with publishing those files elsewhere?</li><li>ELPA is in use for some packages I import, but others I've checked in local copies of that are not in ELPA.
</li><li>Would it be better to contribute to Phil's code base or go it alone?
</li></ol>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-35305450715551286902009-03-28T11:13:00.001-07:002009-03-28T11:13:44.991-07:00Emacs Package Management<a href="http://tromey.com/elpa/">ELPA</a> is the Emacs Lisp Package Archive. Issues I'm pondering of late are:
<ol><li>Does <a href="http://tromey.com/elpa/">ELPA</a> integrate well with SCM backends? I would want to be able to commit changes via a Git repo somewhere (github?) and have others be able to update their Emacs setups seamlessly. But not just Git: some Elisp packages are controlled via other SCM's such as SVN, CVS, Arch, etc.</li><li>What about packages built into GNU Emacs? Some users desire to overlay a newer version of a package than what is installed in Emacs.</li></ol>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0tag:blogger.com,1999:blog-1631774508061871292.post-64248435443099687702009-03-28T11:11:00.001-07:002009-03-28T11:11:54.514-07:00Keyboard efficiency in Emacs<a href="http://technomancy.us/">Phil Hagelberg</a> posted a <a href="http://www.purpleslurple.net/ps.php?theurl=http%3A%2F%2Fblog.mozilla.com%2Ffaaborg%2F2007%2F07%2F05%2Fthe-graphical-keyboard-user-interface%2F#purp443">comment</a> onto <a href="http://blog.mozilla.com/faaborg/2007/07/05/the-graphical-keyboard-user-interface/">The Graphical Keyboard User Interface</a>:
<h3 class="title"><a href="http://blog.mozilla.com/faaborg/2007/07/05/the-graphical-keyboard-user-interface/"><span></span></a></h3>
<blockquote>For ideas on how to improve command discoverability, take a look at how Emacs does things. Every command is named and is invokable via Alt-x and then entering the name (offering tab-completion, of course), and you can look up commands by their name so that their bindings (if applicable) are shown. You can also get a listing at any time of all active bindings. Makes it very easy to explore.
The eMate hold-the-modifier-key trick mentioned above is also a great idea.</blockquote>bgoodrhttp://www.blogger.com/profile/00406827452736180526noreply@blogger.com0