Daily Archives

Articles indexed Tuesday March 30 2010

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

  • Good book for THINKING in terms of algorithms?

    - by chrisgoyal
    Before you mark this is a duplicate, let me explain why this is different. Most of the books on algorithms are more of a reference. You basically have a list of algorithms at your disposal. But what happens when you need to create a new algorithm for something? These books don't teach how to think in terms of algorithms. So I'm looking for books that will teach me the thinking-process of creating algorithms. Any good suggestions?

    Read the article

  • Is it possible to group rows twice in MySQL?

    - by DisgruntledGoat
    I have a table like this: someid somestring 1 Hello 1 World 1 Blah 2 World 2 TestA 2 TestB ... Currently I'm grouping by the id and concatenating the strings, so I end up with this: 1 Hello,World,Blah 2 World,TestA,TestB ... Is it possible to do a second grouping so that if there are multiple entries that end up with the same string, I can group those too?

    Read the article

  • What is the HTTP_PROFILE browser header and how is it used?

    - by Tom
    I've just come across the HTTP_PROFILE header that seems to be used by mobile browsers to point to an .xml document describing the device's capabilities. Doing a Google search doesn't turn up any definitive resources on what this is and how it should be used, can anyone point me to something along the lines of a spec/W3C standard?

    Read the article

  • Quick question on session security.

    - by Scarface
    Hey guys, I was scanning my site for security and I noticed that it was possible for non users to send requests and post information, so I decided to put login checks on all information posts. I was wondering if it was a good way to keep a session id that is created by md5(uniqid()); in a session variable $_SESSION['id']=md5(uniqid()); for each user and then store that in a database under active users for that user. Then when a user tries to insert information, verify that their $_SESSION['id'] variable is equal to the one in the database where the username equals their $_SESSION['username']. What are your ideas on this guys? Thanks in advance!

    Read the article

  • Detecting when error image in PictureBox is used

    - by DMan
    I found this on Google, click here, which someone asked a similar question, receiving a response that they should check if their file exists. However, I'm loading images from web links, in which it displays an error image if A)The picture is not found or B)If, like in image hosting services like Photobucket, displays the 'Bandwidth exceeded' image. Is there a way to detect if either an error image is showing or if a image is invalid?

    Read the article

  • Loading a class into a function ?

    - by Adrian
    I`m currently working on a script, and I have the following situation. function somnicefunction() { require 'someexternalclass.php'; $somevar = new SomeExternalClass(); } For some reason, the above breaks the function. I'm not sure why, I haven't seen much documentation in php.net regarding this, plus google returned no real results. Does anyone have any idea ?

    Read the article

  • Powershell Transcript is empty when running script from SQL Agent Job in 2005 SQL Server

    - by Greg Bray
    I have a complex Powershell script that gets run as part of a SQL 2005 Server Agent Job. The script works fine, but it uses the "Start-Transcript $strLogfile -Append" command to log all of it's actions to a transcript file. The problem is that the transcript is always empty. It adds the header and footer to indicate that the transcript is starting and stopping, but it doesn't actually log anything. Example: ********************** Windows PowerShell Transcript Start Start time: 20100304173001 Username : xxxxxxxxxxxx\SYSTEM Machine : xxxxx-xxx (Microsoft Windows NT 5.2.3790 Service Pack 2) ********************** ********************** Windows PowerShell Transcript End End time: 20100304173118 ********************** When I execute the script from a command prompt or start - run everything works just fine. Here is the command used to run the script (same command used in the Operating system CmdExec step of the SQL Agent Job) powershell.exe -File "c:\temp\Backup\backup script.ps1" I first thought it must have something to do with the script running under the System account (default SQL Agent account), but even when I tried changing the SQL Agent to run under my own personal account it still created a blank transcript. Is there any way to get PowerShell Transcripts to work when executing them as part of a 2005 SQL Server Agent Job?

    Read the article

  • How to create a new LaTeX command that behaves something like \verb?

    - by NawaMan
    I have been using LaTeX from sometime now, but have never actually gotten my hands dirty declaring a new command, as I try to avoid that. However, I need to add monospace text often in my document and I use \verb for it which is fine, except that the verb font size is bigger than the normal text font. So I need to change the font size and undo done like \small{}\verb#My monospace code#\normalsize{}. This is not very convenient and mistake-prone. Is there a better way to do this? Can I define a new command for this? How?

    Read the article

  • I need a piece software to use with my HP F4280 scanner.

    - by D Connors
    So, I got this printer/scanner about a year ago, and I'm really happy with it. The only thing is that I never really liked the HP scanning software that came with it. A few months ago I reformatted and reinstalled windows 7. Then, once I plugged in the printer, I noticed that windows recognized it automatically, and offered to install all the drivers by itself. So instead of manually installing the driver that came in the CD, I simply let windows automatically install it from its servers, and so far it's great. Instead of HP's scanning software (that really wasn't pleasing me), I got a very simplified interface that is more than enough for my ocasional scanning habits. Until today. Today I had to scan a bunch of old pictures for my father. And that simple interface felt like it was lacking quite a few features to make this repetitive task a little easier. And that's why I'm now looking for a good software to use for scanning. By "good" I mean anything well thought out, and specially anything that will make my life easier when repetitive-scanning. It doesn't need to have professional tweaking options, but having them is not a problem either. You guys got anything?

    Read the article

  • In Ada how do I initialise an array constant with a repeated number?

    - by mat_geek
    I need an array of 820 zeors for using with a mathematical function. In C I could just write the following and the compiler would fill the array: const float EMPTY_NUMBER_A[820] = { 0.0, }; However in Ada that isn't possible. I really don't want to hard code the 820 elements as 0.0. Is there a way to get the compiler to do it? type Number_A is array (1 .. 820) of Float; EMPTY_NUMBER_A : constant Number_A := something; Using Ada 95 and GNAT.

    Read the article

  • Why isn't my os.rename working?

    - by Alex
    Hi All, I'm trying to rename some files, but getting a baffling error*. When I run this: if os.path.isfile(fullPath): print 'fmf exists' print fullPath print newFilePath os.rename(fullPath,newFilePath) I get the following error: fmf exists (correct fullPath) (correct newFilePath, ie. destination) Traceback (most recent call last): File "whatever.py", line 374, in ? os.rename(fullPath,newFilePath) OSError: [Errno 2] No such file or directory Since I know that the file at fullPath exists, I'm baffled by the error. Of course, newFilePath doesn't exist, because that would be dumb. Any hints? Thanks! Alex *Aren't they all?

    Read the article

  • unable to get tooltip to work when usingjQuery load() content

    - by user281867
    Hi, I am having problem getting my tooltip to work when using the jQuery load() function. The tooltip works fine if i don't use load() to load external dynamic data. I googled and found the i may need to use live(), but I can't figure how to get it to work. Any suggestion? thank you!! Here is my scripts: function loadEMERContent(uid) { $("#ActionEWPNBook").load("ajaxLoadDATA.cfm?uid="+uid, null, showLoading); $("#EWPNBookloading").html(''); } function showLoading() { $("#EWPNBookloading").html(''); } function simple_tooltip(target_items, name){ $(target_items).each(function(i){ $("body").append(""+$(this).attr('title')+""); var my_tooltip = $("#"+name+i); $(this).removeAttr("title").mouseover(function(){ my_tooltip.css({opacity:0.8, display:"none"}).stop().fadeIn(400); }).mousemove(function(kmouse){ my_tooltip.css({left:kmouse.pageX+15, top:kmouse.pageY+15}); }).mouseout(function(){ my_tooltip.stop().fadeOut(400); }); }); } Here is my ajaxLoadDATA.cfm: Date Hours Modify Date #dateformat(vdate, "mm/dd/yyyy")##dateformat(vdate, "mm/dd/yyyy")# #hours# #dateformat(posted, "mm/dd/yyyy")#  ACTIONS:    Add    Edit    Cancel

    Read the article

  • CheckBox menu item Decrypt in JAVA GUI

    - by Nick
    I am working on a project and part of ask for: add a CheckBox menu item Decrypt which can be checked for decrypt or unchecked for Encrypt. This item should be tied to the toggle button in the GUI. Both should reflect the current status of encrypting/decrypting in the application which is I not sure how to begin with

    Read the article

  • How to disable authentication schemes for WCF Data Services

    - by Schneider
    When I deployed my WCF Data Services to production hosting I started to get the following error (or similar depending on which auth schemes are active): IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used. Apparently WCF Data Services (WCF in general?) cannot handle having more than once authentication scheme active. OK so I am aware that I can disable all-but-one authentication scheme on the web application via IIS control panel .... via a support request!! Is there a way to specify a single authentication scheme on a per-service level in the web.config? I thought this might be as straight forward as making a change to <system.serviceModel> but... it turns out that WCF Data Services do not configure themselves in the web config. If you look at the DataService<> class it does not implement a [ServiceContract] hence you cannot refer to it in the <service><endpoint>...which I presume would be needed for changing its configuration via XML. P.S. Our host is using II6, but both solutions for IIS6 & IIS7 appreciated.

    Read the article

  • Trimming GIT Checkins

    - by yar
    I check my code into a GIT branch every few minutes or so, and the comments end up being things like "Everything broken starting again" and other absurdities. Then every few minutes/hours/days I do a serious checkin with a real comment like, "Fixed bug #22.55, 3rd time." How can I separate these two concepts? I would like to be able to remove all my frequent-checkins and just leave the serious ones.

    Read the article

  • ASP.NET web application can't find an assembly

    - by Charlie Somerville
    I deployed an ASP.NET web application last night and I when I woke up this morning it was very slow and would occasionally just throw a 'Service Unavailable' error. I checked the Event Viewer and it was filled up with these errors: I'm puzzled as it was working perfectly when I deployed it (MonoTorrent is required to retrieve the number of seeders/leechers for a certain torrent off the tracker - this was working fine), but it's no longer working and whenever code that uses MonoTorrent gets involved, the worker process just crashes. MonoTorrent.dll is in the /bin/ directory.

    Read the article

  • How do I send DTMF tones and pauses using Android ACTION_CALL Intent with commas in the number?

    - by Rob Kent
    I have an application that calls a number stored by the user. Everything works okay unless the number contains commas or hash signs, in which case the Uri gets truncated after the digits. I have read that you need to encode the hash sign but even doing that, or without a hash sign, the commas never get passed through. However, they do get passed through if you just pick the number from your contacts. I must be doing something wrong. For example: String number = "1234,,,,4#1"; Uri uri = Uri.parse(String.format("tel:%s", number)); try { startActivity(new Intent(callType, uri)); } catch (ActivityNotFoundException e) { ... Only the number '1234' would end up in the dialer.

    Read the article

  • Simple POST random number issue in PHP

    - by MrEnder
    Ok I am trying to make something to ask you random multiplication questions. Now it asks the questions fine. Generates the random questions fine. But when it reloads the page the random numbers are different... how can I fix this? <?php $rndnum1 = rand(1, 12); $rndnum2 = rand(1, 12); echo "<h3>". $rndnum1 . " x "; echo $rndnum2 . "</h3>"; if($_SERVER["REQUEST_METHOD"] == "GET") { $answer=0; } else if($_SERVER["REQUEST_METHOD"] == "POST") { $answer=trim($_POST["answerInput"]); $check=$rndnum1*$rndnum2; if($answer==$check) { echo "Correct!"; } else { echo "Wrong!"; } } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" > <table> <tr> <td> First Name:&nbsp; </td> <td> <input type="text" name="answerInput" value="<?php echo $answer; ?>" size="20"/> </td> <td> <?php echo $answerError; ?> </td> </tr> <tr> <td class="signupTd" colspan="2"> <input type="submit" name="submit" value="Submit"/> </td> </tr> </table> </form>

    Read the article

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