15,891,864 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by avishekrc (Top 41 by date)
avishekrc
8-May-15 6:13am
View
Existing.Where(e => e.StartsWith(character)).ToList()///this is where it is taking time.
avishekrc
23-Jun-14 9:53am
View
same result.
avishekrc
23-Jun-14 9:27am
View
Requested URL
http://localhost:55581/api/XYZ/PostMyService/updatedBy/1/myobjname/ABC.WS.Enrollment.Client.Model.MyClass
avishekrc
3-Nov-13 13:52pm
View
I think I have explained it clearly in the subject itself,"Round Robin Scheduling:How to find the Average Queue Length and Maximum Queue Length of the Ready Queue". May I know,which part of it you find incomplete?
avishekrc
3-Nov-13 12:54pm
View
In case if you know the answer, please comment.Otherwise please refrain from wasting your time by saying generic terms like 'elementary mathematics', 'understanding', 'knowledge', 'reasoning' etc, because:
1.Any one(even I also, I guess:)) can post such comment,does not require expertise of your level(687k, I know!!)!
2.I have searched every possible resources and could not find any solution or at least any direction towards it.Every where they are showing how to compute Avg Wait time,avg turnaround time,Process completion time,but no where they have discussed about the algorithm/process to find the avg queue length.Still I asked about my understanding,and no where did I mention that 'I don't know how to apply that guess'. All I requested was to confirm,if that understanding is correct or not.
avishekrc
3-Nov-13 1:17am
View
I know how to find mean of a series of values.
The question is:what is the logic of finding the maximum and average queue length computed?
My understanding is:after completion of every cpu cycle/release of resource check the ready queue length,add them and divide them by the total execution time of all the process. And in between check the max length.Is that understanding correct?Or there is some other algorithm/logic to find that(specially in case of RR scheduling)?
avishekrc
14-Mar-13 10:09am
View
I tried this one and got the last parameter(4):http://[^/]+/([^/]+)/[^/]+/[^/]+/?
But I need to extract the 1st parameter(3).
If I try http://[^/]+/([^/]+)/[^/]+/ it gives 3/4.
Also I need the Method Name:Mul
avishekrc
14-Nov-12 6:11am
View
Strange!I still haven't found any response in CP,thats interesting!!Is my question too naive??
avishekrc
1-Feb-12 9:13am
View
Upto memberDoc.SelectSingleNode("ROOT/tblmembers/additionalinfo").InnerText is working fine.
Whenever I am giving memberDoc.SelectSingleNode("ROOT/tblmembers/additionalinfo/patientadditionalinfo[@id='1']").InnerText...it is coming as null.
avishekrc
24-Jan-12 5:33am
View
Thanks,but what about order of importance or mostly used patterns?
avishekrc
30-Nov-11 4:42am
View
Incorrect syntax near '2'
avishekrc
30-Nov-11 4:29am
View
'Now' is not a recognized function name.I am using sqlserver 2005.May be its avaliable in 2008.
avishekrc
30-Nov-11 4:27am
View
Hi Karthik,
Thanks,but here is another catch:
In my tblactivity the checkintime colm values are stored as '01:55 PM', '02:20 AM'etc. so it's not giving the correct data.
avishekrc
1-May-11 11:39am
View
Hi Brian,
As per your suggestion,I have tried the first link for IE only.
Please find below my modified changeService() function.
However,xmlhttp.readyState is giving the value 1.
What can be the reason?
<pre>var xmlhttp='';
function changeService(cntrlCampus)
{ debugger;
var _scampus = cntrlCampus.value;
var service = document.getElementById("ctl00_cphContentSection_hdnservice").value;
var age = document.getElementById("ctl00_cphContentSection_hdnAge").value;
var configxmlPath = 'http://localhost:2753/PatientPortal_MH/MemberForms/xml/';
var requestUrl=configxmlPath + 'Services.xml';
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp)
{
//xmlhttp.onreadystatechange = xmlhttpChange(age,_scampus,service);
xmlhttp.open("GET", "requestUrl", true);
xmlhttp.onreadystatechange= function test()
{
if (xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
}
xmlhttp.send(null);
}
}
}</pre>
Thanks
avishekrc
30-Nov-10 2:57am
View
Sorry,I did not check your comment,after discussing with Netwrok Guy,will let you know.Please ignore my answer below.
avishekrc
30-Nov-10 2:54am
View
Hi Manfred,
Please find below my comments as another answer.
avishekrc
30-Nov-10 2:39am
View
Hi,
I am getting the error:407:Proxy Authentication Required!
This is how my new function look like:
public static string TranslateText(string input, string languagePair, Encoding encoding)
{
string url = String.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text={0}&langpair={1}", input, languagePair);
string result = String.Empty;
WebClient webClient = new WebClient();
webClient.Encoding = encoding;
NetworkCredential netcredit = new NetworkCredential("archowdhury", "Secure*45", "corp");
webClient.Credentials = netcredit;
WebProxy proxyObject = new WebProxy("http://proxy1:3128/");
proxyObject.Credentials = new System.Net.NetworkCredential("archowdhury", "Secure*45", "corp");
webClient.Proxy = proxyObject;//if I don't give webClient.Proxy-it returns Error 407-ProxyAuthentication Required!
result = webClient.DownloadString(url);
//result = webClient.DownloadString("http://www.google.com");//just to check with google itself,still the same error
Match m = Regex.Match(result, "(?<=<div id=result_box dir=\"ltr\">)(.*?)(?=</div>)");
if (m.Success)
result = m.Value;
return result;
}
avishekrc
30-Nov-10 1:21am
View
1.What happens if you don't set credentials on the webclient?It is thowing the same error.
2.How to specify the proxy servers address here?Give me some Idea.
avishekrc
26-Nov-10 8:05am
View
Hi,
I am using the code as suggested here:<a href="http://blogs.msdn.com/b/shahpiyush/archive/2007/06/09/3188246.aspx"></a>
Please find my code below:
I have two text boxes,and in text_change event of one text box I am calling the method which will convert the text entered in English in the first text box into the second text box in some other language.
<pre>
protected void txtEnglish_TextChanged(object sender, EventArgs e)
{
// txtMalay.Text = txtEnglish.Text;
// "ar|en"
string langpair="en|ar";
txtMalay.Text = TranslateText(txtEnglish.Text,langpair);
}
public string TranslateText(string input,string languagePair)
{
try
{
// string url = String.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text={0}&langpair={1}", input, languagePair);
string url = String.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text={0}&langpair={1}", input, languagePair);
WebClient webClient = new WebClient();
//WebClient wc = new WebClient();
webClient.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes("user:pass")));
// string a = ws.DownloadString("http://www.example.com");
webClient.Encoding = System.Text.Encoding.UTF8;
NetworkCredential netcredit = new NetworkCredential("archowdhury", "Secure*45", "corp");
webClient.Credentials = netcredit;
webClient.Proxy = new System.Net.WebProxy()
{
Credentials = new System.Net.NetworkCredential("archowdhury", "Secure*45", "corp")
};
string result = webClient.DownloadString(url);
result = result.Substring(result.IndexOf("id=result_box") + 22, result.IndexOf("id=result_box") + 500);
result = result.Substring(0, result.IndexOf("</div"));
return result;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
return ("failure");
}
</pre>
I am getting the following exception:"
UNABLE TO CONNECT TO THE REMOTE SERVER!
"
Whats wrong here?
avishekrc
14-Oct-10 6:40am
View
I have tried TextChanged() event,but it will only raise after somepostback,right?But here there is no button click event in between.
avishekrc
7-Sep-10 5:34am
View
Hi,
I have got RegEx for time:
^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$
And for CSV:
[0-9]+(,[0-9]+)*
But I need to combine them.
avishekrc
19-Aug-10 8:05am
View
Thanks dude!but at the same time,is there any way to keep their Aspect ratio(Width:Height) unaltered?
avishekrc
29-Jul-10 6:53am
View
Can you please write such small model SP?
avishekrc
28-Jul-10 2:13am
View
Can you post the full correct syntax please?
avishekrc
28-Jul-10 2:12am
View
Can you post the full correct syntax please?I can't post properly what I have tried..
avishekrc
28-Jul-10 2:07am
View
Deleted
'Secondpage.aspx?ProjectId=<%#DataBinder.Eval(Container.DataItem,"ProjectId") %>'
what's wrong here?
avishekrc
28-Jul-10 1:47am
View
Deleted
My page is as follows:
<asp:datalist id="DataList1" runat="server" repeatdirection="Horizontal" repeatcolumns="4" datakeyfield="ProjectId" datasourceid="SqlDataSource1">
<itemtemplate>
<asp:imagebutton id="ImageButton1" width="100px" runat="server"
="" postbackurl="Default2.aspx?ProjectId<%#DataBinder.Eval(Container.DataItem,"ProjectId") %>" imageurl="<%#DataBinder.Eval(Container.DataItem,"ImagePath")%>">
avishekrc
27-Jul-10 10:58am
View
The double quotes I had solved.It is redirecting to the second page,only problem is successfully sending the query string value.
avishekrc
27-Jul-10 10:49am
View
Thanks!!
But then just a small problem,in my second page URL,it is coming as secondpage.aspx?Img_Id=3C%#DataBinder.Eval(Container.DataItem,%22ProjectId%22)%20%%3E
instead of secondpage.aspx?Img_Id=100(the img id )
what to do?
avishekrc
19-Jul-10 7:40am
View
OK,but question remains,how to?
avishekrc
19-Jul-10 5:42am
View
Deleted
The URL from where I have got the Silverligt Application is:(missed in the qstn)
http://www.silverlightshow.net/items/Image-slider-control-in-Silverlight-1.1.aspx
avishekrc
31-May-10 7:57am
View
Please look at the answer below,I could not post it in the comment,hence posting it here.
avishekrc
19-May-10 9:11am
View
sorry the code did not go,see below:
I have added my code in the add an answer section:
avishekrc
19-May-10 9:10am
View
Yes, I have set HeaderText Property of the tab panels and set the ActiveTabIndex to 0;
see below my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication5._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<title>Untitled Page
<asp:scriptmanager id="ScriptManager1" runat="server">
<asp:tabcontainer id="TabContainer1" runat="server" activetabindex="0"
="" height="140px">
<asp:tabpanel runat="server" headertext="TabPanel1" id="TabPanel1">
<contenttemplate>
dfesgdsge
<asp:tabpanel id="TabPanel2" runat="server" headertext="TabPanel2">
<contenttemplate>
dxhgrsherherhe
<asp:tabpanel id="TabPanel3" runat="server" headertext="TabPanel3">
<contenttemplate>
ggggggggggggggtttttttttddddddddddd
avishekrc
19-May-10 1:22am
View
but I want to make the btn enabled depending on the specific item chosen from the radbtnlist...
avishekrc
19-May-10 1:20am
View
nope,not working..can u pls write the above code in CheckChanged event?I have TextChanged event,I tried to write within that,but did not work..
avishekrc
12-May-10 0:29am
View
Thanks dude!it was really helpful!
avishekrc
11-May-10 3:33am
View
Thank u Brij for ur response,can u elaborate with an example like how cahing,session are going to affect the performance and how to deal with them so that they best suit the need?
avishekrc
10-May-10 3:16am
View
Yes,it is blocked here!
avishekrc
4-May-10 3:54am
View
Thanks Sandeep,I did just that and got what I want!I thought I will find some guys here who are associated with such web sites!
Christian,I know that...but in case when you have little time would you go to buy a book or quickly search the net?
avishekrc
4-May-10 3:31am
View
I want some sample questions,quizzes upon which I can practice.
Show More