Search Results

Search found 326 results on 14 pages for 'rahul vyas'.

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

  • How to validate SWT form?

    - by Rahul
    Label label1 = new Label(container, SWT.NULL); label1.setText("Enter the Password "); text1 = new Text(container, SWT.BORDER | SWT.PASSWORD); text1.setText(""); text1.addKeyListener(new KeyListener() { public void keyPressed(KeyEvent e) { } public void keyReleased(KeyEvent e) { if (!text5.getText().isEmpty()) { setPageComplete(false); } } }); hi, i am creating form using SWT in eclipse can anyone tell me how to validate that form entry above is the sample code of that..actually i want to validate password field it should be minimum length of 6.How to do this please reply.

    Read the article

  • Interview question

    - by rahul
    Recenty I was asked this interview question: There is a server which receives millions of requests every day. Design an API for finding out hits in the last one minute, in the last 10 minutes etc. What should be the algorithm and design to implement it efficienly. I want to know the ideas on this.

    Read the article

  • Android adding HTML content on a webview without space

    - by Rahul
    I am trying to add an HTML content to a web view. If the words in the HTML content are without spaces then webview keeps that particular word on the same line.I want that content to be wrapped and be on the next line.Is it possible to do that.I am attaching a sample code that can reproduce the issue. String temp="<p>WebViewallowsyoutocreateyourownwindowforviewingwebpages(orevendevelopacompletebrowser).Inthistutorial,youcreateasimpleActivitythatcanviewandnavigatewebpages.1.CreateanewprojectnamedHelloWebView.</p>"; WebView wb=new WebView(this); wb.loadDataWithBaseURL("", temp, "text/html", Encoding.UTF_8.toString(),""); setContentView(wb);

    Read the article

  • How to covert UTF8 string to UTF16 in JNI

    - by Er Rahul Rajkumar Gupta
    Can anyone please tell me that what is going on wrong with me in this code.Actually in following line of codes I am taking the path of sdcard in a string in jni (C code) and in concatenate function concatenating these manually using loop.The string returned by concatenate works fine but when I am converting it to jstring it prints garbage value in my logcat. Kindly tell me what is the problem. jstring str=(jstring)env->CallObjectMethod(sdcard,storagestring); const char jclass cfile=env->FindClass("java/io/File"); jmethodID fileid=env->GetMethodID(cfile,"<init>","(Ljava/lang/String;)V"); jclass envir=env->FindClass("android/os/Environment"); jmethodID storageid=env->GetStaticMethodID(envir,"getExternalStorageDirectory","()Ljava/io/File;"); jobject sdcard=env->CallStaticObjectMethod(envir,storageid); jclass sdc=env->GetObjectClass(sdcard); jmethodID storagestring=env->GetMethodID(sdc,"toString","()Ljava/lang/String;"); *nativeString = env->GetStringUTFChars(str, 0); char *s =concatenate(nativeString,"/f1.3gp"); //fpath=s; fpath=env->NewStringUTF(s); jobject fobject=env->NewObject(cfile,fileid,fpath); LOGI("size of char=%d size of string=%d",sizeof("/f1.3gp"),sizeof(fpath)); jmethodID existid=env->GetMethodID(cfile,"exists","()Z"); if(env->CallBooleanMethod(fobject,existid)) { jmethodID delid=env->GetMethodID(cfile,"delete","()Z"); if(env->CallBooleanMethod(fobject,delid)) LOGE("File is deleting...%s",env->NewStringUTF("/f1.3gp")); } jmethodID newfileid=env->GetMethodID(cfile,"createNewFile","()Z"); if(env->CallBooleanMethod(fobject,newfileid)) LOGE("dig dig %s",fpath); jthrowable exc=env->ExceptionOccurred(); if(exc) { env->ExceptionDescribe(); env->ExceptionClear(); } LOGE("creating file %s",fpath); }

    Read the article

  • Issues with SharePoint 2010 Development

    - by Rahul Soni
    I am planning to use my laptop for SharePoint 2010 development and I have only 4 GB RAM which is not even upgradable. Just because of RAM constraint, my VS 2010 keeps crawling if I try to run it along with SharePoint 2010 on the same machine. Hence, I've reformatted my machine and looking for alternate solutions until I get a new laptop. Currently, I have installed VS 2010 ONLY on my laptop and wanted to create an empty SharePoint project. Once done with my project, I want to deploy it on a different machine (which is a 4GB RAM machine as well, but contains only SharePoint 2010). I thought this will work and give me a bit of breather if everything is configured well. Unfortunately, when I tried creating a new SharePoint Empty Project in VS 2010, it says... A SharePoint server is not installed on this computer. A SharePoint server must be installed to work with SharePoint projects. Is there a way out?

    Read the article

  • Need some ignition in Embedded Systems

    - by Rahul
    I'm very much interested in building applications for Embedded Devices. I'm in my 3rd year Electrical Engineering and I'm passionate about coding, algorithms, Linux OS, etc. And also by Googling I found out that Linux OS is one of the best OSes for Embedded devices(may be/may not be). I want to work for companies which work on mobile applications. I'm a newbie/naive to this domain & my skills include C/C++ & MySQL. I need help to get started in the domain of Embedded Systems; like how/where to start off, Hardware prerequisites, necessary programming skills, also what kind of Embedded Applications etc. I've heard of ARM, firmware, PIC Micorcontrollers; but I don't know anything & just need proper introduction about them. Thanx. P.S: I'm currently reading Bjarne Struotsup's lecture in C++ at Texas A&M University, and one chapter in it describes about Embedded Systems Programming.

    Read the article

  • Tortoise SVN revision history

    - by rahul
    I want to know for how long the tortoise svn keeps the revision history. Say I have a file which I deleted from repository through repo browser an year ago, will I be able to still recover that file? If I am able to recover, I also want to know the method to permanently delete that earlier copy of file and related revisions history so that in future nobody is able to access that file. Is it possible? I have run into problems in my organisation as I did frequent updations and deletions assuming that file was getting deleted permanently. The file system of repository has bloated now. Please suggest how to fix it.

    Read the article

  • bash: flushing stdin (standard input)

    - by rahul
    I have a bash script that gets some input as stdin. After processing, I copy a file using "-i" (interactive). However, this never gets executed since (I guess) standard input has not been flushed. To simplify with an example: #!/bin/bash while read line do echo $line done # the next line does not execute read -p "y/n" x echo "got $x" Place this in t.sh, and execute with: ls | ./t.sh The read is not executed. I need to flush stdin before the read. How could it do this?

    Read the article

  • Out of memory error

    - by Rahul Varma
    Hi, I am trying to retrieve a list of images and text from a web service. I have first coded to get the images to a list using Simple Adapter. The images are getting displayed the app is showing an error and in the Logcat the following errors occur... 04-26 10:55:39.483: ERROR/dalvikvm-heap(1047): 8850-byte external allocation too large for this process. 04-26 10:55:39.493: ERROR/(1047): VM won't let us allocate 8850 bytes 04-26 10:55:39.563: ERROR/AndroidRuntime(1047): Uncaught handler: thread Thread-96 exiting due to uncaught exception 04-26 10:55:39.573: ERROR/AndroidRuntime(1047): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 04-26 10:55:39.573: ERROR/AndroidRuntime(1047): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 04-26 10:55:39.573: ERROR/AndroidRuntime(1047): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:451) 04-26 10:55:39.573: ERROR/AndroidRuntime(1047): at com.stellent.gorinka.AsyncImageLoaderv.loadImageFromUrl(AsyncImageLoaderv.java:57) 04-26 10:55:39.573: ERROR/AndroidRuntime(1047): at com.stellent.gorinka.AsyncImageLoaderv$2.run(AsyncImageLoaderv.java:41) 04-26 10:55:40.393: ERROR/dalvikvm-heap(1047): 14600-byte external allocation too large for this process. 04-26 10:55:40.403: ERROR/(1047): VM won't let us allocate 14600 bytes 04-26 10:55:40.493: ERROR/AndroidRuntime(1047): Uncaught handler: thread Thread-93 exiting due to uncaught exception 04-26 10:55:40.493: ERROR/AndroidRuntime(1047): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 04-26 10:55:40.493: ERROR/AndroidRuntime(1047): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 04-26 10:55:40.493: ERROR/AndroidRuntime(1047): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:451) 04-26 10:55:40.493: ERROR/AndroidRuntime(1047): at com.stellent.gorinka.AsyncImageLoaderv.loadImageFromUrl(AsyncImageLoaderv.java:57) 04-26 10:55:40.493: ERROR/AndroidRuntime(1047): at com.stellent.gorinka.AsyncImageLoaderv$2.run(AsyncImageLoaderv.java:41) 04-26 10:55:40.594: INFO/Process(584): Sending signal. PID: 1047 SIG: 3 Here's the coding in the adapter... final ImageView imageView = (ImageView) rowView.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); .......... ........... ............ //To load the image... 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); } // return null; } Please tell me how to fix the error....

    Read the article

  • Auto Increment feature of SQL Server

    - by Rahul Tripathi
    I have created a table named as ABC. It has three columns which are as follows:- The column number_pk (int) is the primary key of my table in which I have made the auto increment feature on for that column. Now I have deleted two rows from that table say Number_pk= 5 and Number_pk =6. The table which I get now is like this:- Now if I again enter two new rows in this table with the same value I get the two new Number_pk starting from 7 and 8 i.e, My question is that what is the logic behind this since I have deleted the two rows from the table. I know that a simple answer is because I have set the auto increment on for the primary key of my table. But I want to know is there any way that I can insert the two new entries starting from the last Number_pk without changing the design of my table? And how the SQL Server manage this record since I have deleted the rows from the database??

    Read the article

  • == Operator and operands

    - by rahul
    I want to check whether a value is equal to 1. Is there any difference in the following lines of code Evaluated value == 1 1 == evaluated value in terms of the compiler execution

    Read the article

  • Bulkloading schema less entities on Google App Engine

    - by Rahul
    The new bulkloader added into SDK 1.3.4 works great for models that have a schema. For models inheriting db.Expando (or loosely defined schemas) i would like to understand what i would have to do to bulk upload them. I defined a custom connector, that implemented the ConnectorInterface and converted my data to the python dict required. How can i use this dict to define entities that get uploaded to the data store ? In the documentation there seems to be a post_import_function that can be used to return the entities that get uploaded. Is there an example on how this function is used ?

    Read the article

  • Problem while inserting data from GUI layer to database

    - by Rahul
    Hi all, I am facing problem while i am inserting new record from GUI part to database table. I have created database table Patient with id, name, age etc....id is identity primary key. My problem is while i am inserting duplicate name in table the control should go to else part, and display the message like...This name is already exits, pls try with another name... but in my coding not getting..... Here is all the code...pls somebody point me out whats wrong or how do this??? GUILayer: protected void BtnSubmit_Click(object sender, EventArgs e) { if (!Page.IsValid) return; int intResult = 0; string name = TxtName.Text.Trim(); int age = Convert.ToInt32(TxtAge.Text); string gender; if (RadioButtonMale.Checked) { gender = RadioButtonMale.Text; } else { gender = RadioButtonFemale.Text; } string city = DropDownListCity.SelectedItem.Value; string typeofdisease = ""; foreach (ListItem li in CheckBoxListDisease.Items) { if (li.Selected) { typeofdisease += li.Value; } } typeofdisease = typeofdisease.TrimEnd(); PatientBAL PB = new PatientBAL(); PatientProperty obj = new PatientProperty(); obj.Name = name; obj.Age = age; obj.Gender = gender; obj.City = city; obj.TypeOFDisease = typeofdisease; try { intResult = PB.ADDPatient(obj); if (intResult > 0) { lblMessage.Text = "New record inserted successfully."; TxtName.Text = string.Empty; TxtAge.Text = string.Empty; RadioButtonMale.Enabled = false; RadioButtonFemale.Enabled = false; DropDownListCity.SelectedIndex = 0; CheckBoxListDisease.SelectedIndex = 0; } else { lblMessage.Text = "Name [<b>" + TxtName.Text + "</b>] alredy exists, try another name"; } } catch (Exception ex) { lblMessage.Text = ex.Message.ToString(); } finally { obj = null; PB = null; } } BAL layer: public class PatientBAL { public int ADDPatient(PatientProperty obj) { PatientDAL pdl = new PatientDAL(); try { return pdl.InsertData(obj); } catch { throw; } finally { pdl=null; } } } DAL layer: public class PatientDAL { public string ConString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString; public int InsertData(PatientProperty obj) { SqlConnection con = new SqlConnection(ConString); con.Open(); SqlCommand com = new SqlCommand("LoadData",con); com.CommandType = CommandType.StoredProcedure; try { com.Parameters.AddWithValue("@Name", obj.Name); com.Parameters.AddWithValue("@Age",obj.Age); com.Parameters.AddWithValue("@Gender",obj.Gender); com.Parameters.AddWithValue("@City", obj.City); com.Parameters.AddWithValue("@TypeOfDisease", obj.TypeOFDisease); return com.ExecuteNonQuery(); } catch { throw; } finally { com.Dispose(); con.Close(); } } } Property Class: public class PatientProperty { private string name; private int age; private string gender; private string city; private string typedisease; public string Name { get { return name; } set { name = value; } } public int Age { get { return age; } set { age = value; } } public string Gender { get { return gender; } set { gender = value; } } public string City { get { return city; } set { city = value; } } public string TypeOFDisease { get { return typedisease; } set { typedisease = value; } } } This is my stored Procedure: CREATE PROCEDURE LoadData ( @Name varchar(50), @Age int, @Gender char(10), @City char(10), @TypeofDisease varchar(50) ) as insert into Patient(Name, Age, Gender, City, TypeOfDisease)values(@Name,@Age, @Gender, @City, @TypeofDisease) GO

    Read the article

  • How to add external jar...through URL..using .classpath??

    - by Rahul
    **In any javaProject in eclipse there we always get .classpath file...like <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry path="ABC/junit" kind="src"/> <classpathentry path="org.eclipse.jdt.launching.JRE_CONTAINER" kind="con"/> <classpathentry path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4" kind="con"/> <classpathentry path="targets" kind="output"/> </classpath> Here when we import any external jar it is giving path of that jar in classpathentry...i want that classpathentry should be from any URL which will provide that external jar...can anyone plz tell me how to do that..actually i want to add external jar automatically from URL(any) when user will import that project in eclipse..i don't want user will manually add external jars..i want to make change .classpath accordingly. Or anyother way to do this automatically. Please help me...Waiting for reply.**

    Read the article

  • How to write Java-like enums in C++ ?

    - by Rahul G
    Coming from Java background, I find C++'s enums very lame. I wanted to know how to write Java-like enums (the ones in which the enum values are objects, and can have attributes and methods) in C++. As an example, translate the following Java code (a part of it, sufficient to demonstrate the technique) to C++ : public enum Planet { MERCURY (3.303e+23, 2.4397e6), VENUS (4.869e+24, 6.0518e6), EARTH (5.976e+24, 6.37814e6), MARS (6.421e+23, 3.3972e6), JUPITER (1.9e+27, 7.1492e7), SATURN (5.688e+26, 6.0268e7), URANUS (8.686e+25, 2.5559e7), NEPTUNE (1.024e+26, 2.4746e7); private final double mass; // in kilograms private final double radius; // in meters Planet(double mass, double radius) { this.mass = mass; this.radius = radius; } private double mass() { return mass; } private double radius() { return radius; } // universal gravitational constant (m3 kg-1 s-2) public static final double G = 6.67300E-11; double surfaceGravity() { return G * mass / (radius * radius); } double surfaceWeight(double otherMass) { return otherMass * surfaceGravity(); } public static void main(String[] args) { if (args.length != 1) { System.err.println("Usage: java Planet <earth_weight>"); System.exit(-1); } double earthWeight = Double.parseDouble(args[0]); double mass = earthWeight/EARTH.surfaceGravity(); for (Planet p : Planet.values()) System.out.printf("Your weight on %s is %f%n", p, p.surfaceWeight(mass)); } } Any hep would be greatly appreciated! Thanks!

    Read the article

  • Pls help working with Dropdownlist in scroll window.

    - by Rahul
    Hi all, Data is stored in the database table with the field document type and document id. And displayed in the scrollwindow, scrollwindow is editable. Data displayed like this: In scrollwindow dropdown items are quote, order, invoice etc. And suppose for Quote type document id is QTE100, and for order is ORD100 etc. In this format data is displayed in the scrollwindow. Here my query is at run time when user change the document type say for Quote to Order warning message should display like “This range is not valid”. And since the scrollwindow editable when user select any new document type from dropdown list system should allow to add that new document type and should not display any message. Pls somebody help me how can I achieve this???pls………pls…......pls For this I have written this code in dropdown document change event. Document Type Site_Scroll Document Type_CHG: warning "The range entered isn't valid."; clear window 'Document Type Site_Scroll'; fill window 'Document Type Site_Scroll' table sop_site_line_temp; But whenever I am changing any document from existing one getting the warning message like “This range is not valid” this is expected, but after changing when the window is filled again by temp table focus is setting to document type dropdown list. One more thing whenever I am going to select any new document type from document type I am getting the same warning message which is not expected, system should allow user to select new document type without giving any warning message. Pls….somebody give me some idea or pls modify my code….

    Read the article

  • Nested Class member function can't access function of enclosing class. Why?

    - by Rahul
    Please see the example code below: class A { private: class B { public: foobar(); }; public: foo(); bar(); }; Within class A & B implementation: A::foo() { //do something } A::bar() { //some code foo(); //more code } A::B::foobar() { //some code foo(); //<<compiler doesn't like this } The compiler flags the call to foo() within the method foobar(). Earlier, I had foo() as private member function of class A but changed to public assuming that B's function can't see it. Of course, it didn't help. I am trying to re-use the functionality provided by A's method. Why doesn't the compiler allow this function call? As I see it, they are part of same enclosing class (A). I thought the accessibility issue for nested class meebers for enclosing class in C++ standards was resolved. How can I achieve what I am trying to do without re-writing the same method (foo()) for B, which keeping B nested within A? I am using VC++ compiler ver-9 (Visual Studio 2008). Thank you for your help.

    Read the article

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