Search Results

Search found 6436 results on 258 pages for 'el quick'.

Page 36/258 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • Loading GeckoWebBrowser Exceptions

    - by Mostafa Mahdieh
    I get a strange exception when a window containing a GeckoWebBrowser is loaded. This is the exception message: An unhandled exception of type System.Runtime.InteropServices.COMException occurred in Skybound.Gecko.dll Additional information: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) This is the windows code: public partial class AddContents : Form { String path; public AddContents(String path) { this.path = path; InitializeComponent(); } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } private void AddContents_Load(object sender, EventArgs e) { geckoWebBrowser1.Navigate(path); } private int selId = 1; private bool updateMode = false; private void timer1_Tick(object sender, EventArgs e) { if (updateMode) update(); } private void geckoWebBrowser1_DocumentCompleted(object sender, EventArgs e) { timer1.Enabled = true; updateMode = true; } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { geckoWebBrowser1.Navigate("javascript:scrollToBookmark(" + treeView1.SelectedNode.Tag + ")"); TreeNode selected = treeView1.SelectedNode; TreeNode prev = selected.PrevNode; TreeNode next = selected.PrevNode; if (prev == null) upButton.Enabled = false; if (next == null) downButton.Enabled = false; } private void update() { geckoWebBrowser1.Navigate("javascript:updateSelText()"); GeckoElement el = geckoWebBrowser1.Document.GetElementById("sel_result_991231"); if (el != null) { textBox1.Text = el.InnerHtml; addButton.Enabled = !textBox1.Text.Trim().Equals(String.Empty); } } private void textBox1_Enter(object sender, EventArgs e) { updateMode = false; } private void geckoWebBrowser1_DomMouseDown(object sender, GeckoDomMouseEventArgs e) { updateMode = true; update(); } private void geckoWebBrowser1_DomMouseUp(object sender, GeckoDomMouseEventArgs e) { updateMode = false; } private void addButton_Click(object sender, EventArgs e) { geckoWebBrowser1.Navigate("javascript:addIdToSel()"); TreeNode t = new TreeNode(textBox1.Text); t.Tag = selId; treeView1.Nodes.Add(t); selId++; } }

    Read the article

  • Manually iterating over a selection of XML elements (C#, XDocument)

    - by user316117
    What is the “best practice” way of manually iterating (i.e., one at a time with a “next” button) over a set of XElements in my XDocument? Say I select the set of elements I want thusly: var elems = from XElement el in m_xDoc.Descendants() where (el.Name.LocalName.ToString() == "q_a") select el; I can use an IEnumerator to iterate over them, i.e., IEnumerator m_iter; But when I get to the end and I want to wrap around to the beginning if I call Reset() on it, it throws a NotSupportedException. That’s because, as the Microsoft C# 2.0 Specification under chapter 22 "Iterators" says "Note that enumerator objects do not support the IEnumerator.Reset method. Invoking this method causes a System.NotSupportedException to be thrown ." So what IS the right way of doing this? And what if I also want to have bidirectional iteration, i.e., a “back” button, too? Someone on a Microsoft discussion forum said I shouldn’t be using IEnumerable directly anyway. He said there was a way to do what I want with LINQ but I didn’t understand what. Someone else suggested dumping the XElements into a List with ToList(), which I think would work, but I wasn’t sure it was “best practice”. Thanks in advance for any suggestions!

    Read the article

  • Keyboard navigation for jQuery Tabs

    - by Binyamin
    How to make Keyboard navigation left/up/right/down (like for photo gallery) feature for jQury Tabs with History? Demo without Keyboard feature in http://dl.dropbox.com/u/6594481/tabs/index.html Needed functions: 1. on keyboardtop/down make select and CSS showactivenested ajax tabs from 1-st to last level 2. on keyboardleft/right changeback/forwardcontent ofactivenested ajax tabs tab 3. an extra option, makeactivenested ajax tab on 'cursor-on' on concrete nested ajax tabs level Read more detailed question with example pictures in http://stackoverflow.com/questions/2975003/jquery-tools-to-make-keyboard-and-cookies-feature-for-ajaxed-tabs-with-history /** * @license * jQuery Tools @VERSION Tabs- The basics of UI design. * * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. * * http://flowplayer.org/tools/tabs/ * * Since: November 2008 * Date: @DATE */ (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.tabs = { conf: { tabs: 'a', current: 'current', onBeforeClick: null, onClick: null, effect: 'default', initialIndex: 0, event: 'click', rotate: false, // 1.2 history: false }, addEffect: function(name, fn) { effects[name] = fn; } }; var effects = { // simple "toggle" effect 'default': function(i, done) { this.getPanes().hide().eq(i).show(); done.call(); }, /* configuration: - fadeOutSpeed (positive value does "crossfading") - fadeInSpeed */ fade: function(i, done) { var conf = this.getConf(), speed = conf.fadeOutSpeed, panes = this.getPanes(); if (speed) { panes.fadeOut(speed); } else { panes.hide(); } panes.eq(i).fadeIn(conf.fadeInSpeed, done); }, // for basic accordions slide: function(i, done) { this.getPanes().slideUp(200); this.getPanes().eq(i).slideDown(400, done); }, /** * AJAX effect */ ajax: function(i, done) { this.getPanes().eq(0).load(this.getTabs().eq(i).attr("href"), done); } }; var w; /** * Horizontal accordion * * @deprecated will be replaced with a more robust implementation */ $.tools.tabs.addEffect("horizontal", function(i, done) { // store original width of a pane into memory if (!w) { w = this.getPanes().eq(0).width(); } // set current pane's width to zero this.getCurrentPane().animate({width: 0}, function() { $(this).hide(); }); // grow opened pane to it's original width this.getPanes().eq(i).animate({width: w}, function() { $(this).show(); done.call(); }); }); function Tabs(root, paneSelector, conf) { var self = this, trigger = root.add(this), tabs = root.find(conf.tabs), panes = paneSelector.jquery ? paneSelector : root.children(paneSelector), current; // make sure tabs and panes are found if (!tabs.length) { tabs = root.children(); } if (!panes.length) { panes = root.parent().find(paneSelector); } if (!panes.length) { panes = $(paneSelector); } // public methods $.extend(this, { click: function(i, e) { var tab = tabs.eq(i); if (typeof i == 'string' && i.replace("#", "")) { tab = tabs.filter("[href*=" + i.replace("#", "") + "]"); i = Math.max(tabs.index(tab), 0); } if (conf.rotate) { var last = tabs.length -1; if (i < 0) { return self.click(last, e); } if (i > last) { return self.click(0, e); } } if (!tab.length) { if (current >= 0) { return self; } i = conf.initialIndex; tab = tabs.eq(i); } // current tab is being clicked if (i === current) { return self; } // possibility to cancel click action e = e || $.Event(); e.type = "onBeforeClick"; trigger.trigger(e, [i]); if (e.isDefaultPrevented()) { return; } // call the effect effects[conf.effect].call(self, i, function() { // onClick callback e.type = "onClick"; trigger.trigger(e, [i]); }); // default behaviour current = i; tabs.removeClass(conf.current); tab.addClass(conf.current); return self; }, getConf: function() { return conf; }, getTabs: function() { return tabs; }, getPanes: function() { return panes; }, getCurrentPane: function() { return panes.eq(current); }, getCurrentTab: function() { return tabs.eq(current); }, getIndex: function() { return current; }, next: function() { return self.click(current + 1); }, prev: function() { return self.click(current - 1); } }); // callbacks $.each("onBeforeClick,onClick".split(","), function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); if (conf.history && $.fn.history) { $.tools.history.init(tabs); conf.event = 'history'; } // setup click actions for each tab tabs.each(function(i) { $(this).bind(conf.event, function(e) { self.click(i, e); return e.preventDefault(); }); }); // cross tab anchor link panes.find("a[href^=#]").click(function(e) { self.click($(this).attr("href"), e); }); // open initial tab if (location.hash) { self.click(location.hash); } else { if (conf.initialIndex === 0 || conf.initialIndex > 0) { self.click(conf.initialIndex); } } } // jQuery plugin implementation $.fn.tabs = function(paneSelector, conf) { // return existing instance var el = this.data("tabs"); if (el) { return el; } if ($.isFunction(conf)) { conf = {onBeforeClick: conf}; } // setup conf conf = $.extend({}, $.tools.tabs.conf, conf); this.each(function() { el = new Tabs($(this), paneSelector, conf); $(this).data("tabs", el); }); return conf.api ? el: this; }; }) (jQuery); /** * @license * jQuery Tools @VERSION History "Back button for AJAX apps" * * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. * * http://flowplayer.org/tools/toolbox/history.html * * Since: Mar 2010 * Date: @DATE */ (function($) { var hash, iframe, links, inited; $.tools = $.tools || {version: '@VERSION'}; $.tools.history = { init: function(els) { if (inited) { return; } // IE if ($.browser.msie && $.browser.version < '8') { // create iframe that is constantly checked for hash changes if (!iframe) { iframe = $("<iframe/>").attr("src", "javascript:false;").hide().get(0); $("body").append(iframe); setInterval(function() { var idoc = iframe.contentWindow.document, h = idoc.location.hash; if (hash !== h) { $.event.trigger("hash", h); } }, 100); setIframeLocation(location.hash || '#'); } // other browsers scans for location.hash changes directly without iframe hack } else { setInterval(function() { var h = location.hash; if (h !== hash) { $.event.trigger("hash", h); } }, 100); } links = !links ? els : links.add(els); els.click(function(e) { var href = $(this).attr("href"); if (iframe) { setIframeLocation(href); } // handle non-anchor links if (href.slice(0, 1) != "#") { location.href = "#" + href; return e.preventDefault(); } }); inited = true; } }; function setIframeLocation(h) { if (h) { var doc = iframe.contentWindow.document; doc.open().close(); doc.location.hash = h; } } // global histroy change listener $(window).bind("hash", function(e, h) { if (h) { links.filter(function() { var href = $(this).attr("href"); return href == h || href == h.replace("#", ""); }).trigger("history", [h]); } else { links.eq(0).trigger("history", [h]); } hash = h; window.location.hash = hash; }); // jQuery plugin implementation $.fn.history = function(fn) { $.tools.history.init(this); // return jQuery return this.bind("history", fn); }; })(jQuery); $(function() { $("#list").tabs("#content > div", {effect: 'ajax', history: true}); });

    Read the article

  • NHibernate 2.1 MsSql2000Dialect error

    - by Daniel Dolz
    Hi. I had an old (but great) app using NHibernate 1.0.2. Worked like a charm. But then I decided to upgrade to NHibernate 2.1.2. Had to change some stuff, worked great also. Problem is, I founded out that new version works in some machines and do not work in others. What the heck? Thinking a while, I discovered that it only works in pcs with SQL 2000 installed!! previous version used to works everywhere.... Check out a piece of my exception, it has to do with mssql2000Dialect NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass() en NHibernate.NHibernateUtil..cctor() --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect..ctor() en NHibernate.Dialect.MsSql2000Dialect..ctor() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) Could you help? Thanks!!!!

    Read the article

  • php xpath problems

    - by Phill Pafford
    I'm doing a cURL POST and get the error response back, parse it into an array but having issues with xpath now. // XML <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <errors xmlns="http://host/project"> <error code="30" description="[] is not a valid email address."/> <error code="12" description="id[] does not exist."/> <error code="3" description="account[] does not exist."/> <error code="400" description="phone[] does not exist."/> </errors> // Function / Class class parseXML { protected $xml; public function __construct($xml) { if(is_file($xml)) { $this->xml = simplexml_load_file($xml); } else { $this->xml = simplexml_load_string($xml); } } public function getErrorMessage() { $in_arr = false; $el = $this->xml->xpath("//@errors"); $returned_errors = count($el); if($returned_errors > 0) { foreach($el as $element) { if(is_object($element) || is_array($element)) { foreach($element as $item) { $in_arr[] = $item; } } } } else { return $returned_errors; } return $in_arr; } } // Calling function // $errorMessage is holding the XML value in an array index // something like: $arr[3] = $xml; $errMsg = new parseXML($arr[3]); $errMsgArr = $errMsg->getErrorMessage(); What I would like is all the error code and description attribute values

    Read the article

  • NHibernate with Framework .NET Framework 2

    - by Daniel Dolz
    Hi. I can not make NHibernate 2.1 work in machines without framework 3.X (basically, windows 2000 SP4, although it happens with XP too). NHibernate doc do no mention this. Maybe you can help? I NEED to make NHibernate 2.1 work in Windows 2000 PCs, so you think this can be done? Thanks! PD: DataBase is SQL 2000/2005. Error is: NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass() en NHibernate.NHibernateUtil..cctor() --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect..ctor() en NHibernate.Dialect.MsSql2000Dialect..ctor() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) en System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) en System.Activator.CreateInstance(Type type, Boolean nonPublic) en NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) en NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) en NHibernate.Cfg.Configuration.ProcessMappingsQueue() and continues...

    Read the article

  • php parsing xml result from ipb ssi tool

    - by Sir Troll
    Last week my code was running fine and now (without changing anything) it is no longer able to parse the elements out of the XML. The response from the ssi tool: <?xml version="1.0" encoding="ISO-8859-1"?> <ipbsource><topic id="32"> <title>Test topic</title> <lastposter id="1">Drake</lastposter> <starter id="18">Drake</starter> <forum id="3">Updates</forum> <date timestamp="1345600720">22 August 2012 - 03:58 AM</date> </topic> </ipbsource> enter code here Update: Switched to SimpleXML but I can't extract data from the xml: $xml = file_get_contents('http://site.com/forum/ssi.php?a=out&f=2&show=10&type=xml'); $xml = new SimpleXMLElement($xml); $item_array = array(); var_dump($xml); foreach($xml->topic as $el) { var_dump($el); echo 'Title: ' . $el->title; } The var_dump output: object(SimpleXMLElement)#1 (1) { [0]=> string(1) " " }

    Read the article

  • emacs: Inferior-mode python-shell appears "lagged"

    - by Begbie00
    Hi all - I'm a Python(3.1.2)/emacs(23.2) newbie teaching myself tkinter using the pythonware tutorial found here. Relevant code is pasted below the question. Question: when I click the Hello button (which should call the say_hi function) why does the inferior python shell (i.e. the one I kicked off with C-c C-c) wait to execute the say_hi print function until I either a) click the Quit button or b) close the root widget down? When I try the same in IDLE, each click of the Hello button produces an immediate print in the IDLE python shell, even before I click Quit or close the root widget. Is there some quirk in the way emacs runs the Python shell (vs. IDLE) that causes this "lagged" behavior? I've noticed similar emacs lags vs. IDLE as I've worked through Project Euler problems, but this is the clearest example I've seen yet. FYI: I use python.el and have a relatively clean init.el... (setq python-python-command "d:/bin/python31/python") is the only line in my init.el. Thanks, Mike === Begin Code=== from tkinter import * class App: def __init__(self,master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Button(frame, text="Hello", command=self.say_hi) self.hi_there.pack(side=LEFT) def say_hi(self): print("hi there, everyone!") root = Tk() app = App(root) root.mainloop()

    Read the article

  • How do I construct a more complex single LINQ to XML query?

    - by Cyberherbalist
    I'm a LINQ newbie, so the following might turn out to be very simple and obvious once it's answered, but I have to admit that the question is kicking my arse. Given this XML: <measuresystems> <measuresystem name="SI" attitude="proud"> <dimension name="mass" dim="M" degree="1"> <unit name="kilogram" symbol="kg"> <factor name="hundredweight" foreignsystem="US" value="45.359237" /> <factor name="hundredweight" foreignsystem="Imperial" value="50.80234544" /> </unit> </dimension> </measuresystem> </measuresystems> I can query for the value of the conversion factor between kilogram and US hundredweight using the following LINQ to XML, but surely there is a way to condense the four successive queries into a single complex query? XElement mss = XElement.Load(fileName); IEnumerable<XElement> ms = from el in mss.Elements("measuresystem") where (string)el.Attribute("name") == "SI" select el; IEnumerable<XElement> dim = from e2 in ms.Elements("dimension") where (string)e2.Attribute("name") == "mass" select e2; IEnumerable<XElement> unit = from e3 in dim.Elements("unit") where (string)e3.Attribute("name") == "kilogram" select e3; IEnumerable<XElement> factor = from e4 in unit.Elements("factor") where (string)e4.Attribute("name") == "pound" && (string)e4.Attribute("foreignsystem") == "US" select e4; foreach (XElement ex in factor) { Console.WriteLine ((string)ex.Attribute("value")); }

    Read the article

  • Problem Render backbone collection using Mustache template

    - by RameshVel
    I am quite new to backbone js and Mustache. I am trying to load the backbone collection (Object array) on page load from rails json object to save the extra call . I am having troubles rendering the backbone collection using mustache template. My model & collection are var Item = Backbone.Model.extend({ }); App.Collections.Items= Backbone.Collection.extend({ model: Item, url: '/items' }); and view App.Views.Index = Backbone.View.extend({ el : '#itemList', initialize: function() { this.render(); }, render: function() { $(this.el).html(Mustache.to_html(JST.item_template(),this.collection )); //var test = {name:"test",price:100}; //$(this.el).html(Mustache.to_html(JST.item_template(),test )); } }); In the above view render, i can able to render the single model (commented test obeject), but not the collections. I am totally struck here, i have tried with both underscore templating & mustache but no luck. And this is the Template <li> <div> <div style="float: left; width: 70px"> <a href="#"> <img class="thumbnail" src="http://placehold.it/60x60" alt=""> </a> </div> <div style="float: right; width: 292px"> <h4> {{name}} <span class="price">Rs {{price}}</span></h4> </div> </div> </li> and my object array kind of looks like this

    Read the article

  • How do I get NHibernate to work with .NET Framework 2.0?

    - by Daniel Dolz
    I can not make NHibernate 2.1 work in machines without framework 3.X (basically, windows 2000 SP4, although it happens with XP too). NHibernate doc do not mention this. Maybe you can help? I NEED to make NHibernate 2.1 work in Windows 2000 PCs, do you think this can be done? PD: DataBase is SQL 2000/2005. Error is: NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass() en NHibernate.NHibernateUtil..cctor() --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect..ctor() en NHibernate.Dialect.MsSql2000Dialect..ctor() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) en System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) en System.Activator.CreateInstance(Type type, Boolean nonPublic) en NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) en NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) en NHibernate.Cfg.Configuration.ProcessMappingsQueue() and continues...

    Read the article

  • Alternative to using c:out to prevent XSS

    - by lynxforest
    I'm working on preventing cross site scripting (XSS) in a Java, Spring based, Web application. I have already implemented a servlet filter similar to this example http://greatwebguy.com/programming/java/simple-cross-site-scripting-xss-servlet-filter/ which sanitizes all the input into the application. As an extra security measure I would like to also sanitize all output of the application in all JSPs. I have done some research to see how this could be done and found two complementary options. One of them is the use of Spring's defaultHtmlEscape attribute. This was very easy to implement (a few lines in web.xml), and it works great when your output is going through one of spring's tags (ie: message, or form tags). The other option I have found is to not directly use EL expressions such as ${...} and instead use <c:out value="${...}" /> That second approach works perfectly, however due to the size of the application I am working on (200+ JSP files). It is a very cumbersome task to have to replace all inappropriate uses of EL expressions with the c:out tag. Also it would become a cumbersome task in the future to make sure all developers stick to this convention of using the c:out tag (not to mention, how much more unreadable the code would be). Is there alternative way to escape the output of EL expressions that would require fewer code modifications? Thank you in advance.

    Read the article

  • webBrower Button Click without element ID?

    - by Jeremy
    I'm working on a login system for a forum and trying to make it work via a c# .net form. I need to programitically click the login button on the forum with a webBrower control. So far I have this. webPage page = new webPage(); page.URL = txtURL.Text; page.Load(); //Load the text from the specified URL WebBrowser browser = new WebBrowser(); browser.Document.GetElementById("navbar_username").SetAttribute("value", textBox1.Text); browser.Document.GetElementById("navbar_password").SetAttribute("value", textBox2.Text); HtmlElement el = browser.Document.All["btnI"]; if (el != null) { el.InvokeMember("click"); } else { MessageBox.Show("There is an issue with the program"); } The issue is that the login button on the page does not have an ID or any real information that can allow me to click on it. Does anyone have any suggestions? Here is the code for the login button. <input type="image" src="images/loginbutton.png" class="loginbutton" tabindex="104" value="Log in" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s">

    Read the article

  • using jquery $.ajax to retrieve data and push data into javascript array through the success functio

    - by teamdane
    Hello All, I have a function that I'm trying to retrieve values using $.ajax and push the returned data into an array called output. Problem is the success function will not allow me to push the results into the array. see below for code. var getValues = function(el) { var value = ($(el).val()); if(value == '' || $(el).attr('disabled')) { return []; } var string = 'value=' + value; var output = []; $.ajax({ type: "GET", url: 'shocklookup_callback.php', dataType: "string", data: string, success: function(data) { } }); //output.push({ text : value + 'test', value : value + 'test1'} ); return output; }; Any ideas of what I can put in the success function to be able to push the data into the output array? Also I need to be able to return the output array to the original function getValues. If this doesn't' make a whole lot of sense please let me know and I'll try to explain better. Thanks, Dane

    Read the article

  • C Static Function Confusion

    - by Lime
    I am trying to make the s_cord_print function visible in the cord_s.c file only. Currently the function is visible/runnable in main.c even when it is declared static. How do I make the s_cord_print function private to cord_s.c? Thanks! s_cord.c typedef struct s_cord{ int x; int y; struct s_cord (*print)(); } s_cord; void* VOID_THIS; #define $(EL) VOID_THIS=&EL;EL static s_cord s_cord_print(){ struct s_cord *THIS; THIS = VOID_THIS; printf("(%d,%d)\n",THIS->x,THIS->y); return *THIS; } const s_cord s_cord_default = {1,2,s_cord_print}; main.c #include <stdio.h> #include <stdlib.h> #include "s_cord.c" int main(){ s_cord mycord = s_cord_default; mycord.x = 2; mycord.y = 3; $(mycord).print().print(); //static didn't seem to hide the function s_cord_print(); return 0; } ~

    Read the article

  • javascript countdown clock

    - by roi
    <script> var interval; var minutes = 1; var seconds = 5; window.onload = function() { countdown('countdown'); } function countdown(element) { interval = setInterval(function() { var el = document.getElementById(element); if(seconds == 0) { if(minutes == 0) { el.innerHTML = "countdown's over!"; clearInterval(interval); return; } else { minutes--; seconds = 60; } } if(minutes > 0) { var minute_text = minutes + (minutes > 1 ? ' minutes' : ' minute'); } else { var minute_text = ''; } var second_text = seconds > 1 ? 'seconds' : 'second'; el.innerHTML = minute_text + ' ' + seconds + ' ' + second_text + ' remaining'; seconds--; }, 1000); } </script> this is a good countdown clock and i want to show the time in datalist how do i do it? like in this site www.1buy1.co.il

    Read the article

  • Xml updating with linq not working when quering

    - by user1734230
    I have problem i'm trying to update a specific part of the XML with the linq query but it doesn't work. So i an xml file: <?xml version="1.0" encoding="utf-8"?> <DesignConfiguration> <Design name="CSF_Packages"> <SourceFolder>C:\CSF_Packages</SourceFolder> <DestinationFolder>C:\Documents and Settings\xxx</DestinationFolder> <CopyLookups>True</CopyLookups> <CopyImages>False</CopyImages> <ImageSourceFolder>None</ImageSourceFolder> <ImageDesinationFolder>None</ImageDesinationFolder> </Design> </DesignConfiguration> I want to select the part where the part where there is Design name="somethning" and get the descendants and then update the descendants value that means this part: <SourceFolder>C:\CSF_Packages</SourceFolder> <DestinationFolder>C:\Documents and Settings\xxx</DestinationFolder> <CopyLookups>True</CopyLookups> <CopyImages>False</CopyImages> <ImageSourceFolder>None</ImageSourceFolder> <ImageDesinationFolder>None</ImageDesinationFolder> I have this code: XDocument configXml = XDocument.Load(configXMLFileName); var updateData = configXml.Descendants("DesignConfiguration").Elements().Where(el => el.Name == "Design" && el.Attribute("name").Value.Equals("AFP_GRAFIKA")).FirstOrDefault(); configXml.Save(configXMLFileName); I'm getting the null data in the updateData varibale. When I'm trying the Descendat's function through QuickWatch it also returns a null value. When I'm checking the configXML variable it has data that is my whole xml. What am I doing wrong?

    Read the article

  • Folding a list in F#

    - by bytebuster
    I have a pretty trivial task but I can't figure out how to make the solution prettier. The goal is taking a List and returning results, based on whether they passed a predicate. The results should be grouped. Here's a simplified example: Predicate: isEven Inp : [2; 4; 3; 7; 6; 10; 4; 5] Out: [[^^^^]......[^^^^^^^^]..] Here's the code I have so far: let f p ls = List.foldBack (fun el (xs, ys) -> if p el then (el::xs, ys) else ([], xs::ys)) ls ([], []) |> List.Cons // (1) |> List.filter (not << List.isEmpty) // (2) let even x = x % 2 = 0 let ret = [2; 4; 3; 7; 6; 10; 4; 5] |> f even // expected [[2; 4]; [6; 10; 4]] This code does not seem to be readable that much. Also, I don't like lines (1) and (2). Is there any better solution?

    Read the article

  • Windows 7 task bar program jump list

    - by MrStatic
    I am looking for a way to make a jump list for the windows task bar for application shortcuts. Kinda like the quick launch toolbar but with the jump list look. I tried to make my own 'toolbar' but that does what the quick launch bar did before.

    Read the article

  • Moving multiple folders all at once in Outlook

    - by Luke
    Constantly at my shop, we are moving Outlook (or other email program) files between computers or Windows Installations, and sometimes, people have HUNDREDS of folders. Is there a quick way to move ALL the folders from multiple data files (*.PST) into one single file, without dragging each and every folder? No, I don't want to move the Inbox folder into the other Inbox folder for the quick move, I want something simple like selecting all folders and moving that way. Does such a method exist in any version of Outlook?

    Read the article

  • Windows 7duplicate in boot menu

    - by Mick
    I deploy my Windows 7 with imagex.exe. I do this by means some batch script : Win7_install.bat: cls Diskpart /s Win7_install.txt Imagex /apply Win7_October.wim 1 C: Bcdboot C:\Windows Exit Win7_install.txt: SELECT DISK 0 CLEAN CREATE PARTITION PRIMARY SIZE=102400 SELECT PARTITION 1 FORMAT fs=ntfs LABEL=”SYSTEM” quick ASSIGN LETTER=C CREATE PARTITION PRIMARY SELECT PARTITION 2 FORMAT fs=ntfs LABEL=”DATA” quick SELECT PARTITION 1 ACTIVE EXIT Then after restart I have duplicate entries in boot menu. Anybody have some idea how fix it? Regards

    Read the article

  • how to use webdav with netbeans?

    - by ajsie
    i have a server i save a lot of files, i wonder how i use webdav with netbeans. eg. import a webdav folder edit the php files and save it the new changes apply immediately on the web server (cause the webdav folder is the same as the apache web root folder) i think this is a very smart solution so that you can change the website immediately, without having to download, change and upload. anyone that knows how to accomplish this? (feel free to propose other quick solutions for how to do quick edits)

    Read the article

  • Missing the "add tab group to favorites " option in IE8

    - by dennis461
    I have internet options selected for quick tabs and tab groups in setting, IE8 WIndows XP. I can open a list of favorites from the menu using the blue arrow as a tab group. I can then use the quick tabs button to show the groups open. However, I do not have the "add tab group to favorites" option in the pull down menu for favotites at the Favorite Bar. Is this a Vista feature only?

    Read the article

  • What are the small details Windows and Linux users will trip on when using OSX for the first time?

    - by badp
    Like any other Apple product, OS X prides itself on the little details. When, earlier last week, I used my professor's Mac briefly to give a quick project presentation (mine decided to do a chkdsk at the wrong time, heh), I got the distinct feeling some were put intentionally to make the uninitiated look stupid. What are the small usability details that Windows and Linux users will trip on when their Mac using friend lend them their beloved Mac for some quick web browsing?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >