Search Results

Search found 1052 results on 43 pages for 'jon romero'.

Page 4/43 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • ASP.NET radiobuttonlist onclientclick

    - by Jon
    I've noticed there is no OnClientClick() property for the radiobuttonlist in the ASP.NET control set. Is this a purposeful omissiong on Microsoft's part? Anyway, I've tried to add OnClick to the radio button list like so: For Each li As ListItem In rblSearch.Items li.Attributes.Add("OnClick", "javascript:alert('jon');") Next But alas, it doesn't work. I've even checked the source in firebug, and there is no javascript shown in the radiobuttonlist. Does anyone know how to get this very simple thing working? I'm using ASP.NET control adpaters so don't know if that has anything to do with it. (I wish asp.net/javascript would just work out the box!!!)

    Read the article

  • Clear validation on textInput when validation is not enabled

    - by Jon
    Hi, I've created a custom textInput componenet that handles it's own validation using a private validator. The validation is enabled depending on the state of the component i.e. validation is enable when the components state is "edit". However, when the state changes from edit the internal validator is set to not enabled but the validation errors on the textbox do not clear - the textInput still has the red border and on mouseover the validation errors come up. What I want to happen is that when a validator is disabled the error formatting and error messages clear from the text input control. Does anyone have any idea how to do this I tried setting the internal validator instance to enabled = false and dispatching a new focusOutEvent as below but the validation error formatting is still applied to the textInput contrl. _validatorInstance.enabled = false; //clear the validation errors if any dispatchEvent(new FocusEvent(FocusEvent.FOCUS_OUT)); Any ideas? Thanks Jon

    Read the article

  • SQLSTATE[HY000]: General error: 5 Out of memory (Needed 4194092 bytes)

    - by Jon Reeks
    Hi I'm receiving the following error on my shared hosting box: SQLSTATE[HY000]: General error: 5 Out of memory (Needed 4194092 bytes) This error is only triggered on a specific page. I guess this indicates that I am reaching the upper limit of the 64MB allocated to me in my current MySQL environment. Does this mean that a single query is going over (returning) 64MB of data? If so, i guess i can just track down and tune that specific query? Or isnt that the correct approach? Thanks Jon

    Read the article

  • BioPython: extracting sequence IDs from a Blast output file

    - by Jon
    Hi, I have a BLAST output file in XML format. It is 22 query sequences with 50 hits reported from each sequence. And I want to extract all the 50x22 hits. This is the code I currently have, but it only extracts the 50 hits from the first query. from Bio.Blast import NCBIXM blast_records = NCBIXML.parse(result_handle) blast_record = blast_records.next() save_file = open("/Users/jonbra/Desktop/my_fasta_seq.fasta", 'w') for alignment in blast_record.alignments: for hsp in alignment.hsps: save_file.write('>%s\n' % (alignment.title,)) save_file.close() Somebody have any suggestions as to extract all the hits? I guess I have to use something else than alignments. Hope this was clear. Thanks! Jon

    Read the article

  • Transferring a flat file database to a MySQL database

    - by Jon
    I have a flat file database (yeah gross I know - the worst part is that it's 1.4GB), and I'm in the process of moving it to a MySQL database. The problem is that I'm not sure how to go about doing this - and I've checked through every related question on here but none relate to what I want to do, nor how my database is currently setup. My current flat file database is setup to where a normal MySQL row is its own file, and a MySQL table would be the directory. So for example if you have a user named Jon, there would be a file for the user in a directory named /members/. Within that file would be various information for the user including the users id, rank etc - all separated by tabs, all on separate lines (userid\t4). So here's an example user file: userid 4 notes staff notes: bla bla staff2 notes: bla bla bla username Example So how can I convert the above into their own rows and fields in MySQL? And if possible, could I do thousands of these files at once? Thanks.

    Read the article

  • NHibernate HQL logic problem

    - by Jon
    Hi I'm trying to write an NHibernate HQL query that makes use of parenthesis in the where clause. However, the HQL parser seems to be ignoring my parenthesis, thus changing the meaning of my statement. Can anyone shed any light on the matter? The following HQL query: from WebUser u left join fetch u.WebUserProfile left join fetch u.CommunicationPreferences where (u.CommunicationPreferences.Email = 0 and u.SyncDate is not null) or u.DateDeleted is not null translates to: from WebUser webuser0_ left outer join WebUserProfile webuserpro1_ on webuser0_.UserId = webuserpro1_.WebUserId left outer join WebUserCommunicationPreferences communicat2_ on webuser0_.UserId = communicat2_.UserId where communicat2_.Email = 0 and (webuser0_.SyncDate is not null) or webuser0_.DateDeleted is not null Thanks Jon

    Read the article

  • Is there a good AddIn for Visual Studio that will launch msbuild targets?

    - by Jon Lent
    One of the things I like about the Java IDEs out there is that they typically have the ability to allow a user to right-click on an Ant file and run one of the targets. I've got an msbuild file in my solution that is used for migrating the application database, and would kill to be able to right-click on it, select "update" or "rollback" and have it run. My searching has not turned up anything meant to run inside VS2008, just a shell extension for windows explorer. Has anybody seen such an animal out there? Cordially, Jon

    Read the article

  • bash command history update before execution of command

    - by Jon
    Hi, Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT. However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again). I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm? Thanks, Jon

    Read the article

  • Redirecting input to another view

    - by Jon
    My application is working fine on the normal iPad display, but I also need to output to VGA out. When I do this, I need to add the view to the external screen's window which seems to mean that I can't use it to accept input from the iPad screen. I want to redirect input from the iPad's window to the window displaying on the external screen. As far as I can tell there's no standard method of doing this. I've tried overriding hitTest on the iPad's window view to send it to the window on the external display, but the coordinates seem to get messed up in the process which makes it nigh unusable. I've also tried subclassing the iPad's UIWindow and catching events in sendEvent, then trying to send them to the external window, but this doesn't seem to work at all. Any help would be appreciated, I'm happy to post any code you would like to see. Thanks, Jon

    Read the article

  • How to draw a line of plusses og triangles along a path in WPF?

    - by Jon H
    I need to draw a line with plusses or crosses along an given path (arch) but can't seem to find anything pointing me in the right direction. Any help would me much appreciated. Best, Jon H Edit: Hmmm. I still cant find any good answer to my question. I have googled for "everything"...I have fooled around with DrawingBrush'es with various LineGeometries or GeometryDrawings but cant seem to get a hang on it. Am I on the right coures or is there a better way? Can this be done in Blend/Design and exported in some way?

    Read the article

  • How is the best way to write a SOAP 1.2 Client with Delphi Win32

    - by Cesar Romero
    So far, no Delphi version supports SOAP 1.2 clients or server. I have tried for weeks to make it works, but every time a new problem, with VS/C# I could do the same, and make works in 3 days, but I need to do with Delphi 2009. "I write a new version using Rem Objects SDK,", but the result was not better that I had with Delphi SOAP library. But I'm wondering what choice else do I have, which library/component full support SOAP 1.2? I found a message from Bruneau, suggesting Pocket SOAP http://www.pocketsoap.com/pocketsoap/ I dont know how this works, Ill investigate and see what I can do.

    Read the article

  • Trying to use Digest Authentication for Folder Protection

    - by Jon Hazlett
    StackOverflow users suggested I try my question here. I'm using Server 2008 EE and IIS 7. I've got a site that I've migrated over from XP Pro using IIS 5. On the old system, I was using IIS Password to use simple .htaccess files to control a couple of folders that I didn't want to be publicly viewable. Now that I'm running a full-blown DC with a more powerful version of IIS, I decided it'd be a good idea to start using something slightly more sophisticated. After doing my research and trying to keep things as cheap as possible with a touch of extra security, I decided that Digest Authentication would be the best way to go. My issue is this: With Anon access disabled and Digest enabled, I am never prompted for credentials. when on the server, viewing domain[dot]com/example will simply show my 401.htm page without prompting me for credentials. when on a different network/computer, viewing domain[dot]com/example again shows my 401.htm without prompting for credentials. At the site level I only have Anon enabled. Every subfolder, unless I want it protected, has just Anon enabled. Only the folders I want protected have Anon disabled and Digest enabled. I have tried editing the bindings to see if that would spark any kind of change... www.domain.com, domain.com, and localhost have all been tried. There was never a change in behavior at any permutation (aside from the page not being found when I un-bound localhost to the site). I might have screwed up when I deleted the default site from IIS. I didn't think I'd actually need it for anything, but some of what I have read online is telling me otherwise now. As for Digest settings, I have it pointed to local.domain.com, which is the name assigned to my AD Domain. I'm guessing that's right, but honestly have no clue about what a realm actually is. Would it matter that I have an A record for local.domain.com pointing to my IP address? I had problems initially with an absolute link for 401.htm pages, but have since resolved that. Instead of D:\HTTP\401.htm I've used /401.htm and all is well. I used to get error 500's because it couldn't find the custom 401.htm file, but now it loads just fine. As for some data, I was getting entries like this from access logs: 2009-07-10 17:34:12 10.0.0.10 GET /example/ - 80 - [workip] Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+InfoPath.2) 401 2 5 132 But after correcting my 401.htm links now get logs like this: 2009-07-10 18:56:25 10.0.0.10 GET /example - 80 - [workip] Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.0.11)+Gecko/2009060215+Firefox/3.0.11 200 0 0 146 I don't know if that means anything or not. I still don't get any credential challenges, regardless of where I try to sign in from ( my workstation, my server, my cellphone even ). The only thing that's seemed to work is viewing localhost and I donno what could be preventing authentication from finding it's way out of the server. Thanks for any help! Jon

    Read the article

  • Create a permalink with Javascript

    - by Jon Romero
    I have a textbox where a user puts a string like this: "hello world! I think that __i__ am awesome (yes I am!)" I need to create a correct url like this: hello-world-i-think-that-i-am-awesome-yes-i-am How can be done using reg expressions? Also, is it possible to do it with Greek (for example)? "Ge?a s?? ??sµe" turns to geia-sou-kosme In other programming languages (python/ruby) I am using a translation array. Should I do the same here?

    Read the article

  • Entity Framework and Sql Server view question

    - by Sergio Romero
    Hi to all, For several reasons that I don't have the liberty to talk about, we are defining a view on our Sql Server 2005 database like so: CREATE VIEW [dbo].[MeterProvingStatisticsPoint] AS SELECT CAST(0 AS BIGINT) AS 'RowNumber', CAST(0 AS BIGINT) AS 'ProverTicketId', CAST(0 AS INT) AS 'ReportNumber', GETDATE() AS 'CompletedDateTime', CAST(1.1 AS float) AS 'MeterFactor', CAST(1.1 AS float) AS 'Density', CAST(1.1 AS float) AS 'FlowRate', CAST(1.1 AS float) AS 'Average', CAST(1.1 AS float) AS 'StandardDeviation', CAST(1.1 AS float) AS 'MeanPlus2XStandardDeviation', CAST(1.1 AS float) AS 'MeanMinus2XStandardDeviation' WHERE 0 = 1 The idea is that the Entity Framework will create an entity based on this query, which it does, but it generates it with an error that states the following: "warning 6002: The table/view 'Keystone_Local.dbo.MeterProvingStatisticsPoint' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view." And it decides that the CompletedDateTime field will be this entity primary key. We are using EdmGen to generate the model. Is there a way not to have the entity framework include any field of this view as a primary key? Thanks for help.

    Read the article

  • Updating a Safari Extension?

    - by Ricky Romero
    Hi there, I'm writing a simple Safari Extension, and I'm trying to figure out how to get the update mechanism working. Apple's documentation here is delightfully vague: http://developer.apple.com/safari/library/documentation/Tools/Conceptual/SafariExtensionGuide/UpdatingExtensions/UpdatingExtensions.html And here's my manifest, based on that documentation: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Extension Updates</key> <array> <dict> <key>CFBundleIdentifier</key> <string>net.rickyromero.safari.shutup</string> <key>Team Identifier</key> <string>TMM5P68287</string> <key>CFBundleVersion</key> <string>1</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>URL</key> <string>http://rickyromero.net/misc/SafariExtensions/ShutUp.safariextz</string> </dict> </array> </dict> </plist> I don't know where to get "YourCertifcateID," for example. And when I increment the values for CFBundleVersion and CFBundleShortVersionString, it doesn't trigger an update. I know Safari is hitting my manifest though, because I'm watching HTTP traffic. Thoroughly stumped. Any ideas, guys?

    Read the article

  • Language in a Sandbox in Rails

    - by Jon Romero
    I've found that there WAS a sandbox gem (created by the guys that made try ruby in your browser but it was compatible only with Ruby 1.8. Another problem is that I cannot find it anymore (it seems they stop serving the gem from the servers...). So, is there any secure way of running ruby in a sandbox (so you can run it from your browser)? Or an easy way to run (for example lua/python) in a sandbox (no filesystem access, no creation of objects etc) and be called from Ruby (Rails 2.2)? I want to make an application like try_ruby even without having a ruby underneath. But it has to be an easy language (I saw there was a prolog in ruby, even a lisp but I don't think they are easy to learn languages...). So, do you have any suggestions or tips? Or should I just start creating my own DSL in Ruby (if there is a solution in creating a somewhat safe system)? Thx

    Read the article

  • subclassing and data contracts

    - by Sergio Romero
    I'm playing with the following code: [ServiceContract] public interface IUserAccountService { [OperationContract] UserAccountResponse CreateNewUserAccount(UserAccountRequest userAccountRequest); } public abstract class BaseResponse { public bool Success { get; set; } public string Message { get; set; } } public class UserAccountResponse : BaseResponse { public int NewUserId { get; set; } } My questions are: Do I need to add the DataContract attribute to both the abstract class and the subclass? If the abstract class does not need the DataContract attribute, can I add the DataMember attribure to its properties?

    Read the article

  • Can't make my WCF extension work

    - by Sergio Romero
    I have a WCF solution that consists of the following class libraries: Exercise.Services: Contains the implementation classes for the services. Exercise.ServiceProxy: Contains the classes that are instantiated in the client. Exercise.HttpHost: Contains the services (*.svc files). I'm calling the service from a console application and the "first version" works really well so I took the next step which is to create a custom ServiceHostFactory, ServiceHost, and InstanceProvider so I can use constructor injection in my services as it is explained in this article. These classes are implemented in yet another class library: 4. Exercise.StructureMapWcfExtension Now even though I've modified my service this: <%@ ServiceHost Language="C#" Debug="true" Factory="Exercise.StructureMapWcfExtension.StructureMapServiceHostFactory" Service="Exercise.Services.PurchaseOrderService" %> I always get the following exception: System.ServiceModel.CommunicationException Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted. It fails in this line of code: public class PurchaseOrderProxy : ClientBase<IPurchaseOrderService>, IPurchaseOrderService { public PurchaseOrderResponse CreatePurchaseOrder(PurchaseOrderRequest purchaseOrderRequest) { return base.Channel.CreatePurchaseOrder(purchaseOrderRequest); //Fails here } } But that is not all, I added a trace to the web.config file and this is the error that appears in the log file: System.InvalidOperationException The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host. So this means that my ServiceHostFactory is never being hit, I even set a breakpoint in both its constructor and its method and they never get hit. I've added a reference of the StructureMapWcfExtension library to all the other ones (even the console client), one by one to no avail. I also tried to use the option in the host's web.config file to configure the factory like so: <serviceHostingEnvironment> <serviceActivations> <add service="Exercise.Services.PurchaseOrderService" relativeAddress="PurchaseOrderService.svc" factory="Exercise.StructureMapWcfExtension.StructureMapServiceHostFactory"/> </serviceActivations> </serviceHostingEnvironment> That didn't work either. Please I need help in getting this to work so I can incorporate it to our project. Thank you. UPDATE: Here's the service host factory's code: namespace Exercise.StructureMapWcfExtension { public class StructureMapServiceHostFactory : ServiceHostFactory { private readonly Container Container; public StructureMapServiceHostFactory() { Container = new Container(); new ContainerConfigurer().Configure(Container); } protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { return new StructureMapServiceHost(Container, serviceType, baseAddresses); } } public class ContainerConfigurer { public void Configure(Container container) { container.Configure(r => r.For<IPurchaseOrderFacade>().Use<PurchaseOrderFacade>()); } } }

    Read the article

  • Decode JSON with mochijson2 in Erlang

    - by Jon Romero
    I have a var that has some JSON data: A = <<"{\"job\": {\"id\": \"1\"}}">>. Using mochijson2, I decode the data: Struct = mochijson2:decode(A). And now I have this: {struct,[{<<"job">>,{struct,[{<<"id">>,<<"1">>}]}}]} I am trying to read (for example), "job" or "id". I tried using struct.get_value but it doesn't seem to work. Any ideas?

    Read the article

  • How to get data from struts2 action with jQuery?

    - by Rafa Romero
    I have an Struts2 Web with GoogleMaps. I want to load a list of markers which are saved in a SQL DDBB. To do this, I tried with jQuery and Ajax. Here you are the code: loadMarkers.java public class loadMarkers extends ActionSupport implements ServletRequestAware,ServletResponseAware{ //Variables de sesion/cookie FunctionClass ses; protected HttpServletResponse servletResponse; protected HttpServletRequest servletRequest; private String userID=""; //Variables del marker private List<marker> markersList = new ArrayList<marker>(); public String execute() throws Exception{ FunctionClass friends = new FunctionClass(); //Leemos de la cookie for(Cookie c : servletRequest.getCookies()) { if (c.getName().equals("userID")) userID = (c.getValue()); } System.out.println("en el loadMarkers"); connectionBBDD con = new connectionBBDD(); markersList = con.loadMarkers(userID); return SUCCESS; } I want to use the markerList array in Javascript, to create the markers. This is the struts.xml file: <package name="jsonActions" namespace="/test" extends="json-default"> <action name="LoadMarkers" class="web.localizadroid.maps.loadMarkers"> <interceptor-ref name="basicStack"/> <result type="json"> <param name="root">markersList</param> </result> </action> </package> And here you are the Javascript (jQuery) code: function loadMarkersJ(){ alert("dentro"); $.ajax({ type : "post", url : "LoadMarkers", dataType: "json", success : function(data) { alert(data); var image = new google.maps.MarkerImage ('http://i53.tinypic.com/ettquh.png'); var jSon_Object = eval("(" + data + ")"); //For para analizar los datos (Json) obtenidos de la BBDD for (x = 0; x < jSon_Object.length; x++) { var markersArray = []; var myLatlng = new google.maps.LatLng(jSon_Object[x].lat, jSon_Object[x].lon); markerLoaded = new google.maps.Marker( { position : myLatlng, map : map, icon: image, title: "NOMBRE: " + jSon_Object[x].tarjetName + "\n" + "ANOTACIONES: " + jSon_Object[x].anotaciones + "\n" + "TIME: " + jSon_Object[x].time }); markersArray.push(markerLoaded); if (markersArray) { for (i in markersArray) { alert("entro en forColocaMarkers"); if (markersArray[i].getAnimation() != null) { markersArray[i].setAnimation(null); } else { markersArray[i].setAnimation(google.maps.Animation.BOUNCE); } markersArray[i].setMap(map); } } } } }); } From success : function(data) { to the end, is JavaScript code to create de markers, and this it's OK. The problem is whith ajax, because I don't get to obtain markerList Array by jSon data return...I think that the problem is in the url attribute from $.ajax...I tried loadMarkers.action and loadMarkers, but nothing happens. When I execute the web, only prints the alert alert("dentro"), the alert alert(data) never has been printed. I have forgotten to add the code where I call the Javascript function (loadMarkersJ). Here you are: <p><s:a action="LoadMarkers.action" namespace="/test" onclick="loadMarkersJ(this)">Cargar Marcadores S</s:a></p> Somebody can help me please?

    Read the article

  • Trying to put a generic MyObj<T, U> into an IList where U can be different between objects

    - by Sergio Romero
    I have the following class definition: public interface IItem{} public class FirstObject<T, U> : IItem { public U SomeProperty { get; private set; } } IList<IItem> myList = new List<IItem>(); I did it like this because U can be of different types. Now I want to iterate the list and get my items back, the problem is that I do not know how to cast them back to their original type so I can read the value of SomeProperty. Thanks for your help.

    Read the article

  • Linux IPTables / routing issue

    - by Jon
    Hi all, EDIT 1/3/10 22:00 GMT - rewrote some of it after further investigation It has been a while since I looked at IPtables and I seem to be worse than before as I can not seem to get my webserver online. Below is my firewall rules on the gateway server that is running the dhcp server accessing the net. The webserver is inside my network on a static IP (192.168.0.98, default port). When I use Nmap or GRC.com I see that port 80 is open on the gateway server but when I browse to it, (via public URL. http://www.houseofhawkins.com) it always fails with a connection error, (nmap cannot connect and figure out what the web server is either). I can nmap the webserver and browse to it just fine via same IP inside my network. I believe it is my IPTable rules that are not letting it through. Internally I can route all my requests. Each machine can browse to the website and traffic works just fine. I can MSTSC / ssh to all the webservers internally and they inturn can connect to the web. IPTABLE: *EDIT - Added new firewall rules 2/3/10 * #!/bin/sh iptables="/sbin/iptables" modprobe="/sbin/modprobe" depmod="/sbin/depmod" EXTIF="eth2" INTIF="eth1" load () { $depmod -a $modprobe ip_tables $modprobe ip_conntrack $modprobe ip_conntrack_ftp $modprobe ip_conntrack_irc $modprobe iptable_nat $modprobe ip_nat_ftp echo "enable forwarding.." echo "1" > /proc/sys/net/ipv4/ip_forward echo "enable dynamic addr" echo "1" > /proc/sys/net/ipv4/ip_dynaddr # start firewall # default policies $iptables -P INPUT DROP $iptables -F INPUT $iptables -P OUTPUT DROP $iptables -F OUTPUT $iptables -P FORWARD DROP $iptables -F FORWARD $iptables -t nat -F #echo " Opening loopback interface for socket based services." $iptables -A INPUT -i lo -j ACCEPT $iptables -A OUTPUT -o lo -j ACCEPT #echo " Allow all connections OUT and only existing and related ones IN" $iptables -A INPUT -i $INTIF -j ACCEPT $iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT $iptables -A OUTPUT -o $EXTIF -j ACCEPT $iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT $iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT $iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT $iptables -A FORWARD -j LOG --log-level 7 --log-prefix "Dropped by firewall: " $iptables -A INPUT -j LOG --log-level 7 --log-prefix "Dropped by firewall: " $iptables -A OUTPUT -j LOG --log-level 7 --log-prefix "Dropped by firewall: " #echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF" $iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE $iptables -A INPUT -i $INTIF -j ACCEPT $iptables -A OUTPUT -o $INTIF -j ACCEPT #echo " Allowing packets with ICMP data (i.e. ping)." $iptables -A INPUT -p icmp -j ACCEPT $iptables -A OUTPUT -p icmp -j ACCEPT $iptables -A INPUT -p udp -i $INTIF --dport 67 -m state --state NEW -j ACCEPT #echo " Port 137 is for NetBIOS." $iptables -A INPUT -i $INTIF -p udp --dport 137 -j ACCEPT $iptables -A OUTPUT -o $INTIF -p udp --dport 137 -j ACCEPT #echo " Opening port 53 for DNS queries." $iptables -A INPUT -p udp -i $EXTIF --sport 53 -j ACCEPT #echo " opening Apache webserver" $iptables -A PREROUTING -t nat -i $EXTIF -p tcp --dport 80 -j DNAT --to 192.168.0.96:80 $iptables -A FORWARD -p tcp -m state --state NEW -d 192.168.0.96 --dport 80 -j ACCEPT } flush () { echo "flushing rules..." $iptables -P FORWARD ACCEPT $iptables -F INPUT $iptables -P INPUT ACCEPT echo "rules flushed" } case "$1" in start|restart) flush load ;; stop) flush ;; *) echo "usage: start|stop|restart." ;; esac exit 0 route info: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 5e0412a6.bb.sky * 255.255.255.255 UH 0 0 0 eth2 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 default 5e0412a6.bb.sky 0.0.0.0 UG 100 0 0 eth2 ifconfig: eth1 Link encap:Ethernet HWaddr 00:22:b0:cf:4a:1c inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::222:b0ff:fecf:4a1c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:79023 errors:0 dropped:0 overruns:0 frame:0 TX packets:57786 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11580918 (11.5 MB) TX bytes:22872030 (22.8 MB) Interrupt:17 Base address:0x2b00 eth2 Link encap:Ethernet HWaddr 00:0c:f1:7c:45:5b inet addr:94.4.18.166 Bcast:94.4.18.166 Mask:255.255.255.255 inet6 addr: fe80::20c:f1ff:fe7c:455b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:57038 errors:0 dropped:0 overruns:0 frame:0 TX packets:34532 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21631721 (21.6 MB) TX bytes:7685444 (7.6 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1517 (1.5 KB) TX bytes:1517 (1.5 KB) EDIT OK so as requested I will try and expand on my infrastructure: I previously had it setup with a Sky broadband modem router that did the DHCP and I used its web interface to port forward the web across to the web server. The network looked something like this: I have now replaced the sky modem with a dlink modem which gives the IP to the gateway server that now does the DHCP. It looks like: The internet connection is a standard broadband connection with a dynamic IP, (use zoneedit.com to keep it updated). I have tried it on each of the webservers(one Ubuntu Apache server and one WS2008 IIS7). I think there must also be an issue with my IPTable rules as it can route to my win7 box which has the default IIS7 page and that would not display when I forwarded all port 80 to it. I would be really grateful for any and all help with this. Thanks Jon

    Read the article

  • WPF Control validation

    - by Jon
    Hi all, I'm developing a WPF GUI framework and have had bad experiences with two way binding and lots of un-needed events being fire(mainly in Flex) so I have gone down the route of having bindings (string that represent object paths) in my controls. When a view is requested to be displayed the controller loads the view, and gets the needed entities (using the bindings) from the DB and populates the controls with the correct values. This has a number of advantages i.e. lazy loading, default undo behaviour etc. When the data in the view needs to be saved the view is passed back to the controller again which basically does the reserve i.e. re-populates the entities from the view if values have changed. However, I have run into problems when I try and validate the components. Each entity has attributes on its properties that define validation rules which the controller can access easily and validate the data from the view against it. The actual validation of data is fine. The problem comes when I want the GUI control to display error validation information. It I try changing the style I get errors saying styles cannot be changed once in use. Is the a way in c# to fire off the normal WPF validation mechanism and just proved it with the validaiton errors the controller has found? Thanks in advance Jon

    Read the article

  • Using ASP.NET session state with Silverlight (PRISM)

    - by Jon Andersen
    Hi, The scenario: I have a PRISM application developed in Silverlight (4), and I'm using a ASP.NET server side application to host several web-services (which, in turn, accesses WCF-services, but that's not really important here). The Silverlight application must be able to call the web services cross-domain (meaning that the web services isn't necessarily on the same server hosting the silverlight application). The Silverlight application consists of several modules, each accessing the ASP.NET web-services. I do not have much experience with Silverlight and PRISM, but as far as I can see, this is not a very unusual scenario... The problem: My challange is, that when 2 different modules access the web-services, I get 2 new sessions on the web-server. I would have thought that since both modules live on the same HTML-page (and then also in the same browser session), they would get the same session on the web-server...? I have tried to make the web-service Proxy-client globally available in the container (using Unity), by registering an instance (using Container.RegisterInstance), and then getting this instance whenever a module needs to make a web-service call (using Container.Resolve), but this doesn't seem to help. However, any calls made within the same module always gets the same session on the server. Can anyone see what I'm missing here...? Thanks! Jon

    Read the article

  • Linking Mapkit with Core Data, Search and user location. Converting annotations from a database in a tableview with search to display in a mapview?

    - by Jon
    Xcode is quite new to me so explanations are appreciated. I am looking to build an application that displays annotations in a mapview (zoomed in on current user location). I want the applications to come from some sort of database rather than manually inputting all the annotations (which is what I'm currently doing) What would be my application type? tab based? window based? i want a tab for a tableview with a list of my annotations and a mapview tab that will show my database of annotations but with the map zoomed in on current location. In a perfect world, it would be great if the user could add favourites from these annotations and keep them in a favourites tableview tab. I'm desperate to work this out and create a fully functional app for a final uni project. i have a working application already but it's nothing like what i am trying to achieve, any help would be much appreciated!!!! Jon (if looked through countless tutorials and as of yet found nothing i can understand to achieve a project like this. Some would call me too ambitious, I just want to make a decent app)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >