Search Results

Search found 1976 results on 80 pages for 'grab'.

Page 2/80 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • awk or sed: Best way to grab [this text]

    - by Parand
    I'm trying to parse various info from log files, some of which is placed within square brackets. For example: Tue, 06 Nov 2007 10:04:11 INFO processor:receive: [someuserid], [somemessage] msgtype=[T] What's an elegant way to grab 'someuserid' from these lines, using sed, awk, or other unix utility?

    Read the article

  • How to grab data on website?

    - by Doug
    So, often, I check my accounts for different numbers. For example, my affiliate accounts- i check for cash increase. I want to program a script where it can login to all these websiets and then grab the money value for me and display it on one page. How can I program this?

    Read the article

  • Javascript grab value via http cmd

    - by Craig
    Hello, I am trying to grab a value from a url: http://localhost:8080/bin/task_status?id=2&cmd=percent_done I am unsure how to actually do this within a javascript (ajax) command that once the page has been loaded will be called every .5 seconds. It is using the AJAX built in progress bar to display.

    Read the article

  • trying to grab data from a page after post via curl

    - by Ben
    i am trying to grab data from here : http://mediaforest.biz/mobile/nowplaying.aspx in the page you select a station and post it then you get new page with data. but i cant grab it, i get the same page again. i used this code: <?php header ('Content-type: text/html; charset=utf-8'); $url = "http://mediaforest.biz/mobile/nowplaying.aspx"; $referer = ""; // headers $header[] = "Host: ".parse_url($url, PHP_URL_HOST); $header[] = "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; he; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3"; $header[] = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; $header[] = "Accept-Language: he,en-us;q=0.7,en;q=0.3"; $header[] = "Accept-Encoding: gzip,deflate"; $header[] = "Accept-Charset: windows-1255,utf-8;q=0.7,*;q=0.7"; $header[] = "Keep-Alive: 115"; $header[] = "Connection: keep-alive"; $cookie="cookie.txt"; $fp=fopen($cookie,"w+"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_REFERER,$referer); curl_setopt($ch, CURLOPT_TIMEOUT, 900); curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_HEADER,true); curl_setopt($ch, CURLOPT_COOKIEFILE,$cookie); curl_setopt($ch, CURLOPT_COOKIEJAR,$cookie); curl_setopt($ch, CURLOPT_VERBOSE, 0); $content=curl_exec($ch); echo $content; if(stristr($content,"__EVENTTARGET")){ $array1=explode('__EVENTTARGET" value="',$content); $content1=$array1[1]; $array2=explode('"> <input type="hidden" name="__EVENTARGUMENT"',$content1); $content2=$array2[0]; $EVENTTARGET=urlencode($content2); } if(stristr($content,"__EVENTARGUMENT")){ $array1=explode('__EVENTARGUMENT" value="',$content); $content1=$array1[1]; $array2=explode('"> <script language',$content1); $content2=$array2[0]; $EVENTARGUMENT=urlencode($content2); } if(stristr($content,"formNowPlaying")){ $array1=explode('method="post" action="',$content); $content1=$array1[1]; $array2=explode('"> <input type="hidden" name="__EVENTTARGET"',$content1); $content2=$array2[0]; $nexturl=$content2; } //echo $EVENTTARGET." ".$EVENTARGUMENT." ".$nexturl; $url = "http://mediaforest.biz/mobile/".$nexturl; $fields = "EVENTTARGET=".$EVENTTARGET."&__EVENTARGUMENT=".$EVENTARGUMENT."&MyChannels=0&ViewChannel_Button=Show"; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_REFERER,$referer); curl_setopt($ch, CURLOPT_TIMEOUT, 900); curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_HEADER,true); curl_setopt($ch, CURLOPT_COOKIEFILE,$cookie); curl_setopt($ch, CURLOPT_COOKIEJAR,$cookie); curl_setopt($ch, CURLOPT_VERBOSE, 1); $content_stage2=curl_exec($ch); echo $content_stage2; ?>

    Read the article

  • JMeter to grab full querystring into a variable for future use

    - by jfbauer
    Someone provided me the regex to parse out a query string: (?<=\?)[^?]+$ I am trying to use that in JMeter with no luck (although I am successful in pulling out individual query string parameter values based on various example postings on the web). I created a regular expression extractor called "Grab QueryString". I selected the URL response field to check. For the reference name, I typed "myQueryString". For the regular expression, I entered your text. For template, I entered $1$ Match no = 1 Default Value = ERROR Unfortunately, "myQueryString" is getting populated with ERROR and not the URL query string as hoped when I try and use it as a parameter in a future GET. Thus, I see this in the "View Results Tree": https:/www.website.com/folder/page.aspx?ERROR Instead of: https:/www.website.com/folder/page.aspx?jfhjHSDjgdjhsjhsdhjSJHWed Did I do something wrong? Anyone have any suggestions?

    Read the article

  • Parse text from a screen grab

    - by Caylem
    Hey guys Not sure the best way to explain this but i'll give it a shot. I'm trying to find a way to parse text/numbers from a screen grab in either C# or Java - whichever provides the easiest way, but preferably java. An example would be as follows. You have a website/document/application with a block of text. You can take a screenshot of the specific area which contains this text. Once the screenshot has been taken you can extract a string from it containing the relevant characters. Any feedback is appreciated. Thanks

    Read the article

  • Awk to grab colo(u)r codes from CSS files aka School me in Awk

    - by Andrew Bolster
    Nice and (hopefully) easy. I am trying to work out how to grab the variable #XXX from a text file (css file) containing strings like hr { margin: 18px 0 17px; border-color: #ccc; } h1 a:hover, h2 a:hover, h3 a:hover { color: #001100; } Which I would like to return as ccc 777 The plan then is to throw this through sort and uniq and the end up with a defining colourscheme for the page. Basically, I can't work out how to go from matching /color:#...[...]/ to just printing out the wildcarded sections.

    Read the article

  • jquery grab and move toggle element

    - by tony noriega
    i have a div that is displayed via: $('a#biz-blue-lnk').click(function() { $('#business-blue').show(); return false; }); what i want to figure out is when this DIV is displayed, can i enable the user to grab it and move it around the screen? potentially if they click another DIV they could have two elements on screen... and would like them to be able to move them around to see each one... possible?

    Read the article

  • Trying to grab just absolute links from a webpage using BeautifulSoup

    - by Kevin
    I am reading the contents of a webpage using BeautifulSoup. What I want is to just grab the <a href> that start with http://. I know in beautifulsoup you can search by the attributes. I guess I am just having a syntax issue. I would imagine it would go something like. page = urllib2.urlopen("http://www.linkpages.com") soup = BeautifulSoup(page) for link in soup.findAll('a'): if link['href'].startswith('http://'): print links But that returns: Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python26\lib\BeautifulSoup.py", line 598, in __getitem__ return self._getAttrMap()[key] KeyError: 'href' Any ideas? Thanks in advance. EDIT This isn't for any site in particular. The script gets the url from the user. So internal link targets would be an issue, that's also why I only want the <'a'> from the pages. If I turn it towards www.reddit.com, it parses the beginning links and it gets to this: <a href="http://www.reddit.com/top/">top</a> <a href="http://www.reddit.com/saved/">saved</a> Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python26\lib\BeautifulSoup.py", line 598, in __getitem__ return self._getAttrMap()[key] KeyError: 'href'

    Read the article

  • Using jQuery to grab the content from CKEditor's iframe

    - by miCRoSCoPiC_eaRthLinG
    Hey guys, I have this custom written CMS that uses CKEditor *(FCKEditor v3) for editing content. Along with that I'm using the jQuery Validation plugin to check all fields for error prior to ajax-based submission. For passing on the data to the PHP backend, I'm using the serialize() function. Problem is, serialize manages to grab all other fields correctly, except for the actual content typed in CKEditor. Like every other WYSIWYG editor, this one too overlays an iframe over an existing textbox. And serialize ignores the iframe and looks only into the textbox for content... which of course, it doesn't find - thus returning a blank content body. My approach to this is to create a hook onto the onchange event of CKEditor and concurrently update the textbox (CKEDITOR.instances.[textboxname].getData() returns the content) or some other hidden field with any changes made in the editor. However, since CKEditor is still in it's beta stage and severely lacks documentation, I cannot seem to find a suitable API call that'll enable me to do so. Does anyone have any idea on how to go about this? Or maybe suggest even a better method?

    Read the article

  • Webclient using download file to grab file from server - handling exceptions

    - by baron
    Hello everyone, I have a web service in which I am manipulating POST and GET methods to facilitate upload / download functionality for some files in a client/server style architecture. Basically the user is able to click a button to download a specific file, make some changes in the app, then click upload button to send it back. Problem I am having is with the download. Say the user expects 3 files 1.txt, 2.txt and 3.txt. Except 2.txt does not exist on the server. So I have code like (on server side): public class HttpHandler : IHttpHandler { public void ProcessRequest { if (context.Request.HttpMethod == "GET") { GoGetIt(context) } } private static void GoGetIt(HttpContext context) { var fileInfoOfWhereTheFileShouldBe = new FileInfo(......); if (!fileInfoOfWhereTheFileShouldBe.RefreshExists()) { throw new Exception("Oh dear the file doesn't exist"); } ... So the problem I have is that when I run the application, and I use a WebClient on client side to use DownloadFile method which then uses the code I have above, I get: WebException was unhandled: The remote server returned an error: (500) Internal Server Error. (While debugging) If I attach to the browser and use http://localhost:xxx/1.txt I can step through server side code and throw the exception as intended. So I guess I'm wondering how I can handle the internal server error on the client side properly so I can return something meaningful like "File doesn't exist". One thought was to use a try catch around the WebClient.DownloadFile(address, filename) method but i'm not sure thats the only error that will occur i.e. the file doesn't exist.

    Read the article

  • ThreadAbortException (WebClient using DownloadFile to grab file from server)

    - by baron
    Hi Everyone, Referencing my Earlier Question, regarding downloading a file from a server and handling exceptions properly. I am positive that I had this solved, then in classic programming fashion, returned days later to frustratingly find it broken :-( Updated code: private static void GoGetIt(HttpContext context) { var directoryInfoOfWhereTheDirectoryFullOfFilesShouldBe = new FileInfo(......); var name = SomeBasicLogicToDecideName(); //if (!directoryInfoOfWhereTheDirectoryFullOfFilesShouldBe.RefreshExists()) //{ // throw new Exception(string.Format("Could not find {0}.", name)); //} var tempDirectory = ""; //Omitted - creates temporary directory try { directoryInfoOfWhereTheDirectoryFullOfFilesShouldBe.CopyAll(tempDirectory); var response = context.Response; response.ContentType = "binary/octet-stream"; response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}.zip", name)); ZipHelper.ZipDirectoryToStream(tempDirectory, response.OutputStream); response.End(); } catch (Exception ex) { Debug.WriteLine(ex.ToString()); context.Response.StatusCode = 404; } finally { tempDirectory.DeleteWithPrejudice(); } } This was working fine, and returning the zip, otherwise if the file didn't exist returning 404. Then on the client side I could handle this: public bool Download() { try { using (var client = new WebClient()) { client.DownloadFile(name, tempFilePath); } } catch (Exception) { fileExists = false; } return fileExists; } But the problem now is two things. 1) I get System.Threading.ThreadAbortException: Thread was being aborted in the server side try-catch block. Usually this was just a file not found exception. I have no idea what or why that new exception is throwing? 2) Now that a different exception is throwing on the server side instead of the file not found, it would seem I can't use this set up for the application, because back on client side, any exception is assumed to be filenotfound. Any help, especially info on why this ThreadAbortException is throwing!?!? greatly appreciated. Cheers

    Read the article

  • Jquery html grab + calling a controller action using javascript (ruby on rails)

    - by Zind
    Preface: I consider myself "slightly effective" in ruby on rails, and a complete novice in javascript. Also, yes, I have installed jQuery and associated plugins instead of the default Prototype library. I am in a situation where I am pulling in a table from off-site in an iframe (which is taking care of all internal JS for me) such that when a part of the table is clicked, a td will gain the class "active." What I would like to do is take this info (I'm assuming I can get it in a string format), and pass it to a method (in my controller, I'm assuming) which will parse the html, pull out the pertinent info, and then call a creation method in the same controller with the parsed info, the end result being a new item in that table. What I have so far is javascript which I believe is correct so far: <script type="text/javascript"> var ImportInfo = function() { var info = $('td.active').html(); // call controller action which parses the given string, //checks for existence in database, and adds new row if needed } $("#Import").click(ImportInfo); </script> and, of course, a button with id="ImportLocation." I have looked at this question: http://stackoverflow.com/questions/1334447/using-jquery-to-call-a-controller-action but am somewhat unsure as to how to call a controller action to pass the contents of the td as a string. Is this doable with the jQuery post method?

    Read the article

  • Parse HTML file to grab all ID and Classes for a CSS file

    - by iamfriendly
    Hey all, A short while ago, I'm fairly certain I came across an application (or perhaps a plugin for Coda - the IDE I use) which quickly parses a html document and then spits out all of the elements with IDs and Classes for me to use in a CSS file. Having fully 'got into' zen coding - using the wonderful TEA plugin for Coda, I'm now hot on the heels of this app/plugin again. I've tried and failed miserably at hunting through Google, but have come up completely empty handed. Does anyone know of anything which can do this? Happy New Year everyone!

    Read the article

  • Use SQL Result to Query second time and grab more results via php

    - by maxwell
    I am grabbing a list of school names from a database. When the user clicks on the school name, i want the code to fetch 2-3 other attributes related to the school name that the user has clicked on. My code for the single school name list: $query = mysql_query("Select schoolname, product, username, password from credentials c join products p on p.productid = c.productid join schools s on s.schoolid = c.schoolid join icons i on i.productid = p.productid order by s.schoolname"); echo '<ul>'; while($row = mysql_fetch_array($query)) { echo "<li> <a href='#'>" . $row['schoolname'] . "</a> </li>"; } echo ''; Current Output: School A School A School B School B School B School C School C Expected Output: School name displayed only once (distinct won't work because each school name has 2-3 product credentials School A School B School C Ability for User to click on a school. then the school names underneath will move down (toggle effect) and user can see product, username and password displayed for the school clicked (for example: user clicked on School A) School A productname1, username, password productname2, username, password School B School C

    Read the article

  • Jquery get each div's sub child divs and grab info into an array

    - by McNabbToSkins
    I have a some html that looks like this <div id="main"> <div id="sub_main_1" class="sub_main"> <input type="text" class="sub_name_first" /><br /> <input type="text" class="sub_name_second" /><br /> </div> <div id="sub_main_2" class="sub_main"> <input type="text" class="sub_name_first" /><br /> <input type="text" class="sub_name_second" /><br /> </div> </div> I would like to pull out each sub_main divs information into an array in javascript. So far I have this as my jquery code $('#main').find('.sub_main').each( function() { alert('hi'); }); The alert is just a test that it should show "hi" twice. But this is not working. I am also not clear on how I can store the two inputs in a javascript array. Any help would be great! Thanks,

    Read the article

  • How to grab a PHP site?

    - by s4u
    http://www.frajollakx.co.cc/tool/floodscraps.php - I need to grap the php server code used n this kit .can any posible method to grap this php code ? if so plse share.thanks n advance. :)

    Read the article

  • Grab VLC frames through HTTP protocol

    - by tzador
    Hello, Is there any way to access a movie plaing in VLC through HTTP in jpeg/png format. You see, what I want, is to have a movie playing in my local VLC player, and access currently playing frame through something like http://localhost:9999/current.jpg Is there sucha way, or maybe someother tool can provide it? Thanx a lot in advance

    Read the article

  • SQL join to grab data from same table via intermediate table

    - by Sergio
    Hi Could someone help me with building the following query. I have a table called Sites, and one called Site_H. The two are joined by a foreign key relationship on page_id. So the Sites table contains pages, and the Site_H table shows which pages any given page is a child of by having another foreign key relation back to the site table with a column called ParentOf. So, a page can be have another page as a parent. Other data is stored in the Site_H table such as position etc, hence why it is separated out. I would like a query that returns the details of a page along with the details of its parent page. I just cant quite think about how to structure the SQL. Thanks

    Read the article

  • Grab only 2 items from Jquery Loop

    - by Bry4n
    Here is my Jquery $th.each(function(idx) { var notSelected = $(this).text(); if ((notSelected.indexOf(to) != -1) || (notSelected.indexOf(from) != -1)) { if (idx < 10) { $(this).show(); // and show its corresponding td $td.eq(idx).show(); } } }); It is part of a tableFilter type function for a HTML table. However I want it to only display only 2 of the results. I tried instantiating some kind of index counter but I was unsuccessful. Any help or thoughts would be appreciated.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >