Tuesday, April 24, 2012

OSX + Terminal.app + Emacs + make command key operate as meta

I'm on OSX Lion



I running emacs inside of Terminal.app



I want command-x to result in M-x (and in general, command -> M)



I have tried the following solution and they're not what I want:





What I want, is only inside of Terminal.app (or only inside of emacs), to bind the command key to meta. How do I achieve this?





Changing DIV colors using hover and click in JQuery

Could someone please help. I have these two:



I would like the text to change to lightgreen when hovering, white when not hovering, and red when clicked.



$(".music").hover(
function() {
$(this).css('color','lightgreen');
},
function() {
$(this).css('color', 'white');
}
);

$(".music").click(function () {
$('#result').load('album_list_index.php');
$(this).css({ 'color': 'red', 'font-size': '100%' });
});


Thank you in advance



AC



NOTE: ok im sorry i did not make myself clear.



I need the div to be white when not mousedover
I need it to be gree when mouseover
And i need it to be red when clicked, and remain red until another button is clicked.





java replaceAll(regex, replacement) regex command

Hello I would like to know if anyone knows the regex command to remove the following



 name = 


from the following



 name = wlr


leaving only



 wlr


these details are taken from a txt file but the name = part can appear multiple times



so I was thinking something like this would work but it doesnt work properly



 String file_name = newLine3.replaceAll("name = ", "");


Any help appreciated
Thanking You





Assigning Created Joomla User to the Current User

I've created a Joomla plugin for facebook which lets facebook users to login.
Also, I'm creating new user when they first login through faceobok.



I want to set the current user object to the created user.
is it possibile in Joomla? How?



Thanks





Cell Array appending

I have this doubt.. I need to append the array of string in Matlab. Please suggest me how to do it..



I would like to append the string column wise on each iteration..



Here is a small code snippet which i am handling



<CODE>:
for_loop
filename = 'string';
name=[name; filename]
end


Thanks
Kiran





lock screen sometime not display android

i created lock screen application.. Sometimes it give me a problem. problem is that some time default lock screen display rather than my lock screen and some time directly home screen display. i donot know where is the problem. please give me suggestion about this.



LockScreenActivity:
Use
KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard();



and create ScreenReceiver:
ACTION_SCREEN_OFF
ACTION_SCREEN_ON
ACTION_BOOT_COMPLETED



Refer this link: http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/



in manifeast file : declare service and receiver and permission



The problem is in BroadcastReceiver when
if (recievedIntent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
//call activity
}else if (recievedIntent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
}
but the activity call after screen on.. so what is missing or what is problem.. why it is happn pls rply.





Cross Domain SSO with DotenetOpenAuth

I have integrated DotenetOpenAuth to login using google account.

Its working perfect.
Can i achieve this with it ?

Once user logged in site1.com if user browse to site2.com the user get automatically logged in.