Search Results

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

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

  • Declaring Intent Filter in android

    - by Rahul Varma
    Hi, I have problem in declaring the intents on my app. I have a form with text fields and spinner. I have added a button which onClick must display Datepicker. I have declared the DatePicker as a new class and added to intent onCLick. date.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent i=new Intent(SendMail.this,DatePicker.class); startActivity(i); } }); In manifest i have declared <activity android:name=".DatePicker"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> Now the problem is when i click the button the whole form is getting reset and all the spinner values are getting vanished. This must be because of declaring the intent wrongly. So, can anyone specify how to declare my intent so that the DatePicker will be called on the main form iteself

    Read the article

  • Problem with giving focus to first element inside a container

    - by rahul
    Hi, I am just trying to cycle the focus between elements inside a particular element when the tab key is pressed. What I want to do is not to set focus to any element which is not a descendant of an element when tab is pressed from the last control inside the element. At that time the focus must be set to the first input element inside the container. I have done a sample and it its not working, and I am unable to figure out the issue. Sample can be found here The complete code is Script $(function(){ $(":input:last","#div1").bind("keydown", function(e){ if ( e.keyCode === 9 ) { var firstElem = $(":input:first","#div1"); firstElem.focus(); } }); }); CSS input.red { width: 200px; border: solid 1px red; } input { width: 200px; } HTML <input type="text" class="red" /> <div id="div1"> <input type="text" id="txt1" /> <select id="sel1"> <option>1</option> </select> <input type="text" id="txt2" /> </div> Any help would be appreciated. Thanks

    Read the article

  • About Php development

    - by rahul
    hi actually i m new in prograamming and i have developed two projects one in osdate and other is my own code and i am jyst 6 months older in php as developer i am not happy with my code standard i want to improve that plz anyone can suggest me about standard and how to organised your project before starting ??i know its funny bt i dnt have any senior in my office i have to make myself

    Read the article

  • Rails belongs_to issues

    - by Rahul
    I was trying to follow the answer provided by this post About Event_calendar.Showing only events for current user and not all events present However when I tried to add the belongs_to user in the event model, it gives me the following error. NameError (undefined local variable or method 'user' for #<Class:0x007fff15d1f6c0>): app/models/event.rb:3:in '<class:Event>' app/models/event.rb:1:in '<top (required)>' app/controllers/calendar_controller.rb:9:in 'index' Rendered .../.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.8ms) Rendered .../.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms) Rendered .../.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (23.6ms) in my user.rb model I have included has_many :events Any idea how to fix this?

    Read the article

  • sending an email using user input from android

    - by Rahul Varma
    Hey, I am designing an app in which the data is stored in the database. There's a button in the form which is on clicked to send an email to pre defined mail address with the data that is stored in the database. Since i am a newbie to android i need help regarding sending the mail... So please help me...

    Read the article

  • Public Wildcard Domain Name To Resolve To 127.0.0.1

    - by Rahul
    Is anyone aware of a public wildcard domain name that resolves to IP address 127.0.0.1. For example if I wanted to test a URL locally such as mywebsite.localhost.com or example.localhost.com but I don't have control of DNS settings (hosts file or whatever) then I would use this public DNS to resolve to 127.0.0.1. It needs to be wildcarded so that no matter whatever comes before localhost.com it still resolves to 127.0.0.1.

    Read the article

  • Need some ignition for learning 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

  • Getting Json data into a list view

    - by Rahul Varma
    Hi, I have been searching for a way to get the json data from a URl (for example: http://search.twitter.com/trends.json) and display it in a listview. Couldnt get a perfect example to get it done. Can anyone plz help me out by getting the solution and providing a good example of how to do it...

    Read the article

  • Attaching Files to QC defect by Java code from local machine

    - by Rahul
    Hi All, When we open a defect in QC generally we need to attach the logs of the server i want to Make an application such that It will take files(logs from all the relevant server) and stores in our local machine and then we can rar those files and directly attach it to QC defect mentioned by person opening defect Now my question is how can i access the defect and attach the files to that particular defect Please give your suggestions if any

    Read the article

  • COGNOS 8 Bi value prompt

    - by Rahul Kadam
    Currently I have a value prompt added to my report (with UI selected as List-Box) and the date item used is name 'YEAR'. Now when I run the report the values in the value prompt are seen as below: YEAR 2004 2005 2006 What I want to do is get rid of the year tag that is present in the output of the value prompt box, more clearly the output in the value prompt box should be as below: 2004 2005 2006 Can someone let me know how that can be achieved?

    Read the article

  • Using ckEditor on selective text areas in django admin forms

    - by Rahul
    Hi, I want to apply ckeditor on specific textarea in django admin form not on all the text areas. Like snippet below will apply ckeditor on every textarea present on django form: class ProjectAdmin(admin.ModelAdmin): formfield_overrides = {models.TextField: {'widget': forms.Textarea(attrs={'class':'ckeditor'})}, } class Media: js = ('ckeditor/ckeditor.js',) but i want it on a specific textarea not on every textarea.

    Read the article

  • Cursor on Path doesn't appear in SilverLight

    - by Rahul Soni
    I am trying to draw a circle with a glass effect using Alpha. I am successful in creating that by using the below XAML. The cursor changes to Hand for the Ellipses, but it doesn't affect Path. Basically, I want to show "hand" cursor wherever the mouse appears over the circle. I hope this is not a known issue and I am missing something small. Any help is really appreciated. <Ellipse Cursor="Hand" Width="200" Height="200" Fill="#C42222" Canvas.Left="0" Canvas.Top="0" /> <Ellipse Cursor="Hand" Width="200" Height="200" Canvas.Left="0" Canvas.Top="0"> <Ellipse.Fill> <RadialGradientBrush GradientOrigin="0.3,0.7"> <GradientStop Offset="0" Color="#00000000" /> <GradientStop Offset="1" Color="#66000000" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> <Path Cursor="Hand" Stretch="Fill" Height="114.598" Width="198.696" Data="M98.388435,-1.3301961 C98.388435,-1.3301961 117.1151,-3.094949 141.69321,8.1370029 C156.42262,14.868201 167.67375,23.694145 175.66234,33.657074 C183.67349,43.648144 181.90166,37.8708 191.90166,58.8708 C201.90166,79.870796 199.16658,89.212738 199.13568,92.90377 C198.77556,135.92146 175.45959,97.59124 156.75465,81.024025 C140.98892,67.060104 117.41241,64.357407 114.41241,64.357407 C111.4124,64.357407 83.061241,60.114159 63.061195,71.114143 C43.061146,82.114136 39.637829,86.429352 22.999804,100.99996 C6.5005584,115.44904 2.9997537,112.99996 2.9997537,112.99996 C2.9997537,112.99996 -1.1832786,97.194221 1.9997513,81.999893 C7.2054667,57.150185 13.999762,47.999939 17.999771,42.999943 C21.999781,37.99995 29.935833,23.400871 54.053131,10.21261 C78.91642,-3.3835876 98.388435,-1.3301961 98.388435,-1.3301961 z"> <Path.Fill> <LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#55FFFFFF" Offset="0"/> <GradientStop Color="#11FFFFFF" Offset="0.5"/> <GradientStop Color="#00FFFFFF" Offset="1"/> </LinearGradientBrush> </Path.Fill> </Path>

    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

  • problem in displaying list using array adapters

    - by Rahul Varma
    Hi, I am trying to display the list of songs using array adapters. But the problem is i couldnt display the list and only empty screen with preset background is showing up. Here's the code...All the thee are seperate classes... Plz help me... public class SongsAdapter extends ArrayAdapter<SongsList>{ private Context context; TextView tvTitle; TextView tvMovie; TextView tvSinger; String s; public SongsAdapter(Context context, int resource, int textViewResourceId, String title) { super(context, resource, textViewResourceId); this.context=context; } public View getView(int position, View convertView, ViewGroup parent) { final int i=position; List<SongsList> listSongs = new ArrayList<SongsList>(); String title = listSongs.get(i).gettitleName().toString(); String album = listSongs.get(i).getmovieName().toString(); String artist = listSongs.get(i).getsingerName().toString(); String imgal = listSongs.get(i).gettitleName().toString(); LayoutInflater inflater = ((Activity) context).getLayoutInflater(); View v = inflater.inflate(R.layout.row, null); tvTitle=(TextView)v.findViewById(R.id.text2); tvMovie=(TextView)v.findViewById(R.id.text3); tvSinger=(TextView)v.findViewById(R.id.text1); tvTitle.setText(title); tvMovie.setText(album); tvSinger.setText(artist); final ImageView im=(ImageView)v.findViewById(R.id.image); s="http://www.gorinka.com/"+imgal; 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 ImageView im; public imageloader(String s, ImageView im) { this.ss=s; this.im=im; Thread thread = new Thread(this); thread.start(); } public void run(){ try { 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(); Bitmap bm = BitmapFactory.decodeStream(is); Log.d("img","img"); is.close(); im.setImageBitmap(bm); } catch (Exception t) { Log.e("bitmap url", "Exception in updateStatus()", t); } } } } 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 MusicListActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.openadiuofile); ListView list = (ListView)findViewById(R.id.list1); SongsAdapter adapter = new SongsAdapter(this,R.layout.row, R.id.text2, null); list.setAdapter(adapter); } }

    Read the article

  • Displaying the Time in AM/PM format in android

    - by Rahul Varma
    Hi, I am getting the time using a time picker and displaying the time in the text view using following code... private TimePickerDialog.OnTimeSetListener mTimeSetListener = new TimePickerDialog.OnTimeSetListener() { public void onTimeSet(TimePicker view, int hourOfDay, int minute) { Toast.makeText(SendMail.this, "Your Appointment time is "+hourOfDay+":"+minute, Toast.LENGTH_SHORT).show(); TextView datehid = (TextView)findViewById(R.id.timehidden); datehid.setText(String.valueOf(hourOfDay)+ ":"+(String.valueOf(minute))); } }; Now, the issue is when i set the time as 8:00 pm then i get the time displayed as 20:0... I want to display the time as 8:00 pm... How can i do that???

    Read the article

  • Generic Method to find the tuples used for computation in Postgres?

    - by Rahul
    If I have a table col1 | name | pay ------+------------------+------ 1 | Steve Jobs | 1006 2 | Mike Markkula | 1007 3 | Mike Scott | 1978 4 | John Sculley | 1983 5 | Michael Spindler | 1653 The user executes a sum query which sums the pay of people getting paid more than $1500. Is there a way to also implicitly know which tuples have been used which satisfy the condition for sum ? I know you can separately write another query to just return the primary key ids which satisfy the condition. But, Is there any other way to do that in the same query ? probably rewrite the query in some way ? or... any suggestion ?

    Read the article

  • Binding data to scroll view

    - by Rahul Varma
    Hi, I am new to iphone dev. I have a Label and a scroll view. I am trying to get data from url and bind it to label and a scroll view. I am able to bind the data to label by using... UrlValues *asana=[[data yoga]objectAtIndex:i]; self.AsanaName.text = [asana asanatitle]; Similarly i want to bind some other data in the url to a scroll view. The data i want to bind is 4 or 5 sentences. So, can anyone help me how to do it... Any sample code will be really helpful... Thanks

    Read the article

  • Getting the values from an array in android

    - by Rahul Varma
    Hi, I have a collection of strings and declared the strings individually as arrays using ArrayList<String> al=new ArrayList<String>(); and called the arrays in the program by using al=getIntent().getStringArrayListExtra("titles"); Now, instead of declaring each of the arrays i have created SongsArray.java like below... public class SongsArray { private String title; private String movieName; private String singerName; private String imagePath; private String mediaPath; public String gettitle() { return title; } public void settitle(String title) { this.title = title; } 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; } } Now i want to call the arrays that i have declared. How can i do that???

    Read the article

  • Where can I find a list of all possible messages that an XmlException can contain?

    - by Rahul
    I'm writing an XML code editor and I want to display syntax errors in the user interface. Because my code editor is strongly constrained to a particular problem domain and audience, I want to rewrite certain XMLException messages to be more meaningful for users. For instance, an exception message like this: '"' is an unexpected token. The expected token is '='. Line 30, position 35 .. is very technical and not very informative to my audience. Instead, I'd like to rewrite it and other messages to something else. For completeness' sake that means I need to build up a dictionary of existing messages mapped to the new message I would like to display instead. To accomplish that I'm going to need a list of all possible messages XMLException can contain. Is there such a list somewhere? Or can I find out the possible messages through inspection of objects in C#? Edit: specifically, I am using XmlDocument.LoadXml to parse a string into an XmlDocument, and that method throws an XmlException when there are syntax errors. So specifically, my question is where I can find a list of messages applied to XmlException by XmlDocument.LoadXml. The discussion about there potentially being a limitless variation of actual strings in the Message property of XmlException is moot.

    Read the article

  • Interesting interview question. .Net

    - by rahul
    Coding Problem NumTrans There is an integer K. You are allowed to add to K any of its divisors not equal to 1and K. The same operation can be applied to the resulting number and so on. Notice that starting from the number 4, we can reach any composite number by applying several such operations. For example, the number 24 can be reached starting from 4 using 5 operations: 468121824 You will solve a more general problem. Given integers n and m, return the minimal number of the described operations necessary to transform n into m. Return -1 if m can't be obtained from n. Definition Method signature: int GetLeastCount (int n, int m) Constraints N will be between 4 and 100000, inclusive. M will be between N and 100000, inclusive. Examples 1) 4 576 Returns: 14 The shortest order of operations is: 468121827365481108162243324432576 2) 8748 83462 Returns: 10 The shortest order of operations is: 874813122196832624439366590497873283106834488346083462 3) 4 99991 Returns: -1 The number 99991 can't be obtained because it’s prime!

    Read the article

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