I have a DataTable which is dynamic, it can have 3 column to 7 column, depend on situation. Everything works fine, until to read column name in DataTable to DataColumn.
The reason i am doing this is, in DataTable it have same data repeating, so i want to distinct the DataTable by this dt -- is the DataTable which have the repeating data; dt2 -- is the new DataTable dc -- is DataColumn
- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
step 1: divide decimal number by 8
step 2: write down the residual of division
step 3: if the result of division if 7 or less, write it to the left of residual you wrote in step 2, and there you go, you;ve got an octal represent. If the result is greater or equal to 8 then:
step 4: divide that result by 8
step 5: write the residual of that division to the left of the last one you wrote
step 6: from tis point everything is the same as from step 3.
Example: calculate octal represent of 123
123 / 8=15 , and residual is 3
15 >= 8, so the next thing you do is:
15 / 8 =1, and residual is 7
so far, we have 73
1<=7, so you write it to the left of 7, and there you go, 173 is octal represent of 123.
Hope this was helpful.
if you want to check your calculations, most calculator software has option to automatically calculate octal represents, i.e.
Most of us have a PC at home and one at work. We use our work PC most of the times and home PC comparatively less. Did it ever happen to you that you forgot your Windows 7 Password ? Maybe you go for a month long vacations or business trip and when you are back, you may forget some of your passwords to the home Windows 7 PC.
We tend to have lots of passwords at work, online and at various computers. So to save yourself from a locked out situation, we recommend that you create a password reset disk.
In this article, I will share with you a very simple method to create a Windows 7 Password Reset Pen Drive. So next time you are locked out of Windows 7 at the login screen, you can plug in this USB pen drive in your computer and reset the Windows Password.
To create a Windows 7 Password reset pen drive, I advice to have a small capacity pen drive which is cheap and you should keep it at a safe place, but not so safe that you forget where you kept it when you need it sometime in future.
Follow these simple steps:
Step 1. Insert a pen drive (backup any data if present on the pen drive and delete everything). Then go to Windows 7 Start Menu and type “create password reset disk” in the start menu search and launch the program “Create a password reset disk ” which will be highlighted in the search results.
Step 2. Just follow the simple Password reset Wizard as seen below, by selecting the pen drive from a list of drives it will show you. Note: If you have not inserted a Pen Drive before launching the utility, it will not work and will give an error. If the pen drive is in place, you will see Wizard something like the images below. It will also ask for your current password to create a password reset pen drive.
Step 3. Now you simple need to keep this drive at a safe place. You can use this in case you forget your Windows 7 Password sometime in future, just click forgotten password on the login screen and choose the option to Reset Password after inserting this pen drive into any of the working USB ports of your computer.
NOTE: Windows will honor only the most recent Password reset disk that you have created, so in case you happen to create more than one disk, only the one which is latest will work, all other old password reset disk will not be able to reset the Windows 7 Password.
If you have not created a reset disk and have forgotten your password, you can still reset the password using some utilities like Windows Password Recovery Tool. But these processesmay cost you little money if you need to buy a software to do that. So to avoid any inconvenience later, we recommend that you create a password reset disk.
/* REXX is better than JAVA */
input = '17273747'
x = count7(input)
say 'number of "7" characters is:' x
count7: parse arg digit 2 tail
if digit = ' ' then return(0)
match = (digit = '7')
return (match + count7(tail))
i.e., split the "input" into the 1st column and the "tail" (the other columns).
If there is no "first" column, return '0' ("none").
Test the 1st column.
Recursively call the function, passing the "second-through-last" columns, adding-in the result (0 or 1) from the 1st column.
Many languages claim to be Object-Oriented. While the exact definition of the term is highly variable depending upon who you ask, there are several qualities that most will agree an Object-Oriented language should have:
1. Encapsulation/Information Hiding 2. Inheritance 3. Polymorphism/Dynamic Binding 4. All pre-defined types are Objects 5. All operations performed by sending messages to Objects 6. All user-defined types are Objects Fair enough...
Java IS by virtue of 1, 2, 3, and 6. Java IS NOT by virtue of 4 and 5 (not all pre-defined types are Objects, and not all operations are performed by sending messages to Objects).
But since the definition says only that an OOPL should have these things, then Java qualifies.
Next up; given that definition, how would one define "100%"? Exhibiting all those qualities? If that's the case, Java fails the "purity test".
You need to change the column type from BoundField to TemplateField and call the substring method like this
<asp:TemplateField> <HeaderTemplate> Comments </HeaderTemplate> <ItemTemplate> <%#Eval("Comments").ToString().Substring(0, 25)%> </ItemTemplate> </asp:TemplateField>
In this snippet, I am displaying only the first 25 characters of the Comments field.Only problem with this approach is that if even one of the rows contains a comments field with less than 25 characters, this might trigger an error.The fool proof way then is to write a small function in codebehind which will check the length of the field, chop off any extra characters and in case of shorter strings,