Error writing bytes to client Transport endpoint is not connected
The specified network name is no longer available.
When trying to launch System -> Preferences -> Sound you get the following message in a panel:
Waiting for sound system to respond
In this case, this was the result of my tinkering with the sound system, in an attempt to try to make multiple applications use the sound drivers simultaneously instead of the sound system getting locked by one application only. So I knew exactly what the issue was based on what I added to the following files:
/etc/pulse/daemon.conf
/etc/pulse/default.pa
The file in question causing the issue was the .pa above. Here's the offending line:
Taking a look further down for text detect in the .pa file from above revealed we're already loading some detect lines as per the default .pa file configuration so I only needed to add tsched=0 to disable the timer based scheduling for the module arleady being loaded: module-udev-detect & module-detect:
While using associative arrays, I run into this little issue using this sample KSH93 code:
#!/bin/ksh93u+
function scmp {
typeset -A IPAA;
# Load First File.
for KEY in $(cat 1.rip); do
IPA1[KEY]=1;
done
# Load Second File.
for KEY in $(cat 2.rip); do
IPA2[KEY]=1;
done
};
function main {
scmp;
};
main;
Which resulted in this error:
[root@mbpc bin]# ./a.ksh
./a.ksh[23]: main[21]: scmp: line 10: 192.81.0.250: arithmetic syntax error
[root@mbpc bin]#
The real change to address was here and it was to set the IPA1 and IPA2 to associative array type (Had typeset -A IPAA erronously):
#!/bin/ksh93u+
function scmp {
typeset -A IPA1;
typeset -A IPA2;
# Load First File.
(( CNT = 0 ));
for KEY in $(cat 1.rip); do
(( CNT++ ));
IPA1["${KEY}"]=1;
print "CNT=|$CNT|";
done
# Load Second File.
for KEY in $(cat 2.rip); do
IPA2[""KEY]=1;
done
};
function main {
scmp;
};
main;
which naturally fixed the problem. Of course, the above could be generated for any number of reasons however in this case, it was the typeset lines above:
Cheers,
TK
When assigning values to an associative array in KSH, it's important to note the significance of the $ value:
# typeset -A ABCD; $(( ABCD["moi"]=0 )); $(( ABCD["moi"]++ )); $(( ABCD["moi"]++ )); $(( ABCD["moi"]++ )); print ${ABCD["moi"]};
/bin/ksh93u+: 0: not found [No such file or directory]
/bin/ksh93u+: 0: not found [No such file or directory]
/bin/ksh93u+: 1: not found [No such file or directory]
/bin/ksh93u+: 2: not found [No such file or directory]
3
#
The solution to the above, is of couse to use this logic (dropping the $ in front of the (( … )) statements):
# typeset -A ABCD; (( ABCD["moi"]=0 )); (( ABCD["moi"]++ )); (( ABCD["moi"]++ )); (( ABCD["moi"]++ )); print ${ABCD["moi"]};
3
#
Cheers,
TK
Here's are an example of a random number generator in KSH or it's newer counterpart KSH93. For this post, we'll use the latest KSH from AT&T Labs:
#!/bin/ksh93u+
for (( KEY=0; KEY < 1000000000; KEY++ )); do
print $(( RANDOM / 128 ))"."$(( RANDOM / 128 ))"."$(( RANDO^C/ 128 ))"."$(( RANDOM / 128 ));
done
The purpose of the above is to obtain a random set of entries (IP like) for testing purposes in other logic including testing regular expressions. RANDOM, in this case generates a number between 0 and 32768 and when divided by 128, will print out the intiger part of the equation. To assign a random number a statement similar to MVAR=$RANDOM; can also be used.
Cheers,
TK
The current theme does not natively support menus, but you can use the "Custom Menu" widget to add any menus you create here to the theme's sidebar.
“Your theme supports 0 menus. Select which menu appears in each location”
Reading further on the following pages, we can enable the menus using these functions:
http://codex.wordpress.org/Function_Reference/register_nav_menu
http://codex.wordpress.org/Function_Reference/register_nav_menus
To fix this using the above, in your wordpress theme (create the files if they don't exist.):
header.php (Right after body tag)
<?php wp_nav_menu('menu=Header'); ?>
functions.php (Right at the very top)
<?php
if (function_exists('add_theme_support')) {
register_nav_menus( array( $location => $description ) );
}
?>
CSS Styles come later and can be applied
After that, you should see:
Your theme supports 1 menu. Select which menu you would like to use.
and should be able to create and customize your menus using the wordpress admin panel for your blog. Here are some alternatives how to enable and apply CSS as well to style your menus:
After enabling the wordpress WP Super Cache and the HTML Minifi plugin for the WP Super Cache plugin (That's right, a plugin for a plugin) I get empty pages on /localhost/wp/ (Or http://www.microdevsys.com/wp/) which obviously isn't so good for the readers. So i download the plugin to my local server LAMP installation and test it there. Thankfully I get the same results. (Thankfully because otherwise I'd have a very difficult time debugging this thing through my web host who has limited access.)
/var/log/httpd/error_log
[Fri Nov 30 20:52:13 2012] [warn] Cannot get media type from 'x-mapp-php5'
[Fri Nov 30 20:52:13 2012] [error] [client ::1] PHP Warning: require_once(/var/www/html/wp/wp-content/plugins/wp-super-cache/plugins/min/lib/Minify/HTML.php): failed to open stream: No such file or directory in /var/www/html/wp/wp-content/plugins/wp-super-cache/plugins/WPSCMin.php on line 125, referer: http://localhost/wp/wp-admin/options-general.php?page=wpsupercache&tab=plugins
[Fri Nov 30 20:52:13 2012] [error] [client ::1] PHP Fatal error: require_once(): Failed opening required '/var/www/html/wp/wp-content/plugins/wp-super-cache/plugins/min/lib/Minify/HTML.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/wp/wp-content/plugins/wp-super-cache/plugins/WPSCMin.php on line 125, referer: http://localhost/wp/wp-admin/options-general.php?page=wpsupercache&tab=plugins
[Fri Nov 30 20:52:13 2012] [error] [client ::1] PHP Fatal error: Call to a member function get() on a non-object in /var/www/html/wp/wp-includes/cache.php on line 113, referer: http://localhost/wp/wp-admin/options-general.php?page=wpsupercache&tab=plugins
And in my /var/log/messages, this one:
localhost – - [30/Nov/2012:20:54:48 -0500] "GET /wp/ HTTP/1.1" 500 – "http://localhost/wp/wp-admin/options-general.php?page=wpsupercache&tab=plugins" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.26) Gecko/20120216 Red Hat/3.6.26-1.el6_2 Firefox/3.6.26 AlexaToolbar/alxf-2.17"
Sure enough we baught outselves a Nexus 7 tablet and of course what's a PC, miniature or not, without some sort of web access. My router is setup with MAC address filtering which prevented initial connection unless I get the MAC address of the device to begin with. Unfortunately, Nexus 7 won't let you into the settings until you do an initial setup.
In this case, I've disabled the MAC address filtering on my DD-WRT'd TP-LINK router temporarily (Let's remember, I still have WPA2 security with SSID broadcase disabled so I'm fine to do that.) Once connected, I checked that my connection is fine from my other wireless devices before trying to connect from the Nexus 7. With everything else working, google Nexus 7 went through it's paces and I was finally able to get in on to the device and get my MAC:
WP Super Cache sometimes prints out this message. Cliking on the link revealed a 403 forbidden error wehn we did try.
Test your cached website by clicking the test button below.
Fetching http://www.microdevsys.com/wp/ to prime cache: OK
Fetching first copy of http://www.microdevsys.com/wp/: OK (1.html)
Fetching second copy of http://www.microdevsys.com/wp/: OK (2.html)
The pages do not match! Timestamps differ or were not found!
Things you can do:
| Copyright © 2003 - 2012 Tom Kacperski. All rights reserved. |