Search Results

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

Page 222/556 | < Previous Page | 218 219 220 221 222 223 224 225 226 227 228 229  | Next Page >

  • Strange behavior of move with strings

    - by Umair Ahmed
    I am testing some enhanced string related functions with which I am trying to use move as a way to copy strings around for faster, more efficient use without delving into pointers. While testing a function for making a delimited string from a TStringList, I encountered a strange issue. The compiler referenced the bytes contained through the index when it was empty and when a string was added to it through move, index referenced the characters contained. Here is a small downsized barebone code sample:- unit UI; interface uses System.SysUtils, System.Types, System.UITypes, System.Rtti, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Layouts, FMX.Memo; type TForm1 = class(TForm) Results: TMemo; procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.fmx} function StringListToDelimitedString ( const AStringList: TStringList; const ADelimiter: String ): String; var Str : String; Temp1 : NativeInt; Temp2 : NativeInt; DelimiterSize : Byte; begin Result := ' '; Temp1 := 0; DelimiterSize := Length ( ADelimiter ) * 2; for Str in AStringList do Temp1 := Temp1 + Length ( Str ); SetLength ( Result, Temp1 ); Temp1 := 1; for Str in AStringList do begin Temp2 := Length ( Str ) * 2; // Here Index references bytes in Result Move ( Str [1], Result [Temp1], Temp2 ); // From here the index seems to address characters instead of bytes in Result Temp1 := Temp1 + Temp2; Move ( ADelimiter [1], Result [Temp1], DelimiterSize ); Temp1 := Temp1 + DelimiterSize; end; end; procedure TForm1.FormCreate(Sender: TObject); var StrList : TStringList; Str : String; begin // Test 1 : StringListToDelimitedString StrList := TStringList.Create; Str := ''; StrList.Add ( 'Hello1' ); StrList.Add ( 'Hello2' ); StrList.Add ( 'Hello3' ); StrList.Add ( 'Hello4' ); Str := StringListToDelimitedString ( StrList, ';' ); Results.Lines.Add ( Str ); StrList.Free; end; end. Please devise a solution and if possible, some explanation. Alternatives are welcome too.

    Read the article

  • Is it possible to profile memory usage of unit tests?

    - by Rowland Shaw
    I'm looking at building some unit tests to ascertain if resources are leaking (or not) using the unit testing framework that comes with Visual Studio. At present, I'm evaluating the latest version of ANTS Profiler, but I can't quite work out if it allows me to force a snapshot from code (so that I can take a snapshot, run a unit test a few hundred times, force a garbage collection, and take another snapshot, and save the results out for later analysis). Is this possible to do with ANTS/Visual Studio or should I be exploring options with other profilers?

    Read the article

  • Integrating YUI tests with CruiseControl

    - by Dan R
    I am using YUI to test my JavaScript app, and want to integrate the test results into my CruiseControl build system. How can I use CruiseControl to run the tests? I initially thought about using the JUnit plugin to drive the tests, but that is a no go. Does anyone else have this working? (Please note: Changing either YUI or CruiseControl isn't an option for me.)

    Read the article

  • how to add WHERE clause to Query on android

    - by Brian
    I would like to limit the results to those whose KEY_HOMEID is equal to journalId. I've been on this for a couple days any help would be appreciated. public Cursor fetchAllNotes(String journalId) { return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_HEIGHT, KEY_BODY, KEY_HOMEID},"FROM DATABASE_TABLE WHERE KEY_HOMEID = journalId",null, null, null, null,null); }

    Read the article

  • What is the difference between PS1 and PROMPT_COMMAND

    - by Jed Daniels
    While taking a look at this awesome thread I noticed that some examples use PS1="Blah Blah Blah" and some use PROMPT_COMMAND="Blah Blah Blah" (and some use both) when setting the prompt in a bash shell. What is the difference between the two? An SO search and even a bit of broader google searching aren't getting me results, so even a link to the right place to look for the answer would be appreciated. Thanks!

    Read the article

  • Highlight the text of listboxitems inside a listbox depending on the textbox :

    - by Malcolm
    I have a listbox and I display incremental search result in it based on the text changed event of a textbox, everytime I update the listboxitemsource. The items displayed inside a listbox the text of it must be highlighted. Suppose the person enter in textbox sy and the listbox displays the result all getting started with sy : Somewhat like this..., System SystemDefault SystemFolder so for the all above 3 results Sy must be highlighted. How to achieve this? tx in advance

    Read the article

  • How do I select the first row per group in an SQL Query?

    - by mafutrct
    I've got this SQL query: SELECT Foo, Bar, SUM(Values) AS Sum FROM SomeTable GROUP BY Foo, Bar ORDER BY Foo DESC, Sum DESC This results in an output similar to this: 47 1 100 47 0 10 47 2 10 46 0 100 46 1 10 46 2 10 44 0 2 I'd like to have only the first row per Foo and ignore the rest. 47 1 100 46 0 100 44 0 2 How do I do that?

    Read the article

  • how to implement jquery php progress bar

    - by KittyYoung
    I have a multi-step form where the form on Step3 submits to Step4.php. Step4 is a results page, and it takes some time to load, so I wanted to try and implement a progress bar or a loading bar or something when the user clicks the step3 submit button before Step4.php actually loads. I would think I could do this with jquery? But, I'm not sure how. Is it possible to do this without having to use jquery to post the data to step4.php?

    Read the article

  • SQL join produces one result only

    - by Rami
    Can anyone please tell me why this result is generation only one results? taking in mind that everything is set right and the three tables are populated correctly, i took out the group_concat and it worked but of course with a php undefined index error! SELECT `songs`.`song_name`, `songs`.`add_date`, `songs`.`song_id`, `songs`.`song_picture`, group_concat(DISTINCT artists.artist_name) as artist_name FROM (`songs`) JOIN `mtm_songs_artists` ON `songs`.`song_id` = `mtm_songs_artists`.`song_id` JOIN `artists` ON `artists`.`artist_id` = `mtm_songs_artists`.`artist_id` ORDER BY `songs`.`song_id` DESC LIMIT 10 so i'm guessing it's something related to group_concat. best regards, Rami

    Read the article

  • mySQL search for a number in VARCHAR field

    - by sea_1987
    Hi There, I have a field in my database that contain comma seperated values these values are numbers, and I am trying to do a search and count the number of times that a number appears in that column throughout the column, $sql = "SELECT sector_id_csv, COUNT(sector_id_csv) as count FROM cv WHERE sector_id_csv LIKE '$sectorId'"; This seems slow and does not return any results, and I know the sector_id it is search exsists in the table.

    Read the article

  • Unable to get members of Universal Distribution List using Powershell

    - by PowerShellScripter
    I am trying to write a script to list out all members of a "Universal Distribution List" using Powershell. However I keep getting an empty result set back. When I run the following command against a "Global Distribution List" it works fine and I can see who belongs to it. dsquery group -name "SomeGroup" | dsget group -members -expand However as I mentioned when I run this against a "Universal Distribution List" I get no results. Can anyone help?

    Read the article

  • How do I Store / Access Translations Efficiently?

    - by Gilbert
    I am trying to translate some of the phrases of my website into various languages. so, in my database, I have a table with rows of ID//text//dest_language//text_in_dest_language At the moment, I retreive each translation one by one: get text_in_dest_language where text="Hello World" and dest_languge="zh" This results in 40-50 db calls per page, which, on the app engine, is rather slow. What can I do to mitigate this slowdown?

    Read the article

  • post increment vs pre increment [closed]

    - by mousey
    Possible Duplicate: Difference between i++ and ++i in a loop? Hi, Can some one please help me when to use pre increment or post increment in a for loop. I am getting the same results for both the loops! I also would like to know when and where to choose one between the two. Thanks in advance.

    Read the article

  • Haskell - function (that returns a list) on each element in a list

    - by Ben
    The assignment is to create a multiples function and I essentially want todo the following code: map (\t -> scanl (\x y -> x+y) t (repeat t)) listofnumbers The problem is that the scanl function returns a list of results rather than the one which the map function requires. So is there a function that will allow the return of lists?

    Read the article

  • How to group a database write and spreadsheet write in single "transaction"

    - by WhyGeeEx
    I have a Java program that writes results to both a DB (SQL Server) and a spreadsheet (POI), and it would be best if neither is written to if there's an error with either. It would be a lot worse if the spreadsheet was produced and then an error happened while saving to the DB, so I'm doing the DB-write first. Even so, I'm wondering if someone knows of a way to guarantee they both succeed or fail as a unit. Thanks!

    Read the article

  • Best way to get timezone of user based on area code

    - by niyogi
    Hi folks I'm attempting to get a timezone of a user based on area code information that they provided. I discovered the following resource on maxmind: http://geolite.maxmind.com/download/geoip/api/php/timezone/ I suspect that I could use this with another api that provides the state that an area code belongs to. I'm looking for a simple REST API that provides this info - or a robust scraping routine that achieve the same results. Thanks in advance!

    Read the article

  • PHP - Retrieve Data From mySQL Server

    - by Kevin
    Hello, Does anyone know how to retrieve a piece of data and display the results in php file? A similar query that I would enter is something like this: SELECT 'email' FROM 'users' WHERE 'username' = 'bob' Thus, the result would be just the email. Thanks, Kevin

    Read the article

  • Flex URLRequest and .NET authorization

    - by user252160
    can I make role based authorization when sending requests to an ASP.NET MVC backend system. I am calling action methods and expecting JSON results, however, some action methods are decorated with the [Authorize] attribute, others require some role privileges to be present. I certainly hope that passing authorization data with every request is possible

    Read the article

  • unknown action with will_paginate

    - by merlin
    In my users controller I have this in a method: @users = User.paginate :page => params[:page], :per_page => 10, The results are rendered on users/search. The 2nd page link points to users/search?page=2, but it leads to an unknown action error.

    Read the article

  • CoreData NSFetchedResultsController Empty Section Display

    - by user280390
    Hello I would like to show a fixed number of sections in a table view with a Fetched Results Controller as the data source. If you image the contacts app where sections organised by the alphabet, it will not have a header for B if there are no contacts in that section, so the section headers you see are A then C. I would like to display a section header in my table (for B), but without any rows. an empty section in effect. Can NSFetchedResultsController do this for me?

    Read the article

< Previous Page | 218 219 220 221 222 223 224 225 226 227 228 229  | Next Page >