Thursday

style for asp.net Gridview

This is part of css files that contains style description:
 
.mGrid {
width: 100%;
background-color: #fff;
margin: 5px 0 10px 0;
border: solid 1px #525252;
border-collapse:collapse;
}
.mGrid td {
padding: 2px;
border: solid 1px #c1c1c1;
color: #717171;
}
.mGrid th {
padding: 4px 2px;
color: #fff;
background: #424242 url(grd_head.png) repeat-x top;
border-left: solid 1px #525252;
font-size: 0.9em;
}
.mGrid .alt { background: #fcfcfc url(grd_alt.png) repeat-x top; }
.mGrid .pgr { background: #424242 url(grd_pgr.png) repeat-x top; }
.mGrid .pgr table { margin: 5px 0; }
.mGrid .pgr td {
border-width: 0;
padding: 0 6px;
border-left: solid 1px #666;
font-weight: bold;
color: #fff;
line-height: 12px;
}
.mGrid .pgr a { color: #666; text-decoration: none; }
.mGrid .pgrD A:link {color:#0466c1;}
.mGrid .pgr A:visited {color:#0466c1;}
.mGrid .pgr A:hover {color:#0466c1;}
.mGrid .pgr A:active {color:#0466c1;}
.mGrid .pgr a:hover { color: #000; text-decoration: none; }


images must be placed within style file
grd_alt.png
grd_head.png
grd_pgr.png

In grid this style can by defined as follows:
 
<asp:GridView ID=gv runat=server BorderWidth="0" CellPadding=0 CellSpacing=0 Width="100%" CssClass="mGrid"
AllowPaging=false AllowSorting=false AutoGenerateColumns="False" SkinID=gvSkinMergePeople>
<Columns>
<asp:TemplateField HeaderText="dealer#" >
<ItemTemplate>
<a href='Edit.aspx?id=<%#Eval("Id") %>'> <%#Eval("dealer_") %></a>
</ItemTemplate>


</asp:TemplateField>
<asp:BoundField HeaderText="Client Name" DataField="dealer_name" />
<asp:BoundField HeaderText="Group" DataField="group" />
<asp:BoundField HeaderText="industry" DataField="industry" />
<asp:BoundField HeaderText="status" DataField="dealer_status" />
<asp:BoundField HeaderText="service begins" DataField="service_begins" DataFormatString="{0:mm/dd/yyyy}" />
<asp:BoundField HeaderText="CommissionType" DataField="RevenueSegmentValue" />
<asp:BoundField HeaderText="BudRank" DataField="BudRank" />
<asp:BoundField HeaderText="ForecastRank" DataField="ForecastRank" />
</Columns>
<EmptyDataTemplate>
<table cellpadding=0 cellspacing=0 border=0 width=100% height=100%>
<tr>
<td align=center height="40">
<asp:Label ID=lblEmptyMessage runat=server Text="No Records Found" CssClass="NewPlainText"></asp:Label>
</td>
</tr>
</table>
</EmptyDataTemplate>
</asp:GridView>



Tuesday

cut mp3 files windows

1.download mp3splt from http://mp3splt.sourceforge.net/mp3splt_page/downloads.php
2.Run mp3splt.exe with parameters - like on this example

c:\tools\mp3splt\mp3splt.exe %1 01.40 47.00
pause

some appstore games statistic

Physics Gamebox – $102 589

Ragdoll Cannon (запускали в АппСторе отдельно) – $12 361

Roly-Poly Cannon (запускали отдельно) – $18 795

Cover Orange версия для MAC OS – $13 276

Cover Orange версия для iPad – $476 320

Cover Orange версия для iPhone – $739 986

IAP для iPhone версии – $310 393

IAP для iPad версии – $40 740

Sunday

asp.net password field cleared on postback

add this into "if (IsPostBack){" section on page_load
if (!(String.IsNullOrEmpty(txtPassword.Text.Trim())))
{
txtPassword.Attributes["value"]= txtPassword.Text;
}


self discipline tips

1 - Start small. If you have a little trouble with self discipline and want to work on it, the best thing you can do is to start small, which generally means picking something you think you can succeed at. For example, say you find yourself every New Year's Eve promising yourself to go to the gym every week. Then, March comes along and you find you've not gone for two months. Instead of yelling at yourself for being stupid and lazy why not try modifying your pledge to something you feel you could do. For example, you might promise yourself instead that you'll park farther from the store when you go, to make yourself walk a little more. This is something manageable. Let the gym go hang, at least for now.

2 - One thing at a time. Another thing you can do is to try picking just one thing. Quite often we find ourselves overwhelmed with life and all the things we think we are supposed to be doing, and in response promise ourselves that we'll straighten everything out right away and then find ourselves failing again at all of them. One way out of this is to pick just one thing to work on. Say it's paying bills on time. Forget killing yourself trying to get to places on time or whatever else it is that you worry about. Set up a date and time to pay those bills and don't let any of the other stuff get in the way. Getting those bills paid on time a few months in a row can make you feel more sure of yourself and able to tackle other things.

3 - Don't let other's sway you. One thing to be wary of when attempting to rein in your history of impulsive or less than well thought out behavior patterns is to look at who you keep company with. Quite often people allow others to sabotage their efforts. This is quite obviously not conducive to modifying our self disciplinary issues. To get better at self discipline, you need to either find a way to not listen to these people, or to get them out of your life.

4 - Watch out for weak moments. One of the trickiest parts of self discipline is handling weak moments. These are the killers. We feel fat, or insipid. We feel lost or empty. We find we miss the thing we've chosen to give up, or hate the thing we've started to do. We hate everything. This is when we give up. It's easy to be strong and carry on when we're at the top of our game. It's these low points where we have to find a way though. The best thing you can do when you feel yourself hitting a weak spot is to talk to someone who is not only on your side but can help to remind you of the good that will come out of your sticking to whatever it was you decided on. It's sort of like a sponsor for AA. Call them when you feel weak or are beginning to wonder if what you've chosen to do is so important after all. Call them when you see yourself making reasons for doing something else. Just call them. If you don't have someone you can call or talk to, get yourself up and out of the situation. If you've promised yourself you'd quite biting your nails, then get yourself up and outside. Water the lawn or dig a hole. Do some knitting. Just do something, especially if it means using your hands, because it's really hard to nibble your nails when your fingers are busy.

5 - Fitting it into your lifestyle. To improve your self discipline, you need to make whatever it is you've decided to do fit into your lifestyle. It's generally not enough to just stomp your foot and say this is how things are going to be from now on. To make things work, you have to change the circumstances of the situation. For example, if you've decided that from now on, when you tell your children no, you will not take it back later and let them do whatever that thing was. In addition to making that promise to yourself, you have to make some changes to the situation itself. In this example, it might be something as simple as asking the child for a written request. Doing so causes the child to have to think about their request and it allows you to see more clearly what is being asked and whether it is something that should be allowed or not.

6 - Don't talk about it. Quite often when we make up our minds to do something, one of the first things we do is go around telling everyone we know what we are going to do. Or not do, if that's the case. Try not to do this. It severs no useful purpose and in fact can undermine your resolve. We might think that by telling everyone we are actually asking for help, or at least support, when in fact what we are really doing is looking for approval, that may or may not come. If it doesn't we tend to start wondering if our decision was right in the first place, which can make your self discipline begin to crumble.

7 - Milestones. One of the things you can do along the way is to mark milestones. It might be days or weeks, or months or even years. Or it might be something less easy to write down, such as noting how you feel a change in the way you view certain things. A diary is a good way to keep track of things like this, especially if the thing you're trying to make yourself do or stop doing is rather subtle, like being less critical of your spouse. You might only notice the difference by reading your own words for past days. Keeping a diary also helps you to keep in mind the thing you're working on, which is critical to success.

8 - Charting success. In addition to marking milestones, you might also consider giving yourself a means of measuring your success or failures. Again, many things in life don't necessarily have a grading scale so it's important to watch your milestones and then to gauge whether you've been succeeding at your goals. If you're not doing as well as you'd like, consider things you might do to make it better. If things are going well, keep on as you've been, you're doing great.

9 - Don't let slips stop you. One of the biggest threats to self discipline is slipping and then falling headlong into defeat. This is common with dieting. We are doing great, then one day, in a weak moment we eat a whole bag of miniature brownies. And then, rather than scold ourselves gently and get back on the horse, we tell ourselves we're hopeless and figure we've lost the battle. But we haven't. We only lose the battle when we refuse to fight. It doesn't matter how many times you fail, if you keep fighting, you'll always be in the game.

10 - Rewarding yourself. As with most things in life, if you reward yourself well, you'll find your sub-conscience begin to act as an ally rather than as a force trying to subvert your efforts. Pick something you really like and if possible something you'll be able to enjoy for more than a moment. Things like a hot bubble bath or a chocolate desert are nice, but they are gone the moment we finish. Other things, like a nice purse or golf club serve as reminders every time we see them.

These ten tips to help improve your self discipline can be used by anyone who is trying to think of ways to help their own self discipline. If you are such a person, I wish you all the luck in the world.


imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...