Daily Archives

Articles indexed Saturday May 1 2010

Page 12/76 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Ordering Wordpress posts by most recent comment

    - by James
    I'm wanting to order Wordpress posts by the most recent comment. To the best of my knowledge this isn't possible using the WP_Query object, and would require a custom $wpdb query, which I can easily write. However, I then don't know how to setup the loop to run off this object. Can anyone help?

    Read the article

  • iChat or Gtalk won't connect to AIM. How can I fix this?

    - by classicrock985
    I can sign onto AIM.com and I know my account is active because I can sign in on my iPhone or AIM express. I can't however log in using any 3rd part applications. I've tried logging in using Adium, iChat, and Gmail Chat (Gchat) I have tried to change my port to "443" and changed the server name to something different. This is so weird. Any suggestions??

    Read the article

  • Access: strange results with queries against MDB file

    - by Craig Johnston
    I am running the following SQL against an MDB file, a copy of which is located here: http://hotfile.com/dl/40641614/2353dfc/test.mdb.html (perfectly clean file, no macros or viruses) SELECT datediff("d", MAX(invoice.date), Now) As Date_Diff , MAX(invoice.date) AS max_invoice_date , customer.number AS customer_number FROM invoice INNER JOIN customer ON invoice.customer_number = customer.number GROUP BY customer.number If the the following was added: HAVING datediff("d", MAX(invoice.date), Now) > 365 would this simply exclude rows with Date_Diff <= 365? What should be the effect of the HAVING clause here?

    Read the article

  • Generating PDF document using XSLT

    - by Nair
    I have one huge XML document. I have set of XSL representing each node in the XML. These XSL also have java script to generate the dynamic content. It uses images which are in seperate images folder and it uses fonts as well. At present, I have a program which displays all the nodes that can be transformed and user click on one of the node and the program performs XSLT and display the content in HTML format on IE screen. I want to write a program (.Net , C# or any .Net language) which will allow user to do XSLT tranform on all the available notes and create one PDF document. My initial requirement was to display all the document in the IE itself, so I reused the existing code, and foreach node, perform XSLT and then append it to the current HTML with a page break and it worked ok till we hit huge files. So the requirement changed to create one PDF file with all the nodes. I have couple of questions, 1. What is the best way to create PDF file using XSLT transformation? 2. Since the images are relative path, if we generate the XSLT in html and then write it to a output stream will it loose the images? 3. Will the font be preserved in the PDF document? Really appriciate if someone could point me to some good example that I can take and run with it. Thanks a lot.

    Read the article

  • UIImage created from CGImageRef fails with UIImagePNGRepresentation

    - by Ari J.R.
    I'm using the following code to crop and create a new UIImage out of a bigger one. I've isolated the issue to be with the function CGImageCreateWithImageInRect() which seem to not set some CGImage property the way I want. :-) The problem is that a call to function UIImagePNGRepresentation() fails returning a nil. CGImageRef origRef = [stillView.image CGImage]; CGImageRef cgCrop = CGImageCreateWithImageInRect( origRef, theRect); UIImage *imgCrop = [UIImage imageWithCGImage:cgCrop]; ... NSData *data = UIImagePNGRepresentation ( imgCrop); -- libpng error: No IDATs written into file Any idea what might wrong or alternative for cropping a rect out of UIImage? Many thanks!

    Read the article

  • rspec testing a controller post changing my params from symbols to strings and breaking my tests

    - by ssmithstone
    In my controller spec I am doing this: it "should create new message" do Client.should_receive(:create).with({:title => 'Mr'}) post 'create' , :client => {:title => "Mr" } end ... and in my controller I am doing ... def create client = Client.create(params[:client]) end However this is failing with the following error message : expected: ({:title=>"Mr"}) got: ({"title"=>"Mr"}) I'm wondering why this is happening and how to get it to work

    Read the article

  • Calculation of charged traffic in GPRS network

    - by TyBoer
    I am working with a distributed application communicating over GPRS. I use UDP packets to send business data and ICMP pings to verify connectivity. And now I have a problem with calculating a traffic for which I will be charged by the provider. I have to consider following factors: UDP payload: that is obvious. UDP overhead: UDP header + IP header = 8 + 20 bytes. ICMP echo request without data: IP header + ICMP payload = 28 bytes. ICMP echo reply: as in 3. Above means that for evey data packet I am charged for payload + 28 bytes and for every ping 56 bytes. Am I right or I am missing/misunderstanding something?

    Read the article

  • Export PDF pages to a series of images in Java

    - by dasp
    I need to export the pages of an arbitrary PDF document into a series of individual images in jpeg/png/etc format. I need to do this in in Java. Although I do know about iText, PDFBox and various other java pdf libraries, I am hoping for a pointer to some working example, or some how-to. Thanks.

    Read the article

  • HTML/CSS layout question

    - by TheDelChop
    Guys, I just need a little help with some CSS layout if you don't mind. I've got three things I'm trying to play around with and I need some help making this work the way I was hoping. I've got the element of a page, which I'd like to be 100% of the browser window, obviously. Then I've got two elements which I'd like to stack on top of each other, but the trick is this, I'd like the bottom div, (a menu which should really be a fixed height) to determine the height of the top div. Is there a way to lay this out in CSS?

    Read the article

  • Strategies for memory profiling

    In this whitepaper, Red Gate discusses the importance of handling two common issues in memory management: memory leaks and excessive memory usage. Red Gate demonstrates how their ANTS Memory Profiler can identify issues with memory management and provide a detailed view of a program's memory usage. This whitepaper doubles as a brief tutorial for using the ANTS Memory Profiler by providing an example of a program that is experiencing memory management issues.

    Read the article

  • How do I enable a disabled Event Notification.

    - by Derick Mayberry
    I have a scenerio where I am using external notification to process documents being sent in from the entire navy fleet, normally I have no problems, but just a few days ago an administrator changed passwords and I my queue processing failed and I rolled back the transaction with this C# code: catch (Exception) { TransporterService.WriteEventToWindowsLog(AppName, "Rolling Back Transaction:", ERROR); broker.Tran.Rollback(); break; } after which my target queue would continue to fill up but nothing to the external activation queue. Does the Event Notification get disabled once a transaction is rolled back? Should I have done a broker.EndDialog here when catching my exception? Also, after my event notification is disabled(if that is actually whats happening) how do I re engage it? Do I have to drop it and recreate it? Thank in advance for any help, I love Service Broker and its workign wonderfully except for this bug that I hope to fix soon.

    Read the article

  • What are the most useful Vi/Vim Commands that you wish you'd discovered earlier?

    - by faceless1_14
    I personally learn by experimentation as opposed to reading documentation. A consequence of this is it takes me a long time to learn some of the useful features of a language like e going to the end of a word or 0 to go to the beginning of a line or $ for the end of a line as well as dd deleting a line What are some Vi/Vim commands that you find most useful but didn't know existed when you were first using Vi/Vim.

    Read the article

  • JQuery Json error: Object doesn't support this property or method

    - by Abu Hamzah
    ERROR: Microsoft JScript runtime error: Object doesn't support this property or method i am using WCF service to pull the data and its very simple for the purpose of test and it does returning me the data from wcf service but it fails on json2.js on line number 314-316 // We split the first stage into 4 regexp operations in order to work around // crippling inefficiencies in IE's and Safari's regexp engines. First we // replace all backslash pairs with '@' (a non-JSON character). Second, we // replace all simple value tokens with ']' characters. Third, we delete all // open brackets that follow a colon or comma or that begin the text. Finally, // we look to see that the remaining characters are only whitespace or ']' or // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@'). replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { here is what i am doing function serviceProxy(wjOrderServiceURL) { var _I = this; this.ServiceURL = wjOrderServiceURL; // *** Call a wrapped object this.invoke = function (options) { // Default settings var settings = { serviceMethod: '', data: null, callback: null, error: null, type: "POST", processData: false, contentType: "application/json", dataType: "text", bare: false }; if (options) { $.extend(settings, options); } function GetFederalHolidays() { $("#dContacts1").empty().html('Searching for Active Contacts...'); ContactServiceProxy.invoke({ serviceMethod: "Holidays", callback: function (response) { // ProcessActiveContacts1(response); debugger }, error: function (xhr, errorMsg, thrown) { postErrorAndUnBlockUI(xhr, errorMsg, thrown); } }); } any help what iam doing wrong? i try to change from dataType: text to json but i get the same error above.

    Read the article

  • How to log into a salesforce.com sandbox?

    - by wesgarrison
    I took over a Rails app and am trying to get the Salesforce.com API credentials set up for my user account. I'm set as a system admin with "Developer Mode" on (though I have no clue what that does, I just saw it set on the previous account.) We have a sandbox. I click the login link on it, enter my sandbox username ([email protected]), enter my password, and get "Login attempt has failed". I know my password is okay since I've logged into the production site several times. Using different domains (test.salesforce.com, etc) doesn't help either.

    Read the article

  • Microsoft JScript runtime error: '(function name)' is undefined

    - by Velika2
    Microsoft JScript runtime error: 'txtGivenName_OnFocus' is undefined After adding what I thought was unrelated javascript code to a web page, I am suddenly getting errors that suggest that the browser cannot locate a javascript function that, to me, appears plain as day in design mode. I'm thinking that this is a load sequence order problem of some sort. Originally, my script was at the bottom of the page. I did this with the intent of helping my site's SEO ranking. When I moved the function to the top of the web page, the error went away. Now it is back. I have a feeling someone is going to suggest a jQuery solution to execute some code only when the page is fully loaded. I'm I ignorant of jQuery. IfjQuery is given in the answer, please explain what I need to do (references, placement of script files) for VS 2010 RTM. I am trying to set the focus to the first textbox on the webpage and preselect all of the text in the textbox More info: If I disable this Validator, the problem goes away: <asp:CustomValidator ID="valSpecifyOccupation" runat="server" ErrorMessage="Required" ClientValidationFunction="txtSpecifyOccupation_ClientValidate" Display="Dynamic" Enabled="False"></asp:CustomValidator> function txtSpecifyOccupation_ClientValidate(source, args) { var optOccupationRetired = document.getElementById("<%=optOccupationRetired.ClientID %>"); if (optOccupationRetired.checked) { args.IsValid = true; } else { var txtSpecifyOccupation = document.getElementById("<%=txtSpecifyOccupation.ClientID %>"); args.IsValid = ValidatorTrim(txtSpecifyOccupation.value) != ""; } }

    Read the article

  • Populating a PHP array within a foreach loop

    - by patrick
    I am wanting to add each user into an array and check for duplicates before I do. $spotcount = 10; for ($topuser_count = 0; $topuser_count < $spotcount; $topuser_count++) //total spots { $spottop10 = $ids[$topuser_count]; $top_10 = $gowalla->getSpotInfo($spottop10); $usercount = 0; $c = 0; $array = array(); foreach($top_10['top_10'] as $top10) //loop each spot { //$getuser = substr($top10['url'],7); //strip the url $getuser = ltrim($top10['url'], " users/" ); if ($usercount < 3) //loop only certain number of top users { if (($getuser != $userurl) && (array_search($getuser, $array) !== true)) { //echo " no duplicates! <br /><br />"; echo ' <a href= "http://gowalla.com'.$top10['url'].'"><img width="90" height="90" src= " '.$top10['image_url'].' " title="'.$top10['first_name'].'" alt="Error" /></a> '; $array[$c++] = $getuser; } else { //echo "duplicate <br /><br />"; } } $usercount++; } print_r($array); } The previous code prints: Array ( [0] => 62151 [1] => 204501 [2] => 209368 ) Array ( [0] => 62151 [1] => 33116 [2] => 122485 ) Array ( [0] => 120728 [1] => 205247 [2] => 33116 ) Array ( [0] => 150883 [1] => 248551 [2] => 248558 ) Array ( [0] => 157580 [1] => 77490 [2] => 52046 ) Which is wrong. It does check for duplicates, but only the contents of each foreach loop instead of the entire array. How is this if I am storing everything into $array?

    Read the article

  • How to get Wordpress MU / BuddyPress wp_signup meta data

    - by Ryan
    I am trying to get a value from the meta data that is stored in the wp_signups table for a Wordpress MU / BuddyPress installation. I see it's stored in the meta field as s:3:"age";s:2:"25"; ...which is age = 25 I put the information there using $usermeta['age'] = $_POST['signup_age']; in a plugin subscribing the the bp_signup_usermeta filter. I need to get it back during a function subscribing to bp_before_activate_content. How can I do this? Whats the function call? (searched documentation to no avail)

    Read the article

  • Getting a scriptmanager into a dynamically rendered page

    - by AndreasKnudsen
    Hi, We are rendering usercontrols dynamically like this: public string RenderControl(string pathcontrol) { string html; var page = new Page(); var control = page.LoadControl(path); page.Controls.Add(control); // do stuff to the control (give it some data to work on) using (var writer = new StringWriter()) { HttpContext.Current.Server.Execute(page, writer, false); html = writer.ToString(); } return html; } This lets us the same user controls when rendering pages normally as we do when rendering responses to ajax calls. However, when adding controls which themselves contain a scriptmanagerProxy we run into the problem that the newed up Page object doesn't contain either a ScriptManager or the HtmlForm in which the ScriptManager needs to run. Is there any way around this? Yours Andreas

    Read the article

  • Warning: Why your Internet might fail on May 5

    <b>IT News:</b> "On May 5, the world's top domain authorities (led by ICANN, the US Government and Verisign) will complete the first phase of the roll-out of DNSSEC (Domain Name System Security Extensions) across the 13 root servers that direct user requests to the relevant websites on the internet."

    Read the article

  • Microsoft annule son projet de tablette Courier, l'objet ne sera pas mis en production

    Mise à jour du 30.04.2010 par Katleen Microsoft annule son projet de tablette Courier, l'objet ne sera pas mis en production L'information est courte, claire et concise. Microsoft vient à la fois de confirmer l'existence d'une tablette Courier, et d'en annoncer la mort. Voici donc un rival de moins pour l'iPad d'Apple. C'est Frank Shaw, chargé de communication pour Microsoft, qui a fait -il y a à peine quelques heures- la déclaration suivante aux médias américains : «A tout moment, de nouvelles idées sont expérimentées, testées et incubées. C'est dans l'ADN de Microsoft. Le projet «Courier» en est un exemple. Sa technologie sera évaluée pour un usage futur, mais nous ne prévoyon...

    Read the article

  • about null values!

    - by user329820
    Hi I have a question that if we declare a variable and then do not set it explicitly to null value then it would be null outomatically ,i mean that the below code will return true or false ? thanks DECLARE @val CHAR(4) If @val = NULL

    Read the article

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