Search Results

Search found 21001 results on 841 pages for 'spelling check'.

Page 176/841 | < Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >

  • Checking online users with Facebook Javascript SDK

    - by Roman
    Hi, I'm trying to build some kind of a social game in facebook, where I need that every user that has approved my APP is able to receive notifications from me. When the user approves my App, I save his UID in the DB for future reference. At some later time, I want to make it possible for other users find partners for a game - so I need a way to pick randomly some user from my DB and check if he's online. Then, send him a message and propose to play with the current player. So 2 questions: How can I check if some user is online, using Javascript SDK? It seems that in the new Graph API I can't get the users' online status. How can I then send him a message and propose to play the game? When he approves to play - he is being forwarded to the game page. Many thanks in advance, Roman

    Read the article

  • Can't retrieve more than 2 gmail messages using Zend framework imap access - server dies - doens't r

    - by Ali
    Hi guys I'm working on a google apps application. Basically I've set it up so users can add multiple gmail addresses and check on their inboxes in the application. It works fine with a google apps email address however when I add a gmail address it just dies out. I'm using this code here: $mail = new Zend_Mail_Storage_Imap($mail_options); $all_messages = array(); $page = isset($_GET['page'])?$_GET['page']:1; $limit = isset($_GET['limit'])?$_GET['limit']:20; $offset = (($page-1)*$limit)+1; $end = ($page*$limit)>$c?$c:($page*$limit); for ($i=$offset;$i<=$end;$i++){ $h2t = new html2text(); $h2t->set_allowed_tags('<a>'); if(!$mail[$i]) break; else{ $one_message = $mail->getMessage($i); $one_message->id = $i; $one_message->UID = $mail->getUniqueId($i); $one_message->parts = array(); $one_message->body = ''; $count = 1; foreach (new RecursiveIteratorIterator($mail->getMessage($i)) as $ii=>$part) { try { $tpart = $part; //$tpart->_content = ''; $one_message->parts[$count] = $tpart; $count++; // check for html body if (strtok($part->contentType, ';') == 'text/html') { $b = $part->getContent(); if($part->contentTransferEncoding == 'quoted-printable') $b = quoted_printable_decode($b); $one_message->html_body = $b; $h2t->set_html($b); $one_message->body = $h2t->get_text(); } //check for text body if (strtok($part->contentType, ';') == 'text/plain') { $b = $part->getContent(); if($part->contentTransferEncoding == 'quoted-printable') $b = quoted_printable_decode($b); $one_message->text_body = $b; $one_message->body = $b;//$part->getContent(); } } catch (Zend_Mail_Exception $e) { // ignore } } $all_messages[] = $one_message; } } No matter what the emails it dies out on retrieving just 2 emails... whats going on here?

    Read the article

  • Broken Python installation on CentOS 5.8

    - by Beckett
    I already searched for solution to my problem via Google and stackoverflow's search facility, but haven't found anything related specifically to it. Here's the problem: I needed python 2.7.3 on CentOS 5.8 machine which has only python 2.4.3 preinstalled. Also neither there's the suitable version in it's repositories nor I can upgrade installed version. That's why I decided to build python from source code. But I've made a mistake: instead of make altinstall I did make install thus changing default version of the current installation. It was before I found this article - How to install Python 2.7.3 on CentOS 6.2 . I guess 5.8 and 6.2 versions aren't different to the extent this article is inapplicable. After installation of new python version I installed pip, but once I tried to invoke it, I got "No module named pkg_resources" error. In order to solve this issue I installed setuptools from repository. But it had only led to another error: "Distribution Not Found". My final step was to follow the guide I posted the link to, but I was unable to perform last step: easy_install-2.7 virtualenv command threw "-bash: /usr/local/bin/easy_install-2.7: .: bad interpreter: Permission denied" error. Now when I try to invoke pip or pip-2.7 both commands raise the same error with different names of binaries after "-bash:". Is there any way to fix this problem, so I could install new python version (2.7.3) alongside with the preinstalled one (2.4.3) according to the guide? Any help will be appreciated. P.S.: yum is working fine, although it needs python to function, so I hope the damage I unknowingly caused isn't very severe. Also I'm not a native English speaker, so I apologize for possible occasional grammatical and/or spelling errors.

    Read the article

  • CKEditor plugin: Hightlight selected text by hovering on a new item in the toolbar and selecting fro

    - by scottystang
    I'm new to the CKEditor and I'm trying to create a simple plugin. What I'm hoping to accomplish is to allow the user to highlight some text and then hover on a new item in the toolbar that drops down on mouse over a few different highlight color options for the text. For example, the user could highlight some text, hover on my new item and then select a highlight color. This will be similar to the 'BGColor' plugin except instead of opening a color palette to choose from, the user would select from a drop down of options similar to when you choose to change the font size you have a list of options such as '10', '11', '12', etc. Any help would be appreciated on how to pull this off. I was hoping to check out how 'BGColor' and 'FontSize' plugins where implemented, but I can't find these in ../ckeditor/_source/plugins. Am I looking in the right spot? Also, the link for plugins here - http://docs.cksource.com/CKEditor_3.x/Developers_Guide isn't clickable so I'm not sure if there's a place for plugin documentation that I can check out.

    Read the article

  • Testing a (big) collection retrieved from a db

    - by Bas
    I'm currently doing integration testing on a live database and I have the following sql statement: var date = DateTime.Parse("01-01-2010 20:30:00"); var result = datacontext.Repository<IObject>().Where(r => r.DateTime > date).First(); Assert.IsFalse(result.Finished); I need to test if the results retrieved from the statement, where the given date is less then the date of the object, have Finished set to False. I do not know how many results I get back and currently I'm getting the first object of the list and check if that object has Finished set to false. I know testing only the first item of the list is not valid testing, as a solution for that I could iterate through the list and check all items on Finished, but putting logic in a Test is kinda going against the concept of writing 'good' tests. So my question is: Does anyone have a good solution of how to properly test the results of this list?

    Read the article

  • Browsing \\computer\share fails, but net use \\computer\share works?

    - by JMD
    I've had mixed results with using Windows Explorer to browse remote file shares. The setup: I'm at work on Windows XP SP3 Files are at home on Windows XP SP3 Two separate VPNs are available to access my PC at home corporate OpenVPN (10.1.2.3) a Hamachi/LogMeIn connection (5.1.2.3) With respect to my problem, it doesn't matter which IP I use. They both perform exactly the same way: I expect that if I open Windows Explorer and type in \\10.1.2.3\Shared I should be interrupted with a challenge for credentials, and then be able to interact with the files in the share. However, I just get that annoying dialog, "Windows cannot find '\10.1.2.3\Shared' Check the spelling and try again, or try searching for the item ..." However, I can take that exact same computername/sharename and with net use I can: net use * \\10.1.2.3\Shared * /user:homecomputername\username with this result: Type the password for \\5.69.83.158\C$: Drive Z: is now connected to \\5.69.83.158\C$. The command completed successfully. I can then access the files in Z: in Windows Explorer which was my original intent. Even after Z: is already mapped and the credentials are cached I still cannot bring up \\10.1.2.3\Shared in Windows Explorer. Why does the latter work, but not the former? Edit: Other services work fine, such as RDP. (I have a problem in which I can't SSH home, but I'll consider that separately.)

    Read the article

  • How to log C++ exception if running outside debugger, otherwise rethrow

    - by Stefan Monov
    I wanna do something like this: int main() { try { runApp(); } catch(std::exception const& ex) { if(runningInDebugger()) throw; // let the IDE show me what went wrong else displayMsgBox("Something went wrong! " + ex.what()); } } Needs to work at least in VS2008 but the more debuggers it supports, the better. I want it to check for a debugger at runtime. I don't want to do "#ifdef NDEBUG", because I prefer not to do release builds at all (can't be bothered). So what should I use as a "runningInDebugger()" check?

    Read the article

  • how to implement double click in android

    - by Sanal Varghese
    I am doing a project in which i want to display a particular message on single touch and another message on double touch using android.How can i implement it. My sample code is below if(firstTap){ thisTime = SystemClock.u`enter code here`ptimeMillis(); firstTap = false; }else{ prevTime = thisTime; thisTime = SystemClock.uptimeMillis(); //Check that thisTime is greater than prevTime //just incase system clock reset to zero if(thisTime > prevTime){ //Check if times are within our max delay if((thisTime - prevTime) <= DOUBLE_CLICK_MAX_DELAY){ //We have detected a double tap! Toast.makeText(AddLocation.this, "DOUBLE TAP DETECTED!!!", Toast.LENGTH_LONG).show(); //PUT YOUR LOGIC HERE!!!! }else{ //Otherwise Reset firstTap firstTap = true; } }else{ firstTap = true; } } return false;

    Read the article

  • GitHub on windows :|

    - by Sonic Soul
    i've been experimenting with github as my personal code rep.. and it has been a bit of a disaster with windows. i've used Subversion, CVS, and Perforce in the past.. none were as annoying to use as github. i've figured out the PGP part, although my workstation no longer lets me check in, and after searching around it turns out that github bash is using putty which is not that reliable and should be configured with something else.. i was not able to configure it with windows shell extension for a nice visual of what is part of the repository, what is modified, and easy check ins, and easy pushes.. has anyone successfully configured some kind of windows shell client and can efficiently and quickly synchronize various machines? It just seems to be more pain to use than it is worth..

    Read the article

  • What port is my SQL2008 instance running on?

    - by George
    Check out this pic of my SQL 2008 Management Configuration screen for TCP: I need to know what port I am running on. Base on this previous post, I don't believe that it is 1433, which I guess is the default. When I check my port number in SQL Config Mgr., it is blank. Does this suggest a default port? Note that I have multiple SQL Server instance on the db server. 1 2000 instance and two 2008 instances. I want to know the port of the 2008b instance. Can you help?

    Read the article

  • Implementing simple business model in Haskell

    - by elmes
    Supose we have a very simple model: Station has at least one Train Train has at least two Stations The model has to allow to check what stations any given train visits and to check what trains visit a particular station. How to model it in Haskell? I am a Haskell newbie, so please correct me: once an object is created, you cannot modify it - you can only make a new object based on that one (~immutability). Am I right? If so, I'll have to create a lot of temporary variables with semi-initialized objects (during deserialization or even in unit tests). Basically what I need is an example of modeling domain classes in Haskell - after reading "Learn you a haskell.." I still have no idea how to use this language.

    Read the article

  • Java HashMap with Int Array

    - by Sunil
    Hello I am using this code to check that array is present in the HashMap. public class Test { public static void main(String[]arg) { HashMap<int[],String> map= new HashMap<int[],String>(); map.put(new int[]{1,2}, "sun"); System.out.println(map.containsKey((new int[]{1,2}))); } } But this prints False. How can I check that array is present in the HashMap. Thanks in advance.

    Read the article

  • Locking a file to verify a single execution of a service. How reliable?

    - by Camilo Díaz
    Hello, I am deploying a little service to an UNIX(AIX) system. I want to check if there is no active instance of that service running when starting it. How reliable is to implement that check like this? Try to acquire a lock on a file (w/ FileChannel) If succeeds, keep lock and continue execution If fails, exit and refuse to run the main body I am aware of software like the Tanuki wrapper, however, I'm longing for a simpler(maybe not portable) solution. Regarding PIDFILE(s): I want to avoid using them if possible, as I don't have administrative rights on the machine, neither knowledge in AIX's shell programming.

    Read the article

  • In ASP.NET MVC (3.0/Razor), do you prefer multiple views, or conditionals within views? Why?

    - by Chad
    For my new web app, I'm debating on using multiple views, or conditionals within views. An example scenario would be showing different info to users who are authenticated vs non-authenticated. This could be handled a couple ways. In the controller, check IsAuthenticated and return a view based on that In the view, check IsAuthenticated and show blocks of info based on that Pros of multiple views: Smaller, less complicated view - next to no logic in the view Pros of single views: less view files to maintain The obvious cons are the opposites of the pros: more files to maintain or more complicated view files. Which do you prefer? Why? Any pros/cons I haven't outlined here? Update: Assume each view uses a layout page and partial views to abstract the obviously repetitive code.

    Read the article

  • PHP e-commerce site talking to internal database for stock / ordering?

    - by CitrusTree
    Hi. I'm working on an e-commerce site (either bespoke with PHP, or using Drupal/Ubercart), and I'd like to investigate the site interacting with an internal (filemaker) database we use to manage stock and orders. Currently we manually transfer orders from the web site to our own database, and the site does not check or record changes in stock. My plan to allow the 2 to interact is as follows: Make the internal database available externaly on a machine with a fixed IP Allow external access from the site only Connect to the internal database using ODBC (or similar) Use simple queries to check stock / record stock changes / record order details Am I missing something here as this sounds quite straight forward? Is there another solution I should be taking a look at? Thanks in advance for any help or comments.

    Read the article

  • Why doesn't ConcurrentQueue<T>.Count return 0 when IsEmpty == true?

    - by DanTup - Danny Tuppeny
    I was reading about the new concurrent collection classes in .NET 4 on James Michael Hare's blog, and the page talking about ConcurrentQueue<T> says: It’s still recommended, however, that for empty checks you call IsEmpty instead of comparing Count to zero. I'm curious - if there is a reason to use IsEmpty instead of comparing Count to 0, why does the class not internally check IsEmpty and return 0 before doing any of the expensive work to count? E.g.: public int Count { get { // Check IsEmpty so we can bail out quicker if (this.IsEmpty) return 0; // Rest of "expensive" counting code } } It seems strange to suggest this if it could be "fixed" so easily with no side-effects?

    Read the article

  • Javascript: find URLs in a document

    - by user317005
    how do I find URLs (i.e. www.domain.com) within a document, and put those within anchors: < a href="www.domain.com" www.domain.com< /a html: Hey dude, check out this link www.google.com and www.yahoo.com! javascript: (function(){var text = document.body.innerHTML;/*do replace regex => text*/})(); output: Hey dude, check out this link <a href="www.google.com">www.google.com</a> and <a href="www.yahoo.com">www.yahoo.com</a>!

    Read the article

  • asp.net page life-cycle question

    - by Varyanica
    I have a Table and a Button. Table's cells have controls LiteralControl and CheckBox. I check some fields and then by click on button i remove these fields from database. On event Page_PreRender i clear Table and then fill it with updated data. Then it shows me Table with updated data. But if i check fields of table again and do a click on a button it wont do what i expected. In Page_Load event i see that it dont save properties of controls. Checked CheckBox controls appears as unchecked.

    Read the article

  • Set environment variable in Ubuntu

    - by Junho Park
    In Ubuntu, I'd like to switch my JAVA_HOME environment variable back and forth between Java 5 and 6. I open a terminal and type in the following to set the JAVA_HOME environment variable: export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun And in that same terminal window, I type the following to check that the environment variable has been updated: echo $JAVA_HOME And I see /usr/lib/jvm/java-1.5.0-sun which is what I'm expecting to see. In addition, I modify ~/.profile and set the JAVA_HOME environment variable to /usr/lib/jvm/java-1.5.0-sun. And now for the problem--when I open a new terminal window and I check my JAVA_HOME environment variable by typing in echo $JAVA_HOME I see that my JAVA_HOME environment variable has been reverted back to Java 6. When I reboot my machine (or log out and back in, I suppose) the JAVA_HOME environment variable is set to Java 5 (presumably because of the modification I made in my ~/.profile). Is there a way around this so that I can change my JAVA_HOME environment without having to log out and back in (AND make that environment variable change stick in all new terminal windows)?

    Read the article

  • JavaScript - checking for any lowercase letters in a string

    - by pcampbell
    Consider a JavaScript method that needs to check whether a given string is in all uppercase letters. The input strings are people's names. The current algorithm is to check for any lowercase letters. var check1 = "Jack Spratt"; var check2 = "BARBARA FOO-BAR"; var check3 = "JASON D'WIDGET"; var isUpper1 = HasLowercaseCharacters(check1); var isUpper2 = HasLowercaseCharacters(check2); var isUpper3 = HasLowercaseCharacters(check3); function HasLowercaseCharacters(string input) { //pattern for finding whether any lowercase alpha characters exist var allLowercase; return allLowercase.test(input); } Is a regex the best way to go here? What pattern would you use to determine whether a string has any lower case alpha characters?

    Read the article

  • jQuery Ajax: Copy - Paste thingy

    - by tsiger
    Hi everyone, I have a form where a check an input field for its value and then i do an Ajax call using the typewatch plugin ( a small little thing which detects that the user has stopped typing after a predefined interval ). It works great. As this field is a "coupon discount" in an order form, the value could be entered by copy pasting the "coupon code" from an email or something. It also works with Ctrl+C - Ctrl+V for Copy and paste but not when a user selects the text with the mouse, clicks copy from the context menu and then paste from this menu. Is there a way in jQuery to check for this kind of behaviour in jQuery somehow?

    Read the article

  • dynamic model is not loading fields

    - by Toby Justus
    I am using a dynamic model found on the forum of sencha. function modelFactory(name, fields) { alert(fields); return Ext.define(name, { extend: 'Ext.data.Model', fields: fields }); } I placed the alert(fields) to check what happens with the field because it was not working. I get this: [object Object],[object Object],[object Object] How can i change this into a correct way to use it in the fields? Is there a way to check if the model has been created? With Firebug or something? EDIT: i get this in firebug: [Object { name="ccuDesignation", type=null}, Object { name="wanNumber", type=null}, Object { name="carrierName", type=null}, Object { name="dataPackageName", type=null}, Object { name="simIccid", type=null}, Object { name="expiryTime", type=null}, Object { name="bytesRx", type=null}, Object { name="bytesTx", type=null}]

    Read the article

  • Checking contents of Uploaded file

    - by kapil
    Hi all, I am using ASP.NEt MVC . I want to upload .zip files for which I am using html input file upload control on my view. I want only .zip files to be uploaded. I want to check that my .zip contains only two files - both having extensions .txt and one of them having name "start". Can anyone please suggest me about how to check this? How can we assure that the uploaded .zip is really a zipped folder and not any other file having just .zip extension. can we use HttpPostedFileBase.ContentType? thanks in advance, kaps

    Read the article

  • problem in counting two fields in one query

    - by Mac Taylor
    hey guys i need to count new private messages and old one from a table so first thing come to mind is using mysql_num_rows and easy thing to do // check new pms $user_id = $userinfo['user_id']; $sql = "SELECT author_id FROM bb3privmsgs_to WHERE user_id='$user_id' AND (pm_new='1' OR pm_unread='1')"; $result = $db->sql_query($sql) ; $new_pms = $db->sql_numrows($result); $db->sql_freeresult($result); // check old pms $sql = "SELECT author_id FROM bb3privmsgs_to WHERE user_id='$user_id' AND (pm_new='0' OR pm_unread='0')"; $result = $db->sql_query($sql) ; $old_pms = $db->sql_numrows($result); $db->sql_freeresult($result); but how can i count these two fields just in one statement and shorter lines ?~

    Read the article

< Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >