Search Results

Search found 3612 results on 145 pages for '1 21 gigawatts'.

Page 28/145 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • PHP JSON encode output number as string

    - by mitch
    I am trying to output a JSON string using PHP and MySQL but the latitude and longitude is outputting as a string with quotes around the values. This causes an issue when I am trying to add the markers to a google map. Here is my code: $sql = mysql_query('SELECT * FROM markers WHERE address !=""'); $results = array(); while($row = mysql_fetch_array($sql)) { $results[] = array( 'latitude' =>$row['lat'], 'longitude' => $row['lng'], 'address' => $row['address'], 'project_ID' => $row['project_ID'], 'marker_id' => $row['marker_id'] ); } $json = json_encode($results); echo "{\"markers\":"; echo $json; echo "}"; Here is the expected output: {"markers":[{"latitude":0.000000,"longitude":0.000000,"address":"2234 2nd Ave, Seattle, WA","project_ID":"7","marker_id":"21"}]} Here is the output that I am getting: {"markers":[{"latitude":"0.000000","longitude":"0.000000","address":"2234 2nd Ave, Seattle, WA","project_ID":"7","marker_id":"21"}]} Notice the quotes around the latitude and longitude values.

    Read the article

  • latest Xemacs on Windows binary download

    - by anjanb
    I'm trying to get an updated version for Windows vista. I previously got 21.4.22 but it's been a year since that release. The linux versions should be 22.x. I'm wondering if anyone else builds stable binaries for Windows ? 21.4.22 has several bugs and I cannot figure out how to fix them. I know Xemacs is not as active as GNU emacs but still aren't there any Xemacs users on windows who build their own copies even if the official site doesn't ? I would like to be able to compare buffers, files and directories apart from being able to edit any file : java, javascript, ruby, .bat, .sh, .xml, etc.

    Read the article

  • How do I add a column that displays the number of distinct rows to this query?

    - by Fake Code Monkey Rashid
    Hello good people! I don't know how to ask my question clearly so I'll just show you the money. To start with, here's a sample table: CREATE TABLE sandbox ( id integer NOT NULL, callsign text NOT NULL, this text NOT NULL, that text NOT NULL, "timestamp" timestamp with time zone DEFAULT now() NOT NULL ); CREATE SEQUENCE sandbox_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER SEQUENCE sandbox_id_seq OWNED BY sandbox.id; SELECT pg_catalog.setval('sandbox_id_seq', 14, true); ALTER TABLE sandbox ALTER COLUMN id SET DEFAULT nextval('sandbox_id_seq'::regclass); INSERT INTO sandbox VALUES (1, 'alpha', 'foo', 'qux', '2010-12-29 16:51:09.897579+00'); INSERT INTO sandbox VALUES (2, 'alpha', 'foo', 'qux', '2010-12-29 16:51:36.108867+00'); INSERT INTO sandbox VALUES (3, 'bravo', 'bar', 'quxx', '2010-12-29 16:52:36.370507+00'); INSERT INTO sandbox VALUES (4, 'bravo', 'foo', 'quxx', '2010-12-29 16:52:47.584663+00'); INSERT INTO sandbox VALUES (5, 'charlie', 'foo', 'corge', '2010-12-29 16:53:00.742356+00'); INSERT INTO sandbox VALUES (6, 'delta', 'foo', 'qux', '2010-12-29 16:53:10.884721+00'); INSERT INTO sandbox VALUES (7, 'alpha', 'foo', 'corge', '2010-12-29 16:53:21.242904+00'); INSERT INTO sandbox VALUES (8, 'alpha', 'bar', 'corge', '2010-12-29 16:54:33.318907+00'); INSERT INTO sandbox VALUES (9, 'alpha', 'baz', 'quxx', '2010-12-29 16:54:38.727095+00'); INSERT INTO sandbox VALUES (10, 'alpha', 'bar', 'qux', '2010-12-29 16:54:46.237294+00'); INSERT INTO sandbox VALUES (11, 'alpha', 'baz', 'qux', '2010-12-29 16:54:53.891606+00'); INSERT INTO sandbox VALUES (12, 'alpha', 'baz', 'corge', '2010-12-29 16:55:39.596076+00'); INSERT INTO sandbox VALUES (13, 'alpha', 'baz', 'corge', '2010-12-29 16:55:44.834019+00'); INSERT INTO sandbox VALUES (14, 'alpha', 'foo', 'qux', '2010-12-29 16:55:52.848792+00'); ALTER TABLE ONLY sandbox ADD CONSTRAINT sandbox_pkey PRIMARY KEY (id); Here's the current SQL query I have: SELECT * FROM ( SELECT DISTINCT ON (this, that) id, this, that, timestamp FROM sandbox WHERE callsign = 'alpha' AND CAST(timestamp AS date) = '2010-12-29' ) playground ORDER BY timestamp DESC This is the result it gives me: id this that timestamp ----------------------------------------------------- 14 foo qux 2010-12-29 16:55:52.848792+00 13 baz corge 2010-12-29 16:55:44.834019+00 11 baz qux 2010-12-29 16:54:53.891606+00 10 bar qux 2010-12-29 16:54:46.237294+00 9 baz quxx 2010-12-29 16:54:38.727095+00 8 bar corge 2010-12-29 16:54:33.318907+00 7 foo corge 2010-12-29 16:53:21.242904+00 This is what I want to see: id this that timestamp count ------------------------------------------------------------- 14 foo qux 2010-12-29 16:55:52.848792+00 3 13 baz corge 2010-12-29 16:55:44.834019+00 2 11 baz qux 2010-12-29 16:54:53.891606+00 1 10 bar qux 2010-12-29 16:54:46.237294+00 1 9 baz quxx 2010-12-29 16:54:38.727095+00 1 8 bar corge 2010-12-29 16:54:33.318907+00 1 7 foo corge 2010-12-29 16:53:21.242904+00 1 EDIT: I'm using PostgreSQL 9.0.* (if that helps any).

    Read the article

  • Easy to use time-stamps in Python

    - by Morlock
    I'm working on a journal-type application in Python. The application basically permits the user write entries in the journal and adds a time-stamp for later querying the journal. As of now, I use the time.ctime() function to generate time-stamps that are visually friendly. The journal entries thus look like: Thu Jan 21 19:59:47 2010 Did something Thu Jan 21 20:01:07 2010 Did something else Now, I would like to be able to use these time-stamps to do some searching/querying. I need to be able to search, for example, for "2010", or "feb 2010", or "23 feb 2010". My questions are: 1) What time module(s) should I use: time vs datetime? 2) What would be an appropriate way of creating and using the time-stamp objects? Many thanks!

    Read the article

  • cant login using System.Diagnostics.Process.Start

    - by omair iqbal
    i am tying to login using System.Diagnostics.Process.Start private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("iexplore","[email protected]","password","http://www.gmail.com"); } but visual studio gives me these 2 errors: Error 1 The best overloaded method match for 'System.Diagnostics.Process.Start(string, string, System.Security.SecureString, string)' has some invalid arguments C:\Documents and Settings\Omair\My Documents\Visual Studio 2008\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Form1.cs 21 13 WindowsFormsApplication3 and Error 2 Argument '3': cannot convert from 'string' to 'System.Security.SecureString' C:\Documents and Settings\Omair\My Documents\Visual Studio 2008\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Form1.cs 21 80 WindowsFormsApplication3 note: i am brand new to c# and reletively new to the world of programming sorry for my english

    Read the article

  • crystal reporting in vs2008

    - by hatem gamil
    hi all i wana ask a question about crystal reporting in vs 2008 lets say i have a report with these data customer_ID Customer_Name Order_amoont Order_Date (#group1 VipCustomer) 1 xyz 3 1/1/2010 2 abc 4 2/2/2010 5 sds 21 3/12/2009 (#Group2 NormalCustomer) 3 tyt 2 3/3/2010 4 ha 4 21/3/2009 i want only to display records where Order_Date year is in 2010 only so i went to the section expert and i added a condintion in suppress formula Year(order_Date)=2010 and i get the result ,,the question is how to count how many vip customers ordered in 2010 only and how many normal customer order in 2010 only ,,then i want the total number of both type of customers to be displayed to have a report like that:: customer_ID Customer_Name Order_amoont Order_Date (#group1 VipCustomer) 1 xyz 3 1/1/2010 2 abc 4 2/2/2010 subtotal 2 (#Group2 NormalCustomer) 3 tyt 2 3/3/2010 subtotal 1 total 3 thnx

    Read the article

  • How to make awkward pivot of sql table in MS SQL Server 2005?

    - by Oliver
    I have to rotate a given table from an sql server but a normal pivot just doesn't work (as far as i tried). So has anybody an idea how to rotate the table into the desired format? Just to make the problem more complicated, the list of given labels can vary and it is possible that a new label name can come into at any given time. Given Data ID | Label | Numerator | Denominator | Ratio ---+-----------------+-------------+---------------+-------- 1 | LabelNameOne | 41 | 10 | 4,1 1 | LabelNameTwo | 0 | 0 | 0 1 | LabelNameThree | 21 | 10 | 2,1 1 | LabelNameFour | 15 | 10 | 1,5 2 | LabelNameOne | 19 | 19 | 1 2 | LabelNameTwo | 0 | 0 | 0 2 | LabelNameThree | 15 | 16 | 0,9375 2 | LabelNameFive | 19 | 19 | 1 2 | LabelNameSix | 17 | 17 | 1 3 | LabelNameOne | 12 | 12 | 1 3 | LabelNameTwo | 0 | 0 | 0 3 | LabelNameThree | 11 | 12 | 0,9167 3 | LabelNameFour | 12 | 12 | 1 3 | LabelNameSix | 0 | 1 | 0 Wanted result ID | ValueType | LabelNameOne | LabelNameTwo | LabelNameThree | LabelNameFour | LabelNameFive | LabelNameSix ---+-------------+--------------+--------------+----------------+---------------+---------------+-------------- 1 | Numerator | 41 | 0 | 21 | 15 | | 1 | Denominator | 10 | 0 | 10 | 10 | | 1 | Ratio | 4,1 | 0 | 2,1 | 1,5 | | 2 | Numerator | 19 | 0 | 15 | | 19 | 17 2 | Denominator | 19 | 0 | 16 | | 19 | 17 2 | Ratio | 1 | 0 | 0,9375 | | 1 | 1 3 | Numerator | 12 | 0 | 11 | 12 | | 0 3 | Denominator | 12 | 0 | 12 | 12 | | 1 3 | Ratio | 1 | 0 | 0,9167 | 1 | | 0

    Read the article

  • Idiomatic usage of filter, map, build-list and local functions in Racket/Scheme?

    - by Greenhorn
    I'm working through Exercise 21.2.3 of HtDP on my own and was wondering if this is idiomatic usage of the various functions. This is what I have so far: (define-struct ir (name price)) (define list-of-toys (list (make-ir 'doll 10) (make-ir 'robot 15) (make-ir 'ty 21) (make-ir 'cube 9))) ;; helper function (define (price< p toy) (cond [(< (ir-price toy) p) toy] [else empty])) (define (eliminate-exp ua lot) (cond [(empty? lot) empty] [else (filter ir? (map price< (build-list (length lot) (local ((define (f x) ua)) f)) lot))])) To my novice eyes, that seems pretty ugly because I have to define a local function to get build-list to work, since map requires two lists of equal length. Can this be improved for readability? Thank you.

    Read the article

  • counting fields based on group in crystal report

    - by hatem gamil
    hi all i wana ask a question about crystal reporting in vs 2008 lets say i have a report with these data customer_ID Customer_Name Order_amoont Order_Date (#group1 VipCustomer) 1 xyz 3 1/1/2010 2 abc 4 2/2/2010 5 sds 21 3/12/2009 (#Group2 NormalCustomer) 3 tyt 2 3/3/2010 4 ha 4 21/3/2009 i want only to display records where Order_Date year is in 2010 only so i went to the section expert and i added a condintion in suppress formula Year(order_Date)=2010 and i get the result ,,the question is how to count how many vip customers ordered in 2010 only and how many normal customer order in 2010 only ,,then i want the total number of both type of customers to be displayed to have a report like that:: customer_ID Customer_Name Order_amoont Order_Date (#group1 VipCustomer) 1 xyz 3 1/1/2010 2 abc 4 2/2/2010 subtotal 2 (#Group2 NormalCustomer) 3 tyt 2 3/3/2010 subtotal 1 total 3 thnx

    Read the article

  • How to combine 12 tables with some different and some same fields

    - by Deven
    Hi friends i am having problem in joining tables in oracle my tables are shown bellow table1 looks like id Name Jan 7001 Deven 22 7002 Clause 55 7004 Monish 11 7010 Dipesh 55 7070 Dipika 100 table2 looks like id Name Feb 7001 Deven 12 7002 Clause 15 7003 Nimesh 20 7004 Monish 21 7005 Ritesh 22 table 3 looks like id Name Mar 7001 Deven 122 7020 Chalse 155 7003 Nimesh 88 7033 Monica 217 7070 Dipika 180 like this i am having 12 tables from january to December hwo can i combine this and get out put like bellow table2 looks like id Name Jan Feb Mar ...................... Dec 7001 Deven 22 12 122 7002 Clause 55 15 - .......................- 7003 Nimesh - 20 88 .......................2 7004 Monish 11 21 - .......................- 7005 Ritesh - 22 - .......................20 7010 Dipesh 55 - - .......................- 7020 Chalse - - 155 .......................- 7033 Monica - - 217 .......................100 7070 Dipika 100 - - .......................-

    Read the article

  • Get the closest number

    - by user183089
    Hi, i am implementing a little Black Jack game in C# and i have the following problem calculating the player's hand value. the problem is Ace may have value of 1 or 11 so if the players has three cards and one Ace if the sum of the cards is <= 10 Ace will have value of 11(Sorry for who doesn't know the scope of the game is to reach 21 with the sum of the cards) Other way value of 1 Up to here is easy Now lets assume i do not know how many Aces the player has got and the game is implemented giving the possibility to the dealer to use more than one deck of cards. the user may have in one hand even 5,6,7,8 ... aces. What is the best way(possibly using Linq) to evaluate all the aces the player has got to get the closest combination to 21 (in addition tot he other cards)? I hope i have been clear thanks for your help.

    Read the article

  • How to compile a program which needs a newer version of glib

    - by michael
    Hi, I am trying to compile Webkit on Ubuntu 8.04. But when i run autogen.sh, I get the following error saying it needs a newer version of glib. So what is the safest way to install glib without screwing up the rest of my OS (since the rest needs 2.16 while webkit compile needs 2.21)? checking for GLIB... configure: error: Package requirements (glib-2.0 >= 2.21.3 gobject-2.0 >= 2.0 gthread-2.0 >= 2.0) were not met: Requested 'glib-2.0 >= 2.21.3' but version of GLib is 2.16.6 Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

    Read the article

  • How to implement dynamic queries for MNesia?

    - by Kerem
    I'm trying to implement a function that generates dynamic queries for MNesia. For example, when function is called with these arguments; dyn_query(list, person, [name, age], ["jack", 21]) I want to query MNesia to list items whose name is "jack" and age is 21 in person table. I've tried to implement this by using qlc:q(ListComprehension) and qlc:string_to_handle("ListComprehension"). First failed because of compile errors, compiler didn't let me to use functions instead of ListComprehentions and variables instead of record names like "Item#Table.Member". Second failed, because erl_eval couldn't handle records and throwed exceptions like {undefined_record, person}. Which method should I use? How could i solve these problems? Or should I use a different method? Thanks.

    Read the article

  • Parent Child Relationships with Fluent NHibernate?

    - by ElHaix
    I would like to create a cascading tree/list of N number of children for a given parent, where a child can also become a parent. Given the following data structure: CountryType=1; ColorType=3; StateType=5 6,7,8 = {Can, US, Mex} 10, 11, 12 = {Red, White, Blue} 20,21,22= {California, Florida, Alberta} TreeID ListTypeID ParentTreeID ListItemID 1 1 Null 6 (Canada is a Country) 2 1 Null 7 (US is a Country) 3 1 Null 8 (Mexico is a Country) 4 3 3 10 (Mexico has Red) 5 3 3 11 (Mexico has White) 6 5 1 22 (Alberta is in Canada) 7 5 7 20 (California is in US) 8 5 7 21 (Florida is in US) 9 3 6 10 (Alberta is Red) 10 3 6 12 (Alberta is Blue) 11 3 2 10 (US is Red) 12 3 2 11 (Us is Blue) How would this be represented in Fluent NHibernate classes? Some direction would be appreciated. Thanks.

    Read the article

  • How to make awkward pivot of sql table in SQL Server 2005?

    - by Oliver
    I have to rotate a given table from an SQL Server but a normal pivot just doesn't work (as far as i tried). So has anybody an idea how to rotate the table into the desired format? Just to make the problem more complicated, the list of given labels can vary and it is possible that a new label name can come into at any given time. Given Data ID | Label | Numerator | Denominator | Ratio ---+-----------------+-------------+---------------+-------- 1 | LabelNameOne | 41 | 10 | 4,1 1 | LabelNameTwo | 0 | 0 | 0 1 | LabelNameThree | 21 | 10 | 2,1 1 | LabelNameFour | 15 | 10 | 1,5 2 | LabelNameOne | 19 | 19 | 1 2 | LabelNameTwo | 0 | 0 | 0 2 | LabelNameThree | 15 | 16 | 0,9375 2 | LabelNameFive | 19 | 19 | 1 2 | LabelNameSix | 17 | 17 | 1 3 | LabelNameOne | 12 | 12 | 1 3 | LabelNameTwo | 0 | 0 | 0 3 | LabelNameThree | 11 | 12 | 0,9167 3 | LabelNameFour | 12 | 12 | 1 3 | LabelNameSix | 0 | 1 | 0 Wanted result ID | ValueType | LabelNameOne | LabelNameTwo | LabelNameThree | LabelNameFour | LabelNameFive | LabelNameSix ---+-------------+--------------+--------------+----------------+---------------+---------------+-------------- 1 | Numerator | 41 | 0 | 21 | 15 | | 1 | Denominator | 10 | 0 | 10 | 10 | | 1 | Ratio | 4,1 | 0 | 2,1 | 1,5 | | 2 | Numerator | 19 | 0 | 15 | | 19 | 17 2 | Denominator | 19 | 0 | 16 | | 19 | 17 2 | Ratio | 1 | 0 | 0,9375 | | 1 | 1 3 | Numerator | 12 | 0 | 11 | 12 | | 0 3 | Denominator | 12 | 0 | 12 | 12 | | 1 3 | Ratio | 1 | 0 | 0,9167 | 1 | | 0

    Read the article

  • Switch case in jquery

    - by Jasl
    Am I writing the correct switch case? var cnt = $("#div1 p").length; alert(cnt); switch (cnt) { case (cnt >= 10 && cnt <= 20): alert('10'); break; case (cnt >= 21 && cnt <= 30): alert('21'); break; case (cnt >= 31 && cnt <= 40): alert('31'); break; default: alert('>41'); } For some reason, the alert does not occur when the conditions are matched!

    Read the article

  • how to find distinct digit set numbers over a range of integers?

    - by evil.coder
    Suppose i have a unsigned integer, call it low and one another call it high such that highlow. The problem is to find distinct digit set numbers over this range. For example, suppose low is 1 and high is 20 then the answer is 20, because all the numbers in this range are of distinct digit sets. If suppose low is 1 and high is 21, then the answer is 20, because 12 and 21 have same digit set i.e.1, 2. I am not looking for a bruteforce algo., if anyone has a better solution then a usual bruteforce approach, please tell..

    Read the article

  • Creating lib file from java jar using mingw/gcj

    - by Xinus
    I am trying to convert jar file to native lib file using mingw-gcj under windows platform it is thrown me the error as C:\testDir\libs>gcj -o glassfish-embedded-all-3.1-SNAPSHOT.lib glassfish-embedde d-all-3.1-SNAPSHOT.jar com/sun/codemodel/JAnonymousClass.java: In class 'com.sun.codemodel.JAnonymousCl ass': com/sun/codemodel/JAnonymousClass.java: In constructor '(com.sun.codemodel.JClas s,com.sun.codemodel.JCodeModel)': In file included from com/sun/codemodel/CodeWriter.java:15, from <built-in>:3: com/sun/codemodel/JAnonymousClass.java:21: error: verification failed at PC=3: c onstant pool index out of range com/sun/codemodel/JAnonymousClass.java:21: confused by earlier errors, bailing o ut Is it related to some java 1.6 issue or bug in gcj /

    Read the article

  • converting GPS latitude/longitude from different formats to one format (in PHP)

    - by Dave
    Hi. i'm trying to built in support for locations in my application and i'm expecting users to be inputting gps coordinates in a variety of ways. I need to convert all of the below to: latitude - direction (N/s), degres, minutes, seconds; longitude (E/W) - degrees, minuts, seconds. Each user input will be in a single line. eg: 9.182, -39.140625 9.182 / -39.140625 9.182,-39.140625 9.182 -39.140625 21° 16' 674S[some_separator]27° 30' 318E 21 16 674S[some_separator]27 30 318E [some_separator] may be a single space as well... The final format needs to beas: latitude.direction = south latitude.degrees = 21 latitude.minutes = 16 latitude.seconds = 674 longitude.direction = east longitude.degrees = 27 longitude.minutes = 30 longitude.seconds = 318 (a) what is the simplest way of asking ordinary-non-tech users to input the GPS coordinate?s (b) how do i convert the above to the final format? any built in functions that handle these variations in data input? i've seen http://stackoverflow.com/questions/2548943/gps-format-in-php - but i need to handle a more varied input.

    Read the article

  • Passing get values mangles my urls

    - by SibLiant
    Just upgraded from 1.3 to 2.0.3 and I'm trying to migrate all the changes. I'm noticing that the following line echo $this->Html->link('Quote', array('controller'=>'crm_quotes', 'action'=>'index', $lead['id'].'/'.$crmContact['CrmContact']['id']), null); builds the url "/crm_quotes/index/15/21". When I click the link I'm taken to url: "/crm_quotes/index/15%2F212 so it's replacing the characters with the html # but it's ultimately breaking the link. When I manually edit the URL to the correct one: "/crm_quotes/index/15/21" the page loads. Can someone enlighten me? Should I be using the url function rather than link? I have a lot of pages that need multiple parameters passed in the url. I was using named parameters but after reading some comments by Mark Story I decided to stop the named parameters as he hinted at their possible removal from future versions.

    Read the article

  • C typedef struct uncertainty.

    - by Emanuel Ey
    Consider the following typedef struct in C: 21:typedef struct source{ 22: double ds; //ray step 23: double rx,zx; //source coords 24: double rbox1, rbox2; //the box that limits the range of the rays 25: double freqx; //source frequency 26: int64_t nThetas; //number of launching angles 27: double theta1, thetaN; //first and last launching angle 28:}source_t; I get the error: globals.h:21: error: redefinition of 'struct source' globals.h:28: error: conflicting types for 'source_t' globals.h:28: note: previous declaration of 'source_t' was here I've tried using other formats for this definition: struct source{ ... }; typedef struct source source_t; and typedef struct{ ... }source_t; Which both return the same error. Why does this happen? it looks perfectly right to me.

    Read the article

  • Ruby on Rails - Adding variable to params[]

    - by miligraf
    In the controller, how can I add a variable at the end of a params[]? If I try this I get an error: params[:group_] + variable How should it be done? Edit per request Ok, I have a form that sets groups of radio buttons with names like this: group_01DRN0 Obviously I have different groups in the form (group_01AAI0, group_01AUI0, etc.) and the value is set according to the radio button selected within the group: Radio button "group_01DRN0" could have value of "21" or "22" or "23", radio button "group_01AAI0" could have value of "21" or "22" or "23", etc. In the DB I have every code (01DRN0, 01AAI0, 01AUI0, etc) so I want to select them from DB and iterate in the params value so I can get the radio button group value, I've tried this with no luck: @codes=Code.get_codes for c in @codes @all=params[:group_] + c.name end Thanks.

    Read the article

  • getAssetFileDescriptor from ZipResourceFile merges all mp3 in mediaplayer SOLVED

    - by Jordi
    I've a program with an Expansion file that stores 4 mp3 in a obb file (zip without compression). I can retrieve the data, but instead of taking the audio file i asked for, it merges ALL audio files in the same AssetFileDescriptor. ---SOLVED--- with the fixes Support class public AssetFileDescriptor getaudio(){ ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(c,21,21); AssetFileDescriptor afd=null; if(take==1) { afd = expansionFile.getAssetFileDescriptor("file01.mp3"); }else if(take==2 { afd = expansionFile.getAssetFileDescriptor("file02.mp3"); } //more els eif ............ return afd; } In the MediaPlayer class AssetFileDescriptor fd = Llistat.getInstance().getAudio(); mPlayer.setDataSource(fd.getFileDescriptor(), fd.getStartOffset(),fd.getLength()); mPlayer.prepare(); fd.close(); My problem was that i directly was returning and using a FileDescriptor, while i was needing the AssetFileDescriptor to take its StartOffset and Length.

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >