Search Results

Search found 5180 results on 208 pages for 'outside'.

Page 24/208 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • WPF RelativeSource FindAncestor doesn't work outside of the Control.Resources context?

    - by sker
    I have this VisualBrush resource I took from some site and I apply it with triggers to a TextBox. <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.4" Stretch="None" AlignmentX="Left"> <VisualBrush.Visual> <TextBlock FontStyle="Italic" Text="{Binding Path=Tag, RelativeSource={RelativeSource AncestorType={x:Type Control}, AncestorLevel=1}}"/> </VisualBrush.Visual> </VisualBrush> <Style x:Key="DefaultText" TargetType="TextBox"> <Style.Triggers> <Trigger Property="Text" Value="{x:Null}"> <Setter Property="Background" Value="{StaticResource HelpBrush}"/> </Trigger> <Trigger Property="Text" Value=""> <Setter Property="Background" Value="{StaticResource HelpBrush}"/> </Trigger> </Style.Triggers> </Style> If I place both the VisualBrush and the Style inside the TextBox.Resources tag in XAML, it works fine. But if I take it out and place it in the Window.Resources or a merged dictionary, it stops working. The problem is the Binding, it doesn't find the ancestor TextBox for some reason. I already tried removing AncestorLevel and using AncestorType={x:Type TextBox} - it doesn't work. Any ideas?

    Read the article

  • Can't figure out error in Cisco ASA log "regular translation creation failed for icmp ..."

    - by Martijn Heemels
    Every few seconds our new Cisco ASA 5505 firewall is logging errors that I can't figure out with my limited Cisco experience. Severity Date Time Syslog ID Source IP Destination IP Description 3 Mar 25 2010 17:21:14 305006 8.8.8.8 regular translation creation failed for icmp src inside:10.10.0.200 dst outside:8.8.8.8 (type 3, code 3) 3 Mar 25 2010 17:18:37 305006 8.8.4.4 regular translation creation failed for icmp src inside:10.10.0.200 dst outside:8.8.4.4 (type 3, code 3) The logged inside IP is our internal DNS resolver, and the outside IP's are Google's public DNS servers. ICMP Type 3 Code 3 means "Port Unreachable" Our "outside" interface has a fixed IP and our "inside" interface is in the 10.10.0.0/16 subnet. The 'Inspect DNS' Service Policy is enabled, with the preset DNS inspection map. Furthermore there's an ACL that allows all inbound ICMP on the "outside" interface. I've spent hours trying to figure this one out, so any and all advice is welcome!

    Read the article

  • PropertyGrid PaintValue problem: How to remove (and paint outside) the standard rectangle?

    - by Pedery
    This might be a straightforward question, even though I haven't found an easy solution to it: I've implemented my custom UITypeEditor with the sole purpose of adding a PaintValue to bools. For the sake of the discussion, let's assume that PaintValue will either paint a checked or unchecked radiobutton. Question 1: Now, here's the problem: It seems like PaintValue automatically inserts a 20x13px rectangle after all paint code has completed. Naturally, a radiobutton inside a black rectangle is ugly. Can I easily instruct or override this rectagle not to be painted? Question 2: In this respect, is it possible to paint on top of the propertygrid's native look - meaning could I paint something in order to obscure (part of) the black line separating two grid cells vertically? The purpose of doing this would be to indicate that two values were linked, like constrained width/height to an aspect ratio.

    Read the article

  • Convert binary information to regular data type without outside modules in python.

    - by vgm64
    Hello World. I'm tasked with reading a poorly formatted binary file and taking in the variables. Although I need to do it in C++ (ROOT, specifically), I've decided to do it in python because python makes sense to me, but my plan is to get it working in python and then tackle re-writing in in C++, so using easy to use python modules won't get me too far later down the road. Basically, I do this: In [5]: some_value Out[5]: '\x00I' In [6]: ''.join([str(ord(i)) for i in some_value]) Out[6]: '073' In [7]: int(''.join([str(ord(i)) for i in some_value])) Out[7]: 73 And I know there has to be a better way. What do you think?

    Read the article

  • Any way for a class to prevent outside code from declaring variables of its type?

    - by supercat
    Is it possible for a class of exposing a type for function returns, without allowing users of that class to create variables of that type? A couple usage scenarios: A Fluent interface on a large class; a statement like "foo=bar.WithX(5).WithY(9).WithZ(19);" would be inefficient if it had to create three new instances of the class, but could be much more efficient if the WithX could create one instance, and the other statements could simply use it. A class may wish to support a statement like "foo[19].x = 9;" even when foo itself isn't an array, and does not hold the data in class instances that can be exposed to the public; one way to do that is to have foo[19] return a struct which holds a reference to 'foo' and the value '19', and has a member property 'x' which could call "foo.SetXValue(19, 9);" Such a struct could have a conversion operator to convert itself to the "apparent" type of foo[19]. In both of these scenarios, storing the value returned by a method or property into a variable and then using it more than once would cause strange behavior. It would be desirable if the designer of the class exposing such methods or properties could ensure that callers wouldn't be able to use them more than once. Is there any practical way to accomplish that?

    Read the article

  • Java. Outside classes accessing protected methods.

    - by Jake
    Suppose I have a class in my package org.jake and it has a method with default access (no modifier). Then the method is visible inside the package only. However, when someone receives the jar of my framework, what is to stop them from writing a new class, declaring its package as org.jake, and using my supposedly invisible method? In other words, is there anything I can do to prevent them from doing that?

    Read the article

  • Index was outside the bounds of the array. IndexOutOfRangeException in LINQ to SQL

    - by gtas
    Im getting this exception in the protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); <---- HERE !!! } } of one recently table association i created, there lots of same associations around the database, and this happened in the 4 specific tables i added. Its 1...* relationship and association is Primary Table - Id (identity auto generated) Foreign PId column int not null. I just dont get it....Im using SqlMetal for generation, i regenerated the schema, rebuild, same. This is causing while inserting row in DevExpress XtraGrid, but i dont think this should be issue, same control with same functionality but for different tables works ok. I use grid's event for append value in a property when the entity creating. I disabled this but same again. Recreated the association. No change, exception occurs. Any ideas?

    Read the article

  • Not able to use spring Beans outside container . Always picking up WebSphere Context

    - by Abhijit
    We have the a whole lot of spring bean defined in our project which we deploy in Websphere ^. One example being the following: oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@oracle:1521:OASIS oasis_owner o3ngin33r Now we have a service locator class like following private static ServiceLocator serviceLocator = new ServiceLocator(); private static ApplicationContext beanFactory = new ClassPathXmlApplicationContext(APPLICATION_CONTEXT_LOCATION); protected ServiceLocator() { } public ApplicationContext getBeanFactory() { return beanFactory; } public static ServiceLocator getInstance() { return serviceLocator; Now when I am trying to do this from my jUnit ServiceLocator.getInstance().getBean("oasJdbcData"; getting the following exception Caused by: javax.naming.ServiceUnavailableException: Could not obtain an initial context due to a communication failure. Since no provider URL was specified, the default provider URL of "corbaloc:iiop:[email protected]:2809/NameService" was used. Make sure that any bootstrap address information in the URL is correct and that the target name server is running. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. [Root exception is org.omg.CORBA.TRANSIENT: java.net.ConnectException: Connection refused: connect:host=192.168.255.1,port=2809 vmcid: IBM minor code: E02 completed: No] at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(WsnInitCtxFactory.java:1968) at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1172) at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:720) at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:643) at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:489) at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113) at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:361) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:104) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) ... 33 more which clearly shows it is looking for IntialContext of Websphere which I dont want Any body can tell me what I am doing wrong?

    Read the article

  • Can I set the base path outside of my application directory when binding an image source path to a r

    - by zimmer62
    So I'm trying to display an image that is ouside the path of my application. I only have a relative image path such as "images/background.png" but my images are somewhere else, I might want to choose that base location at runtime so that the binding maps to the proper folder. Such as "e:\data\images\background.png" or "e:\data\theme\images\background.png" <Image Source="{Binding Path=ImagePathWithRelativePath}"/> Is there any way to specify either in XAML or code behind a base directory for those images?

    Read the article

  • How to ignore expired certificates from outside a Java application?

    - by Creepy Gnome
    We have a Java application that we need to ignore an expired self-signed cert, however we cannot modify the code to do this. I wondering if there was a System Property or environment variable that we could provide at start up that would allow us to have all expired cert's ignored for now, or even be more specific and provide externally the specific cert that we would like to have the expiration ignored. Anyone have any ideas that would work?

    Read the article

  • How do I get netcat to accept connections from outside the LAN?

    - by Chris
    I'm using netcat as a backend to shovel data back and forth for a program I'm making. I tested my program on the local network, and once it worked I thought it would be a matter of simply forwarding a port from my router to have my program work over the internet. Alas! This seems not to be the case. If I start netcat listening on port 6666 with: nc -vv -l -p 6666, then go to 127.0.0.1:6666 in a browser, as expected I see a HTTP GET request come through netcat (and my browser sits waiting in vain). If I go to my.external.ip.address:6666, however, nothing comes through at all and the browser displays 'could not connect to my.external.ip.address:6666'. I know that the port is correctly forwarded, as www.canyouseeme.org says port 6666 is open (and when netcat is not listening, that its closed). If I run netcat with -g my.adslmodem's.local.address to set the gateway address, I get the same behavior. Am I using this command line option correctly? Any insight as to what I'm doing wrong?

    Read the article

  • jQuery: How can I check if a block in my document is inside the viewport or outside of it?

    - by Jannis
    I am basically trying to trigger a function if the footer is inside the viewport. How can I check whether the footer is currently visible in the viewport? I assume I will have to put it into the $(window).scroll() event so that the listener becomes true once the footer becomes visible but what the function should be I just can't figure out. Any help would be much appreciated. Thanks for reading, Jannis

    Read the article

  • Should you do validation checks that go outside the possiblility of normal user activity?

    - by Scarface
    Hey guys I have been thinking about form security a lot lately. I have been told time and time again to check if form input is a number if you are expecting a number or escape it in case (unless you use proper mysqli formatting) to avoid injection. 1.After the safety checks are done, should I do additional logic checks? For example, if the user is sending a friend request to them-self for example even if my user interface will not show the form if the user is looking at their own page.

    Read the article

  • Shoulda: How would I use an instance variable outside of a setup or should block?

    - by TheDeeno
    I'm trying to do something like the following: @special_attributes = Model.new.methods.select # a special subset @special_attributes.each do |attribute| context "A model with #{attribute}" setup do @model = Model.new end should "have some special characteristic" assert @model.method(attribute).call end end end However, @special_attributes is out of scope when running the unit tests, leaving me with a nil object on line 2. I can't figure out where to define it to bring it in scope. Any thoughts?

    Read the article

  • How do you reference a custom object outside of the function it was created in with JavaScript?

    - by Jack Roscoe
    Hi, I'm currently using JavaScript and jQuery. I have an function which executes once the document is ready, and inside that I am creating objects which contain various attributes. Within the same function, I can access these new object's attributes no problem, however once I'm inside a different function I can't seem to reference them properly and therefore cannot access the objects or the information inside them. What's the correct way to reference the attributes of an object which was created in a different function to the one looking for the information?

    Read the article

  • Selectively replacing words outside of tags using regular expressions in PHP?

    - by Gary Willoughby
    I have a paragraph of text and i want to replace some words using PHP (preg_replace). Here's a sample piece of text: This lesson addresses rhyming [one]words and ways[/one] that students may learn to identify these words. Topics include learning that rhyming words sound alike and these sounds all come from the [two]ending of the words[/two]. This can be accomplished by having students repeat sets of rhyming words so that they can say them and hear them. The students will also participate in a variety of rhyming word activities. In order to demonstrate mastery the students will listen to [three]sets of words[/three] and tell the teacher if the words rhyme or not. If you notice there are many occurances of the word 'words'. I want to replace all the occurances that don't occur inside any of the tags with the word 'birds'. So it looks like this: This lesson addresses rhyming [one]words and ways[/one] that students may learn to identify these birds. Topics include learning that rhyming birds sound alike and these sounds all come from the [two]ending of the words[/two]. This can be accomplished by having students repeat sets of rhyming birds so that they can say them and hear them. The students will also participate in a variety of rhyming word activities. In order to demonstrate mastery the students will listen to [three]sets of words[/three] and tell the teacher if the birds rhyme or not. Would you use regular expressions to accomplish this? Can a regular expression accomplish this?

    Read the article

  • How do I bind to something outside a datacontext.

    - by AKRamkumar
    I have a listbox in WPF that is in the Layout Root. I also have a Frame that is in the Layout Root as well. The listbox is composed of items that have a string(Name) and a framework element(UI). How do I bind the frame's content to be the UI property of the listbox's selected item property? If you need a codebehind, how would you do this in MVVM

    Read the article

  • Google Maps API V3: How to jump to a specific marker from outside the map?

    - by Tom
    I have a map with two markers on it. The initial view of the map only shows one marker, and I want to provide a link next to the map that will move the map to the 2nd marker when clicked. Here's a demo of what I want, using v2 of the API: http://arts.brighton.ac.uk/contact-university-of-brighton-faculty-of-arts (note the links below the map) Here's what I have so far: <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(50.823817, -0.135634); var myOptions = { zoom: 13, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU } , scaleControl: false }; var map = new google.maps.Map(document.getElementById("map"), myOptions); // 1st marker var marker1 = new google.maps.Marker({ position: new google.maps.LatLng(50.823817, -0.135634), map: map, title: 'my title' }); var infowindow = new google.maps.InfoWindow({ content: 'my window content' }); google.maps.event.addListener(marker1, 'click', function() { infowindow.open(map, marker1); }); // 2nd marker var marker2 = new google.maps.Marker({ position: new google.maps.LatLng(51.5262405, -0.074549), map: map, title: 'my 2nd title'}); var infowindow2 = new google.maps.InfoWindow({ content: 'content for my 2nd window' }); google.maps.event.addListener(marker2, 'click', function() { infowindow2.open(map, marker2); }); } </script> So what I'd like to add is a link to marker2, to move the map some 50-odd miles up, e.g. <a href="#marker2">Second location</a>. How would I do this?

    Read the article

  • IFRAME renders a HTML text outside of boundaries, a bug?

    - by achirlin
    IE8 in non-compatability view, Version 8.0.6001.18702 The code below represents the problem: <body><div style="height:400px;width:400px"><iframe src="http://mail.ru" height="100%" width="100%"></iframe></div></body> Scroll the IFRAME to the right to the middle of "??????? ??????? ? ???????" orange label. Alt-Tab to other window and Alt-Tab back to IE window. The internal HTML will appear ouside of IFRAME boundaries. The screenshot demonstrating the problem. Does the IFRAME rendering have a bug? May be I have an unpatched version (automatic updates are turned ON). Could you suggest a workaround except turning on Compatability View? Thank you.

    Read the article

  • What is natural deduction used for outside of academia?

    - by Danny King
    Hello, I am studying natural deduction as a part of my Formal Specification & Verification Computer Science course at University/College. I find it interesting, however I learn much better when I can find a practical use for things. Could anyone explain to me if and how natural deduction is used other than for formally verifying bits of code? Thanks!

    Read the article

  • Rails: how can I access the request object outside a helper or controller?

    - by rlandster
    In my application_helper.rb file I have a function like this: def internal_request? server_name = request.env['SERVER_NAME'] [plus more code...] end This function is needed in controllers, model, and views. So, I put this code in a utility function file in the lib/ directory. However, this did not work: I got complaints about request not being defined. How can I access the request object in a file in the lib/ directory?

    Read the article

  • How to draw Wingdings 2 characters outside of the 0..255 range in .NET?

    - by romkyns
    The standard windows Charmap utility shows quite a few characters in the "Wingdings 2" font whose character codes are greater than 255 - for example, 0xE4E shows a hand. However, if I try to draw these characters as follows: g.DrawString(new string((char) 0xE4E, 1), new Font("Wingdings 2", 20), brush, x, y); then all I get is a standard "box" replacement character. This is weird, because the above code works for Wingdings 2 symbols between 0x21 and 0xFF, and also works for ALL symbols in, say, Arial Unicode MS. How can I draw those characters from this particular font? Is there a separate API? (Win7; .NET 3.5 SP1) P.S. Here's the weird Character Map font with the duplicated character ranges:

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >