Hi all, I'm working on a large file transfer(P2P) in UDP air application. I want to connect client and server using TCP. Can anybody tell me how to connect both both in TCP. Thank you.
I am getting AJAX Control Toolkit is undefined error when I have the CombineScripts="true" on the ToolkitScriptManager:
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" EnablePageMethods="false" ScriptMode="Release"
LoadScriptsBeforeUI="false" runat="server" CombineScripts="true">
<CompositeScript>
<Scripts>
<asp:ScriptReference Path="~/JavaScript/jquery-1.4.1.min.js" />
<asp:ScriptReference Path="~/JavaScript/Custom.js" />
</Scripts>
</CompositeScript>
</ajaxToolkit:ToolkitScriptManager>
But when I set the CombineScripts to false everything seems to work. Why is this happening?
hello friends,
<div>
<label>
Date:
<span><input type="text" id="date" /></span>
<%--<%=Html.EditorFor(model=>model.Date) %>--%> // Should I use this as Input type?
</label>
<label>
Number#:
<%=Html.TextBox("Number", ViewData["inq"] ?? "")%>
</label>
<label>Comment</label>
<span>
<%=Html.TextArea("value")%>
<%=Html.ValidationMessage("value")%>
</span>
</div>
I am trying to get these three fields on the screen while user enters I am retreving the user enter data on front end.. when I am debugging I am not seeing these fields..
On the view I am using beginForm
<% using (Html.BeginForm("Update", "Home", FormMethod.Post, new { @id = "id" }))
{ %>
my method..
public JsonResult Update(StudentInfo info)
{
Update///
return Json(Status.ToString());
}
when I see in info I am not getting these three fields..
can any one help me out thanks
How to invoke a dll that is dynamically created (during runtime) in a sharepoint site? i am recieving an error that i dont have the load permissions.
Any help on this will be grateful.
I need to convert mediawiki into LaTeX syntax. The formulas should stay the same, but I need to transform, for example = something = into \chapter{something}.
Although this can be obtained with a bit of sed, things get a little dirty with the itemize environment, so I was wondering if a better solution can be produced. Anything that can be useful for this task ?
This is the reverse of this question (graciously copied). Pandoc was the answer to that question, but probably not yet for this.
Hi all, I'm trying to send large files using UDP Adobe air to CPP. While transferring large files some packets are missing. How can I retrieve the missing packets data? I'm first of all connecting client(air) with server(cpp) using tcp. After connection establishment I'm starting file transfer. I am planning to get the file missing data using tcp and then resending the missing packets using tcp. Can anybody tell me how can i come to know which packets are missing while transferring. Thank you.
Hi everyone...
i have a webservice that i want to test by typing the url in the address bar in the web browser
localhost:1981/myProject/admin/autocomplete.asmx
and when i do this it gives this compilation error
CS0234: The type or namespace name 'Oledb' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
i know this is because we added this in our web.config
<add namespace="System.Data.Oledb"/>
<add namespace ="System.Data"/>
in the namespaces section.....
when i call this web service through ajax it works but if i try to test it it gives this error.
Is there any way to prevent this?
hello friends,
i have
public jsonresult update(studentinfo s)
{
for(i=0;i>0;i++)
{
var x = // i am getting some x so i am checking again
if( x != null)
{
var updateuser = student.update(s.student,"","");
**return json(updateuser.ToString());** // if i keep it here i am getting exceptoin saying not all code paths return value bec this return i can not keep it out for loop bec each and evary updateuser i need to return json..
}
}
}
how to overcome this type of things?
thanks
this code works fine in Firefox but not in IE6.. i made changes using boolean true, false but still..
$('#PbtnSelectAll').click(function() {
$('#PricingEditExceptions input[type=checkbox]').attr('checked', 'checked');
$('#PbtnSubmit').show();
$('#PbtnCancel').show();
$('fieldset').find("input:not(:checkbox),select,textarea").attr('disabled',true);
$('#genericfieldset').find("input,select,textarea").removeAttr('disabled');
});
the problem is i am having the view with Fieldsets.. each fieldset having the checkbox when i click onselect all buton its should select all the fieldset checkboxes..but its not doing its allwasy doing for first fieldset which is closest....other things are igonring
but its working in firefox..
thanks
How to apply limit in php, mongodb when using mapreduce function?
I tried this
$cmd=array(// codition array
"mapreduce" => "user",
"map" => $map,
"reduce" => $reduce,
"out" => array("inline" => 1),
"limit"=>2
);
$db=connect();
$query = $db->command($cmd);// run command
But its not working it gives 2 documents.I can't use limit on sub documents.
If I have 100's of sub documents and then I want paging in sub documents.Then it fails.Is it possible to apply limit on sub documents?
I am trying this code to fetch data from wsdl.
Querying the website for the zipid("60630") works fine but in my code it gives the error as
"Invalid ZIP"
wsdlFile = 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl'
wsdlObject = WSDL.Proxy(wsdlFile)
wsdlObject.show_methods()
zipid = "60630"
result = wsdlObject.GetCityWeatherByZIP(ZIP=zipid)
print result[1]
Can someone please help whats wrong here and why the code is not working correctly.
Thanks !!!
Hello friends..
colNames: ['A','B','C','D'],
colModel: [
{ name: 'A', index: 'A', width: 90 },
{ name: 'B', index: 'B', width: 100 },
{ name: 'C', index: 'C', width: 70 },
{ name: 'D', index: 'D', edittype: 'select', width: 100, editoptions: { value: { 1: 'Yes', 2: 'No'}} }
],
My concersn here is.. I am displying A B C D values from db2... for Last Column D I need to put defalut drop down list for all the rows.
Thanks can any body help me out..
thanks
Invoke does not exist in the current context. The same method was not giving any error in Form.cs class but when I used in other class in same project it gives error. i am using threading on forms control.
private void UpdateText(object fileName)
{
if (Textbox.InvokeRequired)
{
UpdateTextCallback back = new UpdateTextCallback(UpdateText);
this.Invoke(back, new object[] { fileName });
}
}
I have a remote tracking branch tracked locally in my local repository using 'git branch -b branch-name origin/branch-name'.
My remote branch is test2/test2 (origin/branch-name) which is being tracked locally as test2.
The origin is also named test2.
I haven't checked-out my local tracking branch test2.
When i do a 'git pull origin remote-branch:local-tracked-branch' i get this error
[test2]$ git pull test2 test2:test2
From /gitvobs/git_bare/test2
! [rejected] test2 - test2 (non fast forward)
Whereas when i checkout my local tracking branch test2
and do pull 'git pull origin local-tracked-branch' i don't get the error
and i do a pull using 'git pull test2 test2'
From /gitvobs/git_bare/test2
* branch test2 - FETCH_HEAD
Auto-merging a.txt
Automatic merge failed; fix conflicts and then commit the result.
i know that adding a + (git pull test2 +test2:test2) would help but it overwrites local changes.
So how do i know which of my local branches are created by me locally using 'git branch new-branch-name' or tracked locally from remote branches using git branch -b branch-name origin/branch-name'?
Hi,
I am trying my hands on asp.net+ajax+httpmodule.
My Form
<form id="LoginForm" runat="server">
<asp:ScriptManager ID="LoginScriptMgr" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="LoginPanel" runat="server">
<ContentTemplate>
<asp:Label ID="lblLoginHeader" Text="Login" runat="server"></asp:Label>
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:Button ID="btnLogin" Text="Login" runat="server" OnClick="Login" />
<asp:Label ID="lblLoginStatus" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
C# Code
protected void Login(object sender, EventArgs e)
{
lblLoginStatus.Text = "Login Successful";
}
Web.config
<httpModules>
<add name="TimeModule" type="MyWebPortal.App_Code.TimeModule,App_Code"/>
</httpModules>
HTTP Module
public class TimeModule : IHttpModule
{
private HttpApplication oApps = null;
public void Dispose()
{
}
public void Init(System.Web.HttpApplication context)
{
oApps = context;
context.PreSendRequestContent += new EventHandler
(context_PreSendRequestContent);
}
void context_PreSendRequestContent(object sender, EventArgs e)
{
string message = "<!-- This page is being processed at " + System.DateTime.Now.ToString() + " -->";
oApps.Context.Response.Output.Write(message);
}
}
When i remove the TimeModule from Web.config my ajax works. If add the TimeModule then the label doesn't show the message "Login Successful".
Removing the ajax panel and with httpmodule available the label shows the message. So, how ajax panel was related to httpmodules?
Exactly I ned to do something like this is this possible?
<%
var Controller = null;
if (Model.ID== "ABC")
{
Controller = "Name";
}
else
{
Controller = "Detail";
}
%>
<% using (Html.BeginForm("edit", Controller, FormMethod.Post, new { @id="exc-" + Model.SID}))
{%>
<%= Html.Summary(true)%>
is this possible?
if i do I am getting exception...
ERROR: Cannot assign to an implicitly-typed local variable
Looking for any decent grid styles designer with standard features such as
select columns from a catalog
Change the ordering of columns
set column font/bold/italic etc.
set column styles - fixed left / right
etc.
Have done it before but don't have access to that code
Looking for any near ready to use sample before reinventing the wheel :)
preferably winforms but can use wpf too
I have some code in asp.net ( kindly given by someone else ) to query AD to get user name and email etc.
using System.DirectoryServices;
using System.DirectoryServices.ActiveDirectory;
using ActiveDs;
DirectorySearcher search = new DirectorySearcher(new DirectoryEntry(), string.Format("(samaccountname={0})", id));
if (search == null)
return id;
if (search.FindOne() == null)
return id;
DirectoryEntry usr = search.FindOne().GetDirectoryEntry();
IADsUser oUsr = (IADsUser)usr.NativeObject;
return string.Format("{0} {1}", usr.Properties["givenname"].Value, usr.Properties["sn"].Value);
However this requires impersonation with an id that's required to be changed every 2 weeks and then updated in the web.config which is often forgotten
Is there any non impersonation code to achieve the same result ?
UPDATE - it's a config tool and it looks up name, email id etc.
I like the service a/c idea
Q - How is it possible to run ( impersonate ) just the AD code with a "service" a/c ? any samples/code ?
how do you impersona
applications which require .NET 2.0 and 3.5 are not running after installing VS 2010 which comes with .NET 4.0
Please help me how can i make .NET 2.0 and 3.5 running using .NET 4.0.........
not will be install both .NET 3.5 and .NET 2.0 along with .NET 4.0....
Thanks in advance....
I followed the instructions as given in Using The Notifications API. Also I faced many problems like the below, because I added the document.querySelector() inside the <head> part:
Uncaught TypeError: Cannot call method 'addEventListener' of null
Now I have the below source, where I am able to Check Notification Support, and Check Notification Permissions links.
Guide me how to bring in notifications in a simpler way. Also, I tried this:
$("#html").click(function() {
if (window.webkitNotifications.checkPermission() == 0) {
createNotificationInstance({ notificationType: 'html' });
} else {
window.webkitNotifications.requestPermission();
}
});
Now I am stuck with this source. I need to generate HTML & Simple Notifications. Am I missing something? Please guide me.
Source:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Desktop Notifications</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
function checkNotifications() {
if (window.webkitNotifications)
alert("Notifications are supported!");
else
alert("Notifications are not supported for this Browser/OS version yet.");
}
function createNotificationInstance(options) {
if (window.webkitNotifications.checkPermission() == 0) { // 0 is PERMISSION_ALLOWED
if (options.notificationType == 'simple') {
return window.webkitNotifications.createNotification('icon.png', 'Notification Title', 'Notification content...');
} else if (options.notificationType == 'html') {
return window.webkitNotifications.createHTMLNotification('http://localhost/');
}
} else {
window.webkitNotifications.requestPermission();
}
}
</script>
<style type="text/css">
* {font-family: Verdana, sans-serif;}
body {font-size: 10pt; margin: 0; padding: 0;}
p {margin: 5px;}
a {color: #09f; text-decoration: none;}
a:hover {color: #f00;}
</style>
</head>
<body>
<p><strong>Desktop Notifications</strong></p>
<p>Lets see how the notifications work in this browser.</p>
<p>
<a href="#" onclick="checkNotifications(); return false;">Check Notification Support</a>.
Next <a href="#" onclick="alert('Notifications are ' + ((window.webkitNotifications.checkPermission() == 0) ? '' : 'not ') + 'allowed!'); return false;">Check Notification Permissions</a>
and if permissions are not there,
<a href="#" onclick="window.webkitNotifications.requestPermission(); return false;">Request Permissions</a>.
Create a
<a href="#" id="text">Simple Notification</a>
or
<a href="#" id="html">HTML Notification</a>.
</p>
</body>
<script type="text/javascript">
document.querySelector("#html").addEventListener('click', function() {
if (window.webkitNotifications.checkPermission() == 0) {
createNotificationInstance({ notificationType: 'html' });
} else {
window.webkitNotifications.requestPermission();
}
}, false);
document.querySelector("#text").addEventListener('click', function() {
if (window.webkitNotifications.checkPermission() == 0) {
createNotificationInstance({ notificationType: 'simple' });
} else {
window.webkitNotifications.requestPermission();
}
}, false);
</script>
</html>