Daily Archives

Articles indexed Monday March 26 2012

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

  • Python HTTPS requests (urllib2) fails on Ubuntu 12.04 without proxy

    - by Pablo
    I have an little app I wrote in Python and it used to work... until yesterday, when it suddenly started giving me an error in a HTTPS connection. I don't remember if there was an update, but both Python 2.7.3rc2 and Python 3.2 are failing just the same. I googled it and found out that this happens when people are behind a proxy, but I'm not (and nothing have changed in my network since the last time it worked). My syster's computer running windows and Python 2.7.2 has no problems (in the same network). response = urllib2.urlopen(url).read() File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 400, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 418, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1215, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol> What's wrong? Any help is appreciated. PS.: Older python versions don't work either, not in my system and not in a live session from USB, but DO work in a Ubuntu 11.10 live session.

    Read the article

  • Wireless Problem on HP Pavillion G6

    - by user47954
    I have a broadcom wireless card in my laptop and the wireless is not working correctly. right in front of the router the wireless signal is 70% and across the room it barely works and in another room it disconnects. i have the drivers and everything. i am running ubuntu 11.10 64bit.it works perfectly in windows 7. can anyone help! 00:00.0 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1705] 00:01.0 VGA compatible controller [0300]: ATI Technologies Inc Device [1002:9649] 00:01.1 Audio device [0403]: ATI Technologies Inc Device [1002:1714] Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel 00:04.0 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:1709] Kernel driver in use: pcieport Kernel modules: shpchp 00:11.0 SATA controller [0106]: Advanced Micro Devices [AMD] Device [1022:7804] Kernel driver in use: ahci Kernel modules: ahci 00:12.0 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7807] (rev 11) Kernel driver in use: ohci_hcd 00:12.2 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7808] (rev 11) Kernel driver in use: ehci_hcd 00:13.0 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7807] (rev 11) Kernel driver in use: ohci_hcd 00:13.2 USB Controller [0c03]: Advanced Micro Devices [AMD] Device [1022:7808] (rev 11) Kernel driver in use: ehci_hcd 00:14.0 SMBus [0c05]: Advanced Micro Devices [AMD] Device [1022:780b] (rev 13) Kernel modules: i2c-piix4 00:14.2 Audio device [0403]: Advanced Micro Devices [AMD] Device [1022:780d] (rev 01) Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel 00:14.3 ISA bridge [0601]: Advanced Micro Devices [AMD] Device [1022:780e] (rev 11) 00:14.4 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:780f] (rev 40) 00:15.0 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a0] Kernel driver in use: pcieport Kernel modules: shpchp 00:15.1 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a1] Kernel driver in use: pcieport Kernel modules: shpchp 00:15.2 PCI bridge [0604]: Advanced Micro Devices [AMD] Device [1022:43a2] Kernel driver in use: pcieport Kernel modules: shpchp 00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1700] (rev 43) 00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1701] 00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1702] 00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1703] 00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1704] 00:18.5 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1718] 00:18.6 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1716] 00:18.7 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1719] 01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 05) Kernel driver in use: r8169 Kernel modules: r8169 07:00.0 Network controller [0280]: Broadcom Corporation Device [14e4:4727] (rev 01) Kernel driver in use: wl Kernel modules: wl 08:00.0 Class [ff00]: Realtek Semiconductor Co., Ltd. Device [10ec:5209] (rev 01)

    Read the article

  • Issues with external mounting after pysdm removed

    - by K. R. Huard
    So, I'm very new to ubuntu. I was having troubles getting my external hard drive to be read/write permission. It's owner is my macbook, and writing on the drive was repeatedly denied. In trying to sort this out, I tried the Nautilus commands (no success), installed the PYSDM application, changed some things (as suggested by this user in this forum http://askubuntu.com/a/113992 )but then found that I was getting an error message whenever I tried to mount an external storage device. The error is: Unable to mount DERPSTICK error mounting: mount exited with exit code 1: helper failed with: [mntent]: line 14 in etc/fstab is bad mount: only root can mount /dev/sdc1/ on /media/sdc1 Others with similar problems put their fstab up here, but I'm not sure how to bring it up, or if I should even try. Thanks for your time!

    Read the article

  • cpufreq not available 11.10

    - by code shogan
    on 11.04 I had cpufreq working on my "AMD Turion(tm) 64 X2 Mobile Technology TL-50 stepping 02" processors, however now on oneiric cpufreq won't load. The core temperature of my cpu is normally 40 c, but lately it's cooking away at 75-80+ c and the fan is always extremely loud even when cpu usage has at 0.4%. and after this dmesg | grep -i cpu I got: Brought up 2 CPUs Switch to broadcast mode on CPU1 Switch to broadcast mode on CPU0 Switched to NOHz mode on CPU #1 Switched to NOHz mode on CPU #0 ACPI: acpi_idle registered with cpuidle cpufreq-nforce2: No nForce2 chipset. cpuidle: using governor ladder cpuidle: using governor menu powernow-k8: Found 1 AMD Turion(tm) 64 X2 Mobile Technology TL-50 (2 cpu cores) (version 2.20.00) I see something about governors and ladder there, does this mean the OS is able to scale my cpu's or not? If so is there a way I can determine it's working? I saw that for other users that the wrong module had been loaded and by disabling it they were able to get cpufreq loaded. How can I tell what scaling module is loaded? stats: Ubuntu Oneiric 32bit Dell Inspiron 1501

    Read the article

  • button missing video lens after upgrade

    - by valyum
    I did an upgrade from 11.10 to 12.04 and after this process i saw that dash button missing movies online,tv show. I have the latest version 5.8,Even after ordering unity --reset i did not get anything. One solution is to install 12.04 but I have many settings that I take a long time ... What can i do?Thanks and sorry for english!

    Read the article

  • Evil Spam Emails caused hosting account suspension!

    - by Sei
    We have a couple domains hosted rackservers.com.au. Recently our account go suspended without any notice. I then filed a ticket and soon got the answer:'There are some one forging email accounts from your domain, and they have been sending out spam emails. So we do not want you here anymore, take your backup and go.' I am quite shocked by such attitude and more confused by the actions we should take under such situation. Should I take my back up and go? Should I ask them for more details? How can I prevent this from happening again in the future?

    Read the article

  • What should a page's minimum word count be in order to be effectively indexed?

    - by ZakGottlieb
    I'm seeding a new site with hundreds of (high quality) posts, but since I am paying per word written, I'm wondering if anybody in the community has any anecdotal evidence as to how many words of content there should now be for a page to be counted just the same as a 700 word+ post, for example? I know there are always examples of pages ranking well with, for instance, 50 words or less of content, but does anyone have any strong evidence on what the minimum count should be, or has anyone read anything very informative in regards to this issue? Thanks a lot in advance!

    Read the article

  • Do unused vertices in a 3D object affect performance?

    - by Gajet
    For my game I need to generate a mesh dynamically. Now I'm wondering does it have a noticeable affect in FPS if I allocate more vertices than what I'm actually using or not? and does it matter if I'm using DirectX or OpenGL? Edit Final output will be a w*h cell grid, but for technical issues it's much easier for me to allocate (w+1)*(h+1) vertices. Sure I'll only use w*h vertices in indexing, and I know there is some memory wasting there, but I want to know if it also affect FPS or not? (Note that mesh is only generated once in each time you play the game)

    Read the article

  • Why are textures always square powers of two? What if they aren't?

    - by Keavon
    Why are the resolution of textures in games always a power of two (128x128, 256x256, 512x512, 1024x1024, etc.)? Wouldn't it be smart to save on the game's file size and make the texture exactly fit the UV unwrapped model? What would happen if there was a texture that was not a power of two? Would it be incorrect to have a texture be something like 256x512, or 512x1024? Or would this cause the problems that non-power-of-two textures may cause?

    Read the article

  • Questions about XNA

    - by Maik Klein
    I've read tons of different threads about XNA, but I still have some questions. First of all: I have 2 years of experience programming and C# is my main language, so XNA would fit perfectly for me, but I have some concerns. People mentioned that C# has a performance loss compared to C++. Is this true? XNA only supports DirectX 9. I found the ANX framework which is pretty similar to XNA but it is capable of DirectX 11. Would this be a good alternative ? Because I'm worried about the performance loss of C#, I searched for a C++ framework and found SFML. It's based on C++ but can be integrated into C#. I already have some experience with UDK, but I am really interested in creating more by myself ( lighting physics etc ). I didn't start yet, what would you recommend me to use / learn ? I am going to create a first person shooter (3D) and I have plenty of time for this. My aim is realtime lighting, realtime global illumination, image-based reflections etc. I want to develop for Windows. Edit: I found something interesting: OpenTK. It supports the latest version of OpenGL which is on the same level as DX11 (if my knowledge is correct). It makes use of mono.

    Read the article

  • Multiple instances of the same Async task (Windows Phone)

    - by Bart Teunissen
    After googeling for ages, and reading some stuff about async task in books. I made a my first program with an async task in it. Only to find out, that i can only start one task. I want to run the task more then once. This is where i found out that that doesn't seem to work. to be a little bit clearer, here are some parts of my code: InitFunction(var); This is the Task itself public async Task InitFunction(string var) { _VarHandle = await _AdsClient.GetSymhandleByNameAsync(var); _Data = await _AdsClient.ReadAsync<T>(_VarHandle); _AdsClient.AddNotificationAsync<T>(_VarHandle, AdsTransmissionMode.OnChange, 1000, this); } This works like a charm when i execute the task only once.. But is there a possibility to run it multiple times. Something like this? InitFunction(var1); InitFunction(var2); InitFunction(var3); Because if i do this now (multiple tasks at once), the task it wants to start is still running, and it throws an exeption. if someone could help me with this, that would be awesome! ~ Bart

    Read the article

  • why C clock() returns 0

    - by eddy ed
    I've got something like this: clock_t start, end; start=clock(); something_else(); end=clock(); printf("\nClock cycles are: %d - %d\n",start,end); and I always get as an output "Clock cycles are: 0 - 0" Any idea why this happens? (Just to give little detail, the something_else() function performs a left-to-right exponentiation using montgomery represantation, moreover I don't know for certain that the something_else() function does indeed take some not negligible time.) This is on Linux. The result of uname -a is: Linux snowy.*****.ac.uk 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

    Read the article

  • Rails 3 Server Startup problem with fastercsv

    - by Anand
    I have a rails 2.3.5 app getting upgraded to Rails 3. I did every thing I am required to do for upgrading and when I start the rails server using rails server it gives me this Please switch to Ruby 1.9's standard CSV library. It's FasterCSV plus support for Ruby 1.9's m17n encoding engine. I am using ruby-1.9.2-p0 and have fastercsv (1.5.3) gem installed. with the help of puts statements, i was able to track down where the error occurred. i found that the execution stops at this line Bundler.require(:default, Rails.env) if defined?(Bundler) in application.rb file. I tried many things but none worked .. please help..

    Read the article

  • Need access to views on the OnSeekBarChangeListener (which is in an own class)

    - by sandkasten
    first of all I hope you understand my english because I'am not a native speaker. Okay, I'am new to android development and try following: For my app I need a SeekBar, so I create a Seekbar via XML and implement an OnSeekBarChangeListener. In the compay I work for its forbidden (because of the styleguid) to create something like this: seekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) { /// Do something } ... }); So I need to create a own class for the OnSeekBarChangeListener. So far no problem. public class SeekBarChangeListener extends SeekBar implements SeekBar.OnSeekBarChangeListener { public SeekBarChangeListener(Context context) { super(context); } public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } public void onStartTrackingTouch(SeekBar seekBar) { } public void onStopTrackingTouch(SeekBar seekBar) { /// Do something. Following Code wont work CheckBox RemeberUsername = (CheckBox)findViewById(R.id.RemeberUsername); /// Always gets NULL } } I need a way to get access to some controls. Normaly the findViewById works fine but not in this case (what I can totaly understand, because how should the listender know about the views?). Some good hints? Or is there no oter way like the first code snippet to get the controls? Hope someone can help me out.

    Read the article

  • XSLT Escape Character not working

    - by liveek
    I am trying to use escape charaters in my text output, as i would like too surround the output in emailData tags. I am using <xsl:text>&#60;emailData&#62;</xsl:text> In the XSLT to esnure that this works however because i am using a tool called Cast Iron for some reason it is not converting the &#60; into < and just spits out &lt;emailData> You can see am image of it HERE that illustrates the output i am getting. My source code is this. How else could i wrap this in emailData tags? <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="header"> <xsl:text>&#60;emailData&#62;</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>From: </xsl:text> <xsl:value-of select="from/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>To: </xsl:text> <xsl:value-of select="to/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Subject: </xsl:text> <xsl:value-of select="subject/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Type: </xsl:text> <xsl:value-of select="contentType/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text> boundary="</xsl:text> <xsl:value-of select="boundary/text()"/> <xsl:text>"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>MIME-Version: </xsl:text> <xsl:value-of select="mimeVersion/text()"/> </xsl:template> <xsl:template match="email"> <xsl:text>&#10;&#10;</xsl:text> <xsl:text>--</xsl:text> <xsl:value-of select="../header/boundary/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Type: </xsl:text> <xsl:value-of select="contentTypeBody/text()"/> <xsl:text> charset="us-ascii"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Transfer-Encoding: </xsl:text> <xsl:value-of select="contentTransfer/text()"/> <xsl:text>&#10;&#10;</xsl:text> <xsl:value-of select="body/text()"/> </xsl:template> <xsl:template match="Attachment"> <xsl:for-each select="Attachments"> <xsl:text>&#0010;&#0010;</xsl:text> <xsl:value-of select="../../header/boundary/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Type: </xsl:text> <xsl:value-of select="attachmentContentType/text()"/> <xsl:text> name="</xsl:text> <xsl:value-of select="attachmentDescription/text()"/> <xsl:text>"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Description: </xsl:text> <xsl:value-of select="attachmentDescription/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Disposition: attachment; filename="</xsl:text> <xsl:value-of select="atachementDisposition/text()"/> <xsl:text>"</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:text>Content-Transfer-Encoding: </xsl:text> <xsl:value-of select="attachmentContentTransfer/text()"/> <xsl:text>&#10;&#10;</xsl:text> <xsl:value-of select="attachementBody/text()"/> <xsl:text>&#10;</xsl:text> <xsl:text>&#60;/emailData&#62;</xsl:text> </xsl:for-each> </xsl:template> <xsl:template match="text()"/> </xsl:stylesheet>

    Read the article

  • How to add style to parent <li> item if child <ul> exists?

    - by user1292760
    I'm trying to make a menu in advance to be seen whether there is a double nesting. <ul class="parent"> <li class="child"></li> <li class="child"> <ul slass="nesting"> <li></li> <li></li> </ul> </li> <li class="child"></li> </ul> So ul class="nesting" hidden by default but appears during the hover of li class="child". I want to make another design on the li class="child" which have a nested ul. Another words how can i show nesting before hover by the means of Javascript/JQuery? Thnaks in advance!

    Read the article

  • how to filter data from xml file for displaying only selected as nodes in treeview

    - by michale
    I have an xml file named "books.xml" provided in the link "http://msdn.microsoft.com/en-us/library/windows/desktop/ms762271(v=vs.85).aspx". What my requirement was to disaplay only the <title> from xml information as nodes in tree view. But when i did the following coding its displaying all the values as nodes like "catalog" as rootnode, book as parent node for all then author,title,genre etc as nodes but i want only root node catalogue and title as nodes not even book. Can any body guide me what modification i need to do in the exisitng logic for displaying title as nodes OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Open XML document"; dlg.Filter = "XML Files (*.xml)|*.xml"; dlg.FileName = Application.StartupPath + "\\..\\..\\Sample.xml"; if (dlg.ShowDialog() == DialogResult.OK) { try { //Just a good practice -- change the cursor to a //wait cursor while the nodes populate this.Cursor = Cursors.WaitCursor; //First, we'll load the Xml document XmlDocument xDoc = new XmlDocument(); xDoc.Load(dlg.FileName); //Now, clear out the treeview, //and add the first (root) node treeView1.Nodes.Clear(); treeView1.Nodes.Add(new TreeNode(xDoc.DocumentElement.Name)); TreeNode tNode = new TreeNode(); tNode = (TreeNode)treeView1.Nodes[0]; //We make a call to addTreeNode, //where we'll add all of our nodes addTreeNode(xDoc.DocumentElement, tNode); //Expand the treeview to show all nodes treeView1.ExpandAll(); } catch (XmlException xExc) //Exception is thrown is there is an error in the Xml { MessageBox.Show(xExc.Message); } catch (Exception ex) //General exception { MessageBox.Show(ex.Message); } finally { this.Cursor = Cursors.Default; //Change the cursor back } }} //This function is called recursively until all nodes are loaded private void addTreeNode(XmlNode xmlNode, TreeNode treeNode) { XmlNode xNode; TreeNode tNode; XmlNodeList xNodeList; if (xmlNode.HasChildNodes) //The current node has children { xNodeList = xmlNode.ChildNodes; for (int x = 0; x <= xNodeList.Count - 1; x++) //Loop through the child nodes { xNode = xmlNode.ChildNodes[x]; treeNode.Nodes.Add(new TreeNode(xNode.Name)); tNode = treeNode.Nodes[x]; addTreeNode(xNode, tNode); } } else //No children, so add the outer xml (trimming off whitespace) treeNode.Text = xmlNode.OuterXml.Trim(); }

    Read the article

  • php extract data from mysql

    - by florin
    I have this mysql table with the following rows: id_cont suma_lun month year -------------------------------------------- FL28 2133 March 2012 FL28 2144 April 2012 FL28 2155 May 2012 FL28 2166 June 2012 How can i extract suma_lun, month and year foreach id_cont? so that i get an output like this: ID: Month: Monthly Sum: Year: ---------------------------------------------- FL28 March 2133 2012 April 2144 2012 May 2155 2012 June 2166 2012 This is my current code: $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) die ('Could not connect to database: '.mysql_error()); mysql_select_db(DB_DATABASE,$link); $sql="SELECT * FROM test WHERE id_cont = '$cur'"; $result=mysql_query($sql); while ($row=mysql_fetch_array($result)) { $a=$row["id_cont"]; $b=$row["suma_lun"]; $c=$row["month"]; $d=$row["year"]; } I echo the data in a table Thanks!

    Read the article

  • Domain validates but won't save

    - by marko
    I have the following setup. Class, say, Car that has a CarPart (belongsTo=[car:Car]). When I'm creating a Car I also want to create som default CarParts, so I do def car = new Car(bla bla bla) def part = new CarPart(car:car) Now, when I do car.validate() or part.validate() it seems fine. But when I do if(car.save && part.save() I get this exception: 2012-03-24 14:02:21,943 [http-8080-4] ERROR util.JDBCExceptionReporter - Batch entry 0 insert into car_part (version, car_id, id) values ('0', '297', '298') was aborted. Call getNextException to see the cause. 2012-03-24 14:02:21,943 [http-8080-4] ERROR util.JDBCExceptionReporter - ERROR: value too long for type character varying(6) 2012-03-24 14:02:21,943 [http-8080-4] ERROR events.PatchedDefaultFlushEventListener - Could not synchronize database state with session org.hibernate.exception.DataException: Could not execute JDBC batch update Stacktrace follows: java.sql.BatchUpdateException: Batch entry 0 insert into car_part (version, deal_id, id) values ('0', '297', '298') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2621) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1837) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2754) at $Proxy20.flush(Unknown Source) at ristretto.DealController$_closure5.doCall(DealController.groovy:109) at ristretto.DealController$_closure5.doCall(DealController.groovy) at java.lang.Thread.run(Thread.java:722) Any ideas?

    Read the article

  • Are application servers necessary? Advantages of using one? (And other JEE questions)

    - by Mike
    Apologies for the long question.. there seems to be other similar questions on here but none really clear up my confusion. I'd be really grateful if someone could confirm or correct my understanding: Java Enterprise Edition is a set of APIs for building enterprise applications, which take away the burden of developing parts of the system that aren't actually features of the application you are trying to build (i.e. messaging, transactions etc). To do this, you can use an application server, which implements these APIs. So you could use JBoss, Glassfish, WebSphere, WebLogic etc which would provide your application with these enterprise services. However, there are many other implementations of these individual services available such as ActiveMQ for messaging, Hibernate for persistence, OpenEJB etc. You can download these implementations as Java libraries and include them in your application, and use the services they provide in a similar way to using the services provided by an application server. So if my understanding is correct, my questions are: I've read a lot of places that application servers are necessary for JEE features like EJB, but can't you just use an implementation such as OpenEJB and not need an application server at all? Are there any features that an application server provides which you cannot get from another source? Why would/wouldn't I choose an application server over a custom stack such as Tomcat, OpenEJB, ActiveMQ, and Hibernate? Is Spring a complete alternative to JEE? Does it ever require an application server or always just a servlet container? Why would someone choose Spring over JEE? Any help would be much appreciated!

    Read the article

  • Remove a child of root of XML using java

    - by Sachin Mhetre
    This is my xml file. - <deviceparameters> - <parameter componenttype="TextBox"> <name>Operating Type</name> <oid>1.3.6.1.4.1.31163.5.1.1</oid> <writable>true</writable> <description>The operating type defines which waveform type is used. This configuration takes several seconds to execute</description> - <paramvalues type="Integer"> <value default="No">123</value> </paramvalues> </parameter> - <parameter componenttype="TextBox"> <name>Active Waveform Status</name> <oid>1.3.6.1.4.1.31163.5.1.2</oid> <writable>false</writable> <description>Show the status of the waveform configured by operatingType</description> - <paramvalues type="String"> <value default="yes">Active</value> </paramvalues> </parameter> </deviceparameters> I want to remove node with name 'Active wavwform Status'. How can I reomve that particular node from xml. The code I have written is below. rootElement = doc.getDocumentElement(); NodeList nList = doc.getElementsByTagName("parameter"); String nodeName = TF_name.getText(); System.out.println(""+nList.getLength()); for (int temp = 0; temp < nList.getLength();temp++) { Node nNode = nList.item(temp); Element eElement = (Element) nNode; String upname1 = getTagValue("name", eElement); if(upname1.equals(nodeName)) { System.out.println("Parent: "+nNode.getParentNode().getNodeName()); System.out.println("nodename: "+nNode.getNodeName()); System.out.println("rmoving ...."); rootElement.removeChild(nNode); System.out.println("removed..."); } }

    Read the article

  • Extjs4: editable rowbody

    - by peter
    in my first ExtJs4 project i use a editable grid with the feature rowbody to have a big textfield displayed under each row. I want it to be editable on a dblclick. I succeeded in doing so by replacing the innerHTML of the rowbody by a textarea but the special keys don't do what they are supposed to do (move the cursor). If a use the textarea in a normal field i don't have this probem. Same problem in IE7 and FF4 gridInfo = Ext.create('Ext.ux.LiveSearchGridPanel', { id: 'gridInfo', height: '100%', width: '100%', store: storeInfo, columnLines: true, selType: 'cellmodel', columns: [ {text: "Titel", flex: 1, dataIndex: 'titel', field:{xtype:'textfield'}}, {text: "Tags", id: "tags", flex: 1, dataIndex: 'tags', field:{xtype:'textfield'}}, {text: "Hits", dataIndex: 'hits'}, {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('d/m/Y'), dataIndex: 'lastChange'} ], plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ], features: [ { ftype: 'rowbody', getAdditionalData: function(data, idx, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: data.desc, //the big textfieldvalue, can't use a textarea here 8< rowBodyCls: this.rowBodyCls, rowBodyColspan: colspan }; } }, {ftype: 'rowwrap'} ] }); me.on('rowbodydblclick', function(gridView, el, event, o) { ... rb = td.down('.x-grid-rowbody').dom; var value = rb.innerText?rb.innerText:rb.textContent; rb.innerHTML = ''; Ext.create('Ext.form.field.TextArea', { id: 'textarea1', value : value, renderTo: rb, border: false, enterIsSpecial: true, enableKeyEvents: true, disableKeyFilter: true, listeners: { 'blur': function(el, o) { rb.innerHTML = el.value; }, 'specialkey': function(field, e){ console.log(e.keyCode); //captured but nothing happens } } }).show(); damn, can't publish my own solution, looks like somebody else has to answer, anyway, here is the function that works function editDesc(me, gridView, el, event, o) { var width = Ext.fly(el).up('table').getWidth(); var rb = event.target; var value = rb.innerText?rb.innerText:rb.textContent; rb.innerHTML = '' var txt = Ext.create('Ext.form.field.TextArea', { value : value, renderTo: rb, border: false, width: width, height: 300, enterIsSpecial: true, disableKeyFilter: true, listeners: { 'blur': function(el, o) { var value = el.value.replace('\n','<br>') rb.innerHTML = value; }, 'specialkey': function(field, e){ e.stopPropagation(); } } }); var txtTextarea = Ext.fly(rb).down('textarea'); txtTextarea.dom.style.color = 'blue'; txtTextarea.dom.style.fontSize = '11px'; } Hi Molecule Man, as an alternative to the approach above i tried the Ext.Editor. It works but i want it inline but when i render it to the rowbody, the field blanks and i have no editor, any ideas ? gridInfo = Ext.create('Ext.grid.Panel', { id: 'gridInfo', height: '100%', width: '100%', store: storeInfo, columnLines: true, selType: 'cellmodel', viewConfig: {stripeRows: false, trackOver: true}, columns: [ {text: "Titel", flex: 1, dataIndex: 'titel', field:{xtype:'textfield'}}, ... {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('d/m/Y'), dataIndex: 'lastChange'} ], plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ], features: [ { ftype: 'rowbody', getAdditionalData: function(data, idx, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: data.desc, rowBodyCls: this.rowBodyCls, rowBodyColspan: colspan }; } } ], listeners:{ rowbodyclick: function(gridView, el, event) { //werkt editDesc(this, gridView, el, event); } } }); function editDesc(me, gridView, el, event, o) { var rb = event.target; me.txt = new Ext.Editor({ field: {xtype: 'textarea'}, updateEl: true, cancelOnEsc: true, floating: true, renderTo: rb //when i do this, the field becomes empty and i don't get the editor }); me.txt.startEdit(el); }

    Read the article

  • Is there a way to programmatically tell if particular block of memory was not freed by FastMM?

    - by Wodzu
    I am trying to detect if a block of memory was not freed. Of course, the manager tells me that by dialog box or log file, but what if I would like to store results in a database? For example I would like to have in a database table a names of routines which allocated given blocks. After reading a documentation of FastMM I know that since version 4.98 we have a possibility to be notified by manager about memory allocations, frees and reallocations as they occur. For example OnDebugFreeMemFinish event is passing to us a PFullDebugBlockHeader which contains useful informations. There is one thing that PFullDebugBlockHeader is missing - the information if the given block was freed by the application. Unless OnDebugFreeMemFinish is called only for not freed blocks? This is which I do not know and would like to find out. The problem is that even hooking into OnDebugFreeMemFinish event I was unable to find out if the block was freed or not. Here is an example: program MemLeakTest; {$APPTYPE CONSOLE} uses FastMM4, ExceptionLog, SysUtils; procedure MemFreeEvent(APHeaderFreedBlock: PFullDebugBlockHeader; AResult: Integer); begin //This is executed at the end, but how should I know that this block should be freed //by application? Unless this is executed ONLY for not freed blocks. end; procedure Leak; var MyObject: TObject; begin MyObject := TObject.Create; end; begin OnDebugFreeMemFinish := MemFreeEvent; Leak; end. What I am missing is the callback like: procedure OnMemoryLeak(APointer: PFullDebugBlockHeader); After browsing the source of FastMM I saw that there is a procedure: procedure LogMemoryLeakOrAllocatedBlock(APointer: PFullDebugBlockHeader; IsALeak: Boolean); which could be overriden, but maybe there is an easier way?

    Read the article

  • sites integration

    - by bassem ala
    hey anyone had this task before ? suppose you have a website called www.a.com and a second www.b.com the the a.com have a button. when you logged in to a.com and click the button you will be send to b.com the question is how can i do this while keeping the credentials of the user when he is sent to b.com i want him automatically logged in to b.com ...PS: every user has an account in a.com he definitely should have an account in b.com .... any ideas please???.... thank u for you ideas and supports :)

    Read the article

  • How to programatically create and read WEP/EAP WiFi configurations in Android?

    - by Als
    How to programatically create and read WEP/EAP WiFi configurations in Android? I have seen a number of people struggling on this very question on various forums and all across the community. I know this is not that straight forward(especially EAP) to figure out because When I wanted to acheive the same I too struggled quite a lot.Well, all the hard work of code analysis and searching various implementations on the internet done with I was finally able to acheive the goal. All the credit goes to number of open source projects and their developers. I would like to share this knowledge with all, Since SO encourages this: "It's also perfectly fine to ask and answer your own question, as long as you pretend you're on Jeopardy: phrase it in the form of a question." Part 1: Creating a WEP WiFi configuration programatically. Part 2: Read a WEP WiFi configuration programatically. Part 3: Read a EAP WiFi Configuration programatically. Part 4: Save a EAP WiFi configuration programatically.

    Read the article

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