Daily Archives

Articles indexed Saturday December 25 2010

Page 9/22 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Please Help to locate the error

    - by jagdeep
    using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class expt2 : System.Web.UI.Page { double result ; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) result = 0.0; protected void Chkbxbd_CheckedChanged(object sender, EventArgs e) { if (Chkbxbd.Checked) { txtbxttl.Text = "" + 10000; result += double.Parse(txtbxttl.Text); } else result = result - 10000; } protected void Chkbxsfa_CheckedChanged(object sender, EventArgs e) { if (Chkbxsfa.Checked) { txtbxttl.Text = "" + 15000; result += double.Parse(txtbxttl.Text); } else result = result - 15000; } protected void btnttl_Click(object sender, EventArgs e) { txtbxttl.Text = "" + result; } } In this code the individual value for checkbox is ok but when the total is made it becomes 0. Please help me to fix it.

    Read the article

  • Microsoft Detours

    - by Bruce
    I am new to Microsoft Detours. I have installed it to trace the system calls a process makes. I run the following commands which I got from the web syelogd.exe /q C:\Users\xxx\Desktop\log.txt withdll.exe /d:traceapi.dll C:\Program Files\Google\Google Talk\googletalk.exe I get the log file. The problem is I don't fully understand what is happening here. How does detours work? How does it trace the system calls? Also I don't know how to read the output in log.txt. Here is one line in log.txt 20101221060413329 2912 50.60: traceapi: 001 GetCurrentThreadId() Finally I want to get the stack trace of the process. How can I get that?

    Read the article

  • how to remove all text nodes and only preserve structure information of a html page with nokogiri

    - by user58948
    I want to remove all text from html page that I load with nokogiri. For example, if a page has the following: <body><script>var x = 10;</script><div>Hello</div><div><h1>Hi</h1></div></body> I want to process it with Nokogiri and return html like the following after stripping the text like so: <body><script>var x = 10;</script><div></div><div><h1></h1></div></body> (THat is, remove the actual h1 text, text between divs, text in p elements etc, but keep the tags. also, dont remove text in the script tags.) How can I do that?

    Read the article

  • How to set html content in Moodialog

    - by Diego
    Hello, i've just downloaded Moodialog, a Mootools plugin for dialog, but i have a problem. If content is set via parameters it will be text and not html. Can you help me change the function to accept html? I suppose that this is the code to be edit. setContent: function(){ var content = Array.from(arguments); if (content.length == 1) content = content[0]; this.content.empty(); var type = typeOf(content); if (['string', 'number'].contains(type)) this.content.set('text', content); else this.content.adopt(content); return this; }, I tried to edit 'text' in 'html', but it will not work. Thanks for help (and sorry for my bad english).

    Read the article

  • Scheduling jobs from a web environment on Linux

    - by Anders Feder
    Hi. I am developing an application in PHP on Linux/Apache. I want to be able to schedule PHP jobs (scripts) for execution at some specific time in the future from within the application. I know that many people will recommend cron and at, but first of all I don't need recurrence (cron) and secondly and most importantly, I need the solution to be able to scale. At was not designed with race condititions in mind, and if two users try to add a job at the same time one or both may fail. It's also important that jobs are executed at their specified time, and not just 'polled' once per minute or so. Can anyone please suggest solutions for this task? Thank you.

    Read the article

  • No Hibernate Exception on the same insert of data

    - by Mark Estrada
    Hi All, Hibernate Newbie here. I am quite unsure why I am not getting any exception when I am executing below code. On first attempt, this code creates the Book Entry on my Book Table. But my concern is that when I execute below code again, no error was pop out by Hibernate. I was in fact expecting some sort of Violation of Primary Key Constraints as what I have bee doing in JDBC code. public class BookDao { public void createBook(Book bookObj) { Session session = HibernateUtil.getSessionFactory() .getCurrentSession(); session.beginTransaction(); session.saveOrUpdate(bookObj); session.getTransaction().commit(); } } public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { // Create the SessionFactory from hibernate.cfg.xml return new AnnotationConfiguration().configure() .buildSessionFactory(); } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed ex.printStackTrace(); throw new ExceptionInInitializerError(ex); } } public static SessionFactory getSessionFactory() { return sessionFactory; } } public class BookDBStarter { public static void main(String[] args) { Book bookHF = new Book(); bookHF.setIsbn("HF-12345"); bookHF.setName("Head First HTML"); bookHF.setPublishDate(new Date()); BookDao daoBook = new BookDao(); daoBook.createBook(bookHF); } } Is this normal hibernate way? And how will I know if my insert is successful? Any thoughts?

    Read the article

  • “if” statement vs OO Design - 2

    - by hilal
    I encountered similar problem “if” statement vs OO Design - 1 but it is slightly different. Here is the problem that open the popup (different objects/popups) onValueChange of listbox Popup1 p1; // different objects Popup2 p2; // different objects Popup3 p3; ... listbox.add("p1"); listbox.add("p2"); listbox.add("p3"); ... listbox.addChangeHandler() { if(getSelectedItem().equals("p1")){ p1 = new Popup1(); p1.show(); } else if() {...} .... } I don't want to write "if" that if p1 then p1 = new Popup1(); p1.center(); How I can handle this situation? Any design-pattern? Here is my solution but it is so costly map() { map.put("p1", new Popup1()); map.put("p2", new Popup2()); map.put("p3", new Popup3()); } onValueChange() { map.get(selectedItem).show(); } One drawback is initialization all the popups. but it is require only when valueChange

    Read the article

  • Codeigniter + Dwoo

    - by RedTruck
    I got problem when implementing my CMS using Codeigniter 1.7.2 and Dwoo. I use Phil Sturgeon Dwoo library. My problem is I want user create template from the admin panel, it means all template will be stored into database including all Dwoo variable and functions.My questions: Is it possible to load dwoo template from database? How to parse dwoo variable or function from database? I tried to load content from database which is include dwoo var and function inside it, and i have tried to do evaluation using dwoo eval() function and phil sturgeon string_parse() but still have no luck. for example: my controller $data['header'] = "<h1>{$header}</h1>"; --> this could be loaded from database $this->parser->parse('header',$data); my view {$header} Thank you,

    Read the article

  • Exchange 2007 restore - Backup Exec Unable to Attach to a resource

    - by Andy
    I have been struggling with this one for months! Grateful for any advice. The setup is a windows 2003 server network, 4xservers on the domain. Two exchange 2007 servers (only one with mailboxes still on). Backup Exec (12.5) on a non-exchange server with agents on the others. Backup exec runs a full backup of exchange across the network well, at pretty reasonable speeds. However, when you try any kind of restore (individual emails, mailboxes or whole system restore - all to same location or to alternate server, RSG etc) the following message is received within about 10-15 secs of starting the job: Job ended: 24 December 2010 at 13:28:32 Completed status: Failed Final error: 0xe000848c - Unable to attach to a resource. Make sure that all selected resources exist and are online, and then try again. If the server or resource no longer exists, remove it from the selection list. Edit the selection list properties, click the View Selection Details tab, and then remove the resource. Final error category: Resource Errors For additional information regarding this error refer to link V-79-57344-33932 Things I have already tried: Changed account to main administrator account (with all permissions) checked versions of ese.dll on both servers - both the same Checked all VSS writers on both servers are stable / normal restoring to different locations Any advice anyone could give would be much appreciated. Many thanks, Andy

    Read the article

  • Email flow problem in Exchange 2003

    - by Hugo Garcia
    Hello colleagues, I have a problem whit some emails that are not being delivered to the user inbox. The SMTP server on the DMZ that receives email from the internet is a Symantec Brigthmail Gateway, this server reports that the message was delivered normally to the exchange server: The DMZ server forwars the incoming mail to the exchange server that is on the LAN segment, and the message tracking on the exchange server reports the email being submited to the advanced queue: I have done severals searches on google, without any luck. have any one of you guys experienced similar problems? Any help or pointers would be very appreciated. as requested, here is a transcript of a smtp session: helo 250 mail2.XXXXXXXXXXXXXXXX.XXX.XX Hello [192.168.9.6] MAIL FROM: [email protected] RCPT TO: [email protected] DATA Subject: Mensaje de Prueba Test . 250 2.1.0 [email protected] OK 250 2.1.5 [email protected] 354 Start mail input; end with <CRLF>.<CRLF> 250 2.6.0 <'[email protected]> Queued mail for delivery

    Read the article

  • Debian/Linux backup files changed by user

    - by verhogen
    I would like to backup my server that is hosting a few websites in such a way that I can restore everything to the way it was from a fresh format. I know that I should backup all the home folders and then probably my /etc/ folders. Is there a way to figure out all the folders that are relevant for backup in that they were not automatically generated or installed from apt-get? It would ideally restore all the users with their current passwords as well. Basically, enough to clone the system but only copying configuration files.

    Read the article

  • Convert file for XLS to TXT format

    - by meenakshi
    I renamed a .xls file to .txt file but the .txt file shows like this: öRn÷åËþEõZ;zûÕ÷IÉD;Üÿêá¾ú‡×_*4u\çBq&?!€¨(ˆô‰/t/ª§‹'Oý?WïçþJ®½ãÁÁ|DiæEÇ’IŠ›ðä/\$r'Ù¡îê?|ÕÝꮲ¸ó—QG¦çåΊ/–×ÒÏpQP~Q|å?‘ÈpÖ‘»ëËß62 Š/zaqçÎÖ©ú•ênÆ›WÚ·«àÙ}S«ˆº/~Ø×:U”¥‡7îTísvçùòl!ý0ýá»êéqx[T¯ß¿ø1 ¼ð…PïXáÃñ}ý«Å'gK)á*ÐÒm¦ŽØ™¯Püä©ïªÇË‹—‹U¡Jq5ÿ‚Šÿò6qúߟX½ûuqi&×6êÞç~°ðÄÜ‹Òý¥Ÿø…cŸEão(ýNÖáÛ«îâW·‰ôîÏn¥zÚ¨—ÞŸqwø6XuÁËóñ¤;¢òhz¾&®û\â:çýÎxÒL\ïùJn2ì4ÓÖ¾‚{9˜Œ›‰<Ÿ¸qgØ0ä†Ï'®Ûë5¹Ñó‰ë›ò0~FšÜäù How can I get the same data as in an .xls file?

    Read the article

  • Document file format for universal adoption?

    - by Scott Muc
    I don't want to assume that someone has Word installed on their machine. What is the best file format so that everyone can read a document file? The only ones I can think of are: Rich Text Format Open Document Format Portable Document Format Plaint Text For example, what would be the best file format to write a resume in? I've actually written mine in XHTML, but some places simply demand a .doc file.

    Read the article

  • What happens when we say "listen to a port" ?

    - by smwikipedia
    Hi, When we start a server application, we always need to speicify the port number it listens to. But how is this "listening mechanism" implemented under the hood? My current imagination is like this: The operating system associate the port number with some buffer. The server application's responsibiligy is to monitor this buffer. If there's no data in this buffer, the server application's listen operation will just block the application. When some data arrives from the wire, the operating system will know that check the data and see if it is targed at this port number. And then it will fill the buffer. And then OS will notify the blocked server application and the server application will get the data and continue to run. Question is: If the above scenario is correct, how could the opearting system know there's data arriving from wire? It cannot be a busy pooling. Is it some kind of interrupt-based mechanism? If there's too much data arriving and the buffer is not big enough, will there be data loss? Is the "listen to a port" operation really a blocking operation? Many thanks.

    Read the article

  • Collision Detection (Ground & Slopes) in 2D Platform Game using Pygame Rects

    - by RedCap
    Hi, First off, I am not after any instructions on logic for collision detection; I get it. What I am trying to work out is the least complicated way to do this with Pygame using Sprites & Rects. I want to be able to check collisions for the Player against ground, walls & slopes. In theory it is quite straight forward, but I'm having difficulty because it seems like you cannot do this with one Rect. One Rect is simple enough to get you collisions in the X plane against walls. The same Rect could be used also be used in the Y plane against solids, but not with slopes - since with the collision routines in Pygame it checks the whole Rect (or mask), rather than perhaps just the bottom middle of the Rect. It seems in addition you need to have a number of "sprites" to check collisions with, that are 1x1 pixel in various places around the Player. What's the easiest way to do this, without having a bunch of 3, 4, or more separate "collision pixels" to check against slopes? Geoff

    Read the article

  • WPF CollectionViewSource Grouping

    - by Miles
    I'm using a Collection View Source to group my data. In my data, I have Property1 and Property2 that I'm needing to group on. The only stipulation is that I don't want sub-groups of another group. So, when I group by these two properties, I don't want to have it so that Property2 because a subgroup of Property1's group. The reason why I'm wanting this is because I'm wanting to have a header that shows the following information: Header: <TextBlock.Text> <MultiBinding StringFormat="Property1: {0}, Property2: {1}"> <Binding Path="Property1"/> <Binding Path="Property2"/> </MultiBinding> </TextBlock.Text> I've tried this with my CollectionViewSource but was not able to "combine" the group and subgroup together: <CollectionViewSource x:Key="myKey" Source="{Binding myDataSource}"> <CollectionViewSource.GroupDescriptions> <PropertyGroupDescription PropertyName="Property1" /> <PropertyGroupDescription PropertyName="Property2" /> </CollectionViewSource.GroupDescriptions> </CollectionViewSource> Is it possible to group two properties together? Something like below? <CollectionViewSource x:Key="myKey" Source="{Binding myDataSource}"> <CollectionViewSource.GroupDescriptions> <PropertyGroupDescription PropertyName="Property1,Property2" /> </CollectionViewSource.GroupDescriptions> </CollectionViewSource>

    Read the article

  • Python Eggs on Google App Engine

    - by ott
    Usually I would use virtualenv and pip for deployment of web applications. With Google App Engine this doesn't work, because all import statement are relative to directory of the application. The most common approach I saw was to simply copy the packages from site-packages to the directory of the application. This involves manual work and is error-prone. Another approach was to changes install_lib and install_scripts in ~/.pydisutils.cfg, but this doesn't allow me to use pip in my home directory simultaneously. Do you have any suggestions for this?

    Read the article

  • Using code from this site

    - by user553798
    Hi, The legal section of this site mentions that all code by the contributors is licensed under the Creative Commons Attribution Share Alike License. Does this mean that I have to attribute the submitter even if the code in question is a few lines amongst hundreds or thousands of lines of code? What if I use code from a book or SDK? For eg; If I use the sample code from Google's Android SDK documentation, does that mean I need to attribute Google every time I write an app, after all it would be impossible to write an app without consulting the SDK docs, atleast initially... I am totally confused :S

    Read the article

  • a direct, simple api to run as system?

    - by fejesjoco
    Suppose a program is running with elevated privileges already, and it needs to see the contents of the System Volume Information folder, and by default, only NT Authority\System can do that. A workaround would be to change ACL's on the folder, but I don't want to mess with that. I already found two ways to do it: the task scheduler and psexec. They are too indirect, I don't even need to describe the first one, and the second one works by installing a windows service, running it, telling it to run whatever I wanted to run, then uninstalling the service. Now the question is: is there a direct, simple WinAPI function to run something as system? I don't think that such an API would circumvent the security restrictions, as an administrator I have the right to schedule a task or install a service, so there must be a shortcut.

    Read the article

  • Signable, streamable, "readable" archive format?

    - by alexvoda
    Is there any archive format that offers the following: be digitally sign-able with a digital certificate from a trusted source like Verisign - for preventing changes to the file (I am not referring to read only, but in case the file was changed it should no longer be signed telling the user this is not the original file) be stream-able - be able to be opened even if not all of the content has been transfered (also not strictly linearly) be "readable" - be able to read the data without extracting to a temporary folder (AFAIK if you open a file in a zip archive it is extracted first, and this stays true even for zip based formats like OOXML. This is not what I want) be portable - support on at least Windows, Linux and Mac OS X is a must, or at least future support be free of patents - Be open source - also preferably a license that allows commercial use(as far as i know GPL a share-alike licence so it doesn't allow comercial use, BSD on the other hand alows it) Note: Though it may come in handy eventually I can not think right now of a scenario that would require both point 1 and point 2 simultaneously. Or lets leave it a be able to check the signature only when the whole file was downloaded. I am not interested in: being able to be compressed being supported on legacy systems Does any existing archive format fit this description (tar evolutions like DAR and pax come to mind) ? If there is, are there programing libraries available for the above mentioned OSs? If not, would it be hard to create such a thing? EDIT: clarrified piont 5 EDIT 2: added a note to clarify point 1 and 2 P.S.: This is my first question on StackOverflow

    Read the article

  • Self-signed ceritificates for many users/browsers/sites

    - by Demiurg
    Here is my problem - I have a lot of users using different browsers accessing many internal web sites using https. I can create my own Certificate Authority, than create a certificate for each server and after that have all the users import it. Obviously, it cannot work in reality - there are too many users and too many sites, and some sites will be added in the future. I'm looking for a way to automate this. Is there a way to create a certificate so that all major browsers (IE, FF, Opera, Chrome and Safari) would trust it for all servers ? If so, what is the best way to install it automatically in all major browsers ?

    Read the article

  • Changing overflow from div dynamically [closed]

    - by user552669
    Hello comunnity! I am filling a div using JQuery. This div has the CSS property 'overflow' set to 'auto' (to display scrollbars because the div has a lot of HTML inside). But the DIV doesn't display the scrollbars. I think that the problem is that I'm setting the CSS property using CSS and the DIV is filling dynamically. How can I do to display scrollbars if the HTML inside the DIV doesn't fit, but dynamically? I'm trying to set the property manually after fill the div, but didn't work: function createWB(tag){ // Fill the div // ... // Set the scrollbars $('.tab_content').css('overflow','auto'); } If a set the property to 'scroll', the scrollbars appear, but disabled. Thanks in advance! :)

    Read the article

  • display flex xml with dash

    - by user217582
    In Flex, how do I display "midi-channel" to s:Label? I tried songTitle.text = mainXML.child("movement-title").text(); it worked but unsure how to display for midi-channel part. <score-partwise> <movement-title>zsdf</movement-title> <part-list> <score-part id="P1"> <part-name>Piano</part-name> <score-instrument id="P1-I1"> <instrument-name>Acoustic Grand Piano</instrument-name> </score-instrument> <midi-instrument id="P1-I1"> <midi-channel>1</midi-channel> <midi-program>1</midi-program> </midi-instrument> </score-part> </part-list>

    Read the article

  • Is there any data missing?

    - by smwikipedia
    Hi experts, Here is some code quoted from Douglas.E.Comer's < Computer Networks and Internets 4th edition. This program will send back any data it received. ... while((len = recv(conn, buff, BUFFERSIZE,0)) >0) // receive data send(conn, buff, len, 0); // send it back ... I am wondering, what if some data arrived when the code is executing in send(..) function, will it miss that data? Because the recv() function is not being executed. If no data is missed, where is the data kept? And by whom? Thanks...

    Read the article

  • What's the most common scenario for Cocoa app setup during first launch?

    - by Eimantas
    I am creating an app and I would like a user to set some obligatory preferences during first app launch. What is the most common scenario to achieve this? Should I set some user defaults to see if the app has been setup? Also - if I determine that the app is being launched for the first time - how should I display "Setup" window? If I load it from the separte xib file - how will I deffer the display of main app window?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >