hi,
i called canvas.drawBitmap to draw an image, but somehow it's showing up behind/underneath the custom view (or it's background). can someone explain this? thanks.
In an ASP.NET web application using C#, when we double click on design it will go to code behind page (cs file), but problem here is, when we double click on design its going to script of source file. Why it is happening?
I have a shell script that I execute after uninstalling a web application. The script is meant to clean up permissions that were needed during the execution of the application.
find /opt/path -exec setacl -d user:myUser{} ';'
After this executes and the acl is removed I am left with an acl that looks as follows
user:101:--- /opt/path
How can I properly call setacl to remove the user without leaving behind a uid?
In asp.net web application using c#, when we double click on design it will go to code behind page(cs file). but problem here is, when we double click on design its going to script of source file. why it is happening
I have an asp.net button, that when clicked calls a code behind function. The function does some evaluation, and then I want to call javascript from within this asp.net function.
The application on which I am working has a web service exposing various methods. Most of these methods use WebOperationContext.Current to set headers up to prevent cacheing. This works fine when the service methods are consumed in AJAX via the generated proxy, but when I attempt to do the same thing from code-behind, WebOperationContext.Current is null.
Can anyone tell me how to confer appropriate call context on the method invocation?
I need to use the Tycho plug-in for Maven behind a firewall that requires authentication. The workaround here:
https://issues.sonatype.org/browse/TYCHO-279
Nearly works, I just need a way of providing a username and password.
Can anyone help?
How does a T9 dictionary work? What is the data structure behind it. If we type '4663' we get 'good' when we press down button we get 'gone' then 'home' etc...
Hi,
when the number of applications running in a pc increases,
the power consumed by the PC is also increasing.
Is this correct?
I think the reason behind this is CPU.
Please let me know what role the CPU plays for more power usage.
Thanks,
Kavi
Is there a way to capture the screen but without the app itself getting shown. I know how to minimize or make a frame invisible but this has to be done real fast cos it's going to happen alot in each second (at least once every second). I want it to look something like the magnifier in Windows Vista/7. (The app can see behind itself.)
Thanks in advance.
hello
i downloaded fancybox.net and edditted the example file from the download pack.
i added a google maps map.
and when i click on the iframe link, the iframe popup apears BEHIND the google maps map.
thats not the way i want it offcourse.
what did i do wrong?
i didn't change the original code from the example file.
see this image for the error:
http://img297.imageshack.us/img297/8981/knipsel.png
I've got very limited knowledge about Erlang, but as far as I understand, it can spawn "processes" with a very low cost.
So I wonder, what are those "processes" behind the scenes?
Are they Fibers? Threads? Continuations?
I have tried this
login_div.Style("display") = "none";
But it's not working.how can I set the display of the div to none through code behind,
in aspx I have a div:
<div id="login_div" runat="server">
Hi,
i have a wcf service which runs perfectly on my dev machine (vs2010, target 3.5) but once deployed, it shows me the code behind of the service (actually the plain text of the .svc file) and not the normal service page:
<%@ ServiceHost Language="C#" Debug="true" Service="SilverlightPoc.Web.FinanceData" CodeBehind="FinanceData.svc.cs" %>
Anyone any idea why the .svc file is rendered as plain text and not as wcf service?
please any 1 can solve it...
how can i select single file page model or code behind page model......please...solve.../ ow can programmer select each according to condition with visual studio 2008 (3.5))
Hi,
I am trying extract number, from line has 'copies : 5' string.
this look behind expression not working.
echo "copies : 5" |perl -ne 'print $1 if /(\d+)(?
Thanks
Hi all,
I developed a WindowsFormsApplication having a Form of Border Style as "FixedToolWindow", now the problem is while I am going to minimize any other opened application then my application going behind of all the application opened already. I am not getting where the problem is exactly. So can anybody help me to find out where the problem and how to short out it ?
Any help will be appreciated.
Thanks in Advance
Background
I frequent the OpenGL ES documentation site at http://www.khronos.org/opengles/sdk/1.1/docs/man/. Even though the content is completely static, it seems to force a reload on every single page I visit, which is very annoying.
I have a squid 3.0 proxy set up (apt-get install squid3 on Ubuntu 10.04), and I added a refresh_pattern to force the pages to cache:
refresh_pattern ^http://www.khronos.org/opengles/sdk/1\.1/docs/man/ …
1440 20% 10080 …
override-expire ignore-reload ignore-no-cache ignore-private ignore-no-store
This is all on one line, of course. While this appears to work for the XHTML documents (e.g., glBindTexture), it fails to cache the linked content, such as the DTD, some .ent files (?) and some XSL files. The delay in fetching these extra files delays rendering of the main document, so my principal annoyance isn't fixed.
The only difference I can glean with these ancillary files is that they come with an Expires: header set to the current time, whereas the XHTML document has none. But I would have expected the override-expire option to fix this. I have confirmed that documents have the same base URL. I have also truncated the pattern to varying degrees, with no effect.
My questions
Why does the override-expire option not seem to work?
Is there a simple way to tell squid to unconditionally cache a document, no matter what it finds in the response headers?
(Hopefully) relevant output
cache.log
Jan 01 10:33:30 1970/06/25 21:18:27| Processing Configuration File: /etc/squid3/squid.conf (depth 0)
Jan 01 10:33:30 1970/06/25 21:18:27| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
Jan 01 10:33:30 1970/06/25 21:18:27| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
Jan 01 10:33:30 1970/06/25 21:18:27| WARNING: use of 'ignore-no-cache' in 'refresh_pattern' violates HTTP
Jan 01 10:33:30 1970/06/25 21:18:27| WARNING: use of 'ignore-no-store' in 'refresh_pattern' violates HTTP
Jan 01 10:33:30 1970/06/25 21:18:27| WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP
Jan 01 10:33:30 1970/06/25 21:18:27| DNS Socket created at 0.0.0.0, port 37082, FD 10
Jan 01 10:33:30 1970/06/25 21:18:27| Adding nameserver 192.168.1.1 from /etc/resolv.conf
Jan 01 10:33:30 1970/06/25 21:18:27| Accepting HTTP connections at 0.0.0.0, port 3128, FD 11.
Jan 01 10:33:30 1970/06/25 21:18:27| Accepting ICP messages at 0.0.0.0, port 3130, FD 13.
Jan 01 10:33:30 1970/06/25 21:18:27| HTCP Disabled.
Jan 01 10:33:30 1970/06/25 21:18:27| Loaded Icons.
Jan 01 10:33:30 1970/06/25 21:18:27| Ready to serve requests.
access.log
Jun 25 21:19:35 2010.710 0 192.168.1.50 TCP_MEM_HIT/200 2452 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/glBindTexture.xml - NONE/- text/xml
Jun 25 21:19:36 2010.263 543 192.168.1.50 TCP_MISS/304 322 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml1-transitional.dtd - DIRECT/74.54.224.215 -
Jun 25 21:19:36 2010.276 556 192.168.1.50 TCP_MISS/304 370 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/mathml.xsl - DIRECT/74.54.224.215 -
Jun 25 21:19:36 2010.666 278 192.168.1.50 TCP_MISS/304 322 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml-lat1.ent - DIRECT/74.54.224.215 -
Jun 25 21:19:36 2010.958 279 192.168.1.50 TCP_MISS/304 322 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml-symbol.ent - DIRECT/74.54.224.215 -
Jun 25 21:19:37 2010.251 276 192.168.1.50 TCP_MISS/304 322 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml-special.ent - DIRECT/74.54.224.215 -
Jun 25 21:19:37 2010.332 0 192.168.1.50 TCP_IMS_HIT/304 316 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/ctop.xsl - NONE/- text/xml
Jun 25 21:19:37 2010.332 0 192.168.1.50 TCP_IMS_HIT/304 316 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/pmathml.xsl - NONE/- text/xml
store.log
Jun 25 21:19:36 2010.263 RELEASE -1 FFFFFFFF D3056C09B42659631A65A08F97794E45 304 1277464776 -1 1277464776 unknown -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml1-transitional.dtd
Jun 25 21:19:36 2010.276 RELEASE -1 FFFFFFFF 9BF7F37442FD84DD0AC0479E38329E3C 304 1277464776 -1 1277464776 unknown -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/mathml.xsl
Jun 25 21:19:36 2010.666 RELEASE -1 FFFFFFFF 7BCFCE88EC91578C8E2589CB6310B3A1 304 1277464776 -1 1277464776 unknown -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml-lat1.ent
Jun 25 21:19:36 2010.958 RELEASE -1 FFFFFFFF ECF1B24E437CFAA08A2785AA31A042A0 304 1277464777 -1 1277464777 unknown -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml-symbol.ent
Jun 25 21:19:37 2010.251 RELEASE -1 FFFFFFFF 36FE3D76C80F0106E6E9F3B7DCE924FA 304 1277464777 -1 1277464777 unknown -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/xhtml-special.ent
Jun 25 21:19:37 2010.332 RELEASE -1 FFFFFFFF A33E5A5CCA2BFA059C0FA25163485192 304 1277462871 1221139523 1277462871 text/xml -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/ctop.xsl
Jun 25 21:19:37 2010.332 RELEASE -1 FFFFFFFF E2CF8854443275755915346052ACE14E 304 1277462872 1221139523 1277462872 text/xml -1/0 GET http://www.khronos.org/opengles/sdk/1.1/docs/man/pmathml.xsl
Hi, I have a asp.net button which has click event which basically adds data into datbase. I also have a radiobuttonlist(i.e Approve / Decline) and a textbox. If user selects decline, the textbox becomes visible. I want to run validation that when user clicks on submit button, if the decline is selected then the textbox can not blank. I have used jquery validation for that. when I click button, the message apppears next to textbox that the field is required but it does not stop the execution of code behind. i.e.It adds data into database. Here is my code.
<script type="text/javascript" language="javascript">
$(function() {
$('#declinediv').hide();
////////
var $radBtn = $("table.rblist input:radio");
$radBtn.click(function() {
var $radChecked = $(':radio:checked');
var value = $radChecked.val();
if (value == 'Decline' || value == 'Approve') {
if (value == 'Decline')
$('#declinediv').show();
else
$('#declinediv').hide();
}
else {
$('#declinediv').hide();
}
});
//////////////////////////
$("#aspnetForm").validate({
rules: {
<%=txtdeclinereason.UniqueID %>: {
minlength: 2,
required: true
}
}, messages: {
<%=txtdeclinereason.UniqueID %>:{
required: "* Required Field *",
minlength: "* Please enter atleast 2 characters *"
}
}, onsubmit: true
});
//////////////////////////////////
$('#btnsubmit').click(function(evt){
var isValid = $("#aspnetForm").valid();
if (!isValid)
{
evt.preventDefault();
}
});
});
function myredirect(v, m, f) {
window.location.href = v;
}
</script>
<table style="border: 1px black solid; text-align: center; vertical-align: middle"
width="100%">
<tr>
<td>
<asp:RadioButtonList ID="rbtnlstapprover" runat="server" RepeatDirection="Horizontal"
CssClass="rblist" DataTextField="username" DataValueField="emailaddress">
<asp:ListItem Text="Approve" Value="Approve" />
<asp:ListItem Text="Decline" Value="Decline" />
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="rbtnlstapprover"
Text="*" ErrorMessage="Please select atleast one Approver" ValidationGroup="approvalgroup"
Display="Dynamic" />
</td>
</tr>
<tr>
<td>
<div id="declinediv">
<asp:TextBox ID="txtdeclinereason" runat="server" TextMode="MultiLine" Columns="80"
Rows="5" />
</div>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnsubmit" runat="server" Text="Submit" CssClass="RegularButton"
CausesValidation="true" ValidationGroup="approvalgroup" OnClick="btnsubmit_Click" />
</td>
</tr>
</table>
How do I stop the execution of code behind? Thanks for your help.
Hi
I am new to wpf and am having a problem which may or may not be trivial. I have defined a custom control as follows in the resource dictionary:
<ResourceDictionary
x:Class="SyringeSlider.Themes.Generic"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SyringeSlider">
<Style TargetType="{x:Type local:CustomControl1}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CustomControl1}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Canvas Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Name="syringeCanvas">
</Canvas>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Unfortunately I cannot go beyond this because I would like to draw a geometry onto the canvas consisting of a set of multiple line geometries whose dimensions are calculated as a function of the space available in the canvas. I believe that I need a code behind method to do this, but have not been able to determine how to link the xaml definition to a code behind method.
Note that I have set up a class x:Class="SyringeSlider.Themes.Generic" for specifically this purpose, but can't figure out which Canvas property to link the drawing method to.
My drawing method looks like this
private void CalculateSyringe()
{
int adjHeight = (int) Height - 1;
int adjWidth = (int) Width - 1;
// Calculate some very useful values based on the chart above.
int borderOffset = (int)Math.Floor(m_borderWidth / 2.0f);
int flangeLength = (int)(adjHeight * .05f);
int barrelLeftCol = (int)(adjWidth * .10f);
int barrelLength = (int)(adjHeight * .80);
int barrelRightCol = adjWidth - barrelLeftCol;
int coneLength = (int)(adjHeight * .10);
int tipLeftCol = (int)(adjWidth * .45);
int tipRightCol = adjWidth - tipLeftCol;
int tipBotCol = adjWidth - borderOffset;
Path mySyringePath = new Path();
PathGeometry mySyringeGeometry = new PathGeometry();
PathFigure mySyringeFigure = new PathFigure();
mySyringeFigure.StartPoint = new Point(0, 0);
Point pointA = new Point(0, flangeLength);
mySyringeFigure.Segments.Add(new LineSegment(pointA, true));
Point pointB = new Point();
pointB.Y = pointA.Y + barrelLength;
pointB.X = 0;
mySyringeFigure.Segments.Add(new LineSegment(pointB, true));
// You get the idea....Add more points in this way
mySyringeGeometry.Figures.Add(mySyringeFigure);
mySyringePath.Data = mySyringeGeometry;
}
SO my question is:
1) Does what I am trying to do make any sense?
2) Can a use a canvas for this purpose? If not, what are my other options?
Thanks!
Hi there,
I need to update some of the values of the item being edited in my code-behind based on some values in a custom Edit Form on our Rad Grid. Can I access the item (and update some values) from one of the Grid's event handlers? Currently I'm storing the values in temporary variables and then injecting the new values in the ObjectDataSource's Inserting/Updating event handlers, but it would be much nicer if I could do it all in one spot. (I can't do it all in the ObjectDataSource event handlers as I can't access the controls inside my Grid's Edit Form.)
I've been playing with the ExtractValues and UpdateValues methods of the GridEditableItem object, but I'm not having any luck.
Any tips would be greatly appreciated :)
Hi All,
This might be something very straight forward and I really think it should work as is, but it doesn't... I have the following scenario:
var itemSource = new Binding
{
Path = new PropertyPath("ItemList"),
Mode = BindingMode.OneTime
};
comboBox.SetBinding(ItemsControl.ItemsSourceProperty, itemSource);
ItemList is simply:
public IList<string> ItemList
{
get
{
return Enum.GetNames(typeof(OptionsEnum)).ToList();
}
}
I would have expected this to bind the list of items to the Combobox, and when I do it in XAML it works fine, but I have to do it in code behind...
Any ideas?
I have a using Tweepy, a python wrapper for Twitter.I am writing a small GUI application in Python which updates my twitter account.
Currently, I am just testing if the I can get connected to Twitter, hence used test() call. I am behind Squid Proxy server.What changes should I make to snippet so that I should get my work done.
Setting http_proxy in bash shell did not help me.
def printTweet(self):
#extract tweet string
tweet_str = str(self.ui.tweet_txt.toPlainText()) ;
#tweet string extracted.
self.ui.tweet_txt.clear() ;
self.tweet_on_twitter(str);
def tweet_on_twitter(self,my_tweet) :
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET);
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET) ;
api = tweepy.API(auth) ;
if api.test() :
print 'Test successful' ;
else :
print 'Test unsuccessful';
I am customizing the ajax html editor. I am creating a class which derives from ajax html editor, and overriding FillTopToolbar() method to have limited toolbar buttons. I am trying to use this in my aspx page.
<%@ Register namespace="Content" tagprefix="edit" %>
<edit:MyEditor runat="server" Width="100%" Height="250px"/>
I am able to see the editor in my aspx page.
The problem comes when I give an ID to the control
<edit:QNAEditor ID="htmlEditor" runat="server" Width="100%" Height="250px"/>
I get an error in the designer file in the below line.
protected global::Content.MYHTMLEditor htmlEditor;
I am not able to use it in code behind. I am using VS 2010.
Please help me in this regard.
i have a master page and a child aspx page, coneected to each other. the master page has the form in it. Now the child page has checkboxes, whose value i would like to pass to another child page with same master page behind it.
Can i change the action=abc.aspx and method=post?
How can i send all the checkbox values (checkbox.text = [email protected]) to the next page?
there are lots of these values that need to pass to nex tpage.