|
Thank for your help
I understood the structure of image but
I don't know how to do to encrypt a text file into an image and decrypt again.
with Byte arrays, I understood it, too
Thank you very much for your help
---Thuc---
|
|
|
|
|
there are some documents on steganography in the codeproject articles, might be worth taking a look at some of those.
|
|
|
|
|
Ask Corinna John http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=475133[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
hi all,
How to identify bookmarks and hyperlinks in a pdf file
The need for me is to identify the following
1. To identify broken bookmarks(ie., Book marks not pointing to any location in the pdf)
2. To identify Bookmarks with null text.
3. To identify the Hyperlinks pointing to web page
4. To identify broken hyperlinks (ie., hyperlink pointing to null location)
Thanks in advance
regards
mist
|
|
|
|
|
THanks for listing your requirements, unfortunately, no one cares about them. What are the specific problems you are having in implementing them?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I would like to have a property to appear in a visual designer where the user can browse for a file, instead of just entering the path manually.
In a visual designer, your custom component can have properties which are displayed in the properties window of hte designer. For instance, if your property is of type bool , the designer lets you choose between true or false. Likely, if your property is of type Enum , the designer displays the list of the enum values you defined.
Now, I am pretty sure that I can have a property that will make the designer put ellipsis (...) so the user can click it and browse for a file.
If this is possible, what would be the type of my property?
|
|
|
|
|
|
|
Hi, I am creating a 5 star rating control using callbacks.
I am not able to send the value to the parent page and then save it. When I try to capture the click event of the image, I guess multiple events occur and then I loose the actual value. The actual value does not persists.
I have used five image controls and One hiddenField named 'hdn' and have written javascript functions for handling the OnMouseOver, OnMouseOut and Click Event. The functions are s follows:
--------Image Click Event----------
function onImgClick(strVal)
{
var countRec;
var imgName;
var message = strVal + ":" + "Click";
var context = "Click";
CallServer(message, context);
}
------------------------------------
----------OnMouseOver--------------
function callSwapImage(strVal)
{
var countRec;
var imgName;
for (countRec = 1; countRec<=parseInt(strVal); countRec++)
{
imgName = "imgStar" + String(countRec);
document.images[imgName].src = "images/starGold.gif";
}
}
---------OnMouseOut------------
function callSwapRedo()
{
var message = document.getElementById("rc1_hdn").value + ":" + "Redo";
var context = "Redo";
CallServer(message, context);
}
-------------------------------
In the code behind file of the user control I have written the following code in the Page_Load Event
protected void Page_Load(object sender, EventArgs e)
{
sCallBackFunctionInvocation = Page.ClientScript.GetCallbackEventReference(this, "message", "ShowSuccess",
"context");
String callbackScript;
callbackScript = "function CallServer(message, context)" +
"{ " + sCallBackFunctionInvocation + ";}";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
"CallServer", callbackScript, true);
HiddenField hdn = new HiddenField();
}
For the RaiseCallbackEvent I have written
public void RaiseCallbackEvent(string eventArgument)
{
string[] remCount = new string[2];
if (Rated != null)
{
if (eventArgument != "")
{
remCount = eventArgument.Split(':');
if (remCount[1] == "Click")
{
EventArgs args = new EventArgs();
Rated(this, args);
}
}
if (hdn.Value.ToString() == "" && remCount[0] == "0")
{
returnValue = "0";
totChecked = returnValue;
hdn.Value = returnValue;
}
else
{
returnValue = remCount[0];
hdn.Value = returnValue;
totChecked = returnValue;
}
}
RateVal = returnValue;
}
The below function is written to send the result back to the client end
public string GetCallbackResult()
{
return returnValue;
}
-----------------------------------
My problem comes now that I want to send the value for the image clicked to the parent page so that I can save the rating. For this I have declared the following event before the page load
public event System.EventHandler Rated;
and then I have declared the event handler for the same in my parent page
protected void Page_Load(object sender, EventArgs e)
{
rc1.Rated += new EventHandler(rc_fetchData);
//rc.Rated += new CommandEventHandler(rc_fetchData);
}
private void rc_fetchData(object sender, EventArgs e)
{
lblMsg.Text = ((HiddenField)rc1.FindControl("hdn")).Value.ToString();
//((HiddenField)rc.FindControl("hdn")).Value.ToString();
}
-----Have A Nice Day-----
|
|
|
|
|
How can i use two filters in the following code
person pp = obj.Find(delegate(person p) { return p.name == "abc"; });
because there should be one return statement in a single block.
So how will i declare another filter to refine the record
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sonia - you asked this question below. Don't repost questions, continue threads instead as this is just plain rude.
|
|
|
|
|
You can write several statements and use logical operators to return the value according to your filter requirements.
Logical Operators in C#[^]
|
|
|
|
|
person pp = obj.Find(delegate(person p) { return p.name == "abc" && BUY_A_BLOODY_C#_BOOK_FOR_THE_HUNDREDTH_TIME; });
|
|
|
|
|
Possibly a little too subtle. I still don't think she'll get it.
|
|
|
|
|
Yes, I agree. I still have a lot to learn to achieve your level of sarcasm and wit
|
|
|
|
|
J4amieC wrote: Yes, I agree. I still have a lot to learn to achieve your level of sarcasm and wit
Oh I don't know. That post made me laugh. I even showed it to people.
|
|
|
|
|
hi
i m newbie to C#.net , i have to create a usercontrol with a gridview in it i have to set its datasource to the dataset used in its parent form to do this i am setting properties at the usercontrol like this :
[System.ComponentModel.ComplexBindingProperties("DataSource","DataMember")]
public partial class UserControl1 : UserControl
{
public object DataSource
{
get
{
return dgvSearch.DataSource;
}
set
{
dgvSearch.DataSource = value;
}
}
public string DataMember
{
get{ return dgvSearch.DataMember ;}
set { dgvSearch.DataMember = value; }
}
public UserControl1()
{
InitializeComponent() ;
}
and from parent form i am setting the datasources for my parent control
BindingSource datasource;
DataSet data=new C21_SecurityDataSet() ;
DataTable dt = data.Tables.Add();
userControl11.DataSource = datasource = new BindingSource (data, "users");
usercontrol11.dataMember="users"
but no data displayed at my user control plz help me out
thanks
|
|
|
|
|
I have the column of type string in the database
Following is the data in that column
1
2
11
12
21
abc
If i sort the table with the help of this column then the output come in the following manner
1
11
12
2
21
abc
can i improve the order actually i want the output like 1 2 11 12 21 abc
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Why not add order by [column name] ASC
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
You could, but only with some extremely fancy logic. It's a string, so you have to abide by the rules of strings. Off the top of my head, I would think that you would have to remove the numeric type strings and sort them independently of the non-numeric strings and then combine the two together.
|
|
|
|
|
i can use the union query to first select the numeric and then an another union query to sort alphanumeric.
Am i doing right?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sonia Gupta wrote: i can use the union query to first select the numeric and then an another union query to sort alphanumeric.
Am i doing right?
For the love of God Sonia, just try it. I'm not going to type your code out for you.
|
|
|
|
|
Convert the data type of the column on the fly using convert or cast then reorder the converted column using ORDER BY.
Make sure the converted type is integer!
|
|
|
|
|
Hi,
I don't think SQL offers the required ordering.
The "natural sort order" as used for file names by Windows Explorer is available through
P/Invoke, so you can implement an IComparer interface like this:
using System.Runtime.InteropServices;
public static int Compare(string s1, string s2) {
if (s1!=null && s2!=null) return StrCmpLogicalW(s1, s2);
else return string.Compare(s1, s2, true);
}
[DllImport("shlwapi.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]
private static extern int StrCmpLogicalW(string s1, string s2);
I do not know how you could apply the above to database-based data; I would guess
you need to first fill a DataTable, then somehow get that sorted using the IComparer object.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Ordinarily I'd say left pad the numerics with SPACEs then sort, but SQL Server doesn't appear to have a PAD function? I thought Oracle did. What Database system are you using?
Some ideas for SQL Server:
select * from PadTest order by
REPLICATE(' ',8-LEN(X))+X
or
select * from PadTest order by
case ISNUMERIC(X)
when 1 then REPLICATE(' ',8-LEN(X))+X
else X end
modified on Friday, March 7, 2008 12:57 PM
|
|
|
|