Search Results

Search found 393 results on 16 pages for 'rahul jain'.

Page 8/16 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How do I integrate WordPress blogs with my Grails application?

    - by Amit Jain
    I had my static site with which WordPress blogs were integrated. Now I have made a Grails application with which I want to integrate those WordPress blogs. I had put the WordPress folder copied from my previous site to the web-app folder of my Grails application. But I am not able to access the WordPress folder, as when I hit URL - http://localhost:8080/myApplicaiton/wordpress/, it shows this error: Error 500: java.net.SocketTimeoutException: Read timed out Also, in my urlMappings.groovy one of the mappings I need is "/$generalPageURL"(controller:'myConroller', action:'myAction') And if I put in the above mapping, all requests for WordPress goes to myAction of myController. Is there any way out to still reach the WordPress folder defined inside web-app folder with the above mapping?

    Read the article

  • Dynamic CSS class names in GWT

    - by Anupam Jain
    I am in the process of porting a simple CSS grid system to GWT. My CSS file currently has classes like .size1, .size2 etc., and I have a CSS resource that looks like - class MyResource extends CSSResource { @ClassName("size1") String size1(); @ClassName("size2") String size2(); // And so on } However what I really want, is to have a single function like the following - String size(int size); which will generate the appropriate class when passed the size as an integer at runtime. This is needed as I perform some calculations to determine the actual space available/needed for a widget in javascript and then attach the appropriate class name. Is this something that is even possible with GWT?

    Read the article

  • KeyError this says that key(partner) is not in dict ?

    - by Ansh Jain
    I am trying to make an chat application using python and django. I almost complete it and its working fine for 8-10 minutes when two persons are chatting after that certain time it shows an error. here is the traceback : - Traceback (most recent call last): File "\Django_chat\django_chat\chat\views.py", line 55, in receive message = chatSession.getMessage(request.session['partner'],request.session['uid'],afterTime) File "C:\Python26\lib\site-packages\django\contrib\sessions\backends\base.py", line 47, in __getitem__ return self._session[key] KeyError: 'partner' here is the receive module :- def receive(request): message received by this user chatSession = chat() data = request.POST afterTime = data['lastMsgTime'] try: message = chatSession.getMessage(request.session['partner'],request.session['uid'],afterTime) except: #partnerId = virtual_users.objects.get(id=request.session['uid']).partner print('there is an error in receive request') traceback.print_exc(file=open("/myapp.log","a")) msg = serializers.serialize("json", message) return HttpResponse(msg) Please Help me :( thanks Ansh J

    Read the article

  • I want to design a html form in python

    - by VaIbHaV-JaIn
    when user will enter details in the text box on the html from <h1>Please enter new password</h1> <form method="POST" enctype="application/json action="uid"> Password<input name="passwd"type="password" /><br> Retype Password<input name="repasswd" type="password" /><br> <input type="Submit" /> </form> </body> i want to post the data in json format through http post request and also i want to set content-type = application/json

    Read the article

  • access dropdown control from the master page to the content page using asp.net

    - by Isha Jain
    i have a master page and the content pages in the master page i have the textbox and dropdown the value in the dropdown may vary according to the content pages e.g for one content page the dropdown may contain branchname, city, address and let for other content page under same master page the dropdown may have values like Contactnumber, EmailID, ........... ......... etc..... so please help me to how can i bind that dropdown from my content page thanks.

    Read the article

  • Difference between following arrays?

    - by jayesh jain
    This is ARRAY1 var array_1 = ["51b59c162de88", [ ["parties", 0.0, 0.011] ]] ["51b59c1b4f52f", [ ["star-speak", 0.0, 0.006], ["parties", 0.0, 0.011] ]] This is ARRAY2 var array_2 = [{ key: "51b59c162de88", values: ["parties", 0.0, 0.011]] }, { key: "51b59c162de94", values: [ ["star-speak", 0.0, 0.006], ["parties", 0.0, 0.011] ] }, ]; What is the exact difference between array 1 and array 2. How do I access their data? I am new to json!!!!

    Read the article

  • Simple Question:Output of below Java program

    - by Abhishek Jain
    public class abc1 { private String s; public abc1(String s){this.s=s;} public static void main(String args[]) { HashSet<Object> hs=new HashSet<Object>(); abc1 a1= new abc1("abc"); abc1 a2= new abc1("abc"); String s1= new String("abc"); String s2= new String("abc"); hs.add(a1); hs.add(a2); hs.add(s1); hs.add(s2); System.out.println(hs.size()); } } Why above program output is 3?

    Read the article

  • what would be the output?

    - by Abhishek Jain
    Please explain me below situation What would be the output? interface A{} class B implements A{} class C extends B{} Class D extends C{} class E extends D{ public static void main(String args[]){ C c = new C(); B b = c; A a = (E)c; A a = (B)c; C c = (C)(B)c; } }

    Read the article

  • Facebook connect with iPhone not working?

    - by Atulkumar V. Jain
    Hi Everybody, I am trying to use Facebook connect in my application, but its not working as I desire. When I am trying to use the API Key and the API SecretKey of my application which I have registered with the facebook its not working. I have downloaded the code for the facebook. In the SessionViewController.m file when I pass my key values its not working. What I am trying to achieve is, when the app launches the first page is the Facebook Login Page. The user enters his username and password and then the next view should display. But nothing is happening, even the label doesn't display the username. Heres the code which I am using - (void)request:(FBRequest*)request didLoad:(id)result { NSArray* users = result; NSDictionary* user = [users objectAtIndex:0]; NSString* name = [user objectForKey:@"name"]; _label.text = [NSString stringWithFormat:@"Logged in as %@",name]; NSLog(@"Username is :- %@",name); FrontController *main = [[FrontController alloc] init]; [self.view addSubview:main.view]; [main release]; } I am not able to figure out what is wrong with this code. When I try with some other key values such as the key for connect application its working fine. Can anyone help me with this... Thanx in advance...

    Read the article

  • setting minDate in datepicker in Rails

    - by Sakshi Jain
    I need to apply minDate attribute to the datepicker in Rails App. In _admin_controls.html.erb <%= f.input :end_date, wrapper: :append do %> <div id="datepicker" class="datepicker input-group edit-left"> <%= f.text_field :end_date, :class => "datetime form-control" %> application.js contains jQuery(document).on('focus', 'input.datetime', function() { opts = {format: 'M dd, yyyy', autoclose: true}; jQuery(this).datepicker(opts); jQuery(".datepicker").css("z-index",10000); }); What should be the javascript to do so only for _admin_controls.html.erb?

    Read the article

  • Java : Singleton class instances in a Web based Application

    - by Preethi Jain
    I have this Singleton class inside a Web Application . public class MyDAO { private static MyDAO instance; private MyDAO() { } public static MyDAO getInstance() { if (instance == null) { instance = new MyDAO(); } return instance; } I will access it this way public void get_Data() { MyDAO dao = MyDAO.getInstance(); } How many Objects of MyDAO class will be created if there are 3 Users accessing the Application ?? Will there be one instance of MyDAO per User ??

    Read the article

  • Using inheritance with multiple files in Ruby

    - by Preethi Jain
    I am new to Ruby . I have a question with respect to using Inheritence in Ruby . I have a class called as Doggy inside a file named Doggy.rb class Doggy def bark puts "Vicky is barking" end end I have written another class named Puppy in another file named puppy.rb class Puppy < Doggy end puts Doggy.new.bark I am getting this Error: Puppy.rb:1:in `<main>': uninitialized constant Doggy (NameError) Is it mandatory to have these classes (Doggy and Puppy ) inside a single file only? Edited As per the suggestions , i have tried using require and require_relative as shown , but still i am getting below Error Puppy.rb:1:in `<main>': uninitialized constant Doggy (NameError) class Puppy < Doggy end require_relative 'Doggy.rb' puts Doggy.new.bark

    Read the article

  • Retrieving Json Array

    - by Rahul Varma
    Hi, I am trying to retrieve the values from the following url: http://rentopoly.com/ajax.php?query=Bo. I want to get the values of all the suggestions to be displayed in a list view one by one. This is how i want to do... public class AlertsAdd { public ArrayList<JSONObject> retrieveJSONArray(String urlString) { String result = queryRESTurl(urlString); ArrayList<JSONObject> ALERTS = new ArrayList<JSONObject>(); if (result != null) { try { JSONObject json = new JSONObject(result); JSONArray alertsArray = json.getJSONArray("suggestions"); for (int a = 0; a < alertsArray.length(); a++) { JSONObject alertitem = alertsArray.getJSONObject(a); ALERTS.add(alertitem); } return ALERTS; } catch (JSONException e) { Log.e("JSON", "There was an error parsing the JSON", e); } } JSONObject myObject = new JSONObject(); try { myObject.put("suggestions",myObject.getJSONArray("suggestions")); ALERTS.add(myObject); } catch (JSONException e1) { Log.e("JSON", "There was an error creating the JSONObject", e1); } return ALERTS; } private String queryRESTurl(String url) { // URLConnection connection; HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet(url); HttpResponse response; try { response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); if (entity != null) { InputStream instream = entity.getContent(); String result = convertStreamToString(instream); instream.close(); return result; } } catch (ClientProtocolException e) { Log.e("REST", "There was a protocol based error", e); } catch (IOException e) { Log.e("REST", "There was an IO Stream related error", e); } return null; } /** * To convert the InputStream to String we use the * BufferedReader.readLine() method. We iterate until the BufferedReader * return null which means there's no more data to read. Each line will * appended to a StringBuilder and returned as String. */ private String convertStreamToString(InputStream is) { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } return sb.toString(); } } Here's the adapter code... public class AlertsAdapter extends ArrayAdapter<JSONObject> { public AlertsAdapter(Activity activity, List<JSONObject> alerts) { super(activity, 0, alerts); } @Override public View getView(int position, View convertView, ViewGroup parent) { Activity activity = (Activity) getContext(); LayoutInflater inflater = activity.getLayoutInflater(); View rowView = inflater.inflate(R.layout.list_text, null); JSONObject imageAndText = getItem(position); TextView textView = (TextView) rowView.findViewById(R.id.last_build_stat); try { textView.setText((String)imageAndText.get("suggestions")); } catch (JSONException e) { textView.setText("JSON Exception"); } return rowView; } } Here's the logcat... 04-30 13:09:46.656: INFO/ActivityManager(584): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.WorldToyota/.Alerts } 04-30 13:09:50.417: ERROR/JSON(924): There was an error parsing the JSON 04-30 13:09:50.417: ERROR/JSON(924): org.json.JSONException: JSONArray[0] is not a JSONObject. 04-30 13:09:50.417: ERROR/JSON(924): at org.json.JSONArray.getJSONObject(JSONArray.java:268) 04-30 13:09:50.417: ERROR/JSON(924): at com.WorldToyota.AlertsAdd.retrieveJSONArray(AlertsAdd.java:30) 04-30 13:09:50.417: ERROR/JSON(924): at com.WorldToyota.Alerts.onCreate(Alerts.java:20) 04-30 13:09:50.417: ERROR/JSON(924): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 04-30 13:09:50.417: ERROR/JSON(924): at android.os.Handler.dispatchMessage(Handler.java:99) 04-30 13:09:50.417: ERROR/JSON(924): at android.os.Looper.loop(Looper.java:123) 04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread.main(ActivityThread.java:4203) 04-30 13:09:50.417: ERROR/JSON(924): at java.lang.reflect.Method.invokeNative(Native Method) 04-30 13:09:50.417: ERROR/JSON(924): at java.lang.reflect.Method.invoke(Method.java:521) 04-30 13:09:50.417: ERROR/JSON(924): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 04-30 13:09:50.417: ERROR/JSON(924): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 04-30 13:09:50.417: ERROR/JSON(924): at dalvik.system.NativeStart.main(Native Method) 04-30 13:09:50.688: ERROR/JSON(924): There was an error creating the JSONObject 04-30 13:09:50.688: ERROR/JSON(924): org.json.JSONException: JSONObject["suggestions"] not found. 04-30 13:09:50.688: ERROR/JSON(924): at org.json.JSONObject.get(JSONObject.java:287) 04-30 13:09:50.688: ERROR/JSON(924): at org.json.JSONObject.getJSONArray(JSONObject.java:362) 04-30 13:09:50.688: ERROR/JSON(924): at com.WorldToyota.AlertsAdd.retrieveJSONArray(AlertsAdd.java:41) 04-30 13:09:50.688: ERROR/JSON(924): at com.WorldToyota.Alerts.onCreate(Alerts.java:20) 04-30 13:09:50.688: ERROR/JSON(924): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 04-30 13:09:50.688: ERROR/JSON(924): at android.os.Handler.dispatchMessage(Handler.java:99) 04-30 13:09:50.688: ERROR/JSON(924): at android.os.Looper.loop(Looper.java:123) 04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread.main(ActivityThread.java:4203) 04-30 13:09:50.688: ERROR/JSON(924): at java.lang.reflect.Method.invokeNative(Native Method) 04-30 13:09:50.688: ERROR/JSON(924): at java.lang.reflect.Method.invoke(Method.java:521) 04-30 13:09:50.688: ERROR/JSON(924): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 04-30 13:09:50.688: ERROR/JSON(924): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 04-30 13:09:50.688: ERROR/JSON(924): at dalvik.system.NativeStart.main(Native Method) Plz help me parsing this script and displaying the values in list format....

    Read the article

  • Android : launching diff activities under TabWidget

    - by rahul
    hiii I am trying to launch activities under each tab. I hav tried with following code public class Tab_Proj1 extends TabActivity { TabHost mTabHost ; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Context context = getApplicationContext(); //mTabHost = (TabHost) this.findViewById(R.id.); mTabHost = getTabHost(); mTabHost.setup(); mTabHost.addTab(mTabHost.newTabSpec("tab_test4") .setIndicator("Contacts") .setContent(new Intent().setClass(context, Tab1Activity.class))); Tab1Activity is extending ListActivity. I m getting exception as:::::: 01-25 11:57:07.352: ERROR/AndroidRuntime(952): Uncaught handler: thread main exiting due to uncaught exception 01-25 11:57:07.382: ERROR/AndroidRuntime(952): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.app.Tab_Proj1/com.android.app.Tab_Proj1.Tab_Proj1}: java.lang.RuntimeException: Could not create tab content because could not find view with id 2131034148 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.os.Handler.dispatchMessage(Handler.java:99) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.os.Looper.loop(Looper.java:123) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.main(ActivityThread.java:3948) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at java.lang.reflect.Method.invokeNative(Native Method) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at java.lang.reflect.Method.invoke(Method.java:521) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at dalvik.system.NativeStart.main(Native Method) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): Caused by: java.lang.RuntimeException: Could not create tab content because could not find view with id 2131034148 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.widget.TabHost$ViewIdContentStrategy.(TabHost.java:539) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.widget.TabHost$ViewIdContentStrategy.(TabHost.java:530) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.widget.TabHost$TabSpec.setContent(TabHost.java:417) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at com.android.app.Tab_Proj1.Tab_Proj1.onCreate(Tab_Proj1.java:52) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 01-25 11:57:07.382: ERROR/AndroidRuntime(952): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231) ====================================================================== Am I going in correct way? If not please help me with some ideas..... thanks

    Read the article

  • how to display image in MFMailComposer?

    - by Rahul Vyas
    Hello all i want to display an image in mfmailcomposer it shows when i add it to attachment but not at the exact place where i want to show it how do i show image in mfmailcomposer. also does someone knows how to launch safari when click on a url in mfmailcomposer?

    Read the article

  • getting an embedded resource in a single dll made up of multiple class libraries

    - by Rahul Gupta
    my solution has multiple projects and in one of them I have the code to get the embedded resource (an xml file) from another project. All this works fine when all the projects are seperate. However when all the class libraries are embedded into a single dll, the code to get the resource file does not work i.e. it cannot get the emebedded resource. I was wondering if the references to the emebedded resource get mixed up when they are combined together in a single dll?? I use the method Assembly.GetCallingAssembly().GetManifestResourceStream("namespace..filename");

    Read the article

  • Using a form HTML form in Cognos 8.4

    - by Rahul Kadam
    Hi, Iam using a HTML form in my Cognos 8.4 report the code for which is seen below:- <form name="floodzone"><p> <input type="text" size="60" name="address" value="1600 Amphitheatre Pky, Mountain View, CA" /> <input type="button" value="Go!" onclick="showAddress();" /> </p> <div id="map_canvas" style="width: 1000px; height: 375px"></div></form>** and i am referencing the above code in the follwoing manner in the HTML item itself:- function showAddress() { //var address = alert(document.floodzone.address.value);} But when i click on the Go button i get the following error as an 'Error in page' (the one u get on the browsers):- Error: 'document.floodzone.address' is null or not an object this same code when i run using Frontpage or Normal IE itself runs fine. But as soon as i put this in Cognos HTML container it thros the error. Request any leads into this.

    Read the article

  • How to pass string file path as HttpPostedfile to fileupload control?

    - by rahul
    Hi friends, I have got little tricky issue i.e I am using API of a product which has few methods for uploading image. The UI part of the product has one file upload control which takes files and convert that into binary and save it to database. In the coding part they are using one method where they send this fileupload.postedfile as one of the input parameter to the method. Now my requirement is, I have a directory where there are hundred of files which i have to send each file one by after another to this method as a input. Now i wish to know how to pass a file name as "HttpPostedFile" to that method as a parameter. I have no other option other than using that API (our clients requirement). Thanks

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >