Daily Archives

Articles indexed Thursday May 13 2010

Page 17/119 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Problem prompting user for extended permissions using showPermissionDialog in FB page tab

    - by snipe
    I have an FBML app that will use the tab as a promo tab before the full app goes live. The purpose of the promo tab is to allow users to opt in to email notifications (using the FB API sendNotifications call), so I need to prompt them to allow the app and grant extended permissions on that promo tab. The tab code is: <?php require_once 'config.php'; ?> <form id="form1"> <h1> <a href="#" clickrewriteform="form1" clickrewriteurl="http://www.mydomain.com/fanpageajax/result.php" clickrewriteid="allowapp">Step 1. Allow the Application</a> </h1> <div id="allowapp"></div> </form> <h1><a onclick="Facebook.showPermissionDialog('email');return false;"> Step 2. Grant extended permissions (intab)</a></h1> The result.php page just tags the API to ensure the allow prompt will show up. The problem is with the Step 2. Once the user has allowed the app, and they click on the Step 2, nothing happens. If they click on it twice, THEN the extended permissions dialog box popups up, but it asks them to grant extended permissions TWICE. OR.... If the user clicks on Step 1, and allows the app, and then reloads the fan page tab, they only have to click on the Step 2 link once, and the permissions show up. Anyone have any ideas? I have been beating myself in the head over this for hours.

    Read the article

  • Zend_XmlRpc :Failed to parse response error

    - by davykiash
    Am trying to get a simple hello world XMLRPC server setup to work.However I get this Failed to parse response error error when I run the test URL http://localhost/client/index/ on my browser In my Rpc Controller that handles all my XMLRPC calls class RpcController extends Zend_Controller_Action { public function init() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); } public function xmlrpcAction() { $server = new Zend_XmlRpc_Server(); $server->setClass('Service_Rpctest','test'); $server->handle(); } } In my client Controller that calls the XMLRPC Server class ClientController extends Zend_Controller_Action { public function indexAction() { $clientrpc = new Zend_XmlRpc_Client('http://localhost/rpc/xmlrpc/'); //Render Output to the view $this->view->rpcvalue = $clientrpc->call('test.sayHello'); } } In my Service_Rpctest function <?php class Service_Rpctest { /** * Return the Hello String * * @return string */ public function sayHello() { $value = 'Hello'; return $value; } } What am I missing?

    Read the article

  • Zend Cache is not retrieving cache items after some period of time

    - by Phil
    Hi, I am using Zend Cache with page caching but it seems to miss the cache after a period of time. For a while it is OK, but I come back tomorrow and hit the page, it doesn't fetch the contents from the cache. why? $frontendOptions = array( 'content_type_memorization' => true, // This remembers the headers, needed for images 'lifetime' => NULL, // cache lifetime forever 'automatic_serialization' => true, 'automatic_cleaning_factor' => 0 ); $myPageCache = new Zend_Cache_Frontend_Page(array( 'debug_header' => false, 'automatic_cleaning_factor'=>0, 'content_type_memorization' => true, 'default_options' => array( 'cache' => true, 'cache_with_get_variables' => true, 'cache_with_post_variables' => true, 'cache_with_session_variables' => true, 'cache_with_cookie_variables' => true ))); $backendOptions = array('cache_dir' => '.' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR); $cache = Zend_Cache::factory($myPageCache, 'File', $frontendOptions, $backendOptions); $cacheKey = hash('md5', "cache_" . $cachePath); // cachePath is the key I use for the cache if(!$cache->start($cacheKey)) { I output html here $cache->end(); }

    Read the article

  • Is my dns server being attacked? And what should I do about it?

    - by Mnebuerquo
    I've been having some intermittent dns problems with a web server, where certain isp's dns servers don't have my hostnames in cache and fail to look them up. At the same time, queries to opendns for those hostnames resolve correctly. It's intermittent, and it always works fine for me, so it's hard to identify the problem when someone reports connectivity problems to my site. In trying to figure this out, I've been looking at my logs to see if there are any errors I should know about. I found thousands of the following messages in my logs, from different ip's, but all requesting similar dns records: May 12 11:42:13 localhost named[26399]: client 94.76.107.2#36141: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:42:13 localhost named[26399]: client 94.76.107.2#29075: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:42:13 localhost named[26399]: client 94.76.107.2#47924: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:42:13 localhost named[26399]: client 94.76.107.2#4727: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:42:14 localhost named[26399]: client 94.76.107.2#16153: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:42:14 localhost named[26399]: client 94.76.107.2#40267: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:43:35 localhost named[26399]: client 82.209.240.241#63507: query (cache) 'burningpianos.com/MX/IN' denied May 12 11:43:35 localhost named[26399]: client 82.209.240.241#63721: query (cache) 'burningpianos.org/MX/IN' denied May 12 11:43:36 localhost named[26399]: client 82.209.240.241#3537: query (cache) 'burningpianos.com/MX/IN' denied I've read of Dan Kaminski's dns cache poisoning vulnerability, and I'm wondering if these log records are an attempt by some evildoer to attack my dns server. There are thousands of records in my logs, all requesting "burningpianos", some for com and some for org, most looking for an mx record. There are requests from multiple ip's, but each ip will request hundreds of times per day. So this smells to me like an attack. What is the defense against this?

    Read the article

  • Fn + Right Arrow on MacBook Pro does not work as END Key for SuperUser web site

    - by George2
    Hello everyone, I am using a MacBook Pro running Mac OS X 10.5. I am new to this development environment, and previously worked on Windows. I have tried that Fn + Right arrow on Mac works as "END" key on Windows -- which makes cursor move to the end of line, for most application like Word for Mac -- I have tried it works. But I tried Fn + Right Arrow does not work for current question input box of SuperUser. I am wondering how to solve this issue and why? Does anyone have the same issue for me? thanks in advance, George

    Read the article

  • C++ casted realloc causing memory leak

    - by wyatt
    I'm using a function I found here to save a webpage to memory with cURL: struct WebpageData { char *pageData; size_t size; }; size_t storePage(void *input, size_t size, size_t nmemb, void *output) { size_t realsize = size * nmemb; struct WebpageData *page = (struct WebpageData *)output; page->pageData = (char *)realloc(page->pageData, page->size + realsize + 1); if(page->pageData) { memcpy(&(page->pageData[page->size]), input, realsize); page->size += realsize; page->pageData[page->size] = 0; } return realsize; } and find the line: page->pageData = (char *)realloc(page->pageData, page->size + realsize + 1); is causing a memory leak of a few hundred bytes per call. The only real change I've made from the original source is casting the line in question to a (char *), which my compiler (gcc, g++ specifically if it's a c/c++ issue, but gcc also wouldn't compile with the uncast statement) insisted upon, but I assume this is the source of the leak. Can anyone elucidate? Thanks

    Read the article

  • What is so great about STL?

    - by Zygrob
    Hello StackOverflow. I am a Java developer trying to learn C++. I have many times read over the web (including StackOverflow) that STL is the best collections library that you can get in *any* language. (Sorry, I do not have any citations atm) However after studying some STL, I am really failing to see what makes STL so special. Would you please shed some light on what sets STL apart from the collection libraries of other languages and make it the _best_ collection library? Thanks in advance, Zygr??b.

    Read the article

  • Validating button click event using JS from inside ascx nested inside updatepanel

    - by Viswa
    Hello I have a button inside an ascx inside an update panel inside aspx content page. When the button is clicked i want it to run a JS function that causes to show a panel. Here is my Code. <pre> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABC.ascx.cs" Inherits="App.ABC" %> <script type= "text/javascript" language="javascript"> var val1=0; var val2=0; function ShowPanel(val2) { if(val2 != 0) { switch(val2) { case 1 : document.getElementById('<%=pnl1.ClientID%>').style.visibility = 'visible'; break; } } return false; } </script> <asp:LinkButton ID="lbl1" runat="server" OnClick="return ShowPanel(1);">count</asp:LinkButton> I am not sue how to do this. Please help Update #1 - ABC.ascx is in updatepanel in the aspx page XYZ.aspx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABC.ascx.cs" Inherits="App.ABC" %> <script type= "text/javascript" language="javascript"> var val1=0; var val2=0; function ShowPanel(val2) { if (val2 != 0) { switch (val2) { case 1: document.getElementById("<%= this.pnl1.ClientID%>").style.display = "none"; break; } } return false; } </script> <div> <div style="text-align:center"> </div> <table style="width:100%; text-align:center; border-color:#99CCFF" border="3"> <tr style="text-align:left"> <td><asp:LinkButton ID="lbl1" runat="server" OnClientClick="return ShowPanel(1);">count</asp:LinkButton> </td> <td style="text-align:right"><asp:Button ID="btnHide1" runat="server" Text="hide" Height="18px" Width="32px"/> </td> </tr> <tr> <td colspan="2"><asp:Panel ID="pnl1" runat="server" Visible="false"> </asp:Panel> </td> </tr> </table> </div>

    Read the article

  • Creating database desktop application with data manipulation in Netbeans using Java Persistence

    - by Lulu
    It's my first time to use Persistence in developing a Java program because I usually connect via JDBC. I read that for large amounts of data, it is best to use persistence. I tried playing with the CRUD example of Netbeans. It's not very helpful thought because it only connects to the DB and allows addition and deletion of records. I need something that will allow me to manipulate the data like if the value from column C1 of table T1 is such, it will retrieve data from table t2. In short, I need to apply conditions before knowing what to retrieve exactly. The example in CRUD example already has a specific table to retrieve and only acts like a database manager. How is it possible to retrieve a specific item first then from this, will determine the next steps to be done. I'm also using embedded JavaDB/Derby as my database (also my first time to use because I usually use remote mysql)

    Read the article

  • find: Prevent .git folders from printing to STDOUT

    - by Nathan Neff
    Hello, I have a find command that I run, to find files named 'foo' in a directory. I want to skip the ".git" directory. The command below works, EXCEPT, it prints an annoying ".git" any time it skips a .git directory find . ( -name .git ) -prune -o -name 'foo' How can I prevent the skipped ".git" directories from printing to STDOUT? Thanks, --Nate

    Read the article

  • why do ppl hate java ?

    - by dfafa
    so today in my Java class.... someone bluntly stated today, it's piece of ** and the professor laughed too. some girl said she's slower in coding because of Java.... why such hatred for Java ?

    Read the article

  • html post issue

    - by Amarsh
    i have the following html code : <FORM name=frmmail> <input id="dochtmlContent" type="hidden" name="dochtmlContent" value="oldValue"/> <script>document.dochtmlContent="newValue"</script> </FORM> and later on in a javascrip function (which is called upn submit): alert(document.dochtmlContent); document.frmmail.method = "post"; document.frmmail.ENCTYPE = "application/x-www-form-urlencoded"; document.frmmail.action = "/myServlet"; document.frmmail.submit(); Basically, I am declaring a hiden variable, changing its value and submitting it. The issue is, while I see an alert box displaying "newValue", when I submit it, my servlet recieves the "oldValue" for the dochtmlContent parameter. Can someone suggest whats wrong here.

    Read the article

  • In the iPad SplitView template, where's the code that specifies which views are to be used in the Sp

    - by Dr Dork
    In the iPad Programming Guide, it gives the following code example for specifying the two views (firstVC and secondVC) that will be used in the SplitView... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { MyFirstViewController* firstVC = [[[MyFirstViewController alloc] initWithNibName:@"FirstNib" bundle:nil] autorelease]; MySecondViewController* secondVC = [[[MySecondViewController alloc] initWithNibName:@"SecondNib" bundle:nil] autorelease]; UISplitViewController* splitVC = [[UISplitViewController alloc] init]; splitVC.viewControllers = [NSArray arrayWithObjects:firstVC, secondVC, nil]; [window addSubview:splitVC.view]; [window makeKeyAndVisible]; return YES; } but when I actually create a new SplitView project in Xcode, I don't see any code that specifies which views should be added to the SplitView. Here's the code from the SplitView template... - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch rootViewController.managedObjectContext = self.managedObjectContext; // Add the split view controller's view to the window and display. [window addSubview:splitViewController.view]; [window makeKeyAndVisible]; return YES; } Thanks in advance for all your help! I'm going to continue researching this question right now.

    Read the article

  • JQuery drag and Drop

    - by dremay
    I wish to create an Interface to choose Multiple answers using Drag & Drop rather than CheckBox near to the answers. User can choose two types of answers (Real Answer and a Fake Answer). The User has Two Images (for Real & Fake) on the answer page. User can drag an Image and drop near to the selected answer. It is possible to change the selection by moving the "image and drop over some other answer". I have used a "div formatted with an image" near to all answers, so user can drop the image (ie fake or real image) over this "div". I have used JQuery to move the "image" and drop over the "div". Now I need add the code to the "div" (ie container used to hold the image) to identify which "image is placed over it" ie either "fake or real".

    Read the article

  • getting started with lex

    - by cambr
    I need to format some hexdump like this: 00010: 02 03 04 05 00020: 02 03 04 08 00030: 02 03 04 08 00010: 02 03 04 05 00020: 02 03 04 05 02 03 04 05 02 03 04 08 to 02 03 04 05 02 03 04 08 02 03 04 02 03 04 05 02 03 04 05 02 03 04 05 02 03 04 a) remove the address fields, if present b) remove any 08 at the end of a paragraph (followed by an empty line) c) remove any empty lines How can this be done using lex? thanks!

    Read the article

  • Twitter API and rate limiting - I am confused

    - by jeffreyveon
    I am new to the Twitter API, and I looked at their whitelisting policies and I am a little confused... I'm basically writing a twitter aggregrator that crawls the public tweets of a set of users (not more than 200) hourly. I wanted to apply for whitelisting, and they seem to offer account based and IP based whitelisting. Since I am using a shared hosting, my outbound IP address might vary (and twitter does'nt allow IP ranges for whitelisting). So I am considering using account based whitelisting. However, while using OAuth, is it possible for me to use account based whitelisting for a background process that crawls the API hourly?

    Read the article

  • Windows powering off after login

    - by Jack
    As soon as I logon to Windows 7 64bit, the computer restarts. It isn't a hardware issue, as linux works fine. Windows 7 64 bit. Safe mode, last known good configuration etc, nothing makes any difference. Nor does startup repair or sfc. I used DaRT to check the event log, and nothing is recorded. How can I troubleshoot this?

    Read the article

  • Pointers to threads

    - by viswanathan
    Suppose i have pointer to a thread like this CWinThread *m_pThread = AfxBeginThread(StartThread, this, THREAD_PRIORITY_NORMAL, 0, 0); Now in my StartThread function assume i did all operations and the function returned like this UINT CClassThread::StartThread(LPVOID pVoid) { return true; } Will my m_pThread be invalid when the return statement is executed?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >