Search Results

Search found 162 results on 7 pages for 'y ramesh rao'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • Android Thumbnail Loading Problem

    - by y ramesh rao
    I'm using a thumbnail loader in my project the one mentioned below. The problem is that the it loads all the thumbnails properly except the ones who's size is of about 40K. When our back end is giving that sort of thumbnails are not generated and sometimes this eventually leads to a Crash too. What m I supposed to do with this ? public class ThumbnailManager { private final Map<String, Bitmap> drawableMap; public static Context context; private Resources res; private int thumbnail_size; public ThumbnailManager() { drawableMap = new HashMap<String, Bitmap >(); res = new Resources(context.getAssets(), null, null); thumbnail_size = res.getInteger(R.ThumbnailManager.THUMBNAIL_SIZE); } public Bitmap fetchBitmap(String urlString) { if(drawableMap.containsKey(urlString)) { return (drawableMap.get(urlString)); } //Log.d(getClass().getSimpleName(), " Image URL :: "+ urlString); try { InputStream is = fetch(urlString); android.util.Log.v("ThumbnailManager", "ThumbnailManager " + urlString); drawableMap.put(urlString, BitmapFactory.decodeStream(is));//Bitmap.createScaledBitmap(BitmapFactory.decodeStream(is), thumbnail_size, thumbnail_size, false)); return drawableMap.get(urlString); } catch(Exception e) { android.util.Log.v("EXCEPTION", "EXCEPTION" + urlString); return null; } } public void fetchBitmapOnThread(final String urlString, final ImageView imageView) { if(drawableMap.containsKey(urlString)) { imageView.setImageBitmap(drawableMap.get(urlString)); return; } if(urlString.compareTo("AUDIO") == 0) { Bitmap audioThumb = BitmapFactory.decodeResource(context.getResources(), R.drawable.timeline_audio_thumb); drawableMap.put(urlString, Bitmap.createScaledBitmap(audioThumb, thumbnail_size, thumbnail_size, false)); imageView.setImageBitmap(drawableMap.get(urlString)); return; } final Handler handler = new Handler() { public void handleMessage(Message message) { imageView.setImageBitmap((Bitmap) message.obj); } }; Thread thread = new Thread() { public void run() { Bitmap urlBitmap = fetchBitmap(urlString); Message message = handler.obtainMessage(1, urlBitmap); handler.sendMessage(message); } }; thread.start(); } public InputStream fetch(String urlString) throws IOException, MalformedURLException { final URL url = new URL(urlString); final URLConnection conn = url.openConnection(); HttpURLConnection httpConn = (HttpURLConnection) conn; httpConn.setAllowUserInteraction(true); httpConn.setInstanceFollowRedirects(true); httpConn.setRequestMethod("GET"); httpConn.connect(); return(conn.getInputStream()); } }

    Read the article

  • Installing Sharepoint on Windows 7

    - by Abhishek Rao
    I have Windows 7 installed on my laptop. I want to know what is the best way to install MOSS 2007 on my laptop? I heard that MOSS 2007 can be directly installed on Windows 7. I want to know if there are ny problems if I do this Or should I install Windows SErver 2008 on VM and then install MOSS 2007 on Windows Server 2008. Is it possible to install Windows Server 2008 VM on Windows 7?? Please let me know the best option...

    Read the article

  • Backup restore without content in sharepoint

    - by Abhishek Rao
    I want to take a backup of my existing site and restore it on a different Sharepoint server. I know its easily possible through stsadm backup restore. But I dont want the content of my lists to appear in the restored sites. Is there any way to achieve this using backup or export command????

    Read the article

  • Regex to match pattern with subdomain in java gives issues

    - by Ramesh
    I am trying to match the sub domain of an url using http://([a-z0-9]*.)?example.com/.* which works perfectly for these cases. http://example.com/index.html http://test.example.com/index.html http://test1.example.com/index.html http://www.example.com/122/index.html But the problem is it matches for this URL too. http://www.test.com/?q=http://example.com/index.html if an URL with another domain has the URL in path it matches.Can any one tell me how to match for current domain only. getting the host will work but i need to match full URL.

    Read the article

  • xslt to show most number of copies in catalog.xml file

    - by SANJAY RAO
    In this catalog.xml file i have two books who have the same inventory i.e 20 . I want to write a xsl file that will display the most number of copies of a book in a catalog .if there are two or more books of the same inventory then they have to be displayed . <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="catalog3.xsl"?> <!DOCTYPE catalog SYSTEM "catalog.dtd"> <catalog> <Book> <sku>12345</sku> <title>Beauty Secrets</title> <condition>New</condition> <current_inventory>20</current_inventory> <price>99.99</price> </Book> <Book> <sku>54321</sku> <title>Picturescapes</title> <current_inventory>20</current_inventory> <condition>New</condition> <price>50.00</price> </Book> <Book> <sku>33333</sku> <title>Tourist Perspectives</title> <condition>New</condition> <current_inventory>0</current_inventory> <price>75.00</price> </Book> <Book> <sku>10001</sku> <title>Fire in the Sky</title> <condition>Used</condition> <current_inventory>0</current_inventory> <price>10.00</price> </Book> below is my catalog3.xsl file which is able to display only one out of the two books <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="max"/> <xsl:template match="/"> <html> <body> <h2>Titles of Books for which Most Copies are Available</h2> <table border="2"> <tr bgcolor="#9acd32"> <th>Title</th> <th>No of Copies</th> </tr> <xsl:apply-templates/> </table> </body> </html> </xsl:template> <xsl:template match="catalog"> <xsl:for-each select="Book"> <xsl:sort select="current_inventory" data-type="number" order="descending"/> <tr> <xsl:if test="position()= 1"> <p><xsl:value-of select="$max = "/></p> <td><xsl:value-of select="title"/></td> <td><xsl:value-of select="current_inventory"/></td> </xsl:if> </tr> could anybody correct me to achieve my goal of displaying all the copies having the same maximum inventory in the catalog . Thanks .

    Read the article

  • What is wrong with this PHP function.

    - by [email protected]
    I am new to PHP and regular expression. I was going thorugh some online examples and came with this example: <?php echo preg_replace_callback('~-([a-z])~', function ($match) { return strtoupper($match[1]); }, 'hello-world'); // outputs helloWorld ?> in php.net but to my surprise it does not work and keep getting error: PHP Parse error: parse error, unexpected T_FUNCTION Why get error ?

    Read the article

  • From where these links are coming

    - by Ramesh
    i am having an web site and it displays in google for some keywords and i need to know these sites are getting displayed in google like this Welcome! - The Apache Software Foundation Supports the development of a number of open-source software projects, including the Apache web server. Includes license information, latest news, ... www.apache.org/ - Cached - Similar Apache web server Tomcat Mirrors Projects from where these '"apache" "web server" tomcat links are coming from ...how to do this for my site///

    Read the article

  • Creating an instance in rails association

    - by Sandeep Rao
    I have three models where a basiccase has a form. Basic case can create a new form. class User < ActiveRecord::Base has_many :basiccases end class Basiccase < ActiveRecord::Base belongs_to :user has_one :basiccases end class Form3C < ActiveRecord::Base belongs_to :basiccases end I want to create an instance of form 3c in the form3c controller. Can any one explain me how I can carry the basiccase_id to the form3c controller to set the foreign key attribute. I can set the value using @basiccase.build_form3_c but I'm not sure how I can get the basiccase_id from the basiccase.

    Read the article

  • svn checkout issue....

    - by Ramesh
    Is there a way to create a working copy with all child folders but with out files in it. My repo is very big, I only need the empty directory structure to be created.

    Read the article

  • Importing a large dataset into a database

    - by peaceful
    I'm a beginning programmer in the relevant areas to this question, so if possible, it'd be helpful to avoid assuming I know a lot already. I'm trying to import the OpenLibrary dataset into a local Postgres database. After it's imported, I plan to use it as a starting seed for a Ruby on Rails application that will include information on books. The OpenLibrary datasets are available here, in a modified JSON format: http://openlibrary.org/dev/docs/jsondump I only need very basic information for my application, much less than what is provided in the dumps. I'm only trying to get out book titles, author names, and relationships between books and authors. Below are two typical entries from their dataset, the first for an author, and the second for a book (they seem to have an entry for each edition of a book). The entries seem to lead off with a primary key, and then with a type, before including the actual JSON database dump. /a/OL2A /type/author {"name": "U. Venkatakrishna Rao", "personal_name": "U. Venkatakrishna Rao", "last_modified": {"type": "/type/datetime", "value": "2008-09-10 08:44:01.978456"}, "key": "/a/OL2A", "birth_date": "1904", "type": {"key": "/type/author"}, "id": 99, "revision": 3} /b/OL345M /type/edition {"publishers": ["Social Science Research Project, Dept. of Geography, University of Dacca"], "pagination": "ii, 54 p.", "title": "Land use in Fayadabad area", "lccn": ["sa 65000491"], "subject_place": ["East Pakistan", "Dacca region."], "number_of_pages": 54, "languages": [{"comment": "initial import", "code": "eng", "name": "English", "key": "/l/eng"}], "lc_classifications": ["S471.P162 E23"], "publish_date": "1963", "publish_country": "pk ", "key": "/b/OL345M", "authors": [{"birth_date": "1911", "name": "Nafis Ahmad", "key": "/a/OL302A", "personal_name": "Nafis Ahmad"}], "publish_places": ["Dacca, East Pakistan"], "by_statement": "[by] Nafis Ahmad and F. Karim Khan.", "oclc_numbers": ["4671066"], "contributions": ["Khan, Fazle Karim, joint author."], "subjects": ["Land use -- East Pakistan -- Dacca region."]} The size of the uncompressed dumps are enormous, about 2GB for the authors list, and 18GB for the book editions list. OpenLibrary does not provide any tools for this themselves, they provide a simple unoptimized Python script for reading in sample data (which unlike the actual dumps comes in pure JSON format), but they estimate if that was modified for use on their actual data it would take 2 months (!) to finish loading the data. How can I read this into the database? I assume I'll need to write a program to do this. What language and any guidance on how I should do it to finish in a reasonable amount of time? The only scripting language I have any experience with is Ruby.

    Read the article

  • view headers in JTable?

    - by Venkats
    I can't view header in JTable while adding it into a JFrame.. String[] col={"Name","ID","Marks"}; Object[][] data={{"venkat",201,450},{"Ramesh",102,450},{"Rahul",2,430}, {"Thiman",4,434}}; table=new JTable(data,col); The above code doesn't set header in JFrame. How to add view header in JTable while adding it into JFrame.....?

    Read the article

  • android : sax Xml parsing

    - by Ram
    Team, I am facing some issue at the time of parsing the XML, but the same works in Java program... When I run the same code through android prgming its failing to parse... InputStream byteArrayInputStream = new ByteArrayInputStream( response.toString().getBytes()); SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); parser.parse(byteArrayInputStream, xmlHandler); Facing the following error DTD handlers aren't supported Any help is greatly appreciated. Thanks, Ramesh

    Read the article

  • Android : background thread

    - by Ram
    Team, I need to run a background thread in my application. Could you please share the best practices where to initiate the thread so that keeps running irrespective of the Activity is being shown and things to consider. The purpose of this background thread is to fire transactions from the Simulator to the server and get the response back from the host. thanks, Ramesh

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >