Search Results

Search found 2886 results on 116 pages for 'behaviour'.

Page 13/116 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Strange behaviour when simply adding strings in Lazarus - FreePascal

    - by linkcharger
    The program has several "encryption" algorithms. This one should blockwise reverse the input. "He|ll|o " becomes "o |ll|He" (block length of 2). I add two strings, in this case appending the result string to the current "block" string and making that the result. When I add the result first and then the block it works fine and gives me back the original string. But when i try to reverse the order it just gives me the the last "block". Several other functions that are used for "rotation" are above. //amount of blocks function amBl(i1:integer;i2:integer):integer; begin if (i1 mod i2) <> 0 then result := (i1 div i2) else result := (i1 div i2) - 1; end; //calculation of block length function calcBl(keyStr:string):integer; var i:integer; begin result := 0; for i := 1 to Length(keyStr) do begin result := (result + ord(keyStr[i])) mod 5; result := result + 2; end; end; //desperate try to add strings function append(s1,s2:string):string; begin insert(s2,s1,Length(s1)+1); result := s1; end; function rotation(inStr,keyStr:string):string; var //array of chars -> string block,temp:string; //position in block variable posB:integer; //block length and block count variable bl, bc:integer; //null character as placeholder n : ansiChar; begin //calculating block length 2..6 bl := calcBl(keyStr); setLength(block,bl); result := ''; temp := ''; {n := #00;} for bc := 0 to amBl(Length(inStr),bl) do begin //filling block with chars starting from back of virtual block (in inStr) for posB := 1 to bl do begin block[posB] := inStr[bc * bl + posB]; {if inStr[bc * bl + posB] = ' ' then block[posB] := n;} end; //adding the block in front of the existing result string temp := result; result := block + temp; //result := append(block,temp); //result := concat(block,temp); end; end; (full code http://pastebin.com/6Uarerhk) After all the loops "result" has the right value, but in the last step (between "result := block + temp" and the "end;" of the function) "block" replaces the content of "result" with itself completely, it doesn't add result at the end anymore. And as you can see I even used a temp variable to try to work around that.. doesnt change anything though.

    Read the article

  • Strange performance behaviour

    - by plastilino
    I'm puzzled with this. In my machine Direct calculation: 375 ms Method calculation: 3594 ms, about TEN times SLOWER If I place the method calulation BEFORE the direct calculation, both times are SIMILAR. Woud you check it in your machine? class Test { static long COUNT = 50000 * 10000; private static long BEFORE; /*--------METHOD---------*/ public static final double hypotenuse(double a, double b) { return Math.sqrt(a * a + b * b); } /*--------TIMER---------*/ public static void getTime(String text) { if (BEFORE == 0) { BEFORE = System.currentTimeMillis(); return; } long now = System.currentTimeMillis(); long elapsed = (now - BEFORE); BEFORE = System.currentTimeMillis(); if (text.equals("")) { return; } String message = "\r\n" + text + "\r\n" + "Elapsed time: " + elapsed + " ms"; System.out.println(message); } public static void main(String[] args) { double a = 0.2223221101; double b = 122333.167; getTime(""); /*--------DIRECT CALCULATION---------*/ for (int i = 1; i < COUNT; i++) { Math.sqrt(a * a + b * b); } getTime("Direct: "); /*--------METHOD---------*/ for (int k = 1; k < COUNT; k++) { hypotenuse(a, b); } getTime("Method: "); } }

    Read the article

  • ASP.NET problem - Firebug shows odd behaviour

    - by Brandi
    I have an ASP.NET application that does a large database read. It loads up a gridview inside an update panel. In VS2008, just running on my local machine, it runs fantastically. In production (identical code, just published and put on one of our network servers), it runs slow as dirt. Debug is set to false, so this is not the cause of the slow down. I'm not an experienced web developer, so besides that, feel free to suggest the obvious. I have been using Firebug to determine what's going on, and here is what that has turned up: On production, there are around 500 requests. The timeline bar is very short. The size column varies from run to run, but is always the same for the duration of the run. Locally, there are about 30 requests. The timeline bar takes up the entire space. Can anyone shed some light on why this is happening and what I can do to fix it? Also, I can't find much of anything on the web about this, so any references are helpful too.

    Read the article

  • Weird behaviour with optparse and bash tab completion

    - by PulpFiction
    Hi I am building a script for users new to Linux, so please understand why I am asking this :) My script runs like this: python script.py -f filename.txt I am using the optparse module for this. However, I noticed the following when doing tab completion. The tab completion works when I do: python script.py <tab completion> # Tab completion works normally as expected But it does not work when I do it like this: python script.py -f <tab completion> # No type of tab completion works here. I really don't want my users typing the name of the input file. Tab completion is a must. How can I get it working or what am I doing wrong here?

    Read the article

  • Dijit.Dialog irregular behaviour of scroll bar making dialog box unusable

    - by arachnica
    I use a dojo dialog box to display a page pulled from another part of the site. The page being pulled is long - so I use the css attribute: `max-height: 900px; overflow:auto; To make sure it displays properly. For a long page, it displays a 900px high dialog box with a scrollbar down the right hand side side. However the scrollbar is going up to the dialog box title and shifting the close box icon to the left. In internet explorer, when a user moves his mouse of the close box icon, it moves to the right. If you move your mouse to the right it moves left - so you can never actually close the box with the icon. I have tried clearing the content in the box and just making it very long, and the same thing still happens. Oddly enough, if I close the window using esc and click pull up the dialog box again, it works fine. Any way I can make it display properly at all times. I am using Dojo version 1.3. Thanks

    Read the article

  • Unexpected behaviour of Order by clause(SQL SERVER 2005)

    - by Newbie
    I have a table which looks like Col1 col2 col3 col4 col5 1 5 1 4 6 1 4 0 3 7 0 1 5 6 3 1 8 2 1 5 4 3 2 1 4 The script is declare @t table(col1 int, col2 int, col3 int,col4 int,col5 int) insert into @t select 1,5,1,4,6 union all select 1,4,0,3,7 union all select 0,1,5,6,3 union all select 1,8,2,1,5 union all select 4,3,2,1,4 If I do a sorting (ascending), the output is Col1 col2 col3 col4 col5 0 1 5 6 3 1 4 0 3 7 1 5 1 4 6 1 8 2 1 5 4 3 2 1 4 The query is Select * from @t order by col1,col2,col3,col4,col5 But as can be seen that the sorting output is wrong (col2 to col5). Why so and how to overcome this? Thanks in advance

    Read the article

  • Weird NodeBuilder and GPath behaviour in Grails

    - by yogiebiz
    Hi, I am quite new with Grails and now I have a problem while using NodeBuilder and GPath. Here is the code snippet def builder = new NodeBuilder() def menu = builder.menu { header(title: "header 1") { submenu(title: "submenu 1.1") submenu(title: "submenu 1.2") } header(title: "header 2") } menu.grep { println it.'@title' When I executed it with Groovy 1.7.2, the result was: header 1 header 2 which just like I expected. But when I executed the code in Grails 1.3.1, the result was different. The result was: submenu 1.1 submenu 1.2 any idea why this happened?

    Read the article

  • Behaviour to simulate an enum implementing an interface

    - by fearofawhackplanet
    Say I have an enum something like: enum OrderStatus { AwaitingAuthorization, InProduction, AwaitingDespatch } I've also created an extension method on my enum to tidy up the displayed values in the UI, so I have something like: public static string ToDisplayString(this OrderStatus status) { switch (status) { case Status.AwaitingAuthorization: return "Awaiting Authorization"; case Status.InProduction: return "Item in Production"; ... etc } } Inspired by the excellent post here, I want to bind my enums to a SelectList with an extension method: public static SelectList ToSelectList<TEnum>(this TEnum enumObj) however, to use the DisplayString values in the UI drop down I'd need to add a constraint along the lines of : where TEnum has extension ToDisplayString Obviously none of this is going to work at all with the current approach, unless there's some clever trick I don't know about. Does anyone have any ideas about how I might be able to implement something like this?

    Read the article

  • Non-CDN hosted jQuery caused some strange behaviour

    - by kwokwai
    Hi all, I was using this JQuery in this download link, and included it in the head tag of a HTML web page: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> In a php web page, I got these few lines of codes: $.ajax({ url: 'http://mywebsite.com/site1/toavail/, type: "post", success: function(data) { // some more code here } }); When I tested the HTML page in IE 6, and 7, I saw the same warning message: "permission denied" When I tested it in Firefox 3, nothing was returned from the server web page. Later, I changed the JQuery source link to be: http://code.jquery.com/jquery-1.4.2.js I refreshed the web page, and I could saw the returned value then.

    Read the article

  • Adding behaviour to a set of classes

    - by devoured elysium
    I have defined an Event class: Event and all the following classes inherit from Event: SportEventType1 SportEventType2 SportEventType3 SportEventType4 Right now I will only have SportEvents but I don't know if in the future I'll want some other kind of events that doesn't even have anything to do with Sports. Later, I will want to draw some graphics with info taken from Events, and the drawing logic can be a bit complex. But, for the moment, I think I shouldn't think of how the drawing will be done and I believe that maybe it'd be better if that drawing part was not put as an integral part of the Event/SportEventX class chain. I am looking for solutions for this problem. I know I could just make Event have an instance variable(attribute, for the java crowds) pointing to something as an IDrawInterface, but that would make the Event class "assume" it will be later used for drawing. I would like to make the Event class oblivious to this if possible. Thanks!

    Read the article

  • Fixing Chrome resizing behaviour

    - by bobo
    <div style="background-color:red;width: 300px;"> <div style="float:left;border:1px solid yellow;">AAA AAA AAA</div> <div style="float:left;border:1px solid green;">BBB BBB BBB</div> <div style="clear:both;"></div> </div> Pasting the above HTML here: http://htmledit.squarefree.com/ And then zoom out in Chrome, you will see that <div> B will eventually be forced down to the next row. If you do the same thing in Firefox and IE, both <div> A and B will stay on the same row. Adding a height attribute on the parent <div> may help, but if the height of the content is not known beforehand, this will not be feasible. I would like to know how this problem can be fixed in Chrome. Many thanks to you all. EDIT: uploaded a screenshot here: http://img52.imageshack.us/i/screenshot1xd.jpg/

    Read the article

  • Behaviour of System.Timer when Interval property changed

    - by lowlyintern
    I have a System.Timer setup to trigger an event every day at 2AM. If the process the timer starts fails then I want the timer to be reset to run every 15 minutes until the process completes succesfully. // this is how the timer is set up. // this is working correctly. double startTime = milliseconds_of_hour_to_start. Timer = new System.Timers.Timer( startTime); Here is the code to reset the timer on success or failure of the event handler. NOTE the timer is not being stopped, just the Interval property is being reset. if (ProcessSuccess) { Timer.Interval = TimeSpan.FromHours(24).TotalMilliseconds; } else { Timer.Interval = TimeSpan.FromMinutes(15).TotalMilliseconds; } My question is this, if the process fails say 4 times, then succeeds will the Timer now be running at around 3AM? i.e. after failing will the original start time of 2AM be advanced by 15 minutes?

    Read the article

  • jsf custom control strange behaviour

    - by Cristian Boariu
    hi, I have a jsf custom control which contains this: <rich:column> <c:if test="#{not empty columnTitle}"> <f:facet name="header"> <rich:spacer/> </f:facet> </c:if> <s:link view="#{view}" value="#{messages['edit']}" propagation="#{propagation}"> <f:param name="${paramName}" value="${paramValue}"/> </s:link> &#160; <h:commandLink action="#{entityHome.removeMethodName(entity)}" value="#{messages['remove']}"/> </rich:column> You see that command link action. I want it to call an action like this: action="#{documentHome.removeProperty(property)"} Well, in order to do this i call the control like: <up:columnDetails view="/admin/property.xhtml" columnTitle="yes" entity="#{property}" paramValue="#{property.propertyId}" propagation="nest" entityHome="documentHome" removeMethodName="removeProperty"/> So, i hardcode entityHome and removeMethodName. Well an error is firing. Caused by javax.servlet.ServletException with message: "#{entityHome.removeMethodName(entity)}: javax.el.MethodNotFoundException It seems that it cannot interpret "removeMethodName". If i print entityHome or removeMethodName it correctly shows the values i pass. But i think jsf has an error like not beeing able to "believe" that after an object.something, that something can be a parameter... Can anyone guide me...?

    Read the article

  • strange behaviour of static method

    - by Cristian Boariu
    Hi, I load a js variable like this: var message = '<%= CAnunturi.CPLATA_RAMBURS_INFO %>'; where the static string CPLATA_RAMBURS_INFO i put like: public static string CPLATA_RAMBURS_INFO = "test"; I use it very well in this method. <script type="text/javascript"> var categoryParam = '<%= CQueryStringParameters.CATEGORY %>'; var subcategoryParam = '<%= CQueryStringParameters.SUBCATEGORY1_ID %>'; var message = '<%= CAnunturi.CPLATA_RAMBURS_INFO %>'; function timedInfo(header) { $.jGrowl(message, { header: header }); }; </script> so the message appears. I do not undersand, why, iso of "test", if i take the value from a static method, ths use of message js var is no longer succesfull (the message no longer appears). public static string CPLATA_RAMBURS_INFO = getRambursInfo(); public static string getRambursInfo() { return System.IO.File.ReadAllText(PathsUtil.getRambursPlataFilePath()); } Any help would be highly appreciated....

    Read the article

  • Strange behaviour when collapsing lines in XML bound WPF Datagrid

    - by Flossn
    i am using a wpf datagrid with a xml file as DataContext. All working good except for iterating thorough the table and collapsing individual rows. There are several checkboxes where the user can decide which kinds of rows he wants to see, dependent on their error level string. If a checkbox is checked, some of the rows are collapsed, others not. You need to uncheck the checkbox and check it again to collapse the ones of the first try and some of the others. If you recheck it again more rows are collapsed every time. I guess it has something to do with how much of the list is actually visible and how much not because of the window size. Thanks in advance. foreach (DataGridRow r in rows) { bool showRow = true; var tb = Datagrid.GetCell(dataGridEvents, r, 2).Content; string level = ((TextBlock)tb).Text; switch (level) { case "Warning": showRow = checkBoxWarnings.IsChecked.HasValue ? checkBoxWarnings.IsChecked.Value : false; break; case "Critical": showRow = checkBoxCritical.IsChecked.HasValue ? checkBoxCritical.IsChecked.Value : false; break; case "OK": showRow = checkBoxOK.IsChecked.HasValue ? checkBoxOK.IsChecked.Value : false; break; case "Unknown": showRow = checkBoxUnknown.IsChecked.HasValue ? checkBoxUnknown.IsChecked.Value : false; break; } r.Visibility = showRow ? Visibility.Visible : Visibility.Collapsed; }

    Read the article

  • VHDL Simulation Timing Behaviour

    - by chris
    I'm trying to write some VHDL code that simply feeds sequential bits from a std_logic_vector into a model of an FSM. However, the bits don't seem to be updating correctly. To try figure out the issue, I have the following code, where instead of getting a bit out of a vector, I'm just toggling the signal x (the same place I'd be getting a bit out). clk <= NOT clk after 10 ns; process(clk) begin if count = 8 then assert false report "Simulation ended" severity failure; elsif (clk = '1') then x <= test1(count); count <= count + 1; end if; end process; EDIT: It appears I was confused.I've put it back to trying to take bit by bit out of the vector. This is the output. I would have thought that on when count is 1, x would take on the value of test1(1) which is a 1.

    Read the article

  • non-CDN Hosted jQuery caused strange some behaviour

    - by kwokwai
    Hi all, I was using this JQuery in this download link, and included it in the head tag of a HTML web page: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> In a php web page, I got these few lines of codes: $.ajax({ url: 'http://mywebsite.com/site1/toavail/, type: "post", success: function(data) { // some more code here } }); When I tested the HTML page in IE 6, and 7, I saw the same warning message: "permission denied" When I tested it in Firefox 3, nothing was returned from the server web page. Later, I changed the JQuery source link to be: http://code.jquery.com/jquery-1.4.2.js then I refreshed the web page, and I could saw the returned value.

    Read the article

  • Weird behaviour with Scanner#nextFloat

    - by James P.
    Running the following in Eclipse initially caused Scanner to not recognize carriage returns in the console effectively blocking further input: price = sc.nextFloat(); Adding this line before the code causes Scanner to accept 0,23 (french notation) as a float: Locale.setDefault(Locale.US); This is most probably due to regional settings in Windows XP Pro. When the code is run again 0,23 is still accepted and entering 0.23 causes it to throw a java.util.InputMismatchException. Any explanation as to why this is happening? Also is there a workaround or should I just use Float#parseFloat? Edit: import java.util.Locale; import java.util.Scanner; public class NexFloatTest { public static void main(String[] args) { //Locale.setDefault(Locale.US); //Locale.setDefault(Locale.FRANCE); // Gives fr_BE on this system System.out.println(Locale.getDefault()); float price; String uSDecimal = "0.23"; String frenchDecimal = "0,23"; Scanner sc = new Scanner(uSDecimal); try{ price = sc.nextFloat(); System.out.println(price); } catch (java.util.InputMismatchException e){ e.printStackTrace(); } try{ sc = new Scanner(frenchDecimal); price = sc.nextFloat(); System.out.println(price); } catch (java.util.InputMismatchException e){ e.printStackTrace(); } String title = null; System.out.print("Enter title:"); try{ title = sc.nextLine(); // This line is skippe } catch(java.util.NoSuchElementException e ){ e.printStackTrace(); } System.out.print(title); } }

    Read the article

  • How to acheieve this kind of behaviour in asp.net mvc

    - by kumar
    Hello Friends,, I have this two Action result methods. public ActionResult GetStudentInfo(StudentBE s) { return PartialView("editStudent", s); } public ActionResult GenericList() { StudentBE codes = new StudentBE(); codes.lookcodes= GetStudentCodes(new string[] { "A", "B", "C, "D", "E" }); return PartialView(codes); } // Lookcodes display dropdownlist boxes in the GeneridList view.. In genericList view I hvae beginForm.. <% using (Html.BeginForm("Updatestudent", "expense", FormMethod.Post, new { @id = "id" })) { %> <% } %> so My updatestudent method is [HttpPost] public JsonResult Updatestudent(StudentBE e) { var status = common.Update(e.student); } } return Json(status.ToString()); } Here is my problem.. the GetStudentInfo Actionresult is having each student information.. in UpdateStudent method Update Method calls the DB calls for stored procedure to update each user information now to update each user I need to call GetstudentInfo each time to get student information to update..? how to call GetStudentInfo method here to get studentinformation? student informatin may be multiple that is more than one student informaton... can anybody help me out.. thanks

    Read the article

  • javascript really strange behaviour

    - by teehoo
    I have the following code if (msg.position == 0) //removed for brevity else if (msg.position == txtArea.value.length) //removed for brevity } else { //ERROR: should not reach here. errorDivTag.innerHTML += msg.position + " " + txtArea.value.length; } I'm having some really weird situations where I'm getting the error in the last code block, but the printed positions show that msg.position is in fact equal to the txtArea.value.length. This only happens 1% of the time, almost as if I have some kind of race-condition in my code where the two are NOT equal during the second if statement, but equal when I print in the error message. Any ideas?

    Read the article

  • ASP.MVC ModelBinding Behaviour

    - by OldBoy
    This one has me stumped, despite the numerous posts on here. The scenario is a basic MVC(2) web application with simple CRUD operations. Whenever the edit form is submitted and the UpdateModel() called, an exception is thrown: System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException was unhandled by user code This occurs against a DropDownList value which is a foreign key on the entity table. However, there is another DropDownList list on the form, representing another foreign key, which does not throw the error (unsurprisingly). Changing the property values manually inside the Edit Action: Recipe recipe = repository.GetRecipe(int.Parse(formValues["recipeid"])); recipe.CategoryId = Convert.ToInt32(formValues["CategoryId"].ToString()); recipe.Page = int.Parse(formValues["Page"].ToString()); recipe.PublicationId=Convert.ToInt32(formValues["PublicationId"].ToString()); Allows the CategoryId and Page properties to be updated, and then the error is thrown on the PublicationId. All of the referential integrity is checked an the same in the db and the dbml. Any light shed on this would be most welcome.

    Read the article

  • Cannot understand the behaviour of dotnet compiler while instantiating a class thru interface(C#)

    - by Newbie
    I have a class that impelemnts an interface. The interface is public interface IRiskFactory { void StartService(); void StopService(); } The class that implements the interface is public class RiskFactoryService : IRiskFactory { } Now I have a console application and one window service. From the console application if I write the following code static void Main(string[] args) { IRiskFactory objIRiskFactory = new RiskFactoryService(); objIRiskFactory.StartService(); Console.ReadLine(); objIRiskFactory.StopService(); } It is working fine. However, when I mwrite the same piece of code in Window service public partial class RiskFactoryService : ServiceBase { IRiskFactory objIRiskFactory = null; public RiskFactoryService() { InitializeComponent(); objIRiskFactory = new RiskFactoryService(); <- ERROR } /// <summary> /// Starts the service /// </summary> /// <param name="args"></param> protected override void OnStart(string[] args) { objIRiskFactory.StartService(); } /// <summary> /// Stops the service /// </summary> protected override void OnStop() { objIRiskFactory.StopService(); } } It throws error: Cannot implicitly convert type 'RiskFactoryService' to 'IRiskFactory'. An explicit conversion exists (are you missing a cast?) When I type casted to the interface type, it started working objIRiskFactory = (IRiskFactory)new RiskFactoryService(); My question is why so? Thanks.(C#)

    Read the article

  • Strange code behaviour?

    - by goldenmean
    Hi, I have a C code in which i have a structure declaration which has an array of int[576] declared in it. For some reason, i had to remove this array from the structure, So i replaced this array with a pointer as int *ptr; declared some global array of same type, somewhere else in the code, and initialized this pointer by assigning the global array to this pointer. So i did not have to change the way i was accessing this array, from other parts of my code. But it works fine/gives desired output when i have the array declared in the structure, but it gives junk output when i declare it as a pointer in the structure and assign a global array to this pointer, as a part of the pointer initialization. All this code is being run on MS-VC 6.0/Windows setup/Intel-x86. I tried below things: 1)Suspected structure padding/alignment but could not get any leads? If at all structure alignment could be a culprit how can i proceed to narrow it down and confirm it? 2) I have made sure that in both cases the array is initialized to some default values, say 0 before its first use, and its not being used before initialization. 3)I tried using global array as well as malloc based memory for this newly declared array. Same result, junk output. Am i missing something? How can i zero down the problem. Any pointers would be helpful. Thanks, -AD.

    Read the article

  • Using AsyncTask, but experiencing unexpected behaviour

    - by capcom
    Please refer to the following code which continuously calls a new AsyncTask. The purpose of the AsyncTask is to make an HTTP request, and update the string result. package room.temperature; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.concurrent.ExecutionException; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import android.app.Activity; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.widget.TextView; public class RoomTemperatureActivity extends Activity { String result = null; StringBuilder sb=null; TextView TemperatureText, DateText; ArrayList<NameValuePair> nameValuePairs; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TemperatureText = (TextView) findViewById(R.id.temperature); DateText = (TextView) findViewById(R.id.date); nameValuePairs = new ArrayList<NameValuePair>(); for (int i = 0; i < 10; i++) { RefreshValuesTask task = new RefreshValuesTask(); task.execute(""); } } // The definition of our task class private class RefreshValuesTask extends AsyncTask<String, Integer, String> { @Override protected void onPreExecute() { super.onPreExecute(); } @Override protected String doInBackground(String... params) { InputStream is = null; try { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://mywebsite.com/roomtemp/tempscript.php"); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); } catch(Exception e) { Log.e("log_tag", "Error in http connection" + e.toString()); } try { BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8); sb = new StringBuilder(); sb.append(reader.readLine()); is.close(); result=sb.toString(); } catch(Exception e) { Log.e("log_tag", "Error converting result " + e.toString()); } return result; } @Override protected void onProgressUpdate(Integer... values) { super.onProgressUpdate(values); } @Override protected void onPostExecute(String result) { super.onPostExecute(result); //System.out.println(result); setValues(result); } } public void setValues(String resultValue) { System.out.println(resultValue); String[] values = resultValue.split("&"); TemperatureText.setText(values[0]); DateText.setText(values[1]); } } The problem I am experiencing relates to the AsyncTask in some way or the function setValues(), but I am not sure how. Essentially, I want each call to the AsyncTask to run, eventually in an infinite while loop, and update the TextView fields as I have attempted in setValues. I have tried since yesterday after asking a question which led to this code, for reference. Oh yes, I did try using the AsyncTask get() method, but that didn't work either as I found out that it is actually a synchronous call, and renders the whole point of AsyncTask useless.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >