Search Results

Search found 3195 results on 128 pages for 'tip and tricks'.

Page 111/128 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • GWT JsonpRequestBuilder Timeout issue

    - by Anthony Kong
    I am getting time out from using JsonpRequestBuilder. The entry point code goes like this: // private static final String SERVER_URL = "http://localhost:8094/data/view/"; private static final String SERVER_URL = "http://www.google.com/calendar/feeds/[email protected]/public/full?alt=json-in-script&callback=insertAgenda&orderby=starttime&max-results=15&singleevents=true&sortorder=ascending&futureevents=true"; private static final String SERVER_ERROR = "An error occurred while " + "attempting to contact the server. Please check your network " + "connection and try again."; /** * This is the entry point method. */ public void onModuleLoad() { JsonpRequestBuilder requestBuilder = new JsonpRequestBuilder(); // requestBuilder.setTimeout(10000); requestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback()); } class Jazz10RequestCallback implements AsyncCallback<Article> { @Override public void onFailure(Throwable caught) { Window.alert("Failed to send the message: " + caught.getMessage()); } @Override public void onSuccess(Article result) { // TODO Auto-generated method stub Window.alert(result.toString()); } The article class is simply: import com.google.gwt.core.client.JavaScriptObject; public class Article extends JavaScriptObject { protected Article() {}; } The gwt page, however, always hit the onFailure() callback and show this alert: Failed to send the message. Timeout while calling <url>. Fail to see anything on the Eclipse plugin console. I tried the url and it works perfectly. Would appreciate any tip on debugging technique or suggestion

    Read the article

  • Java (Tomcat): how to configure a cookieless subdomain to serve static content

    - by Webinator
    One of the tip given by both Google and Yahoo! to speed up webpages loading is to configure a cookieless subdomain to server static content. How do you configure a "cookieless subdomain" using Tomcat in standalone mode (this question is not about how to use Apache to serve static content in a cookieless-way, but about how to do it in Tomcat-standalone mode)? Note that I don't care about filters supporting If-Modified-Since nor care about filters supporting gzipping: the static content I'm serving is forever cacheable (or its name will change) and it is already compressed data (so gzip would only slow down the transfer). Do I need two different Tomcat webapps? (one "cookiefull" and one "cookieless") Do I need two different servlets? (as of now I've got only one dispatcher/controller servlet). Why would a "regular" link to, say, a static image be called in a cookiefull way when it would be on the same domain as the main webapp and then be called in a "cookie-less" way when it is on a subdomain? I don't understand exactly what is going on: is it the browser that decides to append or not cookies to the query? If so, why would it not append the cookies to a static query on a "cookieless" subdomain. Any example as to what is going on behind the scene is most welcome :)

    Read the article

  • Jersey / ServletContext and resource loading on startup.

    - by Raphael Jolivet
    Hello, I'm kind of new in web development with Java. I am developing a web service and I've chosen REST / Jersey for it. I want to init some stuff on startup of the service and to keep them all along the life of the service. First question : Is the constructor of the Jersey Servlet a good place to do that ? Basically, what I want to do is to load a config.ini file located in my WEB-INF directory. Following this help, I understand I need a ServletContext to load my file as a resource. However, it is not clear to me how to get this ServletContext in a Jersey Servlet, as it is not really an instance of a servlet, but rather a POJO with some annotations. I wanted to try this tip, but the attribute "context" is null in the constructor. I think that Jersey might populate it after the constructor. Right ? So how is the right way to do this ? Here is my code so far : /** Main REST servlet */ @Path("/") public class Servlet { // ---------------------------------------------------- // Constants // ---------------------------------------------------- static private final String CONFIG_PATH = "/WEB-INF/config.ini"; // ---------------------------------------------------- // Attributes // ---------------------------------------------------- /** Context */ @Context ServletContext context; // ---------------------------------------------------- // Constructor // ---------------------------------------------------- /** Init the servlet */ public Servlet() { // Load config.ini from WEB-INF Config.config = new Config( this.context.getResourceAsStream(CONFIG_PATH)); // FAIL! this.context is null ... } // ---------------------------------------------------- // URI Handlers // ---------------------------------------------------- /** Welcome page */ @GET @Path("/") @Produces(MediaType.TEXT_HTML) public String welcome() { return "<h1>Hi there.</h1>"; } } Any help would be much appreciated. Thanks in advance, Raphael

    Read the article

  • java TrayIcon using image with transparent background

    - by Jack
    I am using the following code to set a tray icon in Windows and Linux. It works wonderful in Windows and works okay in Linux. In Linux (Ubuntu) I have my panel set to be (somewhat) transparent and when I add a GIF (with a transparent background) the background of the icon shows up all grey and ugly (see image, green diamond "!")....Any ideas on how to make the GIF image I am adding "keep" its transparent background? and the image I am using, if you'd like to test: import java.awt.*; import java.awt.event.*; public class TrayFun { static class ShowMessageListener implements ActionListener { TrayIcon trayIcon; String title; String message; TrayIcon.MessageType messageType; ShowMessageListener( TrayIcon trayIcon, String title, String message, TrayIcon.MessageType messageType) { this.trayIcon = trayIcon; this.title = title; this.message = message; this.messageType = messageType; } public void actionPerformed(ActionEvent e) { trayIcon.displayMessage(title, message, messageType); } } public static void main(String args[]) { Runnable runner = new Runnable() { public void run() { if (SystemTray.isSupported()) { final SystemTray tray = SystemTray.getSystemTray(); Image image = Toolkit.getDefaultToolkit().getImage("green_info.png"); PopupMenu popup = new PopupMenu(); final TrayIcon trayIcon = new TrayIcon(image, "The Tip Text", popup); trayIcon.setImageAutoSize(true); MenuItem item = new MenuItem("Close"); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { tray.remove(trayIcon); } }); popup.add(item); try { tray.add(trayIcon); } catch (AWTException e) { System.err.println("Can't add to tray"); } } else { System.err.println("Tray unavailable"); } } }; EventQueue.invokeLater(runner); } }

    Read the article

  • Poll multiple desktops/servers on a network remotely to determine the IP Type: Static or DHCP

    - by Charles Laird
    Had a gentleman answer 90% of my original question, which is to say I now have the ability to poll a device that I am running the below script on. The end goal is to obtain IP type: Static or DHCP on all desktop/servers on a network I support. I have the list of servers that I will input in a batch file, just looking for the code to actually poll the other devices on the network from one location. Output to be viewed: Device name: IP Address: MAC Address: Type: Marvell Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller NULL 00:00:F3:44:C6:00 DHCP Generic Marvell Yukon 88E8056 based Ethernet Controller 192.168.1.102 00:00:F3:44:D0:00 DHCP ManagementClass objMC = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection objMOC = objMC.GetInstances(); txtLaunch.Text = ("Name\tIP Address\tMAC Address\tType" +"\r\n"); foreach (ManagementObject objMO in objMOC) { StringBuilder builder = new StringBuilder(); object o = objMO.GetPropertyValue("IPAddress"); object m = objMO.GetPropertyValue("MACAddress"); if (o != null || m != null) { builder.Append(objMO["Description"].ToString()); builder.Append("\t"); if (o != null) builder.Append(((string[])(objMO["IPAddress"]))[0].ToString()); else builder.Append("NULL"); builder.Append("\t"); builder.Append(m.ToString()); builder.Append("\t"); builder.Append(Convert.ToBoolean(objMO["DHCPEnabled"]) ? "DHCP" : "Static"); builder.Append("\r\n"); } txtLaunch.Text = txtLaunch.Text + (builder.ToString()); I'm open to recommendations here.

    Read the article

  • Delphi - Message loop for Form created in DirectShow filter goes dead

    - by Robert Oschler
    I have a DirectShow filter created with Delphi Pro 6 and the DSPACK direct show library. I'm running under windows XP. I've tried creating the form dynamically when the container class for the DirectFilter has its constructor called, passing NIL into the constructor as the AOwner parameter (TMyForm.Create(nil) and then calling the Form's Show() method. The form does show but then appears to stop receiving windows messages because it never repaints and does not respond to input. As a test I then tried creating my own WndProc() and overriding the Form's WndProc(). My WndProc() did get called once but never again. I'm guessing it's because I'm a DLL and the context that I am running in is not "friendly" to the window message handler for the form; perhaps something to do with the thread that calls it or whatever. If someone could give me a tip on how to solve this or what the proper way to create a persistent window is from the context of a DirectShow filter I'd appreciate it. Note, as I said the window needs to be persistent so I can't create it as a Filter property page. Thanks, Robert

    Read the article

  • SSL certificate exception problem in Firefox

    - by Baztoune
    Hi there, and thanks in advance for your help or any tip that could get me out of here. I work on a JEE app with a JBoss server and an Apache. I'm not really familiar with SSL connections and certificates, I understand the basic, but I have to deal with it. So on my local configuration (localhost) I have my connection certificate configured on JBoss and Apache, and a USER_DEV.P12 file, which I import in my certificates in Firefox. I have the same configuration on a distant test server (test-server), and a USER_TEST.P12 which I also import in Firefox. When I access https://localhost/ or https://test-server/ Firefox asks me to add an exception, which is normal. After that, I select the appropriated user certificate, and can use my application normally. But for the second (let's say https://test-server/), Firefox rises me a sec_error_reused_issuer_and_serial error. Of course I googled it and founded the Mozilla help, So when I delete the "server" in my certificate manager, I can access again my second domain, but the same problem occurs for the first one. To shorten the problem, my 2 client/server certificate couples are OK but I can't have 2 certificate exceptions at the same time in Firefox for my 2 different servers/users, even though the names, server address, and MD5 are different. I notified the serial is the same (01), but it's working on my colleague's computer. So am I doing something wrong? Do I have to deal with it manually each time (or with Firefox profiles)? Thanks for your help. Bastien.

    Read the article

  • Why would javascript click-areas not be working in IE8?

    - by Edward Tanguay
    I'm trying to find a bug in an old ASP.NET application which causes IE8 to not be able to click on the following "button" area in our application: <td width="150px" class="ctl00_CP1_UiCommandManager1i toolBarItem" valign="middle" onmouseout="onMouseOverCommand(this,1,'ctl00_CP1_UiCommandManager1',0,0);" onmouseover="onMouseOverCommand(this,0,'ctl00_CP1_UiCommandManager1',0,0);" onmousedown="onMouseDownCommand(this, 'ctl00_CP1_UiCommandManager1', 0, 0);" onmouseup="onMouseUpCommand(this, 'ctl00_CP1_UiCommandManager1', 0, 0);" id="ctl00_CP1_UiCommandManager1_0_0"> <span style="width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;"> NEW </span> </td> When we switch IE8 to IE7 compatibility mode, the problem disappears, IE7 is able to click on it. Since the above HTML is generated by a third party control (Janus, http://www.janusys.com/controls), we don't have the source code. has anyone experienced any similar problems with IE8? I've determined that it actually fires the onMouseDownCommand command also the CSS of the button area is different in IE8, it doesn't have color shading that it does in IE7. I can imagine that somewhere the HTML is not valid and IE8 being stricter is not playing along, but where? any advice on how to narrow in on this bug welcome ANSWER: Turned out to be that the application was not checking the navigator.agent for "MSIE 8.0" and was thus treating IE8 has a non-Internet-Explorer browser. Thanks Lazarus for the tip, the IE8 Javascript debugger is very nice, like a Firebug for IE, will be using it more!

    Read the article

  • Weak event handler model for use with lambdas

    - by Benjol
    OK, so this is more of an answer than a question, but after asking this question, and pulling together the various bits from Dustin Campbell, Egor, and also one last tip from the 'IObservable/Rx/Reactive framework', I think I've worked out a workable solution for this particular problem. It may be completely superseded by IObservable/Rx/Reactive framework, but only experience will show that. I've deliberately created a new question, to give me space to explain how I got to this solution, as it may not be immediately obvious. There are many related questions, most telling you you can't use inline lambdas if you want to be able to detach them later: Weak events in .Net? Unhooking events with lambdas in C# Can using lambdas as event handlers cause a memory leak? How to unsubscribe from an event which uses a lambda expression? Unsubscribe anonymous method in C# And it is true that if YOU want to be able to detach them later, you need to keep a reference to your lambda. However, if you just want the event handler to detach itself when your subscriber falls out of scope, this answer is for you.

    Read the article

  • SharpPcap issue

    - by Eyla
    This is my first time to use SharpPcap library. I created new project with VC# 2008 and I added SharpPcap as a reference to my project. I post a sample code to get interface of my pc but I'm getting this error: Error 1 The type or namespace name 'PcapDeviceList' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Ali\Documents\Visual Studio 2008\Projects\Pcap\Pcap\Form1.cs 28 13 Pcap please advice to solve this problem. here is my code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using SharpPcap; using SharpPcap.Packets; using SharpPcap.Protocols; using SharpPcap.Util; namespace Pcap { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { /* Retrieve the device list */ PcapDeviceList devices = SharpPcap.GetAllDevices(); /*If no device exists, print error */ if (devices.Count < 1) { Console.WriteLine("No device found on this machine"); return; } int i = 0; /* Scan the list printing every entry */ foreach (PcapDevice dev in devices) { /* Description */ label1.Text = "{0}) {1}" + i + dev.PcapDescription +"\n"+ /* Name */ "\tName:\t{0}" + dev.PcapName+"\n"+ /* IP Address */ "\tIP Address: \t\t{0}"+ dev.PcapIpAddress+"\n"+ /* Is Loopback */ "\tLoopback: \t\t{0}"+ dev.PcapLoopback; i++; } } } }

    Read the article

  • Help with editing data in entity framework.

    - by Levelbit
    Title of this question is simple because there is no an easy explanation for what I'm trying to ask you. I hope you'll understand in the end :). I have to tables in my database: Company and Location (relationship:one to many) and corresponding entity sets. In my wpf application I have some datagrid which I want to fill with locations and to be able to edit every row in separate window as some form of details view (so I don't want to edit my data in datagrid). I did this by accessing Location entity from selected row and creating a new Location entity and then I copy properties from original entity to newly created. Something like cloning the object. After editing if I press OK changed data is copied to original object back, and if I press Cancel nothing happens. Of course, you probably thinking I could use NoTracking option and AttachAsModified method as was mentioned as solution in some earlier questions(see:http://stackoverflow.com/questions/803022/changing-entities-in-the-entityframework) by Alex James, but lets say I had some problems about that and I have my own reasons for doing this. Finally, because navigation property(Company) of my location entity is assigned to newly created location object(during cloning) from some reason in object context additional object as copy of object I want to edit from datagrid is created without my will(similar problem :http://blogs.msdn.com/alexj/archive/2009/12/02/tip-47-how-fix-up-can-make-it-hard-to-change-relationships.aspx). So, when I do ObjectContext.SaveChanges it inserts additional row of data into my database table Location, the same as the one i wanted to edit. I read about sth like this, but I don't quite understand why is that and how to block or override this. I hope I was clear as I could. Please, solutions or some other ideas.

    Read the article

  • JQuery Tool tips

    - by kwek-kwek
    I want to create a tool tip for an image with a link now I had it working one but it doesn't work with the 2nd image. Here is my Sample Code: <!-- trigger element. a regular workable link --> <a id="test" title="Name - Title">Name</a> <!-- tooltip element --> <div class="tooltip"> <div><span class="name">Name</span><br /> Title <span><a href="#">more info»</a></span></div> </div> <!-- trigger element. a regular workable link --> <a id="test2" title="Name - Title">Name</a> <!-- tooltip element --> <div class="tooltip2"> <div><span class="name">Name</span><br /> Title <span><a href="#">more info»</a></span></div> </div> and here is my script that makes it all happens: <script> // What is $(document).ready ? See: http://flowplayer.org/tools/using.html#document_ready $(document).ready(function() { // enable tooltip for "test" element. use the "slide" effect $("#test").tooltip({ effect: 'slide', offset: [50, 40] }); $("#test2").tooltip2({ effect: 'slide', offset: [50, 40] }); }); </script> but not working please help.

    Read the article

  • Hibernate fails with NullPointerException in EntityTuplizerFactory.constructTuplizer? Why?

    - by Subtwo
    I have a problem when I try to instantiate Hibernate and connect with a MySQL database (see error message below). Curiously enough the connection works fine using the exact same hibernate.cfg.xml file when running Junit tests but it refuses to work when run from Tomcat... I am starting to run out of ideas. Any clues or tip where to look? Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.DynamicMapEntityTuplizer] at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:110) at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135) at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:69) at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:323) at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:456) at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:131) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84) at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:267) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341) at se.fmt.atlantism.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:16) ... 38 more Caused by: java.lang.NullPointerException at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:107) ... 47 more

    Read the article

  • jquery select elements between two elements that are not siblings

    - by naugtur
    eg. [I've removed attributes, but it's a bit of auto-generated html] <img class="p"/> <div> hello world <p> <font><font size="2">text.<img class="p"/> some text</font></font> </p> <img class="p"/> <p> <font><font size="2">more text<img class="p"/> another piece of text </font></font> </p><img class="p"/> some text on the end </div> I need to apply some highlighting with backgrounds to all text that is between two closest [in the html code] img.p elements when hovering first of them. I have no idea how to do that. Lets say I hover the first img.p - it should highlight hello world and text. and nothing else. And now the worst part - I need the backgrounds to disappear on mouseleave. I need it to work with any HTML mess possible. The above is just an example and structure of the documents will differ. [tip. Processing the whole html before binding hover and putting some spans etc. is ok as long as it doesn't change the looks of the output document]

    Read the article

  • Advice welcomed on creating my own Swing component

    - by Toto
    Recently I asked which was the best Swing component to bind to a BigDecimal variable (with some particular editing properties). It turns out that none of the standard Swing components suit me completely, nor did the third-party Swing component libraries I've found out there. So I’ve decided to create my own Swing component. Component description: I want to extend JTextField or JFormattedTextField, so my new component can be easily bound to a BigDecimal variable. The component will have customizable scale and length properties. Behavior: When the component is drawn, it shows only the decimal point and space for scale digits to its right. When the component receives focus the caret should be positioned left to the decimal point. As the user types numbers (any other character is ignored) they appear to the left of the caret, only length – scale numbers are accepted, any other number typed is ignored as the integer portion is full. Any time the user types the decimal point the caret moves to the right side of the decimal point. The following numbers typed are shown in the decimal part, only scale numbers are considered any other number typed is ignored as the decimal portion is full. Additionally, thousand separators should appear as the user types numbers left to the decimal point. Invoking a getValue() method on the component should yield the BigDecimal representing the number just entered. I’ve never created my own Swing component; I’ve barely used the standard ones. So I would appreciate any good tutorial/info/tip on creating the component described. This is the only thing I've got so far. Thanks in advance.

    Read the article

  • How to put foreign key constraints on a computed fields in sql server?

    - by Asaf R
    Table A has a computed field called Computed1. It's persisted and not null. Also, it always computes to an expression which is char(50). It's also unique and has a unique key constraint on it. Table B has a field RefersToComputed1, which should refer to a valid Computed1 value. Trying to create a foreign key constraint on B's RefersToComputed1 that references A' Computed1 leads to the following error: Error SQL01268: .Net SqlClient Data Provider: Msg 1753, Level 16, State 0, Line 1 Column 'B.RefersToComputed1' is not the same length or scale as referencing column 'A.Computed1' in foreign key 'FK_B_A'. Columns participating in a foreign key relationship must be defined with the same length and scale. Q: Why is this error created? Are there special measures needed for foreign keys for computed columns, and if so what are they? Summary: The specific problem rises from computed, char based, fields being varchar. Hence, Computed1 is varchar(50) and not char(50). It's best to have a cast surrounding a computed field's expression to force it to a specific type. Credit goes to Cade Roux for this tip.

    Read the article

  • Django: How can I delete a formset entry if one of it's data is blank?

    - by mkret
    Hi, I have the following scenario: I have a form with data that does not need translation and a formset with a textfield that should be translated into an undefined amount of languages. Both parts are bound to a model. Each translated text is kept in a model with a foreign key that binds it to the untranslatable data. Something like: class Person(models.Model): name = models.CharField(max_length=60) birth_date = models.DateField() class PersonBio(models.Model): person = models.ForeignKey(Person) locale = models.CharField(max_length=10) bio = models.TextField() Each form in the formset has 2 fields: A textfield (with the translated text) A locale field (with the language into which the text was translated) I've got it working with no problems until I tryed to change it's normal behaviour. I wanted to eliminate the need for the DELETE field by deleting an instance of the translated text if the textfield was left blank. I've googled quite a lot now and read the whole documentation for forms, formsets and model validation but had no luck. To be honest, I couldn't even think of a solution. Where should I implement this? On a Form clean() method? On the view? Somewhere in the Fieldset? Fieldset's save() method, maybe? I'll keep trying to find a way to do that, but any help/tip/clue is appreciated. Thanks in advance.

    Read the article

  • virtualenv macosX --no-site-package ignored

    - by Tristram Gräbener
    Hello, I'm having problems with macOSX and virtualenv. It seems to ignore --no-site-package. Using exactly the same commands with linux (archlinux) it works. It it macOSX 10.5 with python 2.5 curl -o virtualenv.py 'http://bitbucket.org/ianb/virtualenv/raw/tip/virtualenv.py Create a new environment python virtualenv.py --no-site-packages foo New python executable in foo/bin/python Installing setuptools...........................done. Activate it source foo/bin/activate Try to install something in it. Despite virtualenv it looks for the system-wide install easy_install cherrypy Searching for cherrypy Best match: CherryPy 3.1.2 Adding CherryPy 3.1.2 to easy-install.pth file Using /Library/Python/2.5/site-packages Processing dependencies for cherrypy Finished processing dependencies for cherrypy Yet it doesn't find the module (foo)guidage-multimodal:~ tristram$ python Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cherrypy Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named cherrypy I tried PIP after looking at http://stackoverflow.com/questions/1382925/virtualenv-no-site-packages-and-pip-still-finding-global-packages However it fails installing psycopg2 (some problems with gcc). Also I would like to be able to have a setup.py (from distribute) that does the whole woork

    Read the article

  • What is the correct way to handle object which is instance of class in apache.xerces?

    - by Roman
    Preface: I'm working on docx parser for java. docx format is based on xml. When I read document its parts are being unmarshalled (with JAXB). And I get a tree of certain elements based on xml markup. Almost problem: But some elements (which are at very deep xml level) returned not as certain class from docx spec (i.e. CTStyle, CTDrawing, CTInline etc) but as Object. Those objects are indeed instances of xerces classes, e.g. ElementNSImpl. Problem: How should I handle these objects. The simplest approach is: CTGraphicData gData = getGraphicData (); Object obj = gData.getAny().get(0); ElementNSImpl element = (ElementNSImpl)obj; But it doesn't seem to be a good solution. I've never worked with xerces directly. What is the better way to do this casting? (If anyone also give me a tip about right way to iterate through nodes it would be great).

    Read the article

  • Switching AM/PM in ASP.NET AJAX MaskedEdit localization

    - by Greg
    The sample page for the MaskedEdit says "Tip: Type 'A' or 'P' to switch AM/PM". Are these keys hardcoded? Does the control automatically change itself for cultures that use 12-hour designators that don't start with A or P? Or is just broken for those? example: Arabic (Saudi Arabia) - AM: ? Arabic (Saudi Arabia) - PM: ? Chinese (Taiwan) - AM: ?? Chinese (Taiwan) - PM: ?? Greek (Greece) - AM: pµ Greek (Greece) - PM: µµ Korean (Korea) - AM: ?? Korean (Korea) - PM: ?? Albanian (Albania) - AM: PD Albanian (Albania) - PM: MD Persian (Iran) - AM: ?.? Persian (Iran) - PM: ?.? Vietnamese (Vietnam) - AM: SA Vietnamese (Vietnam) - PM: CH Afrikaans (South Africa) - PM: nm Punjabi (India) - AM: ????? Punjabi (India) - PM: ??? Syriac (Syria) - AM: ?.? Syriac (Syria) - PM: ?.? If this control doesn't handle this situation, does anyone know of a control that does?

    Read the article

  • How to add clickable logo on the flash web player?

    - by kishore
    Hi All, I have a code like this <script type="text/javascript" src="http://www.clipul.com/play/swfobject.js"></script> <div id="player">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject('http://montsmile.com/jwplayer/player.swf','mpl','480','380','8'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addVariable('height','310'); so.addVariable('width','470'); so.addVariable('file','http://localhost:81/newtip/<?=$videopath1?>'); so.addVariable('logo','http://localhost:81/newtip/ffmpeg/logo2.jpg'); so.addVariable("ClickURL", "http://www.google.com"); so.addVariable('captions','/upload/corrie.xml'); so.addVariable('link','<?=$full_url.'tip.php?vid='.$row_video['vid']?>'); so.addVariable('linkfromdisplay','true'); so.addVariable('linktarget','_blank'); so.addVariable('searchbar','false'); so.addVariable('skin','http://montsmile.com/jwplayer/player.swf'); so.write('player'); </script> It is displaying a player and playing the video. If I Click on the Logo It has to go to www.google.com. But when I click on the logo it becomes pause. Help me how to add clickable Logo on the player

    Read the article

  • Help with Jquery + Masonry Plugin: How to expand/collapse boxes to reveal content

    - by Jam
    I'm using the masonry jquery plugin on a project: (http://desandro.com/resources/jquery-masonry) Basically I have a set of boxes (thumbnails) in a grid. When one is clicked, I want it to expand to a larger size to show more content (additional images and text). I'm struggling with how to make the thumbnail dissappear and then have new content appear in the expanded box. I don't know how to make the new content appear or where to store it on my page--and it needs to have a close button? The creator of the plugin gave me a quick tip for the expanding part, but the code I'm using has a set height and width and I want them to be variable depending on how much content is in the expanded state. Here's my jquery code so far: http://pastie.org/1002101 This is a similar example of the behaviour I want to achieve (except my boxes will have have varying expanded sizes): (http://www.learnsomethingeveryday.co.uk) You'll also notice from that example that it only allows 1 box to be expanded at a time--I would also like to have that functionality. Sorry for all the questions--I'm pretty new to jquery, any help would be amazing!

    Read the article

  • What is the best software design to use in this scenario

    - by domdefelice
    I need to generate HTML snippets using jQuery. The creation of those snippets depends on some data. The data is stored server-side, in session (where PHP is used). At the moment I achieved this - retrieving the data from the server via AJAX in form of JSON - and building the snippets via specific javascript functions that read those data The problem is that the complexity of the data is getting bigger and hence the serialization into JSON is getting even more difficult since I can't do it automatically. I can't do it automatically because some information are sensible so I generate a "stripped" version to send to the client. I know it is difficult to understand without any code to read, but I am hoping this is a common scenario and would be glad for any tip, suggestion or even design-pattern you can give me. Should I store both a complete and a stripped data on the server and then use some library to automatically generate the JSON from the stripped data? But this also means I have to get the two data synchronized. Or maybe I could move the logic server-side, this way avoiding sending the data. But this means sending javascript code (since I rely on jQuery). Maybe not a good idea. Feel free to ask me more details if this is not clear. Thank you for any help

    Read the article

  • PHP not obeying my defined ETags

    - by Sam Bisbee
    What I'm doing I'm pulling an image from the database and sending it to the browser with all the proper headers - the image displays fine. I also send an ETag header, using the SHA1 of the image's content as the tag. The images are getting called semi regularly, so caching is a bit of an issue (won't kill the site, but nice to have). The Problem $_SERVER['HTTP_IF_NONE_MATCH'] is not available to me. As far as I can tell, this is because of PHP's "disobey the cache controls" life style. I can't mess with the session cache limiter, because I don't have access. But, even if I did have access, I wouldn't want to touch it: 99% of the site is under WordPress. The Environment PHP 4 (don't ask) Apache 2.2 WordPress The images live in the database (largeblog), which I can't change. Any guidance, tip/tricks, etc. would be helpful. I don't have much room to change the environmental/structural stuff. Cheers.

    Read the article

  • Use jQuery to find and add an image tooltip

    - by lund.mikkel
    Hey people Okay, what I'm trying to accomplish is a simple tool tip that, when you hover over the name of a color, shows a little image of that color. The html markup looks like this: <label class="colorPicker"> <input type="radio" checked="" id="20" value="20" name="id[2]"> <img width="16" height="16" title=" DinoBlack Mat " alt="DinoBlack Mat" src="images/attributes/color/dinoblack_mat.jpg">DinoBlack Mat </label> <label class="colorPicker"> <input type="radio" id="874" value="874" name="id[2]"> <img width="16" height="16" title="XrayBlue shiny" alt="XrayBlue shiny" src="images/attributes/color/xrayblue_shiny.jpg">XrayBlue shiny </label> I'm using the jQuery plugin "Tooltip" and I've added following to my main js-file: $('.colorPicker').tooltip({ track: true, delay: 0, showURL: false, fade: 250, bodyHandler: function() { return $("<img/>").attr("src", [THE SOURCE FOR THE IMAGE]); } }); The idea is simply that the image should be hidden by default. But when you hover over the text the little thumbnail shows up and makes it easy to recognize the color. The problem is I haven't got a clue how to get the src for the thumbnail. I don't know how to extract the src from the img inside the selected element. I've tried various combinations using the this keyword, but nothing seemed to work. I've also tried to add the src path as a rel attribute to the label, but also without any success. Should be needless to say I also control the PHP-output... I really hope you can help me. I've search the web for days without any luck. I'm getting desperate :D /Mikkel Lund

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >