Daily Archives

Articles indexed Thursday April 1 2010

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

  • Formatted input in c++

    - by julz666
    hey, i'm a noob to c++ (and coding in general) i'm looking for an easy way to take two doubles (at once) from the keyboard and store them in a struct i've created called "Point" and then ultimately store the Point into a vector of Points that's a member of a class (called "Polygon"). i know i could do it with a scanf but need to know how to do it with cin. hope that makes sense. thanks in advance julz

    Read the article

  • Missing output when running system command in perl/cgi file

    - by aladine
    I need to write a CGI program and it will display the output of a system command: script.sh echo "++++++" VAR=$(expect -c " spawn ssh -o StrictHostKeyChecking=no $USER@$HOST $CMD match_max 100000 expect \"*?assword:*\" send -- \"$PASS\r\" send -- \"\r\" expect eof ") echo $VAR echo "++++++" In CGI file: my $command= "ksh ../cgi-bin/script.sh"; my @output= `$command`; print @output; Finally, when I run the CGI file in unix, the $VAR is a very long string including \n and some delimiters. However, when I run on web server, the output is ++++++ ++++++ So $VAR is missing when passing in the web interface/browser. I know maybe the problem is $VAR is very long string. But anyway, is there anyway to solve this problem except writing the output to a file then retrieve it from browser? Thanks if you are interested in my question.

    Read the article

  • Where and which data to save into session on an ASP.NET MVC 2 application?

    - by Shaharyar
    I am having some trouble saving the state of my current view. Currenly I have several selectlist calling their own Action method on the controller that returns the Index view with the filtered model based on the values of the selectlist. I have also written a little FileResult action that creates a csv file based on the current model. But I am only covering one selectlist right now as I only save the value of selectList1 into the session and access it with Session["SelectListValue1"] What are the best practices in this situation? Should I redo the entire (each action for each SelectList) part? Should I save each SelectLists value into the session and check if it's null? Or should I just save the Lambda Expression into the session and modify it during every call?

    Read the article

  • Tip 14 : Solve SmtpClient issues of delayed email and high CPU usage

    - by StanleyGu
    1. It is quite straightforward using SmtpClient class to send out an email 2. However, when you step through the above code executing smtpClient.Send(), you will notice about 2 minutes delay in receiving the email. 3. My first try to solve the issue of delayed email is to set MaxIdleTime=1 4. The first try solves the issue of delayed email very well but introduces another issue: high CPU usage. The CPU usage of my deployed windows service is consistently at 50%, which is much higher than the expected near-zero CPU usage. 5. The second try is to set MaxIdleTime=2, which solves the both issues.    

    Read the article

  • I&rsquo;m back, now with Windows Live Writer goodness

    - by Dave Yasko
    I’ve reimaged my home laptop.  I’m trying to populate it with as much free goodness as possible to see if the free way is as good as the old pay way.  Turns out, I’ve got access to Windows Live Writer.  I’m not sure where that came from, maybe with Vista Ultimate.  I don’t know.  Either way, it makes my blog posting a whole lot easier.  So, maybe, just maybe, it will make me more likely to post.  We’ll see. Later.

    Read the article

  • 10 Tips For Getting Your Business Domain Right

    In today?s connected world, having a website for your business can be more important than having a business card. Your website can even be critical enough to be the difference between business succes... [Author: Tanya Smith - Computers and Internet - March 31, 2010]

    Read the article

  • How to Make your Mac Stand Out

    From time to time every Mac user has to complete a range of day-to-day activities and deal with a range of issues. The most common of them are: ? Hard drive cleanup ? Backup of important files ? P... [Author: Andrew Marsh - Computers and Internet - March 31, 2010]

    Read the article

  • Auto-creating User details with Grails and LDAP

    - by Benny Hallett
    I'm using the Acegi Security plugin for Grails, and authentication via LDAP. The application logs show that on login, we can authenticate the user and get their roles via LDAP, but the login fails because the User Details cannot be found in the application's database. Is there a way to auto create and save a basic User Details domain object if one doesn't already exit?

    Read the article

  • Using PHP variables inside SQL statements?

    - by Homer
    For some reason I can't pass a var inside a mysql statement. I have a function that can be used for multiple tables. So instead of repeating the code I want to change the table that is selected from like so, function show_all_records($table_name) { mysql_query("SELECT * FROM $table_name"); etc, etc... } And to call the function I use show_all_records("some_table") or show_all_records("some_other_table") depending on which table I want to select from at the moment. But it's not working, is this because variables can't be passed through mysql statements?

    Read the article

  • Translating delegate usage from C# to VB

    - by Homeliss
    ContactManager.PostSolve += PostSolve; I am having a problem converting this piece of code from C# to VB.NET. ContactManager.PostSolve is a delegate. I tried the following but it doesn't work, it says PostSolve is not an event of ContactManager: AddHandler ContactManager.PostSolve, AddressOf PostSolve The following works, but this only allows me to have one handler for the delegate: ContactManager.PostSolve = new PostSolveDelegate(AddressOf PostSolve) Is there a way for me to do the same thing in VB that was done in the first piece of code? Thanks!

    Read the article

  • Latex \hline spacing

    - by vigilant
    How do you add spacing after an \hline in a tabular? I can add spacing before it using \vspace, however if I try to add spacing after the \hline, the spacing will come after the next line of text. Here is what I have so far: \multicolumn{2}{Hello!} \vspace{4pt} \\ \hline \textit{Hi!} & \textit{Ho!} I don't want to add a line break after the \hline and do something like \vspace{-xxpt} or use \rule because the generated HTML document from Hevea will be ugly.

    Read the article

  • C# using namespace directive in nested namespaces

    - by MoSlo
    Right, I've usually used 'using' directives as follows using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AwesomeLib { //awesome award winning class declarations making use of Linq } i've recently seen examples of such as using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AwesomeLib { //awesome award winning class declarations making use of Linq namespace DataLibrary { using System.Data; //Data access layers and whatnot } } Granted, i understand that i can put USING inside of my namespace declaration. Such a thing makes sense to me if your namespaces are in the same root (they organized). System; namespace 1 {} namespace 2 { System.data; } But what of nested namespaces? Personally, I would leave all USING declarations at the top where you can find them easily. Instead, it looks like they're being spread all over the source file. Is there benefit to the USING directives being used this way in nested namespaces? Such as memory management or the JIT compiler?

    Read the article

  • best-practices for displaying new view controllers ( iPhone )

    - by Tristan
    I need to display a couple of view controllers (eg, login screen, registration screen etc). What's the best way to bring each screen up? Currently for each screen that I'd like to display, I call a different method in the app delegate like this: Code: - (void) registerScreen { RegistrationViewController *reg = [[RegistrationViewController alloc] initWithNibName:@"RegistrationViewController" bundle:nil]; [window addSubview:reg.view]; } - (void) LoginScreen { LoginViewController *log = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; [window addSubview:log.view]; } It works, but I cant imagine it being the best way.

    Read the article

  • Implementation Phase in SDLC

    - by ultrajohn
    What are the different things that a developer (or a team of developer or the manager) needs to consider if the project they are working is now in the Implementation Phase. I am probably asking 'best practices' during the said phase. Maybe also the tools that should be made available and should be use by the developer. Thank you! I hope you won't find my question stupid. or please label it appropriately as needed.

    Read the article

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