|
|
hey am tryig to recognise a href and get the value so i can build a Uri object with it,
all is good so far except when i encounter a href with javascript in it
can anyone refine my regex pls
<br />
Regex RegexObj = new Regex("<\\s*a\\s+[^>]*href\\s*=\\s*[\"']{1}.+[\"'].*>");<br />
kind regards,
g00fy
|
|
|
|
|
what about
@"<\s*a\s+href\s*=\s*"(.+)"\s*>.+</a>"
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
that wont work
if i test it with
1. <a href='test.ds'>asdf</a>
2. <a href='javascript:go('test.ds')'>asdf</a>
3. <a href="/test.ds">asdf</a>
it will only get the number 3.
but if i use
<\s*a\s+[^>]*href\s*=\s*[\"']{1}.+[\"']{1}>
it will get all 3 and i only wont it to catch 1. & 3.
so i need a character class to exclude the '(' ')' chars but i cant quite get syntax right
so i want to ignore anything that has the brackets in the href or other chars that would not be 'normal' for a href, like, ':'
kind regards,
g00fy
|
|
|
|
|
Hi,
I have a DataTable with a column that is AutoIncrement.
After I clear the DataTable, I would like to have the columns AutoIncrementSeed reset to it's original value... is this possible?
Thanks,
Ron
|
|
|
|
|
You have to use DataTable.Reset() method to retain your autoincrmentseed to it's original position.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hi Sreejith,
I was hoping not to have to rebuild the datatable columns...
DataTable.Reset() clears the columns.
Ron
|
|
|
|
|
Hi, i was wondering is it is possible to pull out the pixels values and display it out. (eg. pixel 1 ->[2,25,125])
|
|
|
|
|
GetPixel will do this if you have only a few pixels to do. For speed, if you want them all, you should read my image processing articles.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
how many pointers do i need? 1 or 3? sorry abt that i just took up C# because of my project requirements i am rather confused now thanxz in advace
|
|
|
|
|
Soulblazer wrote:
how many pointers do i need?
Do you mean to read an image ? 1. My articles will have several images open at once, as they are applying filters.
Soulblazer wrote:
sorry abt that i just took up C# because of my project requirements
What did you use before/why the move to C# ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i have only learnt Java basic however my supervisor wants us to pick us C# to do this project. i am confused as to i have to pull out the red, green and blue values for all the pixels of the whole picture so i was thinking maybe i would need three pointers one for each color. i have been looking at all 6 of your image processing articles for the pass 1 month++.
|
|
|
|
|
Soulblazer wrote:
i have only learnt Java basic however my supervisor wants us to pick us C# to do this project
They are basically the same thing, so no biggie.
Soulblazer wrote:
i am confused as to i have to pull out the red, green and blue values for all the pixels of the whole picture so i was thinking maybe i would need three pointers one for each color
No - did you read my articles ? The byte array that is returned contains a series of bytes, with three for each pixel, blue, green, then red.
Why do you need to pull all the pixels out ? What will you do with them ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i need to display the pixel values inorder to see clearly how the values changes each function.
|
|
|
|
|
You're showing ALL The pixel values ? Must be a small bitmap, perhaps GetPixel is all you need.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
erm it is a big one but will be cropping out a certain part of the picture to see the values.
|
|
|
|
|
Same deal - if you only want to pull out a small number of values, you may decide to use getpixel, to simplify the code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok thanx i will work on it
|
|
|
|
|
i am doing a quiz web page using visual studio.net
i want to show 1 question per page
but i having trouble displaying the row of data i want.
For my database i created, i having 4 columns
- QnC --- Contains my questions and choices (text)
- QID --- questions identity number
- Choice --- choices identity number
- Ans --- answer (not that important, i havent reach this part)
this is my code for sql:
Cmd.CommandText = "SELECT [QnC] FROM Quiz " +
"WHERE [Choice]= " + i + " and " + "[QID]= " + i + "";
"i" is an integer i declared.
i wanna to display the question and choices but i only get to display question even if i use this code:
Cmd.CommandText = "SELECT [QnC] FROM Quiz " +
" WHERE [Choice]= " + i + "";
For this part the column is empty for the row contain questions.
Please tell me where i goes wrong...
fire85
|
|
|
|
|
You don't have a column called Choice, not that I can see. If you did, it would have the same value as QID ?
What does 'select QnC from Quiz' return you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sorry i typed wrongly, i modified it.
for what i expected from 'select QnC from Quiz'
is the Questions and choices that stored in that column.
fire85
|
|
|
|
|
What's the point of having two columns (Choice and QID), if they always contain the same value ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
For another webpage, I wanted to display only the questions in datagrid.
So i seperated it into 2 columns to make it more simple for me to call.
fire85
|
|
|
|
|
None of this makes any sense. You have two columns, but when you do a query, they both get checked for the SAME value ( the value of i ). how does that make it simple ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
But if put together in 1 column i dont know how to seperate it out when i need to display just question only. So i make it in this way.
But now think of it, when calling the questions will also be troublesome too
I will work on my database for better calling
Thanks alots, Sir Christian Graus.
|
|
|
|