Search Results

Search found 13889 results on 556 pages for 'results'.

Page 117/556 | < Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >

  • PHP imap_search not detecting all messages in gmail inbox

    - by Steve
    When I run a very simple imap_search on my GMail inbox, the search returns less messages than it should. Here is the script that anyone with a GMail account can run. $host = '{imap.gmail.com:993/imap/ssl}'; $user = 'foo'; $pass = 'bar'; $imapStream = imap_open($host,$user,$pass) or die(imap_last_error()); $messages = imap_search($imapStream,"ALL"); echo count($messages); imap_close($imapStream); This returns 39 messages. But, I've got 100 messages in my inbox, some in conversations, some forwarded from another account (SquirrelMail, FWIW). Can anyone duplicate these results, and/or tell me what's going on? Other server strings I've tried, all returning the same results: {imap.gmail.com:993/imap/ssl/novalidate-cert} {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX {imap.gmail.com:993/imap/ssl}INBOX GMail's IMAP feature support: http://mail.google.com/support/bin/answer.py?hl=en&answer=78761

    Read the article

  • Jquery get array details

    - by Matt
    I'm having trouble getting a response back from a Jquery ajax call... (It's a script to authenticate a user, and needs to return their name and user ID. My understanding was that I could encode it as JSON and get the data in the format below. It is returning an error of "undefined" for the alert(). The javascript $.ajax({ type: "POST", url: "myURL.php", data: {username: username, password: password}, success: function(results) { //THIS IS WHERE THE PROBLEM IS alert('Hi '+results.name); //Should be "Hi Basil Fawlty" } }); The PHP (myURL.php) //This comes from a SQL call that returns the following name json_encode(array( 'id'=>1, 'name'=>'Basil Fawlty' )); Any help or ideas on where I am going wrong would be greatly appreciated! Thanks.

    Read the article

  • checkbox selected value is lost after coming back to the pagei.e., viewstate value is lost with use

    - by M.Vijay bhasker
    In the left navigation i have a series of check boxes and a grid view in the page body.Grid view results changes based on the check box selection,whenever i click on the links in grid view it goes to the second page and there is a link on the page which takes me back to the first page,but the check box selected value is maintained for the first time only and if we repeat the same process for the second time and i see that the first time selection of the check box is maintained.Here the grid view is placed in update panel and the check box in the left is called using .... AsyncPostBackTrigger ControlID="cphLeftNavigation". I've tried removing the above code referring the cphLeftNavigation and i see the results are coming up correctly and the last selected check box value is being maintained correctly and i want the same functionality to be implemented with/without update panel. Can anyone let me know,what exactly should i change to implement the above mentioned functionality.

    Read the article

  • [c]how to take input for a character pionter without using fget?

    - by ashish yadav
    consider the code include int main() {char* a; scanf("%s",a);//&a and &a[0] give same results-crashes printf("%s",); return 0; } why does this code results in crashing?whereas this code using character array works fine? include int main() {char a[100]; scanf("%s",&a[0]);//works fine printf("%s",a); return 0; } the difference being character array and pointer?but i knew that pointer just points to the first element that is &a[0] should work fine but upper code crashes for all three that is a,&a and &a[0]? the main thing i would to gather is how can i take input of a character pointer if i insist on using scanf only? i apologize if i am not clear. thanks in advance:)

    Read the article

  • Codeigniter view file looping query

    - by user2505513
    Right, I'm unsure about how to code my view file to generate following query results WITHOUT compromising the principles of mvc. Query in model: SELECT * FROM events GROUP BY country, area ORDER BY country, area View: <?php if (isset($query)):?> <?php foreach ($query as $row):?> <h2><?=$row->country?></h2> <h3><?=$row->area?></h3> <?php endforeach;?> <?php endif;?> I want the results to display: England North South West - utilising the GROUP BY parameter As opposed to: England North England South England West Has anybody any advice as to how to achieve this?

    Read the article

  • Multiple resultsets from Oracle in Odp.net,without refcursors

    - by James L
    SQL Server is able to return the results of multiple queries in a single round-trip, e.g: select a, b, c from y; select d, e, f from z; Oracle doesn't like this syntax. It is possible to use reference cursors, like this: begin open :1 for select count(*) from a; open :2 for select count(*) from b; end; However, you incur a penalty in opening/closing cursors and you can hold database locks for an extended period. What I'd like to do is retrieve the results for these two queries in one shot, using Odp.net. Is it possible?

    Read the article

  • Django: How do I go about changing my simple app to use Ajax?

    - by swisstony
    I currently have a web page where the user enters some data and then clicks a submit button. I process the data in views.py and then use the same Django template to return and display the original data and the results. What I would like to do is try to give it a bit more of a modern look and feel. You know the sort of thing, the page doesn't refresh but displays a spinning disk until the results are displayed. I assume this means using Ajax? How difficult is it to modify a simple app like this to use Ajax? What is involved? What are the best tools to use? JQuery?

    Read the article

  • "Easiest" way to track unique visitors to a page, in real time?

    - by Cooper
    I need to record in "real time" (perhaps no more than 5 minute delay?) how many unique visitors a given page on my website has had in a given time period. I seek an "easy" way to do this. Preferably the results would be available via a database query. Two things I've tried that failed (so far): Google Analytics: Does the tracking/reporting, but not in real time - results are delayed by hours. Mint Analytics ( http://www.haveamint.com/ ): Tracks in real time, but seems to aggregate data in a way that prevents reporting of unique visitors to a single page over an arbitrary time frame. So, does anyone know how to make Mint Analytics do what I want, or can anyone recommend an analytics package or programmed approach that will do what I need?

    Read the article

  • mysql timeout - c/C++

    - by user1262876
    Guys i'm facing a problem with this code, the problem is the timeout by timeout i mean the time it takes the program to tell me if the server is connected or not. If i use my localhost i get the answer fast, but when i connect to outside my localhost it takes 50sc - 1.5 min to response and the program frezz until it done. HOw can i fix the frezzing, or make my own timeout, like if still waiting after 50sc, tell me connection failed and stop? please use codes as help, becouse i would understand it better, thanks for any help i get PS: USING MAC #include "mysql.h" #include <stdio.h> #include <stdlib.h> // Other Linker Flags: -lmysqlclient -lm -lz // just going to input the general details and not the port numbers struct connection_details { char *server; char *user; char *password; char *database; }; MYSQL* mysql_connection_setup(struct connection_details mysql_details) { // first of all create a mysql instance and initialize the variables within MYSQL *connection = mysql_init(NULL); // connect to the database with the details attached. if (!mysql_real_connect(connection,mysql_details.server, mysql_details.user, mysql_details.password, mysql_details.database, 0, NULL, 0)) { printf("Conection error : %s\n", mysql_error(connection)); exit(1); } return connection; } MYSQL_RES* mysql_perform_query(MYSQL *connection, char *sql_query) { // send the query to the database if (mysql_query(connection, sql_query)) { printf("MySQL query error : %s\n", mysql_error(connection)); exit(1); } return mysql_use_result(connection); } int main() { MYSQL *conn; // the connection MYSQL_RES *res; // the results MYSQL_ROW row; // the results row (line by line) struct connection_details mysqlD; mysqlD.server = (char*)"Localhost"; // where the mysql database is mysqlD.user = (char*)"root"; // the root user of mysql mysqlD.password = (char*)"123456"; // the password of the root user in mysql mysqlD.database = (char*)"test"; // the databse to pick // connect to the mysql database conn = mysql_connection_setup(mysqlD); // assign the results return to the MYSQL_RES pointer res = mysql_perform_query(conn, (char*) "SELECT * FROM me"); printf("MySQL Tables in mysql database:\n"); while ((row = mysql_fetch_row(res)) !=NULL) printf("%s - %s\n", row[0], row[1], row[2]); // <-- Rows /* clean up the database result set */ mysql_free_result(res); /* clean up the database link */ mysql_close(conn); return 0; }

    Read the article

  • Help me write a nicer SQL query in Rails

    - by Sainath Mallidi
    Hi, I am trying to write an SQL query to update some of the attributes that are regularly pulled from source. the output will be a text file with the following fields: author, title, date, popularity I have two tables to update one is the author information and the other is popularity table. And the Author Active Record object has one popularity. Currently I'm doing it like this.\ arr.each { |x| x = x.split(" ") results = Author.find_by_sql("SELECT authors.id FROM authors, priorities WHERE authors.id=popularity.authors_id AND authors.author = x[0]") results[0].popularity.update_attribute("popularity", x[3]) I need two tables because the popularity keeps changing, and I need only the top 1000 popular ones, but I still need to keep the previously popular ones also. Is there any nicer way to do this, instead of one query for every new object. Thanks.

    Read the article

  • Setting precision on std::cout in entire file scope - C++ iomanip

    - by Ivan
    Hi all, I'm doing some calculations, and the results are being save in a file. I have to output very precise results, near the precision of the double variable, and I'm using the iomanip setprecision(int) for that. The problem is that I have to put the setprecision everywhere in the output, like that: func1() { cout<<setprecision(12)<<value; cout<<setprecision(10)<<value2; } func2() { cout<<setprecision(17)<<value4; cout<<setprecision(3)<<value42; } And that is very cumbersome. Is there a way to set more generally the cout fixed modifier? Thanks

    Read the article

  • MySQL, return only rows where there are duplicates among two columns.

    - by Richard Waite
    I have a table in MySQL of contact information ; first name, last name, address, etc. I would like to run a query on this table that will return only rows with first and last name combinations which appear in the table more than once. I do not want to group the "duplicates" (which may only be duplicates of the first and last name, but not other information like address or birthdate) - I want to return all the "duplicate" rows so I can look over the results and determine if they are dupes or not. This seemed like it would be a simple thing to do, but it has not been. Every solution I can find either groups the dupes and gives me a count only (which is not useful for what I need to do with the results) or doesn't work at all. Is this kind of logic even possible in a query ? Should I try and do this in Python or something?

    Read the article

  • jQuery function execute on Button Click and Enter/Return (key)

    - by Alvin Jones
    I'm trying to create a little search box that allows you to search Twitter based on the keyword you enter in the input field. While it's work, it only works if you press the Submit button. I would also like to be able to press the Enter or Return key to initiate the search. I've tried using the .sumbit function and wrapping my input around a form element with no success. Any insight would be greatly appreciate! Live example: http://tinyurl.com/84axyym <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(document).ready(function(){ function(data) { $('#startSearch').click(function(){ $('#tweets .results').remove(); var searchTerm = 'http://search.twitter.com/search.json?q=' + $('#twitterSearch').val() + '&callback=?' $.getJSON(searchTerm, function(data) { $.each(data.results, function() { $('<div class="results"></div>') .hide() .append('<a class="userPicLink" href="http://twitter.com/' + this.from_user + '">' + '<img class="userImg" src="' + this.profile_image_url + '">' + '</a>') .append('<span class="userName">' + '<a href="http://twitter.com/' + this.from_user + '">' + this.from_user + '</span>') .append('<span class="userText">' + this.text + '</span>') .append('<time class="textTime">' + relTime(this.created_at) + '</time>') .appendTo('#tweets') .fadeIn(); }); }); </script> <body> <label id="searchLabel" for="twitterSearch">Search</label> <input type="search" list="searchSugg" id="twitterSearch" placeholder="css3 animation" required aria-required="true"> <input id="startSearch" type="submit"> <datalist id="searchSugg"> <option value="css3 mulitple backgrounds"> <option value="html5 video"> <option value="responsive web design"> <option value="twitter api"> </datalist> <div id="tweets"> </div> </body>

    Read the article

  • How to parse a string to an integer without library functions?

    - by dack
    Hi, I was recently asked this question in an interview: "How could you parse a string of the form '12345' into its integer representation 12345 without using any library functions, and regardless of language?" I thought of two answers, but the interviewer said there was a third. Here are my two solutions: Solution 1: Keep a dictionary which maps '1' = 1, '2' = 2, etc. Then parse the string one character at a time, look up the character in your dictionary, and multiply by place value. Sum the results. Solution 2: Parse the string one character at a time and subtract '0' from each character. This will give you '1' - '0' = 0x1, '2' - '0' = 0x2, etc. Again, multiply by place value and sum the results. Can anyone think of what a third solution might be? Thanks.

    Read the article

  • php array regular expressions

    - by bell
    I am using regular expressions in php to match postcodes found in a string. The results are being returned as an array, I was wondering if there is any way to assign variables to each of the results, something like $postcode1 = first match found $postcode2 = second match found here is my code $html = "some text here bt123ab and another postcode bt112cd"; preg_match_all("/([a-zA-Z]{2})([0-9]{2,3})([a-zA-Z]{2})/", $html, $matches, PREG_SET_ORDER); foreach ($matches as $val) { echo $val[0]; } I am very new to regular expressions and php, forgive me if this is a stupid question. Thanks in advance

    Read the article

  • 'Recursive' LINQ calls

    - by Sir Psycho
    Hi, I'm trying to build an XML tree of some data with a parent child relationship, but in the same table. The two fields of importance are CompetitionID ParentCompetitionID Some data might be CompetitionID=1, ParentCompetitionID=null CompetitionID=2, ParentCompetitionID=1 CompetitionID=3, ParentCompetitionID=1 The broken query I have simply displays results in a flat format. Seeing that I'm working with XML, some sort of recursive functionality is required. I can do this using recursion, but would like to see the linq version. Any help appreciated. var results = from c1 in comps select new { c.CompetitionID, SubComps= from sc in comps.Where (c2 => c2.CompetitionID == c1.CompetitionID) select sc };

    Read the article

  • Webserver for publishing adjusted images

    - by Petr Prikryl
    I want to create webserver which will be receiving data (images probably) from webclients who will be uploading these photos. And then the webserver must execute some graphic programs (client select whichone) to modify the image(s). After the graphic program is done, the results (output image(s)) will be uploaded to the web temp database (by webserver) to publish results of graphic programs. I found the C++ web toolkit (http://www.webtoolkit.eu), but I'm not sure if this is a suitable C/C++ library for me because I haven't any experiences with making C/C++ web apps/servers. Can someone tell me some advice please? The webserver should have some SDK too, for adding next graphic programs. I'm searching only for any C/C++ tools/libraries/etc.

    Read the article

  • Searching for duplicate records within a text file where the duplicate is determined by only two fie

    - by plg
    First, Python Newbie; be patient/kind. Next, once a month I receive a large text file (think 7 Million records) to test for duplicate values. This is catalog information. I get 7 fields, but the two I'm interested in are a supplier code and a full orderable part number. To determine if the record is dupliacted, I compress all special characters from the part number (except . and #) and create a compressed part number. The test for duplicates becomes the supplier code and compressed part number combination. This part is fairly straight forward. Currently, I am just copying the original file with 2 new columns (compressed part and duplicate indicator). If the part is a duplicate, I put a "YES" in the last field. Now that this is done, I want to be able to go back (or better yet, at the same time) to get the previous record where there was a supplier code/compressed part number match. So far, my code looks like this: Compress Full Part to a Compressed Part and Check for Duplicates on Supplier Code and Compressed Part combination import sys import re import time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ start=time.time() try: file1 = open("C:\Accounting\May Accounting\May.txt", "r") except IOError: print sys.stderr, "Cannot Open Read File" sys.exit(1) try: file2 = open(file1.name[0:len(file1.name)-4] + "_" + "COMPRESSPN.txt", "a") except IOError: print sys.stderr, "Cannot Open Write File" sys.exit(1) hdrList="CIGSUPPLIER|FULL_PART|PART_STATUS|ALIAS_FLAG|ACQUISITION_FLAG|COMPRESSED_PART|DUPLICATE_INDICATOR" file2.write(hdrList+chr(10)) lines_seen=set() affirm="YES" records = file1.readlines() for record in records: fields = record.split(chr(124)) if fields[0]=="CIGSupplier": continue #If incoming file has a header line, skip it file2.write(fields[0]+"|"), #Supplier Code file2.write(fields[1]+"|"), #Full_Part file2.write(fields[2]+"|"), #Part Status file2.write(fields[3]+"|"), #Alias Flag file2.write(re.sub("[$\r\n]", "", fields[4])+"|"), #Acquisition Flag file2.write(re.sub("[^0-9a-zA-Z.#]", "", fields[1])+"|"), #Compressed_Part dupechk=fields[0]+"|"+re.sub("[^0-9a-zA-Z.#]", "", fields[1]) if dupechk not in lines_seen: file2.write(chr(10)) lines_seen.add(dupechk) else: file2.write(affirm+chr(10)) print "it took", time.time() - start, "seconds." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file2.close() file1.close() It runs in less than 6 minutes, so I am happy with this part, even if it is not elegant. Right now, when I get my results, I import the results into Access and do a self join to locate the duplicates. Loading/querying/exporting results in Access a file this size takes around an hour, so I would like to be able to export the matched duplicates to another text file or an Excel file. Confusing enough? Thanks.

    Read the article

  • Are there any context-sensitive code search tools?

    - by Vicky
    I have been getting very frustrated recently in dealing with a massive bulk of legacy code which I am trying to get familiar with. Say I try to search for a particular function call, I get loads of results that turn out to be completely irrelevant; some of them are easy to spot, eg a comment saying // Fixed functionality in foo() so don't need to handle this here any more But others are much harder to spot manually, because they turn out to be calls from other functions in modules that are only compiled in certain cases, or are part of a much larger block of code that is #if 0'd out in its entirety. What I'd like would be a search tool that would allow me to search for a term and give me the choice to include or exclude commented out or #if 0'd out code. Then the search results would be displayed alongside a list of #defines that are required in order for that snippet of code to be relevant. I'm working in C / C++, but other than the specific comment syntax I guess the techniques should be more generally applicable. Does such a tool exist?

    Read the article

  • What are all the special iPhone / iPod Touch HTML tags?

    - by scunliffe
    After peeking at the SO source, I noticed this tag: <link rel="apple-itouch-icon" href="/apple-touch-icon.png" /> Which after a quick Google revealed an Apple "favicon" type thing for display on your homepage ("WebClip Bookmark" to be exact). The only other one that jumps to mind is the: <input type="search" results="5"/> This type="search" causes the field to "inherit" the Apple search icon, and the optional results="x" enables a history of "x" keywords to be maintained. I'm therefore wondering, what other Apple/Safari (iPhone/iPod Touch) specific HTML tags and attributes are out there that I'm not aware of! Curious minds need to know!

    Read the article

  • Elegant solution for multiple forms on single page

    - by NFicano
    I'm building a web application (in Django) that will accept a search criteria and display a report - once the user is satisfied with the results, save both the criteria and a reference to these objects back to the database. The problem I'm having is finding an elegant solution for having 2 forms: Display (GET) the results of their criteria. Enter in some descriptions, and save (POST) everything back to the database. I'm leaning towards AJAX for the GET stuff and a POST for the save, but I wanted to make sure there wasn't a more elegant solution first.

    Read the article

  • Clear sqlalchemy reflection cache

    - by OrganicPanda
    Hi all, I'm using sqlalchemy's reflection tools to get a Table object. I do this because these tables are dynamic and tables/columns can change. Here's the code I'm using: def getTableByReflection(self, tableName, metadata, engine): return Table(tableName, metadata, autoload = True, autoload_with = engine) The problem is that when the above code is run twice it seems to return the same results regardless of whether or not the columns have changed. I have tried refreshing using the mysession.refresh(mytable) but that fails because the table is not attached to any metadata - which makes sense but then why am I seeing cached results? Is there any way to tell the metadata/engine/session to forget about this table and let me load it cleanly?

    Read the article

  • pagination - 10 pages per page

    - by arthur
    I have a pagination script that displays a list of all pages like so: prev [1][2][3][4][5][6][7][8][9][10][11][12][13][14] next But I would like to only show ten of the numbers at a time: prev [3][4][5][6][7][8][9][10][11][12] next How can I accomplish this? Here is my code so far: <?php /* Set current, prev and next page */ $page = (!isset($_GET['page']))? 1 : $_GET['page']; $prev = ($page - 1); $next = ($page + 1); /* Max results per page */ $max_results = 2; /* Calculate the offset */ $from = (($page * $max_results) - $max_results); /* Query the db for total results. You need to edit the sql to fit your needs */ $result = mysql_query("select title from topics"); $total_results = mysql_num_rows($result); $total_pages = ceil($total_results / $max_results); $pagination = ''; /* Create a PREV link if there is one */ if($page > 1) { $pagination .= '< a hr_ef="?page='.$prev.'">Previous</a> '; } /* Loop through the total pages */ for($i = 1; $i <= $total_pages; $i++) { if(($page) == $i) { $pagination .= $i; } else { $pagination .= '< a hr_ef="index.php?page='.$i.'">'.$i.'</a>'; } } /* Print NEXT link if there is one */ if($page < $total_pages) { $pagination .= '< a hr_ef="?page='.$next.'"> Next</a>'; } /* Now we have our pagination links in a variable($pagination) ready to print to the page. I pu it in a variable because you may want to show them at the top and bottom of the page */ /* Below is how you query the db for ONLY the results for the current page */ $result=mysql_query("select * from topics LIMIT $from, $max_results "); while ($i = mysql_fetch_array($result)) { echo $i['title'].'<br />'; } echo $pagination; ?>

    Read the article

  • plld Prolog C++

    - by H.J. Miri
    I have a large Prolog program with lots of predicates. I need to connect to this Prolog code from C++ (VS2008) to obtain certain query results. So I am not trying to embed Prolog in C++ as a logicasl engine, but for my C++ program to connect to my Prolog code, consult (compile) it, obtain query results, and pass them back to C++. Running the following command at the VS2008 Command Prompt generates so many errors: plld -o myprog.exe mycpp.cpp mypl.pl Is there any way I can get my C++ program to consult my Prolog program, by including a command or makefile, etc...? I am aware that if you use VS2008, you are better off not using plld, so I am trying to include everything in one master C++ program, then press F5 to build and compile, and then call Prolog, then C++, and so on... Cheers,

    Read the article

  • TSQL - compare tables

    - by Rya
    I want to create a stored procedure that compares the results of two queries. If the results of the 2nd table can be found in the first, print 'YES', otherwise, print 'No'. Table 1: SELECT dbo.Roles.RoleName, dbo.UserRoles.RoleID FROM dbo.Roles LEFT OUTER JOIN dbo.UserRoles ON dbo.Roles.RoleID = dbo.UserRoles.RoleID WHERE (dbo.Roles.PortalID = 0) AND (dbo.UserRoles.UserID = 2) Table 2: Declare @RowData as nvarchar(2000) Set @RowData = ( SELECT EditPermissions FROM vw_XMP_DMS_Documents where DocumentID = 2) Select Data from dbo.split(@RowData, ',') For example. Table 1: John Jack James Table 2: John Sally Jane Print 'YES' Is this possible??? Thank you all very much. -R

    Read the article

< Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >