Search Results

Search found 554 results on 23 pages for 'amit singh'.

Page 15/23 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Non-Git Github?

    - by Mihir Singh
    This is probably a really weird question... but is there a non-git Github? I want a place to post my projects and share my code (like Github) but I don't want to have to works with versions, commits, etc. I don't like having to create a link between my folder and my git repo and then push the changes etc. In addition, I don't want to have to have a local copy to create or add files; I can edit existing files in Github, but to create or add files, I have to do it locally and then commit and push. I'm not sure if this is the best site to ask on, but I figured someone might have the answer. Thanks in advance.

    Read the article

  • Google Map key in Android?

    - by Amandeep singh
    I am developing an android app in which i have to show map view i have done it once in a previous app but the key i used in the previous is not working int his app . It is just showing a pin in the application with blank screen. Do i have to use a different Map key for each project , If not Kindly help me how can i use my previous Key in this. and also I tried generating a new key but gave the the same key back . Here is the code i used public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); btn=(Button)findViewById(R.id.mapbtn); str1=getIntent().getStringExtra("LATITUDE"); str2=getIntent().getStringExtra("LONGITUDE"); mapView = (MapView)findViewById(R.id.mapView1); //View zoomView = mapView.getZoomControls(); mapView.setBuiltInZoomControls(true); //mapView.setSatellite(true); mc = mapView.getController(); btn.setOnClickListener(this); MapOverlay mapOverlay = new MapOverlay(); List<Overlay> listOfOverlays = mapView.getOverlays(); listOfOverlays.clear(); listOfOverlays.add(mapOverlay); String coordinates[] = {str1, str2}; double lat = Double.parseDouble(coordinates[0]); double lng = Double.parseDouble(coordinates[1]); p = new GeoPoint( (int) (lat * 1E6), (int) (lng * 1E6)); mc.animateTo(p); mc.setZoom(17); mapView.invalidate(); //mp.equals(o); } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } class MapOverlay extends com.google.android.maps.Overlay { @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); Paint mPaint = new Paint(); mPaint.setDither(true); mPaint.setColor(Color.RED); mPaint.setStyle(Paint.Style.FILL_AND_STROKE); mPaint.setStrokeJoin(Paint.Join.ROUND); mPaint.setStrokeCap(Paint.Cap.ROUND); mPaint.setStrokeWidth(2); //---translate the GeoPoint to screen pixels--- Point screenPts = new Point(); mapView.getProjection().toPixels(p, screenPts); //---add the marker--- Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.pin); canvas.drawBitmap(bmp, screenPts.x, screenPts.y-50, null); return true; } Thanks....

    Read the article

  • Question regarding common class

    - by Rocky Singh
    I have following two classes: public class A : System.Web.UI.WebControls.Button { public virtual string X { get { object obj = ViewState["X"]; if (obj != null) return (string)obj; return null; } set { ViewState["X"] = value; } } protected override void OnLoad(EventArgs e) { X=2; } } and public class B : System.Web.UI.WebControls.TextBox { public virtual string X { get { object obj = ViewState["X"]; if (obj != null) return (string)obj; return null; } set { ViewState["X"] = value; } } protected override void OnLoad(EventArgs e) { X=2; } } As you must be seeing the class A and B have exactly the same code , my question is how can I make a common class for it and use these two classes.

    Read the article

  • Is Abstract Factory Pattern implemented correctly for given scenario.... ???

    - by Amit
    First thing... I am novice to pattern world, so correct me if wrong anywhere Scenario: There are multiple companies providing multiple products of diff size so there are 3 entities i.e. Companies, Their Product and size of product I have implement Abstract Pattern on this i.e. so that I will create instance of IProductFactory interface to get desired product... Is below implementation of Abstract Factory Pattern correct ??? If not then please correct the approach + Also tell me if any other pattern can be used for such scenario Thanks in advance... public enum Companies { Samsung = 0, LG = 1, Philips = 2, Sony = 3 } public enum Product { PlasmaTv = 0, DVD = 1 } public enum ProductSize { FortyTwoInch, FiftyFiveInch } interface IProductFactory { IPhilips GetPhilipsProduct(); ISony GetSonyProduct(); } interface ISony { string CreateProducts(Product product, ProductSize size); } interface IPhilips { string CreateProducts(Product product, ProductSize size); } class ProductFactory : IProductFactory { public IPhilips GetPhilipsProduct() { return new Philips(); } public ISony GetSonyProduct() { return new Sony(); } } class Philips : IPhilips { #region IPhilips Members public string CreateProducts(Product product, ProductSize size) {// I have ingnore size for now.... string output = string.Empty; if (product == Product.PlasmaTv) { output = "Plasma TV Created !!!"; } else if (product == Product.DVD) { output = "DVD Created !!!"; } return output; } #endregion } class Sony : ISony {// I have ingnore size for now.... #region ISony Members public string CreateProducts(Product product, ProductSize size) { string output = string.Empty; if (product == Product.PlasmaTv) { output = "Plasma TV Created !!!"; } else if (product == Product.DVD) { output = "DVD Created !!!"; } return output; } #endregion } IProductFactory prodFactory = new ProductFactory(); IPhilips philipsObj = prodFactory.GetPhilipsProduct(); MessageBox.Show(philipsObj.CreateProducts(Product.DVD, ProductSize.FortyTwoInch)); or //ISony sonyObj = prodFactory.GetSonyProduct(); //MessageBox.Show(sonyObj.CreateProducts(Product.DVD, ProductSize.FortyTwoInch));

    Read the article

  • How to send html content in the Email body

    - by Shalini Singh
    Hi, i am using android code with html tag.. but in mail getting same html tag please help me how can i send html link ... the code is giving below Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/html"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"[EMAIL PROTECTED]"}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Example"); context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));

    Read the article

  • javascript mouse cursor change on page load in firefox browser 3.5

    - by Amit
    Hi in case of full page submit a trasparent div id coming and changing the cursor to 'wait' . Now when the page is getting submitted and new page is coming up cursor still remains to 'wait' not changing to default until mouse is moved in Firefox Here is simple html click on show button div is coming when user move mouse over the div cursor is changing as wait cursor. Now when this page is loaded again pressing F5 cursor remain as wait cursor in firefox its working fine in IE is there any way to make the cursor as default on pageload in Firefox <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style> body{ cursor:default; } </style> <script src="js/jquery.js"> </script> <script> var test = true; $(document).ready(function(){ $('#maindiv').css('display','none') }); function showDiv(){ $('#maindiv').css('display','block') } </script> </head> <body> <div id="divBody" style="background-color:red;width:500px;height:500px" >aa <div id="maindiv" style="background-color:#999999;height:100$;width:400px;height:400px;cursor:wait"> sss </div>aa </div> <input type="button" value="show" onclick="showDiv()"/> </body> </html>

    Read the article

  • Need to open to two excel files and add numbers from them into a third file using vba.

    - by Harpyar Singh
    I have two excel files which has similar formatting and the data map each other from cell b15:h31. Row 15 is heading and so is the column B. I want to read file1 cell by cell and add that cell's content to the corresponding cell in File 2 i.e C16 in file 1 gets added to C16 in file 2, C17 in file 1 to C17 in file 2 and so on. The output goes in file 3 or anything. trying to implement through vba but of no success so far. Does anyone know how to go about it.

    Read the article

  • is rand() is perdicatable in C++

    - by singh
    Hi When i run below program i always get same values each time..Is rand is not a true random function. int main() { while(1) { getch(); cout<<rand()<<endl; } } In each run i am getting below values. 41 18467 6334 26500 19169 15724 ......

    Read the article

  • Is rand() predictable in C++

    - by singh
    When I run the below program I always get the same values each time. Is rand not a true random function? int main() { while(1) { getch(); cout<<rand()<<endl; } } In each run I am getting the below values. 41 18467 6334 26500 19169 15724 ......

    Read the article

  • how to get the value from a CSS class object in javascript

    - by amit
    I have to select an <a> element from the given class of objects. when i click on the anchor tag in the showcase_URL class, i want the jquery function to get the value from <a> tag. How can this be done? I cannot make this an id as I am running a while loop to construct all the elements in php. there would be multiple objects of this class. there is no definite selector through which I can get the value of the anchor tag. Help would be much appreciated. echo '<div id="content">'; echo '<div class="showcase_data">'; echo '<div class="showcase_HEAD">'.$row->title.'</div>'; echo '<div class="showcase_TYPE">'.$row->type.'</div>'; echo '<div class="showcase_date">&nbsp;&nbsp;'.$row->date.'</div>'; echo '<div class="showcase_THUMB" style="float: left;" ></div>'; echo '<div class="showcase_TEXT">'.$row->details.'</div><br/>'; echo '<div class="showcase_URL"><a class="purl" value='.$row->num.'href="'.$row->url.'">PROJECT URL</a></div>'; echo '</div>'; echo '</div>';

    Read the article

  • What is the best way to findout whether a date falls in particular range?

    - by Amit
    I tried the following DateTime start = Convert.ToDateTime(TextBox1.Text); DateTime end = Convert.ToDateTime(TextBox2.Text); if (DateTime.Now.Date == start.Date || DateTime.Now.Date == end.Date || (DateTime.Now >= start.Date && DateTime.Now <= end.Date)) { lblResult.Text = "true"; } else { lblResult.Text = "false"; } This verifies if the date range is one day also. Any way to reduce the number of conditions above?

    Read the article

  • What is the best approach to manipulate assets in Drupal from .Net application?

    - by Amandeep Singh
    I'm beginning work on a project that will access a Drupal site to create nodes on the site. This includes file uploading, as the project is to allow people to upload pictures en mass to a Drupal site with minimal ado. Note that my application is written in .Net. What I would like to know is the best approach to achieve the same? Based on initial research it looks like there are several options: 1. XML-RPC 2. Custom PHP module deployed in drupal. But, what is the way to invoke it from .Net? 3. Use a cron job to pick up the files from a watch folder. And add a cron_hook in my module to deploy the file.

    Read the article

  • To remove garbage characters from a string using regex...

    - by Harjit Singh
    Hi I want to remove characters from a string other then a-z, and A-Z. Created following function for the same and it works fine. public String stripGarbage(String s) { String good = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; String result = ""; for (int i = 0; i < s.length(); i++) { if (good.indexOf(s.charAt(i)) >= 0) { result += s.charAt(i); } } return result; } Can anyone tell me a better way to achieve the same. Probably regex may be better option. Regards Harry

    Read the article

  • A datastructure for Robotic Sort

    - by amit.codename13
    I am trying to solve this problem : https://www.spoj.pl/problems/CERC07S/ I have identified that i need a datastructure in which reversing operations have lesser time complexity. I tried to create one using a doubly linked list, in which (i thought) reversing can be done in O(1) by just changing a value associated with the starting and ending node which indicates the direction of traversing the list. I tried to implement it but got stuck. Maybe the approach is wrong! Are trees applicable here? If yes, how? Any ideas or links are appreciated? Thanks in advance.

    Read the article

  • how access value of array list on Struts framework by properties file

    - by singh
    arraylist.add(new ListItem("Activity1", "ActivityName1")); suppose ActivityName1 value store in properties file to provide locale feature. now how can i access the value of Activity1 key that associate to ActivityName1 value on jsp ( ActivityName1 corresponds to a properties file value) by using Struts. i want to find the ActivityName1 value that store in properties file by using the Activity1 key in Struts framework.

    Read the article

  • Trasnfer of dirctory structure on network

    - by singh
    Hi I am designing a remote CD/DVD burner to address hardware constraint on my Machine. My design work like that :(Analogous to network paper printer) Unix Based Machine (acts as server) hosts a burner. Windows based machine acts as client. Client prepare data to be burn and transfer it to server. Server burn the data on CD/DVD. My Question is : . Which is the best protocol to transfer data over network (Keeping same Directory hierarchy) between different OS

    Read the article

  • Any Sercurity issues in ajax dll

    - by lokendra singh
    Hi Friends I am using ajax dll in my application for smooth working but i have some doubt in my mind ? is there any security problem in server when we are using ajax dll in my application. means any one can missuse the application because we are using public memthods in ajax dll. Any one suggest me, thanks in advance Lokendra

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >