Search Results

Search found 7332 results on 294 pages for 'hooray im helping'.

Page 11/294 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to implement a multi-part snake with smooth movement? [closed]

    - by Jamie
    Sorry that i couldnt answer on my previous post but it got closed. I couldnt answer because i had to prepair for my finals. As there were problems with understanding of what im trying to achieve, im going to describe a little bit more in depth. Im creating a game in which you steer a snake. I assume everybody knows how that works. But in my case the snake isnt just propagating in an array element by element. Imagine a 2Dgrid on which the snake moves. Its 10x10 tiles. Lets say one tile is 4x4 meters. The snakes head spawns in the middle of the (3,2) tile (beginning with (0,0)), so its position is (4*3+2,4*2+2)(the 2's are so that the snake is in the middle of the 4x4 tile). And heres where the fun begins. when the snake moves, it doesnt jump to next tile. Instead it moves a fraction of the way there. So lets say the snake is heading to tile (4,2). After it moved once, its position is (4*3+2+0.1,4*2+2), where 0.1 is the fraction of the way it moved. This is done to achieve smooth movement. So now im adding the rest of the body. The rest is supposed to move along the exact same path as the head did. I implemented it so that each part of the body has its own position and direction. Then i apply this algorithm: 1.Move each part in its direction. 2.If a part is in the middle of the tile(which implies all of them are), change each parts direction to the direction of the part proceeding it. As i said before i could make this work, but i cant stop thinking that im overlooking a much easier and cleaner solution. So this is my question. Is there any easier/better/faster way to do this?

    Read the article

  • http request to cgi python script successful, but the script doesn't seem to run

    - by chipChocolate.py
    I have configured cgi scripts for my apache2 web server. Here is what I want to do: Client uploads the image to the server. (this already works) On success, I want to execute the python script to resize the image. I tried the following and the success function does execute but my python script does not seem to execute: Javascript code that sends the request: var input = document.getElementById('imageLoader'); imageName = input.value; var file = input.files[0]; if(file != undefined){ formData= new FormData(); console.log(formData.length); if(!!file.type.match(/image.*/)){ formData.append("image", file); $.ajax({ url: "upload.php", type: "POST", processData: false, contentType: false, success: function() { var input = document.getElementById('imageLoader'); imageName = input.value; var file = input.files[0]; formData = new FormData(); formData.append("filename", file); $.ajax({ url: "http://localhost/Main/cgi-bin/resize.py", type: "POST", data: formData, processData: false, contentType: false, success: function(data) { console.log(data); } }); // code continues... resize.py: #!/usr/bin/python import cgi import cgitb import Image cgitb.enable() data = cgi.FieldStorage() filename = data.getvalue("filename") im = Image.open("../JS/upload/" + filename) (width, height) = im.size maxWidth = 600 maxHeight = 400 if width > maxWidth: d = float(width) / maxWidth height = int(height / d) width = maxWidth if height > maxHeight: d = float(height) / maxHeight width = int(width / d) height = maxHeight size = (width, height) im = im.resize(size, Image.ANTIALIAS) im.save("../JS/upload/" + filename, quality=100) This is the apache2.conf: <Directory /var/www/html/Main/cgi-bin> AllowOverride None Options +ExecCGI SetHandler cgi-script AddHandler cgi-script .py .cgi Order allow,deny Allow from all </Directory> cgi-bin and python script file permissions: drwxrwxr-x 2 mou mou 4096 Aug 24 03:28 cgi-bin -rwxrwxrwx 1 mou mou 1673 Aug 24 03:28 resize.py Edit: Executing this code $.ajax({ url: "http://localhost/Main/cgi-bin/resize.py", type: "POST", data: formData, // formData = {"filename" : "the filename which was saved in a variable whie the image was uploaded"} processData: false, contentType: false, success: function(data) { alert(data); } }); it alerts the following: <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> --> </font> </font> </font> </script> </object> </blockquote> </pre> </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#6622aa"> <td valign=bottom>&nbsp;<br> <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>&lt;type 'exceptions.TypeError'&gt;</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial">Python 2.7.6: /usr/bin/python<br>Sun Aug 24 17:24:15 2014</font></td></tr></table> <p>A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.</p> <table width="100%" cellspacing=0 cellpadding=0 border=0> <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///var/www/html/Main/cgi-bin/resize.py">/var/www/html/Main/cgi-bin/resize.py</a> in <strong><module></strong>()</td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;10</small>&nbsp;<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;11</small>&nbsp;filename&nbsp;=&nbsp;data.getvalue("filename")<br> </tt></font></td></tr> <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;12</small>&nbsp;im&nbsp;=&nbsp;Image.open("../JS/upload/"&nbsp;+&nbsp;filename)<br> </tt></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;13</small>&nbsp;<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;14</small>&nbsp;(width,&nbsp;height)&nbsp;=&nbsp;im.size<br> </tt></font></td></tr> <tr><td><small><font color="#909090">im <em>undefined</em>, <strong>Image</strong>&nbsp;= &lt;module 'Image' from '/usr/lib/python2.7/dist-packages/PILcompat/Image.pyc'&gt;, Image.<strong>open</strong>&nbsp;= &lt;function open&gt;, <strong>filename</strong>&nbsp;= '<font color="#c040c0">\xff\xd8\xff\xe0\x00\x10</font>JFIF<font color="#c040c0">\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00</font>C<font color="#c040c0">\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06\x07\x07\x06\x08\n\x10\n\n\t\t\n\x14\x0e</font>...<font color="#c040c0">\x94\r\x17\x11</font>b<font color="#c040c0">\xcd\xdc\x1a\xfe\xf1\x05\x1b\x15\xd1</font>R<font color="#c040c0">\xce\xe9</font>*<font color="#c040c0">\xb5\x8e</font>b<font color="#c040c0">\x97\x82\x87</font>R<font color="#c040c0">\xf4\xaa</font>K<font color="#c040c0">\x83</font>6<font color="#c040c0">\xbf\xfb</font>0<font color="#c040c0">\xa0\xb6</font>8<font color="#c040c0">\xa9</font>C<font color="#c040c0">\x86\x8d\x96</font>n+E<font color="#c040c0">\xd3\x7f\x99\xff\xd9</font>'</font></small></td></tr></table> <table width="100%" cellspacing=0 cellpadding=0 border=0> <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///usr/lib/python2.7/dist-packages/PIL/Image.py">/usr/lib/python2.7/dist-packages/PIL/Image.py</a> in <strong>open</strong>(fp='../JS/upload/<font color="#c040c0">\xff\xd8\xff\xe0\x00\x10</font>JFIF<font color="#c040c0">\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00</font>C<font color="#c040c0">\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06</font>...<font color="#c040c0">\x94\r\x17\x11</font>b<font color="#c040c0">\xcd\xdc\x1a\xfe\xf1\x05\x1b\x15\xd1</font>R<font color="#c040c0">\xce\xe9</font>*<font color="#c040c0">\xb5\x8e</font>b<font color="#c040c0">\x97\x82\x87</font>R<font color="#c040c0">\xf4\xaa</font>K<font color="#c040c0">\x83</font>6<font color="#c040c0">\xbf\xfb</font>0<font color="#c040c0">\xa0\xb6</font>8<font color="#c040c0">\xa9</font>C<font color="#c040c0">\x86\x8d\x96</font>n+E<font color="#c040c0">\xd3\x7f\x99\xff\xd9</font>', mode='r')</td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1994</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;isPath(fp):<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1995</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;=&nbsp;fp<br> </tt></font></td></tr> <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;1996</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fp&nbsp;=&nbsp;builtins.open(fp,&nbsp;"rb")<br> </tt></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1997</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:<br> </tt></font></td></tr> <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;1998</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;=&nbsp;""<br> </tt></font></td></tr> <tr><td><small><font color="#909090"><strong>fp</strong>&nbsp;= '../JS/upload/<font color="#c040c0">\xff\xd8\xff\xe0\x00\x10</font>JFIF<font color="#c040c0">\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00</font>C<font color="#c040c0">\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06</font>...<font color="#c040c0">\x94\r\x17\x11</font>b<font color="#c040c0">\xcd\xdc\x1a\xfe\xf1\x05\x1b\x15\xd1</font>R<font color="#c040c0">\xce\xe9</font>*<font color="#c040c0">\xb5\x8e</font>b<font color="#c040c0">\x97\x82\x87</font>R<font color="#c040c0">\xf4\xaa</font>K<font color="#c040c0">\x83</font>6<font color="#c040c0">\xbf\xfb</font>0<font color="#c040c0">\xa0\xb6</font>8<font color="#c040c0">\xa9</font>C<font color="#c040c0">\x86\x8d\x96</font>n+E<font color="#c040c0">\xd3\x7f\x99\xff\xd9</font>', <em>global</em> <strong>builtins</strong>&nbsp;= &lt;module '__builtin__' (built-in)&gt;, builtins.<strong>open</strong>&nbsp;= &lt;built-in function open&gt;</font></small></td></tr></table><p><strong>&lt;type 'exceptions.TypeError'&gt;</strong>: file() argument 1 must be encoded string without NULL bytes, not str <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;= ('file() argument 1 must be encoded string without NULL bytes, not str',) <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>message&nbsp;= 'file() argument 1 must be encoded string without NULL bytes, not str' <!-- The above is a description of an error in a Python program, formatted for a Web browser because the 'cgitb' module was enabled. In case you are not reading this in a Web browser, here is the original traceback: Traceback (most recent call last): File "/var/www/html/Main/cgi-bin/resize.py", line 12, in &lt;module&gt; im = Image.open("../JS/upload/" + filename) File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1996, in open fp = builtins.open(fp, "rb") TypeError: file() argument 1 must be encoded string without NULL bytes, not str --> Does this mean that the formData I am sending over is empty?

    Read the article

  • ProgressDialog does not display until after AsyncTask completes

    - by tedwards
    I am trying to display an indefinite ProgressDialog, while an AsyncTask binds to a RemoteService. The RemoteService builds a list of the users contacts when the service is first created. For a long list of contacts this may take 5~10 seconds. The problem I am having, is that the ProgressDialog does not display until after the RemoteService has built it's list of contacts. I even tried putting a Thread.sleep in to give the ProgressDialog time to show up. With the sleep statement the ProgressDialog loads and starts spinning, but then locks up as soon as the RemoteService starts doing it's work. If I just turn the AsyncTask into dummy code, and just let it sleep for a while, everything works fine. But when the task has to do actual work, it is like the UI just sits and waits. Any ideas on what Im doing wrong ? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(IM,"Start Me UP!!"); setContentView(R.layout.main); Log.d(IM, "Building List View for Contacts"); restoreMe(); if (myContacts==null){ myContacts = new ArrayList<Contact>(); this.contactAdapter = new ContactAdapter(this, R.layout.contactlist, myContacts); setListAdapter(this.contactAdapter); new BindAsync().execute(); } else{ this.contactAdapter = new ContactAdapter(this, R.layout.contactlist, myContacts); setListAdapter(this.contactAdapter); } } private class BindAsync extends AsyncTask<Void, Void, RemoteServiceConnection>{ @Override protected void onPreExecute(){ super.onPreExecute(); Log.d(IM,"Showing Dialog"); showDialog(DIALOG_CONTACTS); } @Override protected RemoteServiceConnection doInBackground(Void... v) { Log.d(IM,"Binding to service in BindAsync"); try{ Thread.sleep(2000); } catch (InterruptedException e){ } RemoteServiceConnection myCon; myCon = new RemoteServiceConnection(); Intent i = new Intent(imandroid.this,MyRemoteService.class); bindService(i, myCon, Context.BIND_AUTO_CREATE); startService(i); Log.d(IM,"Bound to remote service"); return myCon; } @Override protected void onPostExecute(RemoteServiceConnection newConn){ super.onPostExecute(newConn); Log.d(IM,"Storing remote connection"); conn=newConn; } };

    Read the article

  • CD/DVD WRITER I/O ERROR !!!

    - by bobby
    http://www.mediafire.com/imageview.php?quickkey=jqzdbd5n0nl i am getting the above error wen i am trying to burn a cd/dvd on my dvd writer. im am getting dis error for evry cd/dvd..!! i hv included a screenshot.above. i dnt knw whether it a problem wit my dvd writer...!! im unable to write any dvds/cds im using imgburn burning software.

    Read the article

  • How does one calculate voltages for overclocking?

    - by TardisGuy
    So, all I know is voltage and clock have something to do with each other. Unstable if too low voltage Too high voltage, and too much heat. or higher voltage + lower clock may heat less than that voltage at higher clock. The reason why im asking is because if I can learn how the power vs speed works, Then i might be able to project some kind of thermal curve to find out where my perfect overclock might be (without 50 burn-ins) But, as is apparent im sure. I have no idea what im talking about. If anyone can help me learn more about this; throw me a page, a macro, whathaveyou I will bow before your awesomeness and... Mail you a phantom hand written thank you letter. Some clarification Rev 1 What im trying to learn: is how much power a cpu is using with measurements (Core Voltage) vs (Clock speed) - It would answer the question: Would a 1.4v core @ 4.0Ghz use as much power as a 1.4v core @ 3.0Ghz?

    Read the article

  • Which web services should be integrated?

    - by Adam Matan
    Mail + Social networking? One identity for all sites? Integration between all social networks and IM services? Which web services should be integrated in the future, and why? Edit: Clarification: By "integrating", I mean that two or more services should be seamlessly connected, and that connection would benefit the user. Foe example, I would really like to have an IM application that would support many accounts on many IM providers (And IMHO, Pidgin's not ready yet).

    Read the article

  • HELP! Any ideas? Im creating a new site using the below script embedded in my swf. But I keep getti

    - by Suzanne
    package com.flashden { import flash.display.MovieClip; import flash.text.*; import flash.events.MouseEvent; import flash.events.*; import flash.net.URLRequest; import flash.display.Loader; public class MenuItem extends MovieClip { private var scope; public var closedX; :Number public static const OPEN_MENU = "openMenu"; public function MenuItem(scope) { // set scope to talk back to -------------------------------// this.scope = scope; // disable all items not to be clickable -------------------// txt_label.mouseEnabled = false; menuItemShine.mouseEnabled = false; menuItemArrow.mouseEnabled = false; // make background clip the item to be clicked (button) ----// menuItemBG.buttonMode = true; // add click event listener to the header background -------// menuItemBG.addEventListener(MouseEvent.CLICK, clickHandler); } private function clickHandler (e:MouseEvent) { scope.openMenuItem(this); } public function loadContent (contentURL:String) { var loader:Loader = new Loader(); configureListeners(loader.contentLoaderInfo); var request:URLRequest = new URLRequest(contentURL); loader.load(request); // place x position of content at the bottom of the header so the top is not cut off ----// loader.x = 30; // we add the content at level 1, because the background clip is at level 0 ----// addChildAt(loader, 1); } private function configureListeners(dispatcher:IEventDispatcher):void { dispatcher.addEventListener(Event.COMPLETE, completeHandler); dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); dispatcher.addEventListener(Event.INIT, initHandler); dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); dispatcher.addEventListener(Event.OPEN, openHandler); dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler); dispatcher.addEventListener(Event.UNLOAD, unLoadHandler); } private function completeHandler(event:Event):void { //trace("completeHandler: " + event); // remove loader animation ----------------// removeChild(getChildByName("mc_preloader")); } private function httpStatusHandler(event:HTTPStatusEvent):void { // trace("httpStatusHandler: " + event); } private function initHandler(event:Event):void { //trace("initHandler: " + event); } private function ioErrorHandler(event:IOErrorEvent):void { //trace("ioErrorHandler: " + event); } private function openHandler(event:Event):void { //trace("openHandler: " + event); } private function progressHandler(event:ProgressEvent):void { //trace("progressHandler: bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal); } private function unLoadHandler(event:Event):void { //trace("unLoadHandler: " + event); } } }

    Read the article

  • How to config mysql-server for heavy load

    - by Rasmus
    Im in the process of setting up a new database server. I have been running a few mysql database servers before and it has been working okay. But i would like to hear the recommended setup for my server. For example, what should i set the max connection, query_cache_size, table_cache and so on. I have arround 4-600 per second: Open tables: 112 Queries per second avg: 430.386. The server i am setting it up on have the following configuration: Linux version 2.6.32-5-amd64 (Debian 2.6.32-41squeeze2) 2x Intel Xeon X3440 @ 2.53GHz 4GB Ram /, /boot, /tmp etc on Software RAID1, 2x 7200RPM SATA Data location on Software RAID0, 2x7200RPM SATA Im am going to place the mysql databases on the RAID0. Am im missing anything? Let me know! Thanks in advance, im looking forward to hearing from you :-) /Rasmus

    Read the article

  • Computer experiencing slowdowns and lockups despite low cpu useage

    - by user157145
    my setup i5-2300 nvidia gtx 550 ti 6 gigs ram 600 w ocz modular psu recently reformatted and already experiencing drastic slowdown as soon as windows comes up, including repeated lockups with multiple various programs reporting that they are not responsive, then recovering after 10-30 seconds. ive checked memory and hard drive both of which come out fine. despite my plethura of worthless antiviral software im forced to assume that my illicit downloading practices have lead me into some comp trouble that i cant seem to determine. i have used ccleaner, search and destroy and malware bytes, all of which have found nothing to indicate what is causing this massive slowdown. in addition according to my resource manager my computer is operating at a load of only 30-50 percent CPU useage and 60 ram useage but taking 5-10 seconds to load files and open folders, and repeated lockups of multiple programs, especially firefox which seems to go unresponsive every 2-3 minutes. any help would be appreciated, i used a program called OTL by old timer, but cant make any sense of the results i was given. any help or suggestions would be appreciated, thank you for taking the time to read this i have avast but it didnt even find anything when i had it do a full system scan, so im thinking its clueless(also nortons, avg, and ad-aware). i also have mse but it has yet to complete a full scan it takes so long (i left it on last night but when i woke up my computer had a problem and had to restart). my hard drive has 300 gigs out of 1tb open and i already used hd tune pro, which said my harddrive was fine and its not a ssd. also im a noob at comps and only have the hd that is currently inside the computer in addition im not sure if studdering is the issue im suffering. my problem is that during my typing of these responses firefox has gone "not responsive" at least 5 times, each for times of about 5-10 seconds. when i try to control alt delete to bring up windows task manager it took 20 seconds. essentially its that my computer goes super slow at bringing up anything, or taking any action whatsoever that opens a program or file and has repeated incidents where i cant even click on whatever im trying to do because it locks up. the confusing thing about these incidents is that its right after restarting where there are minimal programs running and the computer and memory load is light.

    Read the article

  • Server 2003 PDC DNS not working..Failover server is...

    - by Seth
    In the midst of trying to utilize proc power, i create a fault tolerant DNS server a while ago. Since, Ive been trying to add another controller for exchange. So I thought I would revert back to a single primary DNS for the meantime and now Im balancing on a thread. The server i thought I uninstalled DNS, is still acting as DNS. And now the PDC does not resolve. Can anybody walk me through, Im overwhelmed and cant think straight... Im afraid if anyone restarts their machine they wont have internet. Update Ok so from the beginning. I was configuring Exchange on a new server 2008. How it happened I dont know, but it started to not resolve DNS. (exclamation mark on NIC) even though everything was static. So ultimately I decided to remove the server from the problem, because I noticed DNS was in disarray if I used the DNS IP of the first server. This is when I tested with nslookup on each DNS server. I had uninstalled DNS from the second server, but nslookup was still resolving with that IPaddress, which has me all wound up cause I dont understand. So, since the first DNS server isn't resolving, Im assuming if the second one isnt configured right I'll loose internet. Im just confused and dont know where to start troubleshooting...

    Read the article

  • How to see whats taking up space on your hard drive

    - by sam
    Im thinking of switching to one of the macbook pro retinas with a 256gb ssd, im making the move from a 512gb hd, which at the moment is split into a 60bg windows partition (which i dont think im going to have on my new machine) and a 440gb main partition of the main partition ive got 140gb free. So all in if i disregard the 60gb windows part ive got about 200gb free so im using 300gb, which is still a bit to much, ive had this machine 4/5 yrs so its likely to be clogged with files that i no longer need, is there a tool that i can use to view my current hd and see whats taking up the most room, so i can begin to see where i can cut down ? just for a bit of background my current machine runs osx.

    Read the article

  • Raid on ICH9R chip set

    - by user500982
    Hi Im looking at buyign this MB: http://www.supermicro.com/products/motherboard/ATOM/ICH9/X7SPE-HF-D525.cfm Im wondering though if the chipset will support the raid configuration I need. Im looking to configure the following arrays: raid array 1: 2 2TB Disks in Raid 0 raid array 2: 2 2TB Disks in Raid 0 raid array 3 (not actualy an array): 1 300GB Disk not in raid, to be used for OS and boot. So in total there would be 5 drives and the board supports 6. so im good when it comes to connections. However I have herd some chip sets only support one raid array (volume). so either all drives are individual, or are in the array. I must have 2 sperate raid arrays independent of each other, and a 5th drive not in any array. Anybody know if this setup will work? Thanks, -Stewart

    Read the article

  • Lustre - is this bad form?

    - by ethrbunny
    Im going to be consolidating several 'server rooms' into a single installation soon. Part of this effort will be finding a home for 5Tb (and growing) of files / logs. To this end Im looking at Lustre and appreciating its ability to scale. The big vendors want to sell me a $20K SAN to manage this but Im wondering about buying several iSCSI units (like this http://www.asacomputers.com/3U-iSCSI-Solution.html) and using VMs for the OSS machines. This would let me fail-over to cover problems and not require a dedicated system for each OSS. Given articles like this (http://h30565.www3.hp.com/t5/Feature-Articles/RAID-Is-Dead-Long-Live-RAID/ba-p/1422) that talk about how RAID is not keeping up with drive density Im leaning towards more disks with lower capacity each. Again - some akin to the iSCSI array above. Tell me why this is a terrible idea. Do I really need to invest in a PE710 for each OSS/OST?

    Read the article

  • does leaving the laptop cord in break the cord?

    - by firedrake
    i recently got a new cord for my laptop because the cord i had before broke.im not sure how it got messed up, but one moment it charged my laptop and the next moment it didn't. i then got a new cord. the new cord worked perfectly fine until now, and it has only been a month. the cord wont work unless i am pressing it into the socket, which i am currently doing. the only thing i can find in common with the cords is that i leave them plugged in 24/7. my brother says that is the problem, but i do not think it is.any tips or hints? im going to use duct tape to keep the pressure on the cord till i can find a better solution(im also thinking it could be the hole i plug it into on the back of my computer, but im focusing on the other idea for now.if i wiggle the plug part in the socket of my computer it will stop charging unless im pressing it in or to the side) any help or ideas are appreciated. not sure if this will help but i use a gateway with windows vista. thanks

    Read the article

  • Make file Linking issue Undefined symbols for architecture x86_64

    - by user1035839
    I am working on getting a few files to link together using my make file and c++ and am getting the following error when running make. g++ -bind_at_load `pkg-config --cflags opencv` -c -o compute_gist.o compute_gist.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o gist.o gist.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o standalone_image.o standalone_image.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o IplImageConverter.o IplImageConverter.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o GistCalculator.o GistCalculator.cpp g++ -bind_at_load `pkg-config --cflags opencv` `pkg-config --libs opencv` compute_gist.o gist.o standalone_image.o IplImageConverter.o GistCalculator.o -o rungist Undefined symbols for architecture x86_64: "color_gist_scaletab(color_image_t*, int, int, int const*)", referenced from: _main in compute_gist.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [rungist] Error 1 My makefile is as follows (Note, I don't need opencv bindings yet, but will be coding in opencv later. CXX = g++ CXXFLAGS = -bind_at_load `pkg-config --cflags opencv` LFLAGS = `pkg-config --libs opencv` SRC = \ compute_gist.cpp \ gist.cpp \ standalone_image.cpp \ IplImageConverter.cpp \ GistCalculator.cpp OBJS = $(SRC:.cpp=.o) rungist: $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(OBJS) -o $@ all: rungist clean: rm -rf $(OBJS) rungist The method header is located in gist.h float *color_gist_scaletab(color_image_t *src, int nblocks, int n_scale, const int *n_orientations); And the method is defined in gist.cpp float *color_gist_scaletab(color_image_t *src, int w, int n_scale, const int *n_orientation) { And finally the compute_gist.cpp (main file) #include <stdio.h> #include <stdlib.h> #include <string.h> #include "gist.h" static color_image_t *load_ppm(const char *fname) { FILE *f=fopen(fname,"r"); if(!f) { perror("could not open infile"); exit(1); } int width,height,maxval; if(fscanf(f,"P6 %d %d %d",&width,&height,&maxval)!=3 || maxval!=255) { fprintf(stderr,"Error: input not a raw PPM with maxval 255\n"); exit(1); } fgetc(f); /* eat the newline */ color_image_t *im=color_image_new(width,height); int i; for(i=0;i<width*height;i++) { im->c1[i]=fgetc(f); im->c2[i]=fgetc(f); im->c3[i]=fgetc(f); } fclose(f); return im; } static void usage(void) { fprintf(stderr,"compute_gist options... [infilename]\n" "infile is a PPM raw file\n" "options:\n" "[-nblocks nb] use a grid of nb*nb cells (default 4)\n" "[-orientationsPerScale o_1,..,o_n] use n scales and compute o_i orientations for scale i\n" ); exit(1); } int main(int argc,char **args) { const char *infilename="/dev/stdin"; int nblocks=4; int n_scale=3; int orientations_per_scale[50]={8,8,4}; while(*++args) { const char *a=*args; if(!strcmp(a,"-h")) usage(); else if(!strcmp(a,"-nblocks")) { if(!sscanf(*++args,"%d",&nblocks)) { fprintf(stderr,"could not parse %s argument",a); usage(); } } else if(!strcmp(a,"-orientationsPerScale")) { char *c; n_scale=0; for(c=strtok(*++args,",");c;c=strtok(NULL,",")) { if(!sscanf(c,"%d",&orientations_per_scale[n_scale++])) { fprintf(stderr,"could not parse %s argument",a); usage(); } } } else { infilename=a; } } color_image_t *im=load_ppm(infilename); //Here's the method call -> :( float *desc=color_gist_scaletab(im,nblocks,n_scale,orientations_per_scale); int i; int descsize=0; //compute descriptor size for(i=0;i<n_scale;i++) descsize+=nblocks*nblocks*orientations_per_scale[i]; descsize*=3; // color //print descriptor for(i=0;i<descsize;i++) printf("%.4f ",desc[i]); printf("\n"); free(desc); color_image_delete(im); return 0; } Any help would be greatly appreciated. I hope this is enough info. Let me know if I need to add more.

    Read the article

  • apache httpd cannot browse through browser

    - by nuttynibbles
    i've setup apache and php on a virtual machine. everything works fine in the virtual machine. im able to execute php files and run up phpmyadmin connecting to mysql. on my host machine, im able ping and ssh into the remote machines. however, im unable to browse the php files on the host browser using the ip address. in my httpd.conf, im listening to port 80. i enabled the ServerName 192.168.75.102:80 am i missing some settings? port settings maybe?

    Read the article

  • "Cannot allocate memory " error whle copying data from window to ubuntu

    - by John
    I have Ubuntu 9.10 installed inside VM of server 2008. WHen i try to copy the data from the network and paste insid ethe Ubuntu it says error called "Cannot allocate memory " I have 3GB RAM attached to the Ubuntu I tried above suggestion but still im unbale to copy file from my host machine i.e. Windows XP to my Ubuntu machine ( which is at Virtual Machine) Im trying to copy jdk-1_5_0_22-linux-i586.bin file whose size is 47.4 MB Is there any other work around for this problem???? I tried Set the following registry key to ’1': HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache and set the following registry key to ’3': HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size but still im unbale to copy file from my host machine i.e. Windows XP to my Ubuntu machine ( which is at Virtual Machine) Im trying to copy jdk-1_5_0_22-linux-i586.bin file whose size is 47.4 MB Is there any other work around for this problem????

    Read the article

  • Shares Not working

    - by Crash893
    I'm running a ms server 2012 box acting as a file server, I've set up 4 shares (IT SECURITY PUBLIC HR) to start out with each share has its corresponding group as full permissions to the folder however when I access the server \server\it it says i don't have permissions. Public has NTLM AUTH as its full read/write and i can't even get into that Clearly im doing something wrong but im very new to windows server and im not sure how to start trouble shooting.

    Read the article

  • Eine Klasse f&uuml;r sich: Das Oracle Partner Diamant Level

    - by A&C Redaktion
    Es gibt Oracle Partner, die sind so gut, dass uns die Level im OPN Spezialisierungsprogramm ausgegangen sind. Nun, Oracle ist nicht umsonst bekannt für lösungsorientiertes Arbeiten und so fand sich auch in diesem Fall eine brilliante Lösung: Das Diamant Level. Im September durften wir mit dem weltweit tätigen IT-Unternehmen Infosys unseren zweiten höchstqualifizierten Partner nach Accenture im Diamant Level willkommen heißen. An dieser Stelle noch einmal herzliche Glückwünsche nach Bangalore! Infosys zeichnet sich durch exzellentes Fachwissen über Oracle Lösungen und umfassende Beratungskompetenz aus. Mit 25 000 Oracle Beratern weltweit und mit 30 Spezialisierungen, fünf davon "Advanced Specializations", hat sich Infosys mehr als qualifiziert, um die höchste Auszeichnung und damit einmalige Vorteile zu erhalten. Genau für solche Unternehmen ist das Diamant Level gedacht: für Partner, die in das gesamte Lösungs-Portfolio von Oracle investiert und den höchsten Grad an Spezialisierung erreicht haben. Besonderen Wert legen wir darauf, dass Diamant Partner weltweit anspruchsvolle Kunden beraten und individuell abgestimmte, hochwertige Oracle Lösungen bereitstellen. Im Gegenzug hat das Diamant Level auch einiges zu bieten: Durch die herausragende Platzierung auf den Oracle Produktseiten und das Zertifikat "Assigned Global Alliance Manager" erreichen Sie Millionen potentieller Kunden. Zudem haben Sie Zugang zu einzigartigen Support- und Qualifizierungsmöglichkeiten. Haben wir Ihr Interesse geweckt? Auf unseren Partnerseiten können Sie ihr Unternehmen ganz einfach für das OPN Programm anmelden, Spezialisierungen absolvieren und Level um Level aufsteigen.

    Read the article

  • Wolkig und heiter

    - by A&C Redaktion
    Mit Solaris 11 bringt Oracle das erste Betriebssystem für die Cloud auf den Markt. Wir hatten es angekündigt, das Thema Cloud wird uns hier im Blog so schnell nicht loslassen: Am Freitag hat nun Oracle sein erstes Unix-Betriebssystem auf den Markt gebracht, das explizit für die Cloud designt wurde: Solaris 11 heißt es und hier ist die Assoziation zu Stanislaw Lems gleichnamigem Science Fiction-Roman durchaus angebracht: Schließlich gilt Cloud Computing als die Technologie der Zukunft schlechthin. Was bietet Solaris 11, welchen Nutzen können die Oracle Partner daraus ziehen? "Kunden können ihre Betriebsabläufe vereinfachen, die Kapazitäten ihrer Rechenzentren erhöhen und Unternehmensanwendungen von Oracle und anderen in einer sicheren, skalierbaren Cloud oder in einer klassischen Unternehmensumgebung laufen lassen“, fasst John Fowler, Executive Vice President, Systems zusammen. Darf‘s auch etwas konkreter sein? Bitte: Oracle Solaris 11 dient ganz einfach dazu, selbst anspruchsvollste Unternehmensanwendungen in privaten, hybriden und Public Clouds zu betreiben. Als vollständig virtualisiertes Betriebssystem verfügt es über integrierte Virtualisierungs-Funktionen, sowohl für Betriebssystem- als auch für Netzwerk- und Speicher-Ressourcen. Die Server-Virtualisierung sorgt für sichere Live-Migration und flexible Einsatzmöglichkeiten – basierend auf Oracle VM für x86- und SPARC-Systeme. Höchste Verfügbarkeit wird erreicht, indem Solaris 11 ein umfassendes Management über die gesamte Infrastruktur hinweg ermöglicht. Oracle Solaris 11 bietet bereits im Standardbetrieb aktive Sicherheit „by default“, wie rollenbasierten Root-Zugriff und Überwachungsfunktionen. Die Daten- und Speichermanagement-Basis für Oracle Solaris 11 ist Oracle Solaris ZFS. Neben garantierter Datenintegrität erlaubt das Tiered Storage das Einrichten von Pools mit Flash-Speicher und zudem Hochgeschwindigkeitsverschlüsselung. Ein Blick in die Presse zeigt, dass Solaris 11 durchaus für Aufsehen in der Fachwelt sorgt, so äußert sich etwa die Netzwelt sehr positiv: „Die neue Paketverwaltung IPS trägt wie die genannten Neuerungen dazu bei, dass Solaris es in Version 11 durchaus wieder mit den etablierten Linux-Distributionen aufnehmen kann. Das Betriebssystem macht nicht nur im Server-, sondern auch im Desktop-Einsatz eine sehr gute Figur und glänzt mit hoher Stabilität.“ Hier die direkten Links zu weiteren Berichten über Solaris11 in der Fachpresse: Heise onlineZDNetGolem.deSilicon.deAll about SECURITYIT DirectorPro-Linux.deTech ChannelLinux Magazin

    Read the article

  • Happy Birthday, SPARC!

    - by A&C Redaktion
    25 Jahre gibt es SPARC in diesem Herbst – da gratulieren Oracle A&C und alle Partner natürlich ganz herzlich! Wir blicken zurück auf ein Vierteljahrhundert Erfolgsgeschichte:Wir befinden uns im Jahr 1987 und klobige graue PCs halten seit einigen Jahren Einzug in Büros und Privathäuser. Ein innovatives Startup-Unternehmen namens Sun Microsystems präsentiert seinen neuen Computer Sun-4, die eigentliche Sensation jedoch ist der Mikroprozessor, den die jungen Leute extra dafür entwickelt hatten: SPARC. Es handelte sich um einen extrem leistungsfähigen RISC-Hauptprozessor, der sowohl in den eigenen Workstations als auch den Servern der Sun-4-Baureihe zum Einsatz kommt. Vor allem in der Unternehmens-IT ermöglicht SPARC in den Folgejahren einen enormen Sprung nach vorn.Die weitere Entwicklung von SPARC, kombiniert mit einem Überblick über andere Meilensteine in der Geschichte der Computerwelt, finden Sie auf der Webseite "Celebrate 25 Years of SPARC Innovation".Wir springen gleich weiter in die Gegenwart, denn auch seit Sun zu Oracle gehört, hat sich so manches getan: Gerade erst hat Oracle die neue Server-Linie Sparc T4 vorgestellt – in Fachkreisen spricht man bereits von der größten Leistungssteigerung in der Geschichte der SPARC-Prozessoren.In den USA wurde das Jubiläum bereits kräftig gefeiert: Hier finden Sie Bilder vom Geburtstagsfest im Museum für Computer-Geschichte in Mountain View, Kalifornien, bei dem auch die SPARC-Entwickler Bill Joy and Andreas von Bechtolsheim zugegen waren und auch im Video SPARC-Event Highlights dreht sich alles um das Jubiläum. In der Oracle Familie gibt es 2012 noch ein weiteres Geburtstagskind: Solaris wird 20, herzlichen Glückwunsch! Das Unix-Betriebssystem, basierend auf SunOS, kam im Jahr 1992 erstmals auf den Markt. Solaris konnte seine gute Stellung seither behaupten und hat nun mit Solaris 11.1 das erste Cloud-Betriebssystem vorgestellt. Dieses überträgt die Zuverlässigkeit, Sicherheit und Skalierbarkeit des bewährten Solaris in die Cloud und bietet eine optimale Plattform für Unternehmensanwendungen.  Lesen Sie hier, was die Fachpresse über die Geburtstagskinder schreibt: ProLinux.de (SPARC) Computerwoche.de (Solaris)SearchDataCenter.de (Solaris)

    Read the article

  • Happy Birthday, SPARC!

    - by A&C Redaktion
    25 Jahre gibt es SPARC in diesem Herbst – da gratulieren Oracle A&C und alle Partner natürlich ganz herzlich! Wir blicken zurück auf ein Vierteljahrhundert Erfolgsgeschichte:Wir befinden uns im Jahr 1987 und klobige graue PCs halten seit einigen Jahren Einzug in Büros und Privathäuser. Ein innovatives Startup-Unternehmen namens Sun Microsystems präsentiert seinen neuen Computer Sun-4, die eigentliche Sensation jedoch ist der Mikroprozessor, den die jungen Leute extra dafür entwickelt hatten: SPARC. Es handelte sich um einen extrem leistungsfähigen RISC-Hauptprozessor, der sowohl in den eigenen Workstations als auch den Servern der Sun-4-Baureihe zum Einsatz kommt. Vor allem in der Unternehmens-IT ermöglicht SPARC in den Folgejahren einen enormen Sprung nach vorn.Die weitere Entwicklung von SPARC, kombiniert mit einem Überblick über andere Meilensteine in der Geschichte der Computerwelt, finden Sie auf der Webseite "Celebrate 25 Years of SPARC Innovation".Wir springen gleich weiter in die Gegenwart, denn auch seit Sun zu Oracle gehört, hat sich so manches getan: Gerade erst hat Oracle die neue Server-Linie Sparc T4 vorgestellt – in Fachkreisen spricht man bereits von der größten Leistungssteigerung in der Geschichte der SPARC-Prozessoren.In den USA wurde das Jubiläum bereits kräftig gefeiert: Hier finden Sie Bilder vom Geburtstagsfest im Museum für Computer-Geschichte in Mountain View, Kalifornien, bei dem auch die SPARC-Entwickler Bill Joy and Andreas von Bechtolsheim zugegen waren und auch im Video SPARC-Event Highlights dreht sich alles um das Jubiläum. In der Oracle Familie gibt es 2012 noch ein weiteres Geburtstagskind: Solaris wird 20, herzlichen Glückwunsch! Das Unix-Betriebssystem, basierend auf SunOS, kam im Jahr 1992 erstmals auf den Markt. Solaris konnte seine gute Stellung seither behaupten und hat nun mit Solaris 11.1 das erste Cloud-Betriebssystem vorgestellt. Dieses überträgt die Zuverlässigkeit, Sicherheit und Skalierbarkeit des bewährten Solaris in die Cloud und bietet eine optimale Plattform für Unternehmensanwendungen.  Lesen Sie hier, was die Fachpresse über die Geburtstagskinder schreibt: ProLinux.de (SPARC) Computerwoche.de (Solaris)SearchDataCenter.de (Solaris)

    Read the article

  • SSL: Alternative Netzwerkverschlüsselung für Oracle Datenbanken

    - by Heinz-Wilhelm Fabry (DBA Community)
    Das Netzwerk bietet eine extrem kritische Angriffsfläche in jeder Sicherheitsarchitektur. Einerseits ist kaum zu verhindern, dass externe oder auch interne Angreifer auf das Netzwerk zugreifen: So sieht etwa jemand, der Zugriff auf einen sogenannten Netzwerksniffer hat (zum Beispiel auf das weit verbreitete Wireshark) alle Daten, die im Netzwerk übertragen werden. Andererseits gehen alle Befehle, die an eine Oracle Datenbank geschickt werden - mit Ausnahme der Informationen zu Benutzernamen und Passwort beim LOGIN - sowie alle Daten, die aus einer Datenbank ausgegeben werden, im Klartext über das Netzwerk. Das Risiko,  über das Netzwerk Daten 'zu verlieren', ist daher nur in den Griff zu bekommen, wenn man den Datenstrom verschlüsselt. Die einfachste Lösung zur Verschlüsselung des Datenstroms bietet ASO mit der sogenannten nativen Verschlüsselung über SQL*Net. Sie ist bei Bedarf und ohne Neustart der Datenbank ganz einfach und im Extremfall mit einer einzigen Einstellung in der Konfigurationsdatei SQLNET.ORA zu implementieren, nämlich mitSQLNET.ENCRYPTION_SERVER = REQUIREDWegen der einfachen Umsetzung wird diese Variante von der ganz überwiegenden Mehrheit der ASO Anwender bevorzugt eingesetzt. Im Rahmen der Datenbank Community wurde das Verfahren auch schon näher betrachtet. Allerdings lässt sich mit der ASO auch die Verschlüsselung des Netzwerks über SSL implementieren. Wie das aufzusetzen ist beschreibt dieser Tipp. Er versteht sich als erstes How-To zur Einarbeitung in die Thematik.

    Read the article

  • Displaying music list using custom lists instead of array adapters

    - by Rahul Varma
    Hi, I have displayed the music list in a list view. The list is obtained from a website. I have done this using Arraylist. Now, i want to iterate the same program using custom lists and custom adapters instead of array list. The code i have written using array lists is... public class MusicListActivity extends Activity { MediaPlayer mp; File mediaFile; TextView tv; TextView albumtext; TextView artisttext; ArrayList<String> al=new ArrayList<String>(); //ArrayList<String> al=new ArrayList<String>(); ArrayList<String> node=new ArrayList<String>(); ArrayList<String> filepath=new ArrayList<String>(); ArrayList<String> imgal=new ArrayList<String>(); ArrayList<String> album=new ArrayList<String>(); ArrayList<String> artist=new ArrayList<String>(); ListView lv; Object[] webImgListObject; String[] stringArray; XMLRPCClient client; String loginsess; HashMap<?, ?> siteConn = null; //ImageView im; Bitmap img; String s; int d; int j; StreamingMediaPlayer sm; int start=0; Intent i; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.openadiuofile); lv=(ListView)findViewById(R.id.list1); al=getIntent().getStringArrayListExtra("titles"); //node=getIntent().getStringArrayListExtra("nodeid"); filepath=getIntent().getStringArrayListExtra("apath"); imgal=getIntent().getStringArrayListExtra("imgpath"); album=getIntent().getStringArrayListExtra("album"); artist=getIntent().getStringArrayListExtra("artist"); // ArrayAdapter<String> aa=new ArrayAdapter<String>(this,R.layout.row,R.id.text2,al); //lv.setAdapter(aa); try{ lv.setAdapter( new styleadapter(this,R.layout.row, R.id.text2,al)); }catch(Throwable e) { Log.e("openaudio error",""+e.toString()); goBlooey(e); } lv.setOnItemClickListener(new OnItemClickListener(){ @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3){ j=1; try{ d=arg2; String filep=filepath.get(d); String tit=al.get(d); String image=imgal.get(d); String singer=artist.get(d); String movie=album.get(d); sendpath(filep,tit,image,singer,movie); // getpath(n); }catch(Throwable t) { goBlooey(t); } } }); } @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); if(j==0) {i=new Intent(this,gorinkadashboard.class); startActivity(i);} } @Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); j=0; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode==KeyEvent.KEYCODE_SEARCH) { Log.i("go","go"); return true; } return(super.onKeyDown(keyCode, event)); } public void sendpath(String n,String nn,String image,String singer,String movie) { Intent ii=new Intent(this,MusicPlayerActivity.class); ii.putExtra("path",n); ii.putExtra("titletxt",nn); //ii.putStringArrayListExtra("playpath",filepath); ii.putExtra("pos",d); ii.putExtra("image",image); ii.putStringArrayListExtra("imagepath",imgal); ii.putStringArrayListExtra("filepath", filepath); ii.putStringArrayListExtra("imgal", imgal); ii.putExtra("movie" ,movie ); ii.putExtra("singer",singer); ii.putStringArrayListExtra("album", album); ii.putStringArrayListExtra("artist",artist); ii.putStringArrayListExtra("tittlearray",al); startActivity(ii); } class styleadapter extends ArrayAdapter<String> { Context context=null; public styleadapter(Context context, int resource, int textViewResourceId, List<String> objects) { super(context, resource, textViewResourceId, objects); this.context=context; } @Override public View getView(int position, View convertView, ViewGroup parent) { final int i=position; LayoutInflater inflater = ((Activity) context).getLayoutInflater(); View v = inflater.inflate(R.layout.row, null); tv=(TextView)v.findViewById(R.id.text2); albumtext=(TextView)v.findViewById(R.id.text3); artisttext=(TextView)v.findViewById(R.id.text1); tv.setText(al.get(i)); albumtext.setText(album.get(i)); artisttext.setText(artist.get(i)); final ImageView im=(ImageView)v.findViewById(R.id.image); s="http://www.gorinka.com/"+imgal.get(i); // displyimg(s,v); // new imageloader(s,im); String imgPath=s; AsyncImageLoaderv asyncImageLoaderv=new AsyncImageLoaderv(); Bitmap cachedImage = asyncImageLoaderv.loadDrawable(imgPath, new AsyncImageLoaderv.ImageCallback() { public void imageLoaded(Bitmap imageDrawable, String imageUrl) { im.setImageBitmap(imageDrawable); } }); im.setImageBitmap(cachedImage); return v; } } public class imageloader implements Runnable{ private String ss; //private View v; //private View v2; private ImageView im; public imageloader(String s, ImageView im) { this.ss=s; //this.v2=v2; this.im=im; Thread thread = new Thread(this); thread.start(); } public void run(){ try { // URL url = new URL(ss); // URLConnection conn = url.openConnection(); // conn.connect(); HttpGet httpRequest = null; httpRequest = new HttpGet(ss); HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = (HttpResponse) httpclient.execute(httpRequest); HttpEntity entity = response.getEntity(); BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity); InputStream is = bufHttpEntity.getContent(); // BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(is); Log.d("img","img"); // bis.close(); is.close(); im.setImageBitmap(bm); // im.forceLayout(); // v2.postInvalidate(); // v2.requestLayout(); } catch (Exception t) { Log.e("bitmap url", "Exception in updateStatus()", t); //goBlooey(t); // throw new RuntimeException(t); } } } private void goBlooey(Throwable t) { AlertDialog.Builder builder=new AlertDialog.Builder(this); builder .setTitle("Exception!") .setMessage(t.toString()) .setPositiveButton("OK", null) .show(); } } I have created the SongList.java, SongsAdapter.java and also SongsAdapterView.java. Their code is... public class SongsList { private String titleName; private String movieName; private String singerName; private String imagePath; private String mediaPath; // Constructor for the SongsList class public SongsList(String titleName, String movieName, String singerName,String imagePath,String mediaPath ) { super(); this.titleName = titleName; this.movieName = movieName; this.singerName = singerName; this.imagePath = imagePath; this.mediaPath = mediaPath; } public String gettitleName() { return titleName; } public void settitleName(String titleName) { this.titleName = titleName; } public String getmovieName() { return movieName; } public void setmovieName(String movieName) { this.movieName = movieName; } public String getsingerName() { return singerName; } public void setsingerName(String singerName) { this.singerName = singerName; } public String getimagePath() { return imagePath; } public void setimagePath(String imagePath) { this.imagePath = imagePath; } public String getmediaPath() { return mediaPath; } public void setmediaPath(String mediaPath) { this.mediaPath = mediaPath; } } public class SongsAdapter extends BaseAdapter{ private Context context; private List<SongsList> listSongs; public SongsAdapter(Context context, List<SongsList> listPhonebook){ this.context = context; this.listSongs = listSongs; } public int getCount() { return listSongs.size(); } public Object getItem(int position) { return listSongs.get(position); } public long getItemId(int position) { return position; } public View getView(int position, View view, ViewGroup viewGroup) { SongsList entry = listSongs.get(position); return new SongsAdapterView(context,entry); } } public SongsAdapterView(Context context, SongsList entry) { super(context); this.setOrientation(VERTICAL); this.setTag(entry); // TODO Auto-generated constructor stub View v = inflate(context, R.layout.row, null); TextView tvTitle = (TextView)v.findViewById(R.id.text2); tvTitle.setText(entry.gettitleName()); TextView tvMovie = (TextView)v.findViewById(R.id.text3); tvTitle.setText(entry.getmovieName()); TextView tvSinger = (TextView)v.findViewById(R.id.text1); tvTitle.setText(entry.getsingerName()); addView(v); } } Can anyone please tell me how to display the list using custom lists and custom adapters using the code above???

    Read the article

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