Daily Archives

Articles indexed Wednesday March 17 2010

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

  • Can continuations be used as a replacement for recursion?

    - by Sam
    The following function generates a 'stack level too deep (SystemStackError)' for n = 5,000 def factorial(n) n == 0 ? 1 : factorial(n -1) * n end Is there a way to avoid this error using continuations/callcc? Note: I know this can be implemented without recursion. e.g. def factorial2(n) (1..n).inject(1) {|result, n| result * n } end

    Read the article

  • Giving Custom permission

    - by user295261
    Hello, My requirement is that there are 2 parties 1. User (who creates the item) 2.Approvers who approve the item When the user creates the item then they should see only their created item in the list (This is easily possible)...the approvers should have only read access and they can see all the items ...when i select the option that only person who creates the item can see the item then approvers are not able to see the items...can somebody plz help that how to work with this...maybe i am missing some simple stuff so can anybody just point me out to the solution.. Thanks

    Read the article

  • Open-source training class/room/instructor resource management software?

    - by Kyle Eli
    We're looking to replace an internal system used for managing training classes with something a bit more robust. Needs to be open-source or have a license level that grants access to source, and needs to be ASP.net (C# preferred, but could live with VB.net) Ultimately, we'll need to be able to assign facilities and instructors, manage attendees, send notifications, and build calendar views. We'll also be integrating with our website to allow on-line sign-up and other things for attendees to manage on their own. We do expect to implement quite a bit of it in-house, but we'd like as broad of a base to start from as we can get. Still, just a really good web-based meeting-room reservation system might make a good enough starting point. In list form: Meeting/training resource management softwareASP.net (C# or VB.net)Source availableWe're expecting to have to modify the software to meet all of our requirements

    Read the article

  • How can I find a computer on my network that is doing mass mailings?

    - by Alex Ciarlill
    I was notified by my isp that one of my machines is sending out spam. This happened about 3 months ago on windows machine running cygwin that was hacked due to an SSH vuln. The hackers setup IIS and SMTP. I cleared out the machine and all the services are disabled so I think that machine is okay I am wondering if there is any other way to identify which machine it could be coming from? The ISP has NO useful information such as source port, destination port, destination IP... nothing. I am running DD-WRT on my router, Windows 7 PC and a Windows XP PC.

    Read the article

  • How I can determine the sector size on an external hard drive?

    - by sigint
    Hard drives are transitioning from 512 byte to 4096 byte sector sizes, and it looks like Windows XP won't support these newer drives without additional software (such as WDalign from Western Digital) My question is: how does this affect external hard drives? I'll be buying a 1TB USB external drive, and it'll be plugged into a mix of Windows 7 and XP machines. Is there an easy way to tell what the sector size on an external hard drive is?

    Read the article

  • What Would a CyberWar Do To Your Business?

    - by Brian Dayton
    In mid-February the Bipartisan Policy Center in the United States hosted Cyber ShockWave, a simulation of how the country might respond to a catastrophic cyber event. An attack takes place, they can't isolate where it came from or who did it, simulated press reports and market impacts...and the participants in the exercise have to brief the President and advise him/her on what to do. Last week, Former Department of Homeland Security Secretary Michael Chertoff who participated in the exercise summarized his findings in Federal Computer Weekly. The article, given FCW's readership and the topic is obviously focused on the public sector and US Federal policies. However, it touches on some broader issues that impact the private sector as well--which are applicable to any government and country/region-- such as: ·         How would the US (or any) government collaborate to identify and defeat such an attack? Chertoff calls this out as a current gap. How do the public and private sector collaborate today? How would the massive and disparate collection of agencies and companies act together in a crunch? ·         What would the impact on industries and global economies be? Chertoff, and a companion article in Government Computer News, only touch briefly on the subject--focusing on the impact on capital markets. "There's no question this has a disastrous impact on the economy," said Stephen Friedman, former director of the National Economic Council under President George W. Bush who played the role of treasury secretary. "You have financial markets shut down at this point, ordinary transactions are dramatically depleted, there's no question that this has a major impact on consumer confidence." That Got Me Thinking ·         How would it impact Oracle's customers? I know they have business continuity plans--is this one of their scenarios? What if it's not? How would it impact manufacturing lines, ATM networks, customer call centers... ·         How would it impact me and the companies I rely on? The supermarket down the street, my Internet Service Provider, the service station where I bought gas last night.   I sure don't have any answers, and neither do Chertoff or the participants in the exercise. "I have to tell you that ... we are operating in a bit of unchartered territory." said Jamie Gorelick, a former deputy attorney general who played the role of attorney general in the exercise.    But it is a good thing that governments and businesses are considering this scenario and doing what they can to prevent it from happening.

    Read the article

  • Cost of using ASP.NET

    - by Mackristo
    One thing that I keep hearing in reference to ASP.NET and MSFT technologies is that they cost money to use. Often when they are being compared to open source languages someone will mention that one factor in favor of open source is that it's free (to an extent). My question is, when does ASP.NET actually cost money to use in terms of using the proprietary technology? Understandably there are the hosting fees, but I'm curious about the fees outside of these hosting fees. I'm especially curious about this as it relates one-person smaller-site development (non-team/large enterprise). Any help is appreciated. (edits) Some excellent answers. Much appreciated The projects that I'm looking to use the technologies for would be personal sites and very small business sites (1 or 2). The intent would of course be that these projects get much bigger. It seems that for commercial production, fees will apply. What about just basic dynamic "shared hosting" sites that provide information?

    Read the article

  • WiX: Prevent 32-bit installer from running on 64-bit Windows

    - by Tom the Junglist
    Hi everyone, Due to user confusion, our app requires separate installers for 32-bit and 64-bit versions of Windows. While the 32-bit installer runs fine on win64, it has the potential to create support headaches and we would like to prevent this from happening. I want to prevent the 32-bit MSI installer from running on 64-bit Windows machines. To that end I have the following condition: <Condition Message="You are attempting to run the 32-bit installer on a 64-bit version of Windows."> <![CDATA[Msix64 AND (NOT Win64)]]> </Condition> With the Win64 defined like this: <?if $(var.Platform) = "x64"?> <?define PlatformString = "64-bit"?> <?define Win64 ?> <?else?> <?define PlatformString = "32-bit"?> <?endif?> Thing is, I can't get this check to work right. Either it fires all the time, or none of the time. The goal is to check presence of the run-time msix64 variable against the compile-time Win64 variable and throw an error if these don't line up, but the logic is not working how I intend it to. Has anyone come up with a better solution? Thanks! Tom

    Read the article

  • Alternative to jQuery's .toggle() method that supports eventData?

    - by Bungle
    The jQuery documentation for the .toggle() method states: The .toggle() method is provided for convenience. It is relatively straightforward to implement the same behavior by hand, and this can be necessary if the assumptions built into .toggle() prove limiting. The assumptions built into .toggle have proven limiting for my current task, but the documentation doesn't elaborate on how to implement the same behavior. I need to pass eventData to the handler functions provided to toggle(), but it appears that only .bind() will support this, not .toggle(). My first inclination is to use a flag global to a single handler function to store the click state. In other words, rather than: $('a').toggle(function() { alert('odd number of clicks'); }, function() { alert('even number of clicks'); }); do this: var clicks = true; $('a').click(function() { if (clicks) { alert('odd number of clicks'); clicks = false; } else { alert('even number of clicks'); clicks = true; } }); I haven't tested the latter, but I suspect it would work. Is this the best way to do something like this, or is there a better way that I'm missing? Thanks!

    Read the article

  • Git access on Heroku deployment and others: connection refused

    - by Toby Hede
    I have suddenly run into an issue using git. I created a new app, went to push to Heroku and now see: ssh: connect to host heroku.com port 22: Connection refused My other previously working Heroku apps no longer work, receiving the same error. Other Heroku commands work (create, info, db:push). I also see the error when accessing Git on my unfuddle accounts. I can SSH to other services, so it doesn't look like it's my machine. Any ideas?

    Read the article

  • Help with PHP mailer script

    - by Chris
    Hi there, I'm clueless when it comes to PHP and have a script that emails the contents of a form. The trouble is it only sends me the comment when I want it to also send the name and email address that is captured. Anyone know how I can adjust this script to do this? A million thanks in advance! <?php error_reporting(E_NOTICE); function valid_email($str) { return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE; } if($_POST['name']!='' && $_POST['email']!='' && valid_email($_POST['email'])==TRUE && strlen($_POST['comment'])>1) { $to = "[email protected]"; $headers = 'From: '.$_POST['email'].''. "\r\n" . 'Reply-To: '.$_POST['email'].'' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $subject = "Contact Form"; $message = htmlspecialchars($_POST['comment']); if(mail($to, $subject, $message, $headers)) { echo 1; //SUCCESS } else { echo 2; //FAILURE - server failure } } else { echo 3; //FAILURE - not valid email } ?>

    Read the article

  • Rotate webpage via code?

    - by Adam Davis
    I'm hoping that there's a relatively simple way to rotate a webpage a little bit, 30 degrees or so, while still leaving it fully functional and usable. I completely control the page, and can modify it to make this easier if needed. I'd rather not re-write the whole thing in SVG, though, but perhaps javascript and canvas will work? Is there a way using CSS, Javascript, or some other cross browser method that would allow me to accomplish this?

    Read the article

  • Forcing XDocument.ToString() to include the closing tag when there is no data.

    - by JasonM
    I have a XDocument that looks like this: XDocument outputDocument = new XDocument( new XElement("Document", new XElement("Stuff") ) ); That when I call outputDocument.ToString() Outputs to this: <Document> <Stuff /> </Document> But I want it to look like this: <Document> <Stuff> </Stuff> </Document> I realize the first one is correct, but I am required to output it this way. Any suggestions?

    Read the article

  • How To Perform Distributed Website Monitoring?

    - by cballou
    I would like to know how sites like the following perform distributed website monitoring (from multiple checkpoints/countries). pingdom.com, site24x7.com, uptrends.com, siteuptime.com, etc, etc. To be exact, what process would occur in checking if a given domain name went down? If the server finds that the site is down, what is the next step? Would it make a REST API request to a separate server to run the same test and report the results? I have a few theories, including: utilizing host(s) from different countries utilizing proxies from different countries I'm looking for the most proper or correct way to handle this, which can include the usage of servers from multiple countries/hosts.

    Read the article

  • XAMPP: Access Forbidden!

    - by Yar
    I just installed a fresh XAMPP on OSX. Apache runs and I can see the splash page. I open the httpd.conf and I set both places that point to htdocs to someplace else, which results in Apache showing an "Access Forbidden!" message. I plugged my directory here: <Directory "/Applications/XAMPP/xamppfiles/htdocs"> and here: DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs" I have set the permissions to 777 for everything including the enclosing directory, but to no avail. Strangely, I just did this whole thing with MAMP and had no problems serving that directory, but it was slow.

    Read the article

  • How come CodeIgniter's img tag doesn't fill the "src" properly?

    - by Shamoon
    My code is as follows: $image_array = array( "src" => base_url() . "img/ajax-bar_loader.gif" ); echo img( $image_array ); But when I debug in FireFox, the tag is: <img original="http://www.mysite.com/img/ajax-bar_loader.gif" style=""> I'm not really sure where that "original" tag came from, but it doesn't render my images. Any ideas?

    Read the article

  • Jquery Ajax loading Problem

    - by Starx
    I have a function to load a html part into a element in main index page kinda like this $(".ajax").click(function() { //load a page into a element }); This works But the HTML part which i have just loaded also have links that need to trigger same function above, but it does not. Until I save that function in a separate .js file and load in the main index file as well as all other files from where I need to trigger that function even though these internal files are going to loaded into the the first main file . Is there any way for a function in the index file to run from the html document that is loaded inside a element.

    Read the article

  • Error connecting to online fossil repository after changing password.

    - by Toby Allen
    I set up a fossil repository on a shared hosting account I have. I created a perl script fossil.pl that points to a cloned repository that I put up on the webspace. I set all the correct permissions (755). When I go to fossil.pl I get the web ui. Everythings cool. However I'm having a problem with pushes and hoping someone could point me to a solution. When I clone a repository it sets a new password for me (Toby) in the new cloned repository. If I push to this repository online without changing the password it works fine, I can push up changes from my local machine to the online repository. However once I change the password for Toby (to something more easily remembered by me) I get the following error. Bytes Cards Artifacts Deltas Send: 1810 9 0 2 1Server Error: not authorized to write fossil: server says: not authorized to write Anyone know why this is happening? Anyone know how to fix it?

    Read the article

  • Cross compiling unit tests with CppUnit or similar

    - by Mark
    Has anyone used a package like CppUnit to cross-compile C++ unit tests to run on an embedded platform? I'm using G++ on a Linux box to compile executables that must be run on a LynxOS board. I can't seem to get any of the common unit test packages to configure and build something that will create unit tests. I see a lot of unit test packages, CppUnit, UnitTest++, GTest, CppUTest, etc., but very little about using these packages in a cross-compiler scenario. The ones with a "configure" script imply that this is possible, but I can't seem to get them to configure and build.

    Read the article

  • How to position an element so that it does not flow off the visible screen

    - by rjray
    I am creating pseudo-tooltips on a page that has a lot of "a" and "span" elements that have these tips associated with them. Everything in the creation of the element is fine, and it displays fine. However, since this is a page with a lot of data, as you get towards the bottom of the visual area the tooltips start to flow past the bottom edge of the window. My initial attempt to compensate for this with window.innerWidth/innerHeight didn't come out too well. I'm using jQuery for DOM manipulation (but not jQuery UI). Given the event itself, and the height and width of the tooltip (which I can get with getBoundingClientRect()), how can I position this element so that the bottom of the tooltip is never below the edge of the window?

    Read the article

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