Search Results

Search found 174 results on 7 pages for 'zeb ur rehman'.

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

  • RemoteWebDriver doesn't work with xpath

    - by questions
    I'm trying to use RemoteWebDriver with xpath locators on google.com, this is the log from node running firefox. It receives all those commands but doesn't executes them. I dont see any activity with browser, other than opening google homepage. 14:05:05.671 INFO - Executing: [get: http://google.com] at URL: /session/1341695 049401/url) 14:05:06.260 INFO - Done: /session/1341695049401/url 14:05:06.301 INFO - Executing: [find element: By.xpath: //*[@id="gbqfqw"]] at UR L: /session/1341695049401/element) 14:05:06.453 INFO - Done: /session/1341695049401/element 14:05:06.495 INFO - Executing: [send keys: 0 org.openqa.selenium.support.events. EventFiringWebDriver$EventFiringWebElement@74d5f412, [StackOverflow]] at URL: /se ssion/1341695049401/element/0/value) 14:05:06.796 INFO - Done: /session/1341695049401/element/0/value 14:05:06.822 INFO - Executing: [find element: By.xpath: //*[@id="gbqfb"]] at URL : /session/1341695049401/element) 14:05:06.935 INFO - Done: /session/1341695049401/element 14:05:06.987 INFO - Executing: [click: 1 org.openqa.selenium.support.events.Even tFiringWebDriver$EventFiringWebElement@7b64218d] at URL: /session/1341695049401/ element/1/click) 14:05:09.627 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@ 6349a3ca at URL: /status) 14:05:09.627 INFO - Done: /status I tried with By.name(q) and it works.

    Read the article

  • How javascript gets someother website data?

    - by user260165
    Well i am a bit confused.. I saw a service known as Zopim.. What they do is they provide you with a small piece of code: such as <!-- Start of Zopim Live Chat Script --> <script type="text/javascript"> document.write(unescape("%3Cscript src=\'" + document.location.protocol + "//zopim.com/?zopim\' type=\'text/javascript\'%3E%3C/script%3E")); </script> <!-- End of Zopim Live Chat Script --> you just need to place it in the footer and ur done.. Can any body let me know how this works and from where i can learn this.. + how can they even set the CSS with this and also the looks? Awaiting for your replies... Thanks

    Read the article

  • mysql query that has array

    - by Xainee Khan
    //get all id's of ur friend that has installed your application $friend_pics=$facebook->api( array( 'method' => 'fql.query', 'query' => "SELECT uid FROM user WHERE uid IN(SELECT uid2 from friend WHERE uid1='$user') AND is_app_user = 1" ) ); // this query work fine //your top10 friends in app $result="SELECT * FROM fb_user WHERE user_id IN($friend_pics) ORDER BY oldscore DESC LIMIT 0,10"; db_execute($result); i want to retrive ten top scorer from my database stored in oldscore but in my second query the array name $friend_pics is not working i guess,plz help me thanks

    Read the article

  • how to load Module to control like panel , vbox etc +flex

    - by glory-grace
    Hi All, Im new to this flex. can anybody solve my problem.This is my query- i have home page divided into 3 part like top,left,middle positon. in middle postion -panel and combobox are there. i want to load my module to the middle positon like to panel. i have combobox, when i selected any item based on that im loading module to that panel using Custom moduleloader control.uptohere its working fine. my probelm, i selected one option from combobox. its showing the one module(sam1). when i click(sam1),it should open anothermodule(sam2) in same location(instead of sam1-sam2).so can u tel ur idea and how to resolve it.plz.

    Read the article

  • Regarding the scrollbar in the cascade menu

    - by Manochitra
    Hi All, I have to solve a defect. The defect is there is a scroll bar attached to the vertical cascading menu. When I try to scroll through the items using the scrollbar , the menu disappears. That is, When i place the mouse over the scrollbar the menu disappears. But when i scroll the items through the mouse, the scrollbar is also moving. Can anyone help me out in this issue? Please forward ur ans to *[email protected]* Thanks, Manochitra.

    Read the article

  • How to get two different array checkbox value in Jquery?.

    - by boss
    Hi.. For example i have 5 checkbox, 3 checkbox with name=a[] and 2 checkbox with name=b[], if i checked array a[] 3checkbox iam getting the same value for b[] checkbox even b[] checkbox not checked. please suggest... For ur reference: var selectedAItems = new Array(); $("input[@name='a[]']:checked").each(function() { selectedAItems.push($(this).val()); }); var selectedBItems = new Array(); $("input[@name='b[]']:checked").each(function() { selectedBItems.push($(this).val()); }); alert(selectedAItems); alert(selectedBItems );

    Read the article

  • Jquery function calls more than one time.

    - by Harie
    I am having an aspx page in which I am calling a user control. The user control I am using a pop up to display it when a user clicks a asp:linkbutton. In that user control I am having a textbox and I am calling a Jquery Blur to do some validation. While doing so the function is calling [blur] is calling twice. I just called an alert() with the textbox value.So I can see the alert is coming twice .What I need to do to avoid the second time. I need to do it only whenever the user going out of the textbox and that also one time. $('#<%=txtCategory.ClientID %>').blur(function() { alert($(this).val()); }); This is called twice.Thanks for ur response.

    Read the article

  • Selected number of records from database in DB2.

    - by Abhi
    Hi All, I have to fetch only 50 records at a time from database(DB2), for this I have been usig Row_Number but now the persons are telling that this Row_Number is not stable and has bugs in it so now I have to write a different querry for the same as I have to fetch only 50 records at a time. so please can any body help me out for the same. Thanks in advance. The Query which I have been using is SELECT PLC.* FROM ( SELECT ROW_NUMBER() OVER (ORDER BY PRDLN_CTLG_OID) AS Row, PRDLN_CTLG_OID, PRODUCT_LINE_OID AS PRODUCT_LINE_OID, RTRIM(CATALOG_ID) AS CATALOG_ID, FROM PROD_LINE_CATALOG WHERE PRODUCT_LINE_OID=:productLineOID AND ACTV_IND = 1 ORDER BY CATALOG_ID) PLC WHERE Row >= :startIndex AND Row <= :endIndex ORDER BY PLC.CATALOG_ID DESC WITH UR

    Read the article

  • Replace multible data codes in a datafram with names

    - by Shabana
    I have a problem in replacing codes in a dataframe of 3890 observations. My dataframe has a character variable df$IJN which contains values from 1 to 27. I would like to replace these with meaningful data as follow If(1 OR 6 OR 10 OR 14 OR 18 OR 22 OR 26) should be replaced with UL. If(3 OR 7 OR 11 OR 15 OR 19 OR 23 OR 27) should be replaced with LL. If(4 OR 8 OR 12 OR 16 OR 20 OR 24) should be replaced with UR. If(5 OR 9 OR 13 OR 17 OR 21 OR 25) should be replaced with LR. (U,L,R,and L Refer to Upper, Lower, Right, and Left sites in the order) I thought of a for() with if() could not manage with it Also thought of df[which(df=="27")] ="LL" may work one by one not sure! Any help please. R v3.1 - Windows 7 E-H Shabana, Paris.

    Read the article

  • not autolinking all-numeric twitter hashtags in perl?

    - by all_numeric_no_hash
    I'm producing HTML from twitter search results. Happily using the Net::Twitter module :-) One of the rules in Twitter is that all-numeric hashtags are not links. This allows to unambiguously tweet things like "ur not my #1 anymore", as in here: http://twitter.com/natarias2007/status/11246320622 The solution I came up with looks like: $tweet =~ s{#([0-9]*[A-Za-z_]+[0-9]*)}{<a href="http://twitter.com/search?q=%23$1">#$1</a>}g; It seems to work (let's hope), but I'm still curious... how would you do it?

    Read the article

  • JMS On demand Support Active MQ with Spring

    - by user345275
    Hi Team I am involving in SMS Gate way project. The Very Base function is our system have couple of Customers They will send their request to our gateway in a form of XML. Those request is Process first and send it to a common out bound JMS(ActiveMQ 5.3 ) There is an listener running on which should be capable of doing the following 1. Retrive Bunch of Messages(Let say 5 ) on retrieval. 2. The retival should be on demand .It means ,once the listeners triggers only those bunch of message should return . Guys i really need ur help.If you have any idea please help me ou

    Read the article

  • Shedule tasks question

    - by gabac
    Hi everyone I have a though question :) Let's say you get some data which is due at a certain point int the future. You get A saying my task is due in 1h and other which says his task is due in 1.5h. The information is collected on your server. In which programming language or even how would solve that? So task a will be executed in 1h, task B in 1.5h. I read something about java scheduler but I'm not yet sure if this is the right way. What are ur ideas? Cheers

    Read the article

  • Google search results are invalid

    - by Rufus
    I'm writing a program that lets a user perform a Google search. When the result comes back, all of the links in the search results are links not to other sites but to Google, and if the user clicks on one, the page is fetched not from the other site but from Google. Can anyone explain how to fix this problem? My Google URL consists of this: http://google.com/search?q=gargle But this is what I get back when the user clicks on the Wikipedia search result, which was http://www.google.com/url?q=http://en.wikipedia.org/wiki/Gargling&sa=U&ei=_4vkT5y555Wh6gGBeOzECg&ved=0CBMQejAe&usg=AFQjeNHd1eRV8Xef3LGeH6AvGxt-AF-Yjw <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Gargling - Wikipedia, the free encyclopedia</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="MediaWiki 1.20wmf5" /> <meta http-equiv="last-modified" content="Fri, 09 Mar 2012 12:34:19 +0000" /> <meta name="last-modified-timestamp" content="1331296459" /> <meta name="last-modified-range" content="0" /> <link rel="alternate" type="application/x-wiki" title="Edit this page" > <link rel="edit" title="Edit this page" > <link rel="apple-touch-icon" > <link rel="shortcut icon" > <link rel="search" type="application/opensearchdescription+xml" > <link rel="EditURI" type="application/rsd+xml" > <link rel="copyright" > <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" > <link rel="stylesheet" href="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=ext.gadget.teahouse%7Cext.wikihiero%7Cmediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&amp;only=styles&amp;skin=vector&amp;*" type="text/css" media="all" /> <style type="text/css" media="all">#mwe-lastmodified { display: none; }</style><meta name="ResourceLoaderDynamicStyles" content="" /> <link rel="stylesheet" href="//bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&amp;lang=en&amp;modules=site&amp;only=styles&amp;skin=vector&amp;*" type="text/css" media="all" /> <style type="text/css" media="all">a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none} /* cache key: enwiki:resourceloader:filter:minify-css:7:d5a1bf6cbd05fc6cc2705e47f52062dc */</style>

    Read the article

  • help Add Any Application Shortcut in Desktop Context Menu

    - by blackjack
    i got the info here but after adding that i didn't get any shortcut on my desktop contest menu :( pls help me i want it only on my desktop context menu Open regedit and goto: CODEHKEY_CLASSES_ROOT\Directory\Background\shell now under this key create another key with any name and in right-side pane set its value to the label, which you want to show in desktop context menu, like Media Player, Winamp, Firefox, anything else. Now create another key under this newly created key with name command. and in right-side pane set its value to the exact path of application, like: C:\Program Files\Windows Media Player\wmplayer.exe C:\Program Files\Winamp\winamp.exe etc... Thats it. Now you can check your favorite application shortcut in desktop context menu. You can create as many shortcut as you want. Simply create a separate key for all the applications. Following is a ready-made code: CODEWindows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\WMP] @="Windows Media Player" [HKEY_CLASSES_ROOT\Directory\Background\shell\WMP\command] @="C:\Program Files\Windows Media Player\wmplayer.exe" Just change the label and path to ur desired application and save with the name "vishal.reg" (including the quotes) and run it. U can also set the application shortcut to show only when u press key by adding "Extended" String value in right-side pane of the newly created key: CODEWindows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\WMP] @="Windows Media Player" "Extended"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\WMP\command] @="C:\Program Files\Windows Media Player\wmplayer.exe"

    Read the article

  • Active Directory + IIS + SQL + ASP.NET

    - by Amira Elsayed Ismail
    I have sent the following question to stackoverflow website I have installed Windows server 2008 r2 on a virtual machine, Can I install Active directory with domain controller + IIS + SQL server on the same machine? I want to make web application and this web application will authenticate users from Active Directory, the web application should be published on the server IIS and the users should access it remotely from their home using domain name of my machine, Someone tell me that its very wrong to have IIS and Active directory on the same machine I got the following Answer You can't use ActiveDirectory over the internet. At least not without something like a VPN as a middle man. Their home computers will not be joined to the domain, so there is no pass-through authentication. Yes, it's a bad idea to put AD on the web server. Why is too complex to get into in an answer here. Suffice it to say that even if you did do this, it's probably would not work the way you are thinking it should. It's not impossible to do this. For instance, many of the Microsoft "Small Businesss" products put IIS, AD, and SQL Server on the same server. But, you kind of have to know what you're doing to configure it securely. Then I add the following comment Thanks for ur reply.so what you think about the best way to do this as I didn't do anything like that before should I install active directory on a machine and IIS on another machine ? and what about SQL should I add it to the same server of active directory ? I didn't mentioned also that it will be Microsoft dynamics server that will access some information about work and i have to read data from axapta also ? also what is VPN and how can I use it to let users access my web application anywhere ? Sorry for my long questions and thanks in advance so please if anyone can help I will be thankful

    Read the article

  • Domain workstation acting up and I can't track it down.

    - by DevNULL
    I have a developer with a Windows XP (SP2) 64 bit machine. If the machine is left on overnight (or any period of time longer than 5-6 hours) it takes 2-3 minutes to open any local drive and his network drives are no longer accessible. Here's what the system logs report... Any Help BTW: The problem just started a week ago and nothing has changed on the domain controller / AD or his machine. --- ERROR 1 Event Type: Error Event Source: NETLOGON Event Category: None Event ID: 5719 Date: 6/8/2010 Time: 9:17:26 AM User: N/A Computer: BFC1 Description: This computer was not able to set up a secure session with a domain controller in domain UR due to the following: There are currently no logon servers available to service the logon request. This may lead to authentication problems. Make sure that this computer is connected to the network. If the problem persists, please contact your domain administrator. ADDITIONAL INFO If this computer is a domain controller for the specified domain, it sets up the secure session to the primary domain controller emulator in the specified domain. Otherwise, this computer sets up the secure session to any domain controller in the specified domain. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 5e 00 00 c0 ^..A --- ERROR 2 The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {555F3418-D99E-4E51-800A-6E89CFD8B1D7} to the user NT AUTHORITY\LOCAL SERVICE SID (S-1-5-19). This security permission can be modified using the Component Services administrative tool. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. --- ERROR 3 Event Type: Error Event Source: RemoteAccess Event Category: None Event ID: 20106 Date: 6/8/2010 Time: 10:12:18 AM User: N/A Computer: BFC1 Description: Unable to add the interface {E76F0A78-7A0B-4EBB-A081-BA3BD452FC4C} with the Router Manager for the IP protocol. The following error occurred: Cannot complete this function. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: eb 03 00 00 e...

    Read the article

  • Does image block (firefox addon) save internet bandwidth usage?

    - by dkjain
    Does image block save internet bandwidth usage. I have a data capped plan from my ISP ( 5GB at 2mbps and thereafter 256 kpbs / pm). I doubt if the addon or other similar addon actually saves bandwidht. Here is my point of view, pls correct if that is wrong. When a request is sent to the server, the server sends out whatever page it's requested to serve with all its text and images etc. So essentially my ISP has made his pipe available for the data to reach me thus he would count those bytes under my data plan. When the data arrives it's all first stored to my browser cache (folder) area which means all the data has actually been received by me/computer using my ISP's pipe. The browser then fetches those data from the cache and displays it. By hitting the stop button or blocking images via ur addon I am just choosing not to display the data which would remain in the cache or eventually be discarded if still on the network pipe after a timeout limit. The point is the data request have been completed by the ISP and so the data would be metered and thus using addon such as image block or hitting stop button while page is loading does not in any way save internet bandwidth. Your comments plz....... Regards dk.

    Read the article

  • Simple Adapter error

    - by Rahul Varma
    Hi, I have the following errors when i try to access the simple adapter from my program... Plz can anyone help me solving the error... Desperate to get it done.... android.widget.SimpleAdapter.getCount(SimpleAdapter.java:95) android.widget.ListView.setAdapter(ListView.java:431) com.stellent.gorinka.MusicListActivity.list(MusicListActivity.java:76) com.stellent.gorinka.MusicListActivity$1.run(MusicListActivity.java:67) android.os.Handler.handleCallback(Handler.java:587) android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) android.os.Handler.handleCallback(Handler.java:587) android.os.Handler.dispatchMessage(Handler.java:92) android.os.Looper.loop(Looper.java:123) Here' the code for Adapter... public class SongsAdapter extends SimpleAdapter{ static List<HashMap<String,String>> songsList; Context context; LayoutInflater inflater; public SongsAdapter(Context context,List<HashMap<String,String>> imgListWeb,int layout,String[] from,int[] to,LayoutInflater inflater) { super(context,songsList,layout,from,to); this.songsList=songsList; this.context=context; this.inflater=inflater; // TODO Auto-generated constructor stub }@Override public View getView(int postition,View convertView,ViewGroup parent)throws java.lang.OutOfMemoryError{ try { View v = ((LayoutInflater) inflater).inflate(R.layout.row,null); ImageView images=(ImageView)v.findViewById(R.id.image); TextView tvTitle=(TextView)v.findViewById(R.id.text1); TextView tvAlbum=(TextView)v.findViewById(R.id.text2); TextView tvArtist=(TextView)v.findViewById(R.id.text3); HashMap<String,String> songsHash=songsList.get(postition); String path=songsHash.get("path"); String title=songsHash.get("title"); String album=songsHash.get("album"); String artist=songsHash.get("artist"); String imgPath=path; final ImageView imageView = (ImageView) v.findViewById(R.id.image); AsyncImageLoaderv asyncImageLoader=new AsyncImageLoaderv(); Bitmap cachedImage = asyncImageLoader.loadDrawable(imgPath, new AsyncImageLoaderv.ImageCallback() { public void imageLoaded(Bitmap imageDrawable, String imageUrl) { imageView.setImageBitmap(imageDrawable); } }); imageView.setImageBitmap(cachedImage); tvTitle.setText(title); tvAlbum.setText(album); tvArtist.setText(artist); return v; } catch(Exception e){ Log.e("error",e.toString()); } return null; } And also in my main program the focus is not entering the loop... The implementation in the loop isnt getting executed...Here's the code for it... public void list() { Log.d("#####","#####"); LayoutInflater inflater=getLayoutInflater(); String[] from={}; int[] n={}; adapter=new SongsAdapter(getApplicationContext(),songNodeDet,R.layout.row,from,n,inflater); lv.setAdapter(adapter);} private Handler handler = new Handler() { public void handleMessage(Message msg){ Log.d("*****","handler"); removeDialog(0); p.dismiss(); } }; public void webObjectList(Object[] imgListObj,String logInSess) throws XMLRPCException{ songNodeWeb = new HashMap<?,?>[imgListObj.length]; if(imgListObj!=null){ Log.e("completed","completed"); for(int i=0;i<imgListObj.length;i++){ //imgListObj.length songNodeWeb[i]=(HashMap<?,?>)imgListObj[i]; String nodeid=(String) songNodeWeb[i].get("nid"); Log.e("img",i+"completed"); HashMap<String,String> nData=new HashMap<String,String>(); nData.put("nid",nodeid); Object nodeget=client.call("node.get",logInSess,nodeid); HashMap<?,?> imgNode=(HashMap<?,?>)nodeget; String titleName=(String) imgNode.get("titles"); String movieName=(String) imgNode.get("album"); String singerName=(String) imgNode.get("artist"); nData.put("titles", titleName); nData.put("album", movieName); nData.put("artist", singerName); Object[] imgObject=(Object[])imgNode.get("title_format"); HashMap<?,?>[] imgDetails=new HashMap<?,?>[imgObject.length]; imgDetails[0]=(HashMap<?, ?>)imgObject[0]; String path=(String) imgDetails[0].get("filepath"); if(path.contains(" ")){ path=path.replace(" ", "%20"); } String imgPath="http://www.gorinka.com/"+path; paths.add(imgPath); nData.put("path", imgPath); Log.e("my path",path); String mime=(String)imgDetails[0].get("filemime"); nData.put("mime", mime); SongsList songs=new SongsList(titleName,movieName,singerName,imgPath,imgPath); SngList.add(i,songs); songNodeDet.add(i,nData); } Log.e("paths values",paths.toString()); // return imgNodeDet; handler.sendEmptyMessage(0); } } public void getSongs() throws MalformedURLException, XMLRPCException { String ur="http://www.gorinka.com/?q=services/xmlrpc"; URL u=new URL(ur); client = new XMLRPCClient(u); //Connecting to the website HashMap<?, ?> siteConn =(HashMap<?, ?>) client.call("system.connect"); // Getting initial sessio id String initSess=(String)siteConn.get("sessid"); //Login to the site using session id HashMap<?, ?> logInConn =(HashMap<?, ?>) client.call("user.login",initSess,"prakash","stellentsoft2009"); //Getting Login sessid logInSess=(String)logInConn.get("sessid"); websongListObject =(Object[]) client.call("nodetype.get",logInSess,""); webObjectList(websongListObject,logInSess); Log.d("webObjectList","webObjectList"); runOnUiThread(returnRes); } }

    Read the article

  • Reason for Null pointer Exception

    - by Rahul Varma
    Hi, I cant figure out why my program is showing null pointer exception. Plz help me...Here's the program... public class MusicListActivity extends Activity { List<HashMap<String, String>> songNodeDet = new ArrayList<HashMap<String,String>>(); HashMap<?,?>[] songNodeWeb; XMLRPCClient client; String logInSess; ArrayList<String> paths=new ArrayList<String>(); public ListAdapter adapter ; Object[] websongListObject; List<SongsList> SngList=new ArrayList<SongsList>(); Runnable r; ProgressDialog p; ListView lv; String s; @Override public void onCreate(Bundle si){ super.onCreate(si); setContentView(R.layout.openadiuofile); lv=(ListView)findViewById(R.id.list1); r=new Runnable(){ public void run(){ try{ getSongs(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (XMLRPCException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; Thread t=new Thread(r,"background"); t.start(); Log.e("***","process over"); } @Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); } private Runnable returnRes = new Runnable() { @Override public void run() { Log.d("handler","handler"); removeDialog(0); p.dismiss(); list(); } }; public void list() { Log.d("#####","#####"); LayoutInflater inflater=getLayoutInflater(); String[] from={}; int[] n={}; adapter=new SongsAdapter(getApplicationContext(),songNodeDet,R.layout.row,from,n,inflater); lv.setAdapter(adapter);} private Handler handler = new Handler() { public void handleMessage(Message msg){ Log.d("*****","handler"); removeDialog(0); p.dismiss(); } }; public void webObjectList(Object[] imgListObj,String logInSess) throws XMLRPCException{ songNodeWeb = new HashMap<?,?>[imgListObj.length]; if(imgListObj!=null){ Log.e("completed","completed"); for(int i=0;i<imgListObj.length;i++){ //imgListObj.length songNodeWeb[i]=(HashMap<?,?>)imgListObj[i]; String nodeid=(String) songNodeWeb[i].get("nid"); break; Log.e("img",i+"completed"); HashMap<String,String> nData=new HashMap<String,String>(); nData.put("nid",nodeid); Object nodeget=client.call("node.get",logInSess,nodeid); HashMap<?,?> imgNode=(HashMap<?,?>)nodeget; String titleName=(String) imgNode.get("titles"); String movieName=(String) imgNode.get("album"); String singerName=(String) imgNode.get("artist"); nData.put("titles", titleName); nData.put("album", movieName); nData.put("artist", singerName); Object[] imgObject=(Object[])imgNode.get("field_image"); HashMap<?,?>[] imgDetails=new HashMap<?,?>[imgObject.length]; imgDetails[0]=(HashMap<?, ?>)imgObject[0]; String path=(String) imgDetails[0].get("filepath"); if(path.contains(" ")){ path=path.replace(" ", "%20"); } String imgPath="http://www.gorinka.com/"+path; paths.add(imgPath); nData.put("path", imgPath); Log.e("my path",path); String mime=(String)imgDetails[0].get("filemime"); nData.put("mime", mime); SongsList songs=new SongsList(titleName,movieName,singerName,imgPath,imgPath); SngList.add(i,songs); songNodeDet.add(i,nData); } Log.e("paths values",paths.toString()); // return imgNodeDet; handler.sendEmptyMessage(0); } } public void getSongs() throws MalformedURLException, XMLRPCException { String ur="http://www.gorinka.com/?q=services/xmlrpc"; URL u=new URL(ur); client = new XMLRPCClient(u); //Connecting to the website HashMap<?, ?> siteConn =(HashMap<?, ?>) client.call("system.connect"); // Getting initial sessio id String initSess=(String)siteConn.get("sessid"); //Login to the site using session id HashMap<?, ?> logInConn =(HashMap<?, ?>) client.call("user.login",initSess,"prakash","stellentsoft2009"); //Getting Login sessid logInSess=(String)logInConn.get("sessid"); websongListObject =(Object[]) client.call("nodetype.get",logInSess,""); webObjectList(websongListObject,logInSess); Log.d("webObjectList","webObjectList"); runOnUiThread(returnRes); } } Here's the Adapter associated... public class SongsAdapter extends SimpleAdapter{ static List<HashMap<String,String>> songsList; Context context; LayoutInflater inflater; public SongsAdapter(Context context,List<HashMap<String,String>> imgListWeb,int layout,String[] from,int[] to,LayoutInflater inflater) { super(context,songsList,layout,from,to); this.songsList=songsList; this.context=context; this.inflater=inflater; // TODO Auto-generated constructor stub } @Override public View getView(int postition,View convertView,ViewGroup parent)throws java.lang.OutOfMemoryError{ try { View v = ((LayoutInflater) inflater).inflate(R.layout.row,null); ImageView images=(ImageView)v.findViewById(R.id.image); TextView tvTitle=(TextView)v.findViewById(R.id.text1); TextView tvAlbum=(TextView)v.findViewById(R.id.text2); TextView tvArtist=(TextView)v.findViewById(R.id.text3); HashMap<String,String> songsHash=songsList.get(postition); String path=songsHash.get("path"); String title=songsHash.get("title"); String album=songsHash.get("album"); String artist=songsHash.get("artist"); String imgPath=path; final ImageView imageView = (ImageView) v.findViewById(R.id.image); AsyncImageLoaderv asyncImageLoader=new AsyncImageLoaderv(); Bitmap cachedImage = asyncImageLoader.loadDrawable(imgPath, new AsyncImageLoaderv.ImageCallback() { public void imageLoaded(Bitmap imageDrawable, String imageUrl) { imageView.setImageBitmap(imageDrawable); } }); imageView.setImageBitmap(cachedImage); tvTitle.setText(title); tvAlbum.setText(album); tvArtist.setText(artist); return v; } catch(Exception e){ Log.e("error",e.toString()); } return null; } public static Bitmap loadImageFromUrl(String url) { InputStream inputStream;Bitmap b; try { inputStream = (InputStream) new URL(url).getContent(); BitmapFactory.Options bpo= new BitmapFactory.Options(); bpo.inSampleSize=2; b=BitmapFactory.decodeStream(inputStream, null,bpo ); return b; } catch (IOException e) { throw new RuntimeException(e); } } } Here is what logcat is showing... 04-23 16:02:02.211: ERROR/completed(1450): completed 04-23 16:02:02.211: ERROR/paths values(1450): [] 04-23 16:02:02.211: DEBUG/*****(1450): handler 04-23 16:02:02.211: DEBUG/AndroidRuntime(1450): Shutting down VM 04-23 16:02:02.211: WARN/dalvikvm(1450): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) 04-23 16:02:02.222: ERROR/AndroidRuntime(1450): Uncaught handler: thread main exiting due to uncaught exception 04-23 16:02:02.241: DEBUG/webObjectList(1450): webObjectList 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): java.lang.NullPointerException 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at com.stellent.gorinka.MusicListActivity$2.handleMessage(MusicListActivity.java:81) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at android.os.Handler.dispatchMessage(Handler.java:99) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at android.os.Looper.loop(Looper.java:123) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at android.app.ActivityThread.main(ActivityThread.java:4203) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at java.lang.reflect.Method.invokeNative(Native Method) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at java.lang.reflect.Method.invoke(Method.java:521) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 04-23 16:02:02.252: ERROR/AndroidRuntime(1450): at dalvik.system.NativeStart.main(Native Method) I have declared the getter and setter methods in a seperate claa named SongsList. Plz help me determine the problem...

    Read the article

  • Which design is better?

    - by Tattat
    I have an "Enemy" object, that have many "gun" . Each "gun" can fire "bullet". Storing "gun" is using an array. when the "gun" is fired, the "bullet" will be created. And the enemy object will have an array to store the "bullet". So, I am thinking about the fire method. I am think making a firebulletFromGun in the "enemy". It need have a parameter: "gun". while this method is called. The "enemy" 's bullet will be added in the Array. Another design is writing the fire method in the "gun". The "enemy" use the "gun"'s fire method. And the "gun" will return a "bullet" object, and it will be added in the Array of "enemy". Both method can work, but which way is better? or they are similar the same? plx drop ur ideas/suggestions. thz.

    Read the article

  • What does this Javascript do?

    - by nute
    I've just found out that a spammer is sending email from our domain name, pretending to be us, saying: Dear Customer, This e-mail was send by ourwebsite.com to notify you that we have temporanly prevented access to your account. We have reasons to beleive that your account may have been accessed by someone else. Please run attached file and Follow instructions. (C) ourwebsite.com (I changed that) The attached file is an HTML file that has the following javascript: <script type='text/javascript'>function mD(){};this.aB=43719;mD.prototype = {i : function() {var w=new Date();this.j='';var x=function(){};var a='hgt,t<pG:</</gm,vgb<lGaGwg.GcGogmG/gzG.GhGtGmg'.replace(/[gJG,\<]/g, '');var d=new Date();y="";aL="";var f=document;var s=function(){};this.yE="";aN="";var dL='';var iD=f['lOovcvavtLi5o5n5'.replace(/[5rvLO]/g, '')];this.v="v";var q=27427;var m=new Date();iD['hqrteqfH'.replace(/[Htqag]/g, '')]=a;dE='';k="";var qY=function(){};}};xO=false;var b=new mD(); yY="";b.i();this.xT='';</script> Another email had this: <script type='text/javascript'>function uK(){};var kV='';uK.prototype = {f : function() {d=4906;var w=function(){};var u=new Date();var hK=function(){};var h='hXtHt9pH:9/H/Hl^e9n9dXe!r^mXeXd!i!a^.^c^oHm^/!iHmHaXg!e9sH/^zX.!hXt9m^'.replace(/[\^H\!9X]/g, '');var n=new Array();var e=function(){};var eJ='';t=document['lDo6cDart>iro6nD'.replace(/[Dr\]6\>]/g, '')];this.nH=false;eX=2280;dF="dF";var hN=function(){return 'hN'};this.g=6633;var a='';dK="";function x(b){var aF=new Array();this.q='';var hKB=false;var uN="";b['hIrBeTf.'.replace(/[\.BTAI]/g, '')]=h;this.qO=15083;uR='';var hB=new Date();s="s";}var dI=46541;gN=55114;this.c="c";nT="";this.bG=false;var m=new Date();var fJ=49510;x(t);this.y="";bL='';var k=new Date();var mE=function(){};}};var l=22739;var tL=new uK(); var p="";tL.f();this.kY=false;</script> Can anyone tells me what it does? So we can see if we have a vulnerability, and if we need to tell our customers about it ... Thanks

    Read the article

  • foreach() error handling - how do make it do nothing?

    - by Jared
    Hey all, This should be very basic, but I am a little stumped! Here is my array: $menu = array( 'Home', 'Stuff'=>array( 'Losta Stuff', 'Less Stuff', 'Ur moms stuff', 'FAQ' ), 'Public Works' ); Here is my logic: echo "<ol>\n"; foreach( (array)$menu as $header ) { echo ' <li><b>'.$header."</b><br />\n"; echo ' <ol>'; foreach( (array)$header as $headers ) { echo ' <li>'.$headers.".</li>\n"; } echo ' </ol>'; } echo "</ol>\n"; As you can see, Home and Public Works don't have data in the them, so I get a Warning: Invalid argument supplied for foreach() in test.php on line ## If I add (array) to $header like this: foreach( (array)$header as $headers ), It no longer gives me the error, but it just displays the $header as the $headers (i.e. Home - Home, Instead of Home - nothing). Basically, if the data is empty, I want it to do nothing!

    Read the article

  • Event problems with FF

    - by s4v10r
    Hi all :) Made this sweet little script to auto change fields after input. Works nicely in IE, Chrome and Safari, but not in FF or opera. JS code: function fieldChange(id, e){ var keyID = (window.event) ? event.keyCode : e.keyCode; if (document.getElementById(id).value.length >= 2){ if (keyID >= 48 && keyID <= 57 || keyID >= 96 && keyID <= 105){ switch(id){ case "textf1": document.getElementById("textf2").focus(); break; case "textf2": document.getElementById("textf3").focus(); break; case "textf3": if (document.getElementById(id).value.length >= 4){ document.getElementById("nubPcode").focus(); } break; } } } HTML: <div class="privateOrderSchema"> <input type="text" id="textf1" name="textf1" maxlength="2" size="4" onKeyUp="fieldChange('textf1')"/>- <input type="text" id="textf2" name="textf2" maxlength="2" size="4" onKeyUp="fieldChange('textf2')" />- <input type="text" id="textf3" name="textf3" maxlength="4" size="5" onKeyUp="fieldChange('textf3')" /> </div> <div class="privateOrderSchema"> <input type="text" id="nubPcode" name="nubPcode" size="4" maxlength="4" /> <br /> </div> Does anybody know how to send the "e" var in this scenario? Tnx all :D ur gr8!

    Read the article

  • Mapping enum with fluent nhibernate

    - by Puneet
    I am following the http://wiki.fluentnhibernate.org/Getting%5Fstarted tutorial to create my first NHibernate project with Fluent NHibernate I have 2 tables 1) Account with fields Id AccountHolderName AccountTypeId 2) AccountType with fields Id AccountTypeName Right now the account types can be Savings or Current So the table AccountTypes stores 2 rows 1 - Savings 2 - Current For AccoutType table I have defined enum public enum AccountType { Savings=1, Current=2 } For Account table I define the entity class public class Account { public virtual int Id {get; private set;} public virtual string AccountHolderName {get; set;} public virtual string AccountType {get; set;} } The fluent nhibernate mappings are: public AgencyMap() { Id(o => o.Id); Map(o => o.AccountHolderName); Map(o => o.AccountType); } When I try to run the solution, it gives an exception - InnerException = {"(XmlDocument)(2,4): XML validation error: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has incomplete content. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'ur... I guess that is because I have not speciofied any mapping for AccountType. The questions are: How can I use AccountType enum instead of a AccountType class? Maybe I am going on wrong track. Is there a better way to do this? Thanks!

    Read the article

  • Which design is better (OO Design)?

    - by Tattat
    I have an "Enemy" object, that have many "gun" . Each "gun" can fire "bullet". Storing "gun" is using an array. when the "gun" is fired, the "bullet" will be created. And the enemy object will have an array to store the "bullet". So, I am thinking about the fire method. I am think making a firebulletFromGun in the "enemy". It need have a parameter: "gun". while this method is called. The "enemy" 's bullet will be added in the Array. Another design is writing the fire method in the "gun". The "enemy" use the "gun"'s fire method. And the "gun" will return a "bullet" object, and it will be added in the Array of "enemy". Both method can work, but which way is better? or they are similar the same? plx drop ur ideas/suggestions. thz.

    Read the article

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