Search Results

Search found 418 results on 17 pages for 'walter chen'.

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

  • Where is my validator?

    - by Danny Chen
    I have a validator in my page: <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="IdentifySEDSED1TxtDate" ErrorMessage="Significant Event Date 1 is missing" ValidType="SEDate">*</asp:RequiredFieldValidator> I found that in Page_Load: (below is a screen shot from the Watch Window) this.FindControl("rfv1") {Text = "*"} rfv1 The name 'rfv1' does not exist in the current context See, I can get this control with FindControl, but I can't get it using ID directly! What happens?

    Read the article

  • TDD vs. Unit testing

    - by Walter
    My company is fairly new to unit testing our code. I've been reading about TDD and unit testing for some time and am convinced of their value. I've attempted to convince our team that TDD is worth the effort of learning and changing our mindsets on how we program but it is a struggle. Which brings me to my question(s). There are many in the TDD community who are very religious about writing the test and then the code (and I'm with them), but for a team that is struggling with TDD does a compromise still bring added benefits? I can probably succeed in getting the team to write unit tests once the code is written (perhaps as a requirement for checking in code) and my assumption is that there is still value in writing those unit tests. What's the best way to bring a struggling team into TDD? And failing that is it still worth writing unit tests even if it is after the code is written? EDIT What I've taken away from this is that it is important for us to start unit testing, somewhere in the coding process. For those in the team who pickup the concept, start to move more towards TDD and testing first. Thanks for everyone's input. FOLLOW UP We recently started a new small project and a small portion of the team used TDD, the rest wrote unit tests after the code. After we wrapped up the coding portion of the project, those writing unit tests after the code were surprised to see the TDD coders already done and with more solid code. It was a good way to win over the skeptics. We still have a lot of growing pains ahead, but the battle of wills appears to be over. Thanks for everyone who offered advice!

    Read the article

  • API for parse/update UNIX configuration files

    - by Chen Levy
    Unix configuration files come in all shapes and forms. I know that Webmin has a Perl API that makes it easy to parse and modify most common configuration pro grammatically, while preserving changes that might have been made by hand. Are there any other libraries that has similar functionality, perhaps for other languages (Python, Ruby, C, C++, etc)?

    Read the article

  • Eclipse crashes during SVN merges

    - by Wing C. Chen
    I am currently using Eclipse Version: 3.5.1. It works perfectly in normal conditions, even with the SVN plugin, the faulty component that I am about to talk about now. The thing is that whenever I am conducting a merge, eclipse shuts down. It just crashes without even leaving an error message or anything else. It happens too often so that I can hardly normally. I am now using RapidSVN for merges. However, I would still like to know if there is any way to improve my eclipse condition.

    Read the article

  • ServerAlias www.example.com is not recognized

    - by Tianzhou Chen
    Below is my config file: NameVirtualHost 12.34.56.78:80 < VirtualHost 12.34.56.78:80 ServerAdmin [email protected] ServerName domain1.com ServerAlias www.domain1.com DocumentRoot /srv/www/domain1.com/public_html1/ ErrorLog /srv/www/domain1.com/logs/error.log CustomLog /srv/www/domain1.com/logs/access.log combined < /VirtualHost < VirtualHost 12.34.56.78:80 ServerAdmin [email protected] ServerName domain2.com ServerAlias www.domain2.com DocumentRoot /srv/www/domain2.com/public_html1/ ErrorLog /srv/www/domain2.com/logs/error.log CustomLog /srv/www/domain2.com/logs/access.log combined < /VirtualHost The thing is when I put www.domain1.com into browser, apache2 doesn't retrieve the web page resides in /srv/www/domain1.com/public_html1/, instead, it gets the page from the default document root defined in another file. However, if I put www.domain2.com, everything works fine. I don't see any difference between two VirtualHost config block, so I wonder what does make the difference. BTW, I haven't put any .htaccess file under their document root. Thanks for your advice! Tianzhou

    Read the article

  • How to exclude series in legend (Flex)

    - by Sean Chen
    Hello, In flex charting, I want to draw something like "reference lines" which are related to specific series, therefore these lines are not independent series and should not be shown in legend. Is it possible to exclude some series from chart legend? Thanks!

    Read the article

  • How to implement ctypes in IronPython

    - by Walter
    I need help. I have a code which is passing a script into a DLL and initialize the instrument. But, one of the code unable to use in IronPython beside python 2.7 and 3.3 I have attached the code as below enter code here import ctypes import time, sys DLLHANDLE=ctypes.cdll.LoadLibrary("C:\\INSTRDLL\\builds\\DCSOURCEDLL\\B2902A.dll") INPUTSCRIPT="SYSTEM{DCSOURCE1|INIT}" INPUTVOLTAGE=0.0 c_INPUTSCRIPT=ctypes.c_char_p(INPUTSCRIPT) c_INPUTVOLTAGE=ctypes.c_double(INPUTVOLTAGE) SOURCEHANDLE=DLLHANDLE.DCSOURCE(c_INPUTSCRIPT,c_INPUTVOLTAGE) time.sleep(1) Once "SOURCEHANDLE=DLLHANDLE.DCSOURCE(c_INPUTSCRIPT,c_INPUTVOLTAGE)" is triggered, Ironpython will crash automatically and no idea how to resolve it... or any workaround solution? Please advice..

    Read the article

  • How to use regex to match ASTERISK in awk

    - by Ken Chen
    I'm stil pretty new to regular expression and just started learning to use awk. What I am trying to accomplish is writing a ksh script to read-in lines from text, and and for every lines that match the following: *RECORD 0000001 [some_serial_#] to replace $2 (i.e. 000001) with a different number. So essentially the script read in batch record dump, and replace the record number with date+record#, and write to separate file. So this is what I'm thinking the format should be: awk 'match($0,"/*FTR")!=0{$2="$DATE-n++"; print $0} match($0,"/*FTR")==0{print $0}' $BATCH > $OUTPUT but obviously "/*FTR" is not going to work, and I'm not sure if changing $2 and then write the whole line is the correct way to do this. So I am in need of some serious enlightenment.

    Read the article

  • Detect block size for quota in Linux

    - by Chen Levy
    The limit placed on disk quota in Linux is counted in blocks. However, I found no reliable way to determine the block size. Tutorials I found refer to block size as 512 bytes, and sometimes as 1024 bytes. I got confused reading a post on LinuxForum.org for what a block size really means. So I tried to find that meaning in the context of quota. I found a "Determine the block size on hard disk filesystem for disk quota" tip on NixCraft, that suggested the command: dumpe2fs /dev/sdXN | grep -i 'Block size' or blockdev --getbsz /dev/sdXN But on my system those commands returned 4096, and when I checked the real quota block size on the same system, I got a block size of 1024 bytes. Is there a scriptable way to determine the quota block size on a device, short of creating a known sized file, and checking it's quota usage?

    Read the article

  • Difference between Document-oriented-DB and Bigtable clones

    - by chen
    We are looking for a suitable storage engine for our weblog history data. We looked at Bigtable's paper and understand it is suitable to us well. However, I also understand that Document-oriented-DB such as MongoDB seems to provide a little more powerful schema power -- i.e, it can model our data as well. I wonder how nowadays ppl choose a scalable NoSQL DB --- I read enough articles like "we looked at A, B and C, and we decided to use C". But I'd like to see some benchmark number. What I am saying is that if MongoDB and the like can provide same level of performance as Bigtable clones, why don't web companies choose it (preparing to deal with various potentially more complex data problem)? Thanks, By the way, I read an article (which convinced me at the moment) saying Cassandra does not fit the M/R operation, any comments?

    Read the article

  • iTextSharp last version doesnot support metadata?

    - by zp chen
    Console.WriteLine("Chapter 1 example 6: Meta Information"); // step 1: creation of a document-object Document document = new Document(); try { // step 2: // we create a writer that listens to the document // and directs a PDF-stream to a file PdfWriter.GetInstance(document, new FileStream("Chap0106.pdf", FileMode.Create)); // step 3: we add some metadata and open the document document.AddTitle("Hello World example"); document.AddSubject("This example explains step 6 in Chapter 1"); document.AddKeywords("Metadata, iText, step 6, tutorial"); document.AddCreator("My program using iText#"); document.AddAuthor("Bruno Lowagie"); document.AddHeader("Expires", "0"); document.Open(); // step 4: we add a paragraph to the document document.Add(new Paragraph("Hello World")); } catch (DocumentException de) { Console.Error.WriteLine(de.Message); } catch (IOException ioe) { Console.Error.WriteLine(ioe.Message); } // step 5: we close the document document.Close(); I am just copy the iTextSharp.tutorial. I get the pdf file Chap0106.pdf but metadata show nothing... I am use vs2008 xp system

    Read the article

  • Does @JoinTable has a property of "table" or not?

    - by Kent Chen
    The following is copied from hibernate's document. (http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/#d0e2770) @CollectionOfElements @JoinTable( table=@Table(name="BoyFavoriteNumbers"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoriteNumber", nullable=false) However, when I put this in practice, I just found that @JoinTable has no "table" property, instead it has a "name" property to specify the table name. But I need "table" property to specify indexes. What's going on here? I'm almost driven crazy!

    Read the article

  • Which way is more effective?

    - by Danny Chen
    I have a huge IEnumerable(suppose the name is myItems), which way is more effective? Solution 1: Filter it first then ForEach. Array.ForEach(myItems.Where(FILTER-IT-HERE).ToArray(),MY-ACTION); Solution 2: Do RETURN in MY-ACTION if the item is not up to the mustard. Array.ForEach(myItems.ToArray(),MY-ACTION-WITH-FILTER); Is one of them always better than another? Or any other good suggestions? Thanks in advance.

    Read the article

  • Business Objects - Containers or functional?

    - by Walter
    Where I work, we've gone back and forth on this subject a number of times and are looking for a sanity check. Here's the question: Should Business Objects be data containers (more like DTOs) or should they also contain logic that can perform some functionality on that object. Example - Take a customer object, it probably contains some common properties (Name, Id, etc), should that customer object also include functions (Save, Calc, etc.)? One line of reasoning says separate the object from the functionality (single responsibility principal) and put the functionality in a Business Logic layer or object. The other line of reasoning says, no, if I have a customer object I just want to call Customer.Save and be done with it. Why do I need to know about how to save a customer if I'm consuming the object? Our last two projects have had the objects separated from the functionality, but the debate has been raised again on a new project. Which makes more sense? EDIT These results are very similar to our debates. One vote to one side or another completely changes the direction. Does anyone else want to add their 2 cents? EDIT Eventhough the answer sampling is small, it appears that the majority believe that functionality in a business object is acceptable as long as it is simple but persistence is best placed in a separate class/layer. We'll give this a try. Thanks for everyone's input...

    Read the article

  • Should I release NSString before assigning a new value to it?

    - by Elliot Chen
    Hi, Please give me some suggestions about how to change a NSString variable. At my class, I set a member var: NSString *m_movieName; ... @property(nonatomic, retain) NSString *m_movieName; At viewDidLoad method, I assign a default name to this var: -(void)viewDidLoad{ NSString *s1 = [[NSString alloc] initWithFormat:@"Forrest Gump"]; self.m_movieName = s1; ... [s1 release]; [super viewDidLoad] } At some function, I want to give a new name to this var, so I did like: -(void)SomeFunc{ NSString *s2 = [[NSString alloc] initWithFormat:@"Brave Heart"]; //[self.movieName release]; // ??????? Should perform here? self.m_moiveName = s2; [s2 release]; } I know, NSString* var is just a pointer to an allocated memory block, and 'assign' operation will increment this memory block's using count. For my situation, should I release m_movieName before assigning a value to it? If I do not release it (via [self.movieName release]), when and where will the previous block be released? Thanks for your help very much!

    Read the article

  • Windows programming for Unix programmer

    - by Jochen Walter
    I am looking for an introduction to Windows programming. I already have some experience with .net-programming using C#, now I want an overview of the lower-level APIs of Windows. Wikipedia has an article on this subject but, it is quite terse. Is there a canonical book or web site for this kind of information?

    Read the article

  • bash: function + source + declare = boom

    - by Chen Levy
    Here is a problem: In my bash scripts I want to source several file with some checks, so I have: if [ -r foo ] ; then source foo else logger -t $0 -p crit "unable to source foo" exit 1 fi if [ -r bar ] ; then source bar else logger -t $0 -p crit "unable to source bar" exit 1 fi # ... etc ... Naively I tried to create a function that do: function save_source() { if [ -r $1 ] ; then source $1 else logger -t $0 -p crit "unable to source $1" exit 1 fi } safe_source foo safe_source bar # ... etc ... But there is a snag there. If one of the files foo, bar, etc. have a global such as -- declare GLOBAL_VAR=42 -- it will effectively become: function save_source() { # ... declare GLOBAL_VAR=42 # ... } thus a global variable becomes local. The question: An alias in bash seems too weak for this, so must I unroll the above function, and repeat myself, or is there a more elegant approach? ... and yes, I agree that Python, Perl, Ruby would make my file easier, but when working with legacy system, one doesn't always have the privilege of choosing the best tool.

    Read the article

  • Flex: Can I assign propertiy of multi-layer object to Chart's xField or yField?

    - by Sean Chen
    Hi, I have a question about how to assign property of a multi-layer object to Chart's xField or yField. For example: var obj:Object = new Object(); var store:Object = new Object(); store.store1 = 300; store.store2 = 200; store.store3 = 250; obj.date = "2010/04/26"; obj.count = 2; obj.store = store; Because I have to draw multiple LineSeries, the yField on different series must be assigned to obj.store.store1~store3. How can I set yField in different layer of object?

    Read the article

  • validating data in .net

    - by Chen Kinnrot
    i'm looking for recommended validation frameworks, or patterns for an n-tier client application, i wanna write the validation once and ind it to wpf gui, and also for server side and client side related bussiness logic

    Read the article

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