|
1. Stop calling everyone sir, we are not a bunch of knights here you know
2. Stop posting the same friggin question every 5 minutes
[EDIT]
2 1/2. Why are you even posting when you clearly are not taking anyones advice anyway?
3. Finally, and most importantly, QUIT TRYING TO BE A PROGRAMMER BECAUSE YOU CLEARLY ARE NOT CUT OUT FOR A LIFE OF USING YOUR OWN BRAIN TO SOLVE A PROBLEM WHICH IS WHAT BEING A PROGRAMMER IS ALL ABOUT!!!!!!!!!!!! (12 should do it, now to bold or not to bold...)
4. Why have you not quit yet?!?!?
<wheres the="" damn="exploding head" smiley="" when="" you="" need="">
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
sorry dear, i was in critical problem. but now i have solved that problem. and i didnt use ur ideas.
and it was my test in one company and now i got job.
thank you very much. in future i will never post any problem here.
is it okkkk???????????????????????????????????????????????????????
and go to hell
yogesh
|
|
|
|
|
you had a test to see if you could get someone to do the work for you? thats a weird one
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
dear Sir, nothing weird about it. He is applying for a managerial job.
Luc Pattyn [Forum Guidelines] [My Articles]
- 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 the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
i wish i had known that sooner, i could have got my own company by testing myself how to become a Code Project[^] member
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
yogesh_softworld123 wrote: it was my test in one company and now i got job
Wait a moment! This forum post was part of a technical test in a job interview!?! Isn't that cheating?
|
|
|
|
|
yogesh_softworld123 wrote: in future i will never post any problem here
That's not the idea. This site is here to help people, including you. Reposting the same question repeatedly isn't going to get you the help you seek though. Neither is not following the advice you've been given and not explaining why.
If the advice given was incorrect, then you should post back to the same thread with an explanation of why it didn't help. If it was a problem with the way you expressed the problem, edit the post and the subject will change to modified so others can see it's changed and will reread the question.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
hi every body
i want know how can i convert the audio sample rate and sample size in wave file
Ex: i have audio files with sample size 16bit , audio sample rate 44khz
and i want to change it to 8 bit , audio sample rate 11khz
how can i do this by c#
thanks in advance
|
|
|
|
|
well after a quick google search, see here [^]for details.
I found that WAVE files can be stored in a number of different encodings, see here [^]for details.
So I would suggest finding the encoding you have first. Then you can look into the format of that encoding. For example MP3 encoding details can be found here[^].
Then you can parse the file and change the data you want then save the file again. Simple enough in theory, but are you prepared to attempt the work is the real question.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
i have one gridview the source code of gridview is given below.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="check" runat="server" Checked="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="title" HeaderText="title" />
<asp:BoundField DataField ="firstname" HeaderText="firstname" />
<asp:BoundField DataField ="lastname" HeaderText="lastname" />
<asp:BoundField DataField ="jobtitle" HeaderText="jobtitle" />
<asp:BoundField DataField ="company" HeaderText="company" />
<asp:BoundField DataField ="address1" HeaderText="address1" />
<asp:BoundField DataField ="address2" HeaderText="address2" />
<asp:BoundField DataField ="city" HeaderText="city" />
<asp:BoundField DataField ="state" HeaderText="state" />
<asp:BoundField DataField ="zipcode" HeaderText="zipcode" />
<asp:BoundField DataField ="country" HeaderText="country" />
<asp:BoundField DataField ="email" HeaderText="email" />
<asp:BoundField DataField ="phone" HeaderText="phone" />
<asp:BoundField DataField ="fax" HeaderText="fax" />
<asp:TemplateField HeaderText="requirement">
<ItemTemplate>
<asp:LinkButton ID="requirement" Text='<%#DataBinder.Eval(Container.DataItem,"requirement")%>' runat="server">
</asp:LinkButton>
<%--<asp:linkbutton id="requirement" runat="server" commandargument='<%# Eval("requirement") %>' commandname="Download">download file</asp:linkbutton>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField ="description" HeaderText="description" />
<asp:BoundField DataField ="find" HeaderText="find" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
c# code:
protected void btnDownload_click(object sender, EventArgs e)
{
foreach (GridViewRow gvr in GridView1.Rows)
{
CheckBox cb = (CheckBox)gvr.FindControl("check");
if (cb.Checked)
{
string filepath = gvr.Cells[14].Text;
DownloadFile(filepath);
}
}
}
protected void DownloadFile(string filepath)
{
System.IO.Stream iStream = null;
byte[] buffer = new byte[10000];
int length;
long dataToRead;
string filename = System.IO.Path.GetFileName(filepath);
try
{
iStream = new System.IO.FileStream(filepath, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read);
dataToRead = iStream.Length;
Response.ContentType = "application/octet-stream";
Response.AddHeader("content-Disposition", "attachment;filename=" + filename);
while (dataToRead > 0)
{
if (Response.IsClientConnected)
{
length = iStream.Read(buffer, 0, 10000);
Response.OutputStream.Write(buffer, 0, length);
Response.Flush();
buffer = new byte[10000];
dataToRead = dataToRead - length;
}
else
{
dataToRead = -1;
}
}
}
catch (Exception ex)
{
Response.Write("Error:" + ex.Message);
}
finally
{
if (iStream != null)
{
iStream.Close();
}
}
}
error message::Error:Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\675676'.
any body give me the solution
thankyou in advance
|
|
|
|
|
No one is auditing your entire code, especially when it isn't formatted and put into pre tags, never mind the fact that this isn't the asp.net forum.
|
|
|
|
|
mmmm.... you already posted the solution to your problem. Its clear by the error message is it not?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
here is my error message.
Error:Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\format.docx'
bellow is my total code
source code
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="check" runat="server" Checked="false"/>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="title" HeaderText="title" />
<asp:BoundField DataField ="firstname" HeaderText="firstname" />
<asp:BoundField DataField ="lastname" HeaderText="lastname" />
<asp:BoundField DataField ="jobtitle" HeaderText="jobtitle" />
<asp:BoundField DataField ="company" HeaderText="company" />
<asp:BoundField DataField ="address1" HeaderText="address1" />
<asp:BoundField DataField ="address2" HeaderText="address2" />
<asp:BoundField DataField ="city" HeaderText="city" />
<asp:BoundField DataField ="state" HeaderText="state" />
<asp:BoundField DataField ="zipcode" HeaderText="zipcode" />
<asp:BoundField DataField ="country" HeaderText="country" />
<asp:BoundField DataField ="email" HeaderText="email" />
<asp:BoundField DataField ="phone" HeaderText="phone" />
<asp:BoundField DataField ="fax" HeaderText="fax" />
<asp:TemplateField HeaderText="requirement">
<ItemTemplate>
<asp:LinkButton ID="requirement" CommandArgument='<%#Eval("requirement")%>' runat="server" OnClick="requirement_click">download file</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField ="description" HeaderText="description" />
<asp:BoundField DataField ="find" HeaderText="find" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
c# code:
protected void requirement_click(object sender, EventArgs e)
{
GridViewRow gvr = (GridViewRow)((LinkButton)sender).Parent.Parent;
if (((CheckBox)gvr.FindControl("check")).Checked)
DownloadFile(((LinkButton)sender).CommandArgument);
}
protected void DownloadFile(string filepath)
{
System.IO.Stream iStream = null;
byte[] buffer = new byte[10000];
int length;
long dataToRead;
string filename = System.IO.Path.GetFileName(filepath);
try
{
iStream = new System.IO.FileStream(filepath, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read);
dataToRead = iStream.Length;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "inline; filename=" + filename);
while (dataToRead > 0)
{
if (Response.IsClientConnected)
{
length = iStream.Read(buffer, 0, 10000);
Response.OutputStream.Write(buffer, 0, length);
Response.Flush();
buffer = new byte[10000];
dataToRead = dataToRead - length;
}
else
{
dataToRead = -1;
}
}
}
catch (Exception ex)
{
Response.Write("Error:" + ex.Message);
}
if (iStream != null)
{
iStream.Close();
}
}
plzzzzz give me the solution
thank you in advance
|
|
|
|
|
The error message clearly says that the filepath you have given can not be found. so maybe you should check the file is there. try putting the filepath in the error message into windows explorer.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
How can i write a C# script in selenium for Blank username and password feild?
|
|
|
|
|
hey dude what is selenium???
|
|
|
|
|
Lookee[^]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i think you need to post this message in ASP.Net forum.....
Have a Happy Coding.....
|
|
|
|
|
You can use server side validation if you don't
want to use client validation using javascript
You can also do it by asp validation control
If you know how to use asp validation control
Thank You
Vinod Kr.
Software Engineer
EBC Publishing LUcknow
|
|
|
|
|
I have the following class structure - as you can see the nested class has an additional Font that needs disposing.
I'm not too hot on Disposal techniques (the laziness of the managed world!), is the method I've used sufficient and 'safe'?
public class MyClass : IDisposable
{
private MyNestedForm myNestedForm;
public MyClass()
{
myNestedForm = new MyNestedForm();
}
public Font XYZFont
{
set { myNestedForm.XYZFont = value; }
}
public void Dispose()
{
myNestedForm.Dispose();
}
internal class MyNestedForm : Form
{
private Font xyzFont;
public Font XYZFont
{
get
{
if(xyzFont==null)
return Control.DefaultFont;
else
return xyzFont;
}
set { xyzFont = value; }
}
protected override void Dispose(bool disposing)
{
if (xyzFont != null)
xyzFont.Dispose();
base.Dispose(disposing);
}
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Looks OK to me. BTW, why are you exposing the nested class to outside of MyClass ?
|
|
|
|
|
Cool - thanks
N a v a n e e t h wrote: exposing the nested class to outside of MyClass
I haven't totally decided whether to keep the class nested or not. If I keep it nested I'll change it to private, but if I move it back outside (where it was originally) then it will need to stay internal.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Usually, when you override the Dispose(bool disposing) method, you do it like the following:
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (xyzFont != null)
xyzFont.Dispose();
}
base.Dispose(disposing);
}
A better explanation here[^].
DaveyM69 wrote: I'm not too hot on Disposal techniques (the laziness of the managed world!),
Don't do that, this is bad programming. In fact, I am tired to fix the code written by lazy programmers. If you are holding expensive resources, you give your clients a change to do cleanup when appropriate by calling your Dispose() method.
|
|
|
|
|
Le Centriste wrote: Don't do that
I know, that's why I was wanting to check before getting in to this too deep.
"disposing: true to release both managed and unmanaged resources; false to release only unmanaged resources."
I should have noticed that and put the managed stuff inside a disposing check - thanks for pointing it out.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I'm having a bit of a problem getting the Unicode version of this:
((char)((int)'a' + new Random().Next(26))).ToString();
The above snippet returns a random lowercase character. I'm trying to do the same thing for Unicode Characters in the range of 0621 - 064A
Suggestions?
If the post was helpful, please vote!
Why won't the worm just leave me be?
|
|
|
|