Daily Archives

Articles indexed Saturday March 27 2010

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

  • Redirect output to file

    - by Algorist
    Hi, I have a shell script which is currently running and was running from past 8 hours. It will complete only by tomorrow evening. At the end of the program, it will print 2 million words to standard output. I am running the program on the screen. I forgot to redirect the output to a file. I know I won't be able to copy the data from the window. Is there a way to output the command to a file. I don't want to restart the program. Any thoughts?? Thank you. Bala

    Read the article

  • How do I create a view with a picker on the bottom and a table view on the top?

    - by Andy
    Hi - first time asker, long-time lurker. I am trying to create an iPhone view that has a date/time picker on the bottom half of the screen, and a grouped, single-section, four-row table view on the top half of the screen (almost identical to the one Apple shows in Fig. 2-4 of their View Controller Programming Guide (but then never goes on to explain). Conceptually, I think I understand that what I need is a main view with a pair of subviews - one for the picker, and one for the table view. I'm pretty sure I can make the picker function once I have it on-screen, and I'm pretty sure I can make the table view function too. What I can't for the life of me figure out is how, programmatically speaking, to get the two views onto the screen simultaneously. I can lay it out perfectly in Interface Builder, but then it all goes to hell when I switch to Xcode...the view appears with the picker, but no table view. Thanks, in advance, for any help you can offer.

    Read the article

  • converting huge MPEG audio files to something smaller

    - by john
    I've got some large MPEG audio files (144 MB each) that I'm looking to convert to something smaller so I can send them out as attachments to an email. Any suggestions on the software to use? I'm looking for something free that will run on Windows. I don't really care what the destination file is, mp3 would be nice. If there's a web service out there that would do this without the need to download any software to my machine, that would be even better, but I would be more than happy just getting it done any way I can. Thanks!

    Read the article

  • VLC playing mkv file without sound

    - by Tim
    When I play mkv file in VLC, it produces this error No suitable decoder module: VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this. What does it mean and how to fix it? My OS is Windows 7. Thanks and regards!

    Read the article

  • Call asp.net web service from php

    - by SamB09
    Hi im calling an aps.net web service from a php service. The service searches both databases with a search parameter. Im not sure how to pass a search parameter to the asp.net service. Code is below. ( there is no search paramter currently but im just interested in how it would be passed to the asp.net service) $link = mysql_connect($host, $user, $passwd); mysql_select_db($dbName); $query = 'SELECT firstname, surname, phone, location FROM staff ORDER BY surname'; $result = mysql_query($query,$link); // if there is a result if ( mysql_num_rows($result) > 0 ) { // set up a DOM object $xmlDom1 = new DOMDocument(); $xmlDom1->appendChild($xmlDom1->createElement('directory')); $xmlRoot = $xmlDom1->documentElement; // loop over the rows in the result while ( $row = mysql_fetch_row($result) ) { $xmlPerson = $xmlDom1->createElement('staff'); $xmlFname = $xmlDom1->createElement('fname'); $xmlText = $xmlDom1->createTextNode($row[0]); $xmlFname->appendChild($xmlText); $xmlPerson->appendChild($xmlFname); $xmlSname = $xmlDom1->createElement('sname'); $xmlText = $xmlDom1->createTextNode($row[1]); $xmlSname->appendChild($xmlText); $xmlPerson->appendChild($xmlSname); $xmlTel = $xmlDom1->createElement('phone'); $xmlText = $xmlDom1->createTextNode($row[2]); $xmlTel->appendChild($xmlText); $xmlPerson->appendChild($xmlTel); $xmlLoc = $xmlDom1->createElement('loc'); $xmlText = $xmlDom1->createTextNode($row[3]); $xmlLoc->appendChild($xmlText); $xmlPerson->appendChild($xmlLoc); $xmlRoot->appendChild($xmlPerson); } } // // instance a SOAP client to the dotnet web service and read it into a DOM object // (this really should have an exception handler) // $client = new SoapClient('http://stuiis.cms.gre.ac.uk/mk05/dotnet/dataBind01/phoneBook.asmx?WSDL'); $xmlString = $client->getDirectoryDom()->getDirectoryDomResult->any; $xmlDom2 = new DOMDocument(); $xmlDom2->loadXML($xmlString); // merge the second DOM object into the first foreach ( $xmlDom2->documentElement->childNodes as $staffNode ) { $xmlPerson = $xmlDom1->createElement($staffNode->nodeName); foreach ( $staffNode->childNodes as $xmlNode ) { $xmlElement = $xmlDom1->createElement($xmlNode->nodeName); $xmlText = $xmlDom1->createTextNode($xmlNode->nodeValue); $xmlElement->appendChild($xmlText); $xmlPerson->appendChild($xmlElement); } $xmlRoot->appendChild($xmlPerson); } // return result echo $xmlDom

    Read the article

  • Server.Transfer("error_404.aspx") in Application_Error returns a blank page

    - by qntmfred
    I look for HttpExceptions in the Application_Error sub of my global.asx Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) Dim ex As Exception = HttpContext.Current.Server.GetLastError() If ex IsNot Nothing Then If TypeOf (ex) Is HttpUnhandledException Then If ex.InnerException Is Nothing Then Server.Transfer("error.aspx", False) End If ex = ex.InnerException End If If TypeOf (ex) Is HttpException Then Dim httpCode As Integer = CType(ex, HttpException).GetHttpCode() If httpCode = 404 Then Server.ClearError() Server.Transfer("error_404.aspx", False) End If End If End If End Sub I can step through this code and confirm it does hit the Server.Transfer("error_404.aspx"), as well as the Page_Load of error_404.aspx, but all it shows is a blank page.

    Read the article

  • Is there anything RAD comparable to VCL?

    - by mawg
    After years in embedded programming, I have to develop a Windows app. I dug out my old C++ Builder and Delphi. These are great and the latest version costs over $1k, so I won't be going there. What I prarticularly like is the VCL (visual component library) which let's me code my own components and share them with others, plus the thousands of existing 3rd party components. I noticed that there is now also a RAD PHP from Borland too. I realzie that MSVC, QT, NetBeans, etc are good enough IDEs for RAD, BUT does anything offer the ease of the Borland products for developing additional components - and does anything else have thousands to choose from? PC based? Cross-platform is good. Browser based? Free is always good ;-) I don't particularly care about the programming language.

    Read the article

  • What does this mean: warning: converting from ‘void (ClassName::*)()’ to ‘void (*)()’

    - by Brendan Long
    I have a member function in a class that has a callback, but the callback isn't strictly neccessary, so it has a default callback, which is empty. It seems to work fine, but I get an annoying warning: warning: converting from ‘void (ClassName::*)()’ to ‘void (*)()’ I'm trying to figure out what it means and how to turn it off (or fix it if I really am doing something wrong). Here's some simple code: class ClassName{ public: void doSomething(void (*callbackFunction)() = (void(*)()) &ClassName::doNothing){ callbackFunction(); } void doNothing(){} }; int main(){ ClassName x; x.doSomething(); return 0; } Note: If I do this (without explicitly casting it as a void(*)()): void doSomething(void (*callbackFunction)() = &ClassName::doNothing) I get this: main.cpp:3: error: default argument for parameter of type ‘void (*)()’ has type ‘void (ClassName::*)()’

    Read the article

  • Need some testcases on solving this problem

    - by user285825
    I am trying to solve the minesweeper problem of acm problemset archive, http://uva,onlinejudge,org/index,php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1130 I tested with all the possible cases that I can imagine of: 1, minimum 1 1 , 1 1 # 2, maximum upto 100 upto 100 repeat until 100 3, for each position I test for mine 4 4 ,,, ,,,, ,,,, 4 4 ,#,, ,,,, ,,,, ,,,, lastly 4 4 ,,,, ,,,, ,,,, ,,,# 4, for each postion I put a ',' and surround it with mines 4 4 ,### # # # 4 4 , # # # lastly 4 4 # # # , I thought that these are reasonable and representative sets of testcases, But still Wrong answer, I am not sure what else could I test for, I would be glad if someone throw some light on further strategy to test this thing,

    Read the article

  • Python MySQLdb placeholders syntax

    - by ensnare
    I'd like to use placeholders as seen in this example: cursor.execute (""" UPDATE animal SET name = %s WHERE name = %s """, ("snake", "turtle")) Except I'd like to have the query be its own variable as I need to insert a query into multiple databases, as in: query = """UPDATE animal SET name = %s WHERE name = %s """, ("snake", "turtle")) cursor.execute(query) cursor2.execute(query) cursor3.execute(query) What would be the proper syntax for doing something like this?

    Read the article

  • Should we tell our expected and current CTC just in mail before interview?

    - by jitendra
    Should we tell our expected and current CTC just in mail before interview? I read on many resume advices "never put salary info in resume" but these day every company ask expected CTC then takes interview. What should i give in reply to this type of mail where company is asking for expected and current CTC before interview? Can they appoint me directly , without interview? Should i ask any other question to company before giving expected and current CTC? Hi, This is Mikel from london I found your resume on a job portal and it's very good .We have very urgent requirements @ london. Requirement1 : Senior Web Designer Experience: min4+yrs Skills:HTML,Adobe Photoshop, Javascript,CSS, Dreamweaver,Accessibility Etc.. If you looking for change just forward your latest resume to [email protected] along with these details Contact Number: Current CTC: Expected CTC: Notice Period: Current Location: Like to Relocate to London (Y/N):

    Read the article

  • Resources for how to design graph/charts well

    - by wesgarrison
    One of my projects needs to show users where they rank in certain calculations. I inherited the graph structure from the previous programmer and had to leave it alone while I worked on other parts of the site. It's time to make the graphs more meaningful, so I'm looking for books/websites/etc about graphs. (Not graph theory!) Charts that convey comparisons at a glance. Everyone suggests The Visual Display of Quantitative Information by Edward Tufte and that's spot on for what I'm looking for, so anything related to that would be great. Naturally, personal experience about what to do or not would be helpful as well.

    Read the article

  • Using native MySQL driver in Erlang

    - by Mickey Shine
    I am using native MySQL driver (http://code.google.com/p/erlang-mysql-driver/) with mochiweb. When I tried that MySQL driver in shell mode, all woked fine. But when I write some code with Mochiweb, it reported me the following error: =CRASH REPORT==== 4-Jul-2009::04:44:29 === crasher: initial call: mochiweb_socket_server:acceptor_loop/1 pid: <0.61.0> registered_name: [] exception error: no function clause matching mysql:fetch(p1,<<"SELECT * FROM cdb_forums LIMIT 10">>) in function perly_web:loop/2 in call from mochiweb_http:headers/5 ancestors: [perly_web,perly_sup,<0.58.0>] messages: [] links: [<0.60.0>,#Port<0.965>] dictionary: [{mochiweb_request_body,undefined}, {mochiweb_request_qs,[]}, {mochiweb_request_post,[]}, {mochiweb_request_path,"/online"}, {mochiweb_request_cookie, [{"04c_sid","hG9Oyv"}, {"04c_visitedfid","2"}, {"kQx_cookietime","2592000"}, {"kQx_loginuser","admin"}, {"kQx_activationauth", "98b3mdX86fKT9dI4WyKuL61Tqxk%2BW1r6ACpHp9y8itH2xQ"}, {"smile","1D1"}]}] trap_exit: false status: running heap_size: 1597 stack_size: 24 reductions: 5188 neighbours: The code I write in Mochiweb is start(Options) -> {DocRoot, Options1} = get_option(docroot, Options), Loop = fun (Req) -> ?MODULE:loop(Req, DocRoot) end, % we’ll set our maximum to 1 million connections. (default: 2048) mochiweb_http:start([{max, 1000000}, {name, ?MODULE}, {loop, Loop} | Options1]), mysql:start_link(p1, "10.0.0.123", "root", "root", "test"). stop() -> mochiweb_http:stop(?MODULE). loop(Req, DocRoot) -> "/" ++ Path = Req:get(path), case Req:get(method) of Method when Method =:= 'GET'; Method =:= 'HEAD' -> case Path of "online" -> Result1 = mysql:fetch(p1, <<"SELECT * FROM cdb_forums LIMIT 10">>), Body1 = io:format("Result1: ~p~n", [Result1]), Req:ok({"text/plain", Body1}); The connection looks good but when I added Result1 = mysql:fetch(p1, <<"SELECT * FROM cdb_forums LIMIT 10">>), it crashed. Can someone help me? Thanks in advance~ //================================================== updated: I noticed the follwoing information. If that is correct? =PROGRESS REPORT==== 4-Jul-2009::05:49:32 === supervisor: {local,kernel_safe_sup} started: [{pid,<0.65.0>}, {name,inet_gethost_native_sup}, {mfa,{inet_gethost_native,start_link,[]}}, {restart_type,temporary}, {shutdown,1000}, {child_type,worker}] mysql_conn: greeting version "5.1.33-log" (protocol 10) salt "ne0_m'vA" caps 63487 serverchar <<8,2,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0>> salt2 "!|o;vabJ*4bt" mysql_auth send packet 1: <<5,162,0,0,64,66,15,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,114,111,111,116,0,20,52,235,78, 173,36,251,201,242,172,139,113,231,253,181,245,3, 91,198,111,135>> Link: {ok,<0.62.0>} =SUPERVISOR REPORT==== 4-Jul-2009::05:49:32 === Supervisor: {local,perly_sup} Context: start_error Reason: ok Offender: [{pid,undefined}, {name,perly_web}, {mfa, {perly_web,start, [[{ip,"0.0.0.0"}, {port,8000}, {docroot, "/work/mochiweb-read-only/scripts/perly/priv/www"}]]}}, {restart_type,permanent}, {shutdown,5000}, {child_type,worker}]

    Read the article

  • Google Charts Through CURL

    - by swt83
    I have a PHP class that helps me generate URLs for custom charts using Google Chart service. These URLs work fine when I load them in my browser, but I'm trying to pull them using CURL so I can access the charts on secure https websites. Whenever I try and pull a chart via CURL, I get an Error 400 Bad Request. Any idea on how to get around this? Everything I have tried has failed. $url = urldecode($_GET['url']); $session = curl_init($url); // Open the Curl session curl_setopt($session, CURLOPT_HEADER, false); // Don't return HTTP headers curl_setopt($session, CURLOPT_RETURNTRANSFER, true); // Do return the contents of the call $image = curl_exec($session); // Make the call #header("Content-Type: image/png"); // Set the content type appropriately curl_close($session); // And close the session die($image);

    Read the article

  • group inlines in django admin

    - by pablo
    Hi I have a two models, Model1 and Model2. Model2 has a FK to Model1 and FK to iteself. In the admin I show Model2 as inlines in Model1 change_form. I want to modify the way the inlines are shown in the admin. I need to group all the instances that have the same parent_model2 and display them as a readonly field with a string of 'childs' in the parent Model2 instance. I know how to use itertools.groupby (or the django version) but don't know how to do it in the admin. What should I override to be able to iterate over all the Model2 instances, group them by parent, add children to the parent and remove children from the inlines? class Model1(models.Model): name = models.CharField() class Model2(models.Model): name = models.CharField() fk_model1 = models.ForeignKey('self', blank=True, null=True) parent_model2 = models.ForeignKey('self', blank=True, null=True) Thanks

    Read the article

  • SQL SERVER FIX : ERROR : 4214 BACKUP LOG cannot be performed because there is no current database b

    I recently got following email from one of the reader.Hi Pinal,Even thought my database is in full recovery mode when I try to take log backup I am getting following error.BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.Smo)How to fix it?Thanks,[name and email removed as requested]Solution / Fix:This error can [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Installing and using 32-bit software in 64-bit Linux

    - by Isxek
    Is there a way to install and run i386 software packages inside an AMD64 version of Xubuntu (v9.10)? Just to get an idea, how much effort would it require to port it to something usable within the said OS. I imagine it would be a lot. Thanks! If you need more info (specs, etc.) let me know.

    Read the article

  • Jquery Fast image switching

    - by echedey lorenzo
    Hi, I have a php class that generates a map image depending on my db data. It is periodically updated thru a serInterval loop. I am trying to update it with no flickering but I just can't. I've tried different methods (preloader, imageswitcher) with no success. //first load function map() { $("#map").html("<img src=map.php?randval="+Math.random()+">"); } //update it from setInterval calls function updatemap() { $("#map").fadeOut(function() { $(this).load(function() { $(this).fadeIn(); }); $(this).attr("src", "map.php?randval="+Math.random()); }) } Is there any way to update the image with no flickering at all? I would prefer an inmediate swap insteado of a fade. The problem I'm having is that after calling updatemap() the image just dissapears. ¿Maybe it is a problem with the attribute src I am parsing? THanks for your help.

    Read the article

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