Search Results

Search found 1062 results on 43 pages for 'shah al'.

Page 13/43 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Adding Class instance as a new Row in DataGridView (c#)

    - by Amit Shah
    Hi All, I have a class say [Serializable] public class Answer { [DisplayName("ID")] public string ID { get; set; } [DisplayName("Value")] public string Value { get; set; } } and I have a datagridview with bounded columns to the above class. instances of this class Answer are created dynamically as and when required. How do I update datagridview when each and every instance of class is created. is it possible to do something of this sort. dataGridView.Rows.Add(classInstance); Thanks in Advance, Amit

    Read the article

  • setting an ImageView to invisable inside a custom Adapter

    - by iyad al aqel
    i'm defining my own list adapter and i want an image inside it to be shown OR hidden based on a value what i've noticed that its always invisible or visible disregarding the value Here's my code , this code is inside the getView method singleRow=data.get(position); readit = singleRow.getRead(); Log.i("readit","" + readit ); //NotificationID=singleRow.getId(); holder.title.setText(singleRow.getAttach_title()); holder.date.setText( singleRow.getAttach_created()); holder.dueDate.setVisibility(ImageView.INVISIBLE); holder.course.setText(singleRow.getCourse_title()); if(readit==1) { //holder.read.setImageResource(IGNORE_ITEM_VIEW_TYPE); holder.read.setVisibility(ImageView.INVISIBLE); } else { holder.read.setImageResource(R.drawable.unread); }

    Read the article

  • Webapp: safetly update a shared List/Map in the AppContext

    - by al nik
    I've Lists and Maps in my WebAppContext. Most of the time these are only read by multiple Threads but sometimes there's the need to update or add some data. I'm wondering what's the best way to do this without incurring in a ConcurrentModificationException. I think that using CopyOnWriteArrayList I can achieve what I want in terms of - I do not have to sync on every read operation- I can safety update the list while other threads are reading it. Is this the best solution? What about Maps?

    Read the article

  • Setting up a web developer lab for learning purposes

    - by Saleh Al-Abbas
    I'm not a developer by profession. Therefore, I'm not exposed to real world technical problems that face professional developers. I read/heard about web farms, integration between different systems, load balancing ... etc. Therefore, I was wondering if there are ways for the individual developer to create an environment that simulates real world situations with minimal number of machines like: web farms & caching simulating many users accessing your website (Pressure tests?) Performance load balancing anything you think I should consider. By the way, I have a server machine and 1 PC. and I don't mind investing in tools and software. PS. I'm using Microsoft technologies for development but I hope this is not a limiting factor. Thanks

    Read the article

  • Continuous Deployment with a C#/ASP.NET website?

    - by Amber Shah
    I have a website in C#/ASP.NET that is currently in development. When we are in production, I would like to do releases frequently over the course of the day, as we fix bugs and add features (like this: http://toni.org/2010/05/19/in-praise-of-continuous-deployment-the-wordpress-com-story/). If you upload a new version of the site or even change a single file, it kicks out the users that are currently logged in and makes them start over any forms and such. Is there a secret to being able to do deployments without interfering with users for .NET sites?

    Read the article

  • Login time out when calling opening a new window from modal popup (ASP.NET)

    - by Harsh Shah
    I have a weird problem. I have a window, on a button click I open a modal popup (using ModelPopupExtender), that let's you select a few criteria and then click a submit button. On click of submit button, I open a new window (using window.open()) that shows the status of what happened to your submitted request. However, every time this status window is opened, it goes to the login page. I am thinking the modal popup can't pass the authentication cookie to the newly opened window, but I'm not sure. Here's my web.config portion:

    Read the article

  • Cast object to interface when created via reflection

    - by Al
    I'm trying some stuff out in Android and I'm stuck at when trying to cast a class in another .apk to my interface. I have the interface and various classes in other .apks that implement that interface. I find the other classes using PackageManager's query methods and use Application#createPackageContext() to get the classloader for that context. I then load the class, create a new instance and try to cast it to my interface, which I know it definitely implements. When I try to cast, it throws a class cast exception. I tried various things like loading the interface first, using Class#asSubclass, etc, none of which work. Class#getInterfaces() shows the interface is implemented. My code is below: PackageManager pm = getPackageManager(); List<ResolveInfo> lr = pm.queryIntentServices(new Intent("com.example.some.action"), 0); ArrayList<MyInterface> list = new ArrayList<MyInterface>(); for (ResolveInfo r : lr) { try { Context c = getApplication().createPackageContext(r.serviceInfo.packageName, Context.CONTEXT_IGNORE_SECURITY | Context.CONTEXT_INCLUDE_CODE); ClassLoader cl = c.getClassLoader(); String className = r.serviceInfo.name; if (className != null) { try { Class<?> cls = cl.loadClass(className); Object o = cls.newInstance(); if (o instanceof MyInterface) { //fails list.add((MyInterface) o); } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } // some exceptions removed for readability } } catch (NameNotFoundException e1) { e1.printStackTrace(); }

    Read the article

  • CDATA xml parsing extra greater than problem

    - by Ruchir Shah
    Hi, I am creating an xml using php and parsing that xml in iphone application code. In description field there is some html tags and text. I am using following line to convert this html tags in to xml tag using CDATA. $response .= '<desc><![CDATA['.trim($feed['fulltext']).']]></desc>'; Now, here my $feed['fulltext'] value is like this <span class="ABC">...text...</span> In xml I am getting following response, <desc><![CDATA[><span class"ABC">...text...</span>]]></desc> You can see here, I am getting an extra greater-than symbol just before the value of $feed['fulltext'] starts. (like this: ...text...) Any solution or suggestion for this? Thanks in advance. Cheers.

    Read the article

  • White dialog theme

    - by Al
    I've noticed some apps have a dialog with white background, including along the title border, as opposed to the default black. I know how to make the background white but the whiteness doesn't extend to the dialog's title border. This image: http://localhostr.com/files/25bb19/tether.png is an example of how I want the dialog to look. Anyone know I can do this? I mainly use AlertDialog.Builder to make my dialogs so ideally something I can easily to that.

    Read the article

  • untar from run command in fibre

    - by Shah.Bhavesh
    i want to untar file from source to destination with below statement `def untar(source,destination): run("tar -xf {0} {1}".format(source,destination)) ` i am getting Error C:\Users\test\Desktop\fabric>fab -H user@host-p pass untar:source =/shared/sample.tar,destination=/home/ Traceback (most recent call last): File "C:\Users\shasmukh\AppData\Roaming\Python\Python27\site-packages\fabric\m ain.py", line 630, in main docstring, callables, default = load_fabfile(fabfile) File "C:\Users\shasmukh\AppData\Roaming\Python\Python27\site-packages\fabric\m ain.py", line 163, in load_fabfile imported = importer(os.path.splitext(fabfile)[0]) File "C:\Users\shasmukh\Desktop\fabric\fabfile.py", line 11 def copy(source,destination) ^ SyntaxError: invalid syntax

    Read the article

  • RECOVER A DELETED FILE WWW in ubuntu 9.04

    - by Al MUbarak
    Hai., i'm using unbuntu 9.04 and i had all web developing dump has been installed in www folder., today morning unfortunately i delete the www folder via terminal. but i'm afraid about that issue., i dont have any knowledge for how to restore the www folder and included files asap. IF anyone Could known the issue and how to rectify that issue., pls let me know., Thnaks in Advance.,

    Read the article

  • Retrieveing ALL head elements in document including iframe

    - by Vishal Shah
    I'm trying to add style elements to all ALL the head elements in a document, including those in an iframe. if i use var heads = document.getElementsByTagName('head'); It just returns the first head element and not the ones in the iframe. this is the complete code : var heads = document.getElementsByTagName("head"); var style = document.createElement("style"); style.type = "text/css"; style.appendChild(document.createTextNode(css)); for(var i=0;i<heads.length;i++) heads[i].appendChild(style); but this doesn't seem to work! am i doing something wrong here...?

    Read the article

  • wpf legacy server call

    - by Shah Al
    Hi, We have a legacy application running tomcat that publishes data in a simple html table. I have no control on the remote server publishing the data. I am looking to extract the data into a WPF desktop application and display it as a table. Is there any way a WPF application can make a url call, get the result and parse the data. This would be similar to AJAX from JSP. Any thoughts/ideas? Please advice. Regards,

    Read the article

  • error writing to plist

    - by Najeebullah Shah
    [array writeToFile:[documentsDirectory stringByAppendingPathComponent:@"data.plist" atomically:YES]; this line gives error that method -stringByAppendingPathComponent not found. whats the issue NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSArray *array = [[NSArray alloc]initWithObjects:@"First", @"Second", @"Third", nil]; [array writeToFile:[documentsDirectory stringByAppendingPathComponent:@"data.plist" atomically:YES]];

    Read the article

  • What design pattern shall I use in this question?

    - by iyad al aqel
    To be frank, this is a homework question, so I'll tell you my opinion. Can you let me know my mistakes rather than giving me the solution? This is the question : Assume a restaurant that only offers the following two types of meals: (a) a full meal and (b)an economic meal. The full meal consists of the following food items and is served in the following order: 1. Appetizer 2. Drink 3. Main dish 4. Dessert Meanwhile the economic meal consists of the following food items and is served in the following order: 1. Drink 2. Main dish Identify the most appropriate design pattern that can be used to allow a customer to only order using one of the two types of meals provided and that the meal components must be served in the given order. I'm confused between the Factory and the Iterator and using them both together. Using the factory Pattern we can create the two meals full and economic and provide the user with with a base object class that will decide upon. But how can we enforce the ordering of the elements, I thought of using the iterator along that will iterate through the the composite of the two created factories sort of speak. What do you think?

    Read the article

  • passing data from a servlet to javascript code in an Ajax application ?

    - by A.S al-shammari
    I have a simple jsp/servlet application and I want to add AJAX feature to this app. I use JQuery , but it doesn't matter what javascript framework I use. This is my code: <script type="text/javascript"> function callbackFunction(data){ $('#content').html(data); } $('document').ready(function(){ $('#x').click(function() { $.post('/ajax_2/servlet',callbackFunction) }); }); </script> <body> <a href="#" id="x">Increase it</a> <div id="content"></div> </body> </html> Servlet HttpSession session = request.getSession(); Integer myInteger = (Integer)session.getAttribute("myInteger"); if(myInteger == null) myInteger = new Integer(0); else myInteger = new Integer(myInteger+1); session.setAttribute("myInteger", myInteger); response.getWriter().println(myInteger); The Question: I use out.print to transfer data from a servlet to javascript code (ajax code) , but If I have a complex structure such as Vector of Object or something like this , what is the best way to transfer the data? what about an XML file , JSON ? Is there any special jsp/servlets library to transfer data from a servlet to ajax application ? How can I parse this data in callbackFunction ?

    Read the article

  • ColumnCount in DataGridView remains 0 after assigning data source

    - by Manan Shah
    I am having trouble with the following simple code List<Car> tempList = new List<Car>(); BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = tempList; dgTempView.DataSource = bindingSource; Here, dgTempView is a data grid view After the above lines execute, the column count in the datagrid view remains 0. And when I try adding a Car instance in tempList, I get an error saying that 'no row can be added to a datagridview control that does not have columns' . I am not able to understand what am I missing here

    Read the article

  • Cluster analysis on two columns that contain name of person in R

    - by Alka Shah
    I am a beginner in R. I have to do cluster analysis in data that contains two columns with name of persons. I converted it in data frame but it is character type. To use dist() function the data frame must be numeric. example of my data: Interviewed.Type interviewed.Relation.Type 1. An1 Xuan 2. An2 The 3. An3 Ngoc 4. Bui Thi 5. ANT feed 7. Bach Thi 8. Gian1 Thi 9. Lan5 Thi . . . 1100. Xung Van I will be grateful for your help.

    Read the article

  • Show context menu when link is long pressed in TextView

    - by Al
    I have a TextView with its MovementMethod set to LinkMovementMethod. Text added to the TextView is a combination of normal text and URLs. For URLs, I would like to offer a context menu when the URL is long pressed for doing things such as copying the address. I've had a look at the source for LinkMovementMethod but it doesn't seem to have any long pressed related code I could override. Any ideas on how to go around achieving this?

    Read the article

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