Search Results

Search found 119 results on 5 pages for 'nikhil lamba'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • making hyperlink

    - by Nikhil K
    I have an arraylist (eg: h1) contain some urls. eg: http://www.google.com,http://www.yahoo.com,http://www.xyz.com,..... How can i put hyperlinks to each elements in that arraylist in c# ? Means by clicking on that url it should navigate to corresponding website.Can you give an example?? Also, how can i use 'Hyperlink' keyword in c# ?

    Read the article

  • making multiple c# file for one asp.net page

    - by Nikhil K
    For my project(in asp.net) i wrote near 1000 lines of c# code for one asp.net page.It includes so many functions.The problem is,it is going complicated while i am writing more codes on one page.How can i make multiple c# files for one asp.net page?? I tried by adding new class in VS2008.But calling a function from one file to other is making error(item is not present in current file).How can i do that??

    Read the article

  • Data table to Excel conversion leaves my server side button non responsive

    - by Nikhil Vaghela
    We have a web part on which we display some data in a grid. We are exporting grid's underlying datatable to Excel and displaying Open - Save - Cancel dialouge box on click of a server side button. Following is the code we are executing on click of server side button. this.Page.Response.Clear(); this.Page.Response.AppendHeader("Content-Disposition", "attachment; filename=MyTasks.xls"); this.Page.Response.ContentType = "application/ms-excel"; this.Page.Response.Write("...here goes my well formated html...."); this.Page.Response.End(); Problem is that when i click on Cancel in the diaglouge box then dialogue box to Open/Save excel disappears but all the server side buttons placed on my web part becomes non responsive, on click of any of those buttons their server side click event does not get fired !!! Any idea ? Thanks.

    Read the article

  • How can I request a url using AJAX

    - by Nikhil Dinesh
    I am quite new in this area. I need to find out how to make a request to my solr server using Ajax How can I give a url(my solr server's url) in request Any body know how to deal with this? How can i make a request to the below mentioned url http://mysite:8080/solr/select/?q=%2A%3A%2A&version=2.2&start=0&rows=100&indent=on See here: Corrected the Code Snippet as below function getProductIds() { var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) console.dir(xmlhttp); else alert('no response'); var ajaxURL = "http://localhost:8080/solr/select/?q=*:*&version=2.2&start=0&rows=100&indent=on"; xmlhttp.open("GET", ajaxURL, true); xmlhttp.send(); } This is my code, it always showing "no response" Thanks.

    Read the article

  • Custom constructors for models in Google App Engine (python)

    - by Nikhil Chelliah
    I'm getting back to programming for Google App Engine and I've found, in old, unused code, instances in which I wrote constructors for models. It seems like a good idea, but there's no mention of it online and I can't test to see if it works. Here's a contrived example, with no error-checking, etc.: class Dog(db.Model): name = db.StringProperty(required=True) breeds = db.StringListProperty() age = db.IntegerProperty(default=0) def __init__(self, name, breed_list, **kwargs): db.Model.__init__(**kwargs) self.name = name self.breeds = breed_list.split() rufus = Dog('Rufus', 'spaniel terrier labrador') rufus.put() The **kwargs are passed on to the Model constructor in case the model is constructed with a specified parent or key_name, or in case other properties (like age) are specified. This constructor differs from the default in that it requires that a name and breed_list be specified (although it can't ensure that they're strings), and it parses breed_list in a way that the default constructor could not. Is this a legitimate form of instantiation, or should I just use functions or static/class methods? And if it works, why aren't custom constructors used more often?

    Read the article

  • How to I count key collisions when using boost::unordered_map?

    - by Nikhil
    I have a data structure with 15 unsigned longs, I have defined a hash function using hash_combine as follows: friend std::size_t hash_value(const TUPLE15& given) { std::size_t seed = 0; boost::hash_combine(seed, val1); boost::hash_combine(seed, val2); ... return seed; } I insert a large number of values into a boost::unordered_map but the performance is not good enough. Probably, I could do better with an alternative hashing function. To confirm this, I need to check how many collisions I am getting. How do I do this?

    Read the article

  • Adobe AIR canvas dimensions messed up

    - by Nikhil
    I'm messing about with Canvas in Adobe Air. But their seems to be some issue with the mouse coordinates. The more I click towards the right, the difference between the draw position and actual click increases. My code is Wb.canvas.fillRect(evt.clientX-canvasTag.clientX, evt.clientY-canvasTag.clientY, 50, 50);

    Read the article

  • Update query in ado.net

    - by nikhil
    I wanted to update a column in my table, i have written the code it runs fine without any error also it displays the confirmation dialog box but the table is not updated whats wrong with the code. Dim sqlConn As New SqlClient.SqlConnection sqlConn.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\housingsociety.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" Try sqlConn.Open() Catch sqlError As Exception MsgBox(sqlError.Message, 0, "Connection Error!") End Try Dim sqlComm As New SqlClient.SqlCommand sqlComm.Connection = sqlConn sqlComm.CommandText = "update committe_member set name = '@name' where name = 'member1'" Dim paramString As New SqlClient.SqlParameter("@name", SqlDbType.VarChar, 50) paramString.Direction = ParameterDirection.Input sqlComm.Parameters.Add(paramString) paramString.Value = TextBox1.Text sqlComm.ExecuteNonQuery() MsgBox("Record Sucessfully Altered", 0, "Confirmation!") sqlConn.Close()

    Read the article

  • Problem with File uplolad in javascript.

    - by Nikhil
    I have used javascript to upload more than one file. when user clicks on 'add more' javascript appends new object to older div using innerHTML. Now the problem is if I select a file and then click on "add more" then new file button exist but older selected file removes and two blank file buttons display. I want this old file must be selected when user add new file button. If anybody can, Help Plz!!! tnX.

    Read the article

  • SQL Server - Searching string with international characters using LIKE clause

    - by Nikhil
    Hi, I have a field 'Description' which can have product descriptions with any unicode characters. If I search for a description which contains an international character, with a LIKE condition (word searched with does not have the international character) I get the following results: Ex: GEWÜRZTRAMINER is one of the descriptions. When I do: Select * from table where Description LIKE '%GEWURZTRAMINER%', it retrieves the entry. When I do: Select * from table where Description LIKE '%GEWURZ%', the entry is not retrieved. (Note: the search condition does not include the Ü but has a U) Is there a way around this so that I can retrieve with '%GEWURZ%' as well? SQl Server 2008

    Read the article

  • Removing exception

    - by Nikhil K
    I have used this code for extracting urls from web page.But in the line of 'foreach' it is showing Object reference not set to an instance of an object exception. What is the problem? how can i correct that? WebClient client = new WebClient(); string url = "http://www.google.co.in/search?hl=en&q=java&start=10&sa=N"; string source = client.DownloadString(url); HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(source); foreach (HtmlNode link in doc.DocumentNode.SelectNodes("//a[@href and @rel='nofollow']")) { Console.WriteLine(link.Attributes["href"].Value); }

    Read the article

  • Boost Shared Pointer: Simultaneous Read Access Across Multiple Threads

    - by Nikhil
    I have a thread A which allocates memory and assigns it to a shared pointer. Then this thread spawns 3 other threads X, Y and Z and passes a copy of the shared pointer to each. When X, Y and Z go out of scope, the memory is freed. But is there a possibility that 2 threads X, Y go out of scope at the exact same point in time and there is a race condition on reference count so instead of decrementing it by 2, it only gets decremented once. So, now the reference count newer drops to 0, so there is a memory leak. Note that, X, Y and Z are only reading the memory. Not writing or resetting the shared pointer. To cut a long story short, can there be a race condition on the reference count and can that lead to memory leaks?

    Read the article

  • reducing loading time of 100 pages of google

    - by Nikhil
    for my project i need to access entire pages(100) of google at a time for a particular keyword.I used 'for' loop for accessing pages in url written in my c# code.But it is taking more time to access.Some times it showing HttpRequest error.Any way to increase the speed?

    Read the article

  • How can I start XServer in Linux through apache user triggered by Perl script running in background?

    - by Nikhil
    I am trying to launch MS Office through WINE using a PERL script hosted by apache and and triggered by other application. I am getting the following error message in log files "Application trying to create a window but no driver could not be loaded. Make sure that your X server is running and that $DISPLAY is set correctly". If I run the script directly on shell prompt using root user then WINE starts XServer properly and execute MS MSoffice in addition to that if I set xhost +local:apache on shell prompt then also it works fine. How can I start the XServer from apache user?

    Read the article

  • C++: Initialization Order for Member Classes

    - by Nikhil
    In the following code, when the ctor of X is called will the ctor of A or B be called first? Does the order in which they are placed in the body of the class control this? If somebody can provide a snippet of text from the C++ standard that talks about this issue, that would be perfect. class A; class B; class X { private: A a; B b; }

    Read the article

  • Silverlight Cream for March 30, 2010 -- #825

    - by Dave Campbell
    In this Issue: Jeremy Likness, Tim Greenfield, Tim Heuer, ondrejsv, XAML Ninja, Nikhil Kothari, Sergey Barskiy, Shawn Oster, smartyP, Christian Schormann(-2-), and John Papa And Glenn Block. Shoutouts: Victor Gaudioso produced a RefCard for DZone: Getting Started with Silverlight and Expression Blend Way to go Victor... it looks great! Gavin Wignall announced Metia launch FourSquare and Bing maps mash up – called Near.me Cheryl Simmons talks about VS2010 and the design surface: Changing Templates with the Silverlight Designer (and seeing the changes immediately) Michael S. Scherotter posted that New York Times Silverlight Kit Updated for Windows Phone 7 Series Jaime Rodriguez posted about 2 free chapters in his new book (with Yochay Kiriaty): A Journey Into Silverlight On Windows Phone -Via Learning WIndows PHone Programming Did you know there was "MSDN Radio"?? Tim Heuer posted follow-up answers to this morning's show: MSDN Radio follow-up answers: Prism for Silverlight, DomainServices and relationships Michael Klucher posted a great set of links for WP7 game development this morning: Great Game Development Tutorials for Windows Phone Zhiming Xue has 3 pages of synopsis and links for everything Windows Phone at MIX. This is the 1st, but at the top of the pages are links to the other two: Windows Phone 7 Content From MIX10 – Part I From SilverlightCream.com: Using WriteableBitmap to Simplify Animations with Clones Jeremy Likness takes a break from his LOB posts to demonstrate a page flip animation using WriteableBitmap to simplify the animation using clones. SAX-like Xml parsing Want some experience or fun with Rx? Tim Greenfield has a post up on building an observable XmlReader. nstalling Silverlight applications without the browser involved Last night I blogged Mike Taulty's take on the "Silent Install" for an OOB app, tonight, I'm posting Tim Heuer's insight on the topic. How to: Create computed/custom properties for sample data in Blend/Sketchflow ondrejsv posted an example of digging into the files that control the sample data for Blend to get what you really want. PathListBox Adventures – radial layout Check out the radial layout XAML Ninja did using the PathListBox ... and all code available. RIA Services and Validation Nikhil Kothari has a great (duh!) post up that follows his Silverlight TV on the same subject: RIA Services and validation... lots of good external links also. Windows Phone 7 Application with OData Sergey Barskiy did an OData to WP7 app by using the feed from MIX10. You can see a list of sessions, and click on one to see details. Getting Blur And DropShadow to work in the Windows Phone Emulator Shawn Oster responds to some forum questions about Blur and DropShadow effects not showing up in the WP7 emulator, and gives the code trick we have to do for now. Metro Icons for Windows Phone 7 We all got the other icon set for WP7 from MSDN, but smartyP pulled the Metro Icons from the PPT deck of the MIX10 presentations... good job! Fonts in SketchFlow Christian Schormann talks about fonts in Sketchflow, where they live on your machine, and how you can use them. Blend 4: About Path Layout, Part III Christian Schormann also has Part III of his epic tutorial up on Path Layout and Blend. This one is on dynamic resizing layouts, and he has links back to the other two if you missed them... or you can find them with a search at SilverlightCream... :) Simple ViewModel Locator for MVVM: The Patients Have Left the Asylum John Papa And Glenn Block teamed up to solve the View First model only without the maintenance involved with the ViewModel locator by using MEF. It only took these guys and hour... sigh... :) Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • What is the easiest way to add compression to WCF in Silverlight?

    - by caryden
    I have a silverlight 2 beta 2 application that accesses a WCF web service. Because of this, it currently can only use basicHttp binding. The webservice will return fairly large amounts of XML data. This seems fairly wasteful from a bandwidth usage standpoint as the response, if zipped, would be smaller by a factor of 5 (I actually pasted the response into a txt file and zipped it.). The request does have the "Accept-Encoding: gzip, deflate" - Is there any way have the WCF service gzip (or otherwise compress) the response? I did find this link but it sure seems a bit complex for functionality that should be handled out-of-the-box IMHO. OK - at first I marked the solution using the System.IO.Compression as the answer as I could never "seem" to get the IIS7 dynamic compression to work. Well, as it turns out: Dynamic Compression on IIS7 was working al along. It is just that Nikhil's Web Developer Helper plugin for IE did not show it working. My guess is that since SL hands the web service call off to the browser, that the browser handles it "under the covers" and Nikhil's tool never sees the compressed response. I was able to confirm this by using Fiddler which monitors traffic external to the browser application. In fiddler, the response was, in fact, gzip compressed!! The other problem with the System.IO.Compression solution is that System.IO.Compression does not exist in the Silverlight CLR. So from my perspective, the EASIEST way to enable WCF compression in Silverlight is to enable Dynamic Compression in IIS7 and write no code at all.

    Read the article

  • Lambda&rsquo;s for .NET made easy&hellip;

    - by mbcrump
    The purpose of my blog is to explain things for a beginner to intermediate c# programmer. I’ve seen several blog post that use lambda expressions always assuming the audience is familiar with them. The purpose of this post is to make them simple and easily understood. Let’s begin with a definition. A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types. So anonymous function… delegates or expression tree types? I don’t get it??? Confused yet?   Lets break this into a few definitions and jump right into the code. anonymous function – is an "inline" statement or expression that can be used wherever a delegate type is expected. delegate - is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value. Expression trees - represent code in a tree-like data structure, where each node is an expression, for example, a method call or a binary operation such as x < y.   Don’t worry if this still sounds confusing, lets jump right into the code with a simple 3 line program. We are going to use a Function Delegate (all you need to remember is that this delegate returns a value.) Lambda expressions are used most commonly with the Func and Action delegates, so you will see an example of both of these. Lambda Expression 3 lines. using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 {     class Program     {          static void Main(string[] args)         {             Func<int, int> myfunc = x => x *x;             Console.WriteLine(myfunc(6).ToString());             Console.ReadLine();         }       } } Is equivalent to Old way of doing it. using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 {     class Program     {          static void Main(string[] args)         {               Console.WriteLine(myFunc(6).ToString());             Console.ReadLine();         }            static int myFunc(int x)          {              return x * x;            }       } } In the example, there is a single parameter, x, and the expression is x*x. I’m going to stop here to make sure you are still with me. A lambda expression is an unnamed method written in place of a delegate instance. In other words, the compiler converts the lambda expression to either a : A delegate instance An expression tree All lambda have the following form: (parameters) => expression or statement block Now look back to the ones we have created. It should start to sink in. Don’t get stuck on the => form, use it as an identifier of a lambda. A Lamba expression can also be written in the following form: Lambda Expression. using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 {     class Program     {          static void Main(string[] args)         {             Func<int, int> myFunc = x =>             {                 return x * x;             };               Console.WriteLine(myFunc(6).ToString());             Console.ReadLine();         }       } } This form may be easier to read but consumes more space. Lets try an Action delegate – this delegate does not return a value. Action Delegate example. using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 {     class Program     {          static void Main(string[] args)         {             Action<string> myAction = (string x) => { Console.WriteLine(x); };             myAction("michael has made this so easy");                                   Console.ReadLine();         }       } } Lambdas can also capture outer variables (such as the example below) A lambda expression can reference the local variables and parameters of the method in which it’s defined. Outer variables referenced by a lambda expression are called captured variables. Capturing Outer Variables using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 {     class Program     {          static void Main(string[] args)         {             string mike = "Michael";             Action<string> myAction = (string x) => {                 Console.WriteLine("{0}{1}", mike, x);          };             myAction(" has made this so easy");                                   Console.ReadLine();         }       } } Lamba’s can also with a strongly typed list to loop through a collection.   Used w a strongly typed list. using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 {     class Program     {          static void Main(string[] args)         {             List<string> list = new List<string>() { "1", "2", "3", "4" };             list.ForEach(s => Console.WriteLine(s));             Console.ReadLine();         }       } } Outputs: 1 2 3 4 I think this will get you started with Lambda’s, as always consult the MSDN documentation for more information. Still confused? Hopefully you are not.

    Read the article

  • Silverlight 4.0, Visual Studio 2010, .NET 4.0 released

    - by vladimirl
    Technorati Tags: Silverlight OK, now that Silverlight 4.0 finally is out (http://weblogs.asp.net/scottgu/archive/2010/04/15/silverlight-4-released.aspx) its time to learn it. Also VS 2010 and .NET 4.0 released (http://weblogs.asp.net/scottgu/archive/2010/04/12/visual-studio-2010-and-net-4-released.aspx). And remember about Windows Phone! There is more than enough information on the web. One thing that I would like to see from Microsoft is a complete reference example of business application. Personally I like what Nikhil Kothari is doing (check out his Mix 10 session “Developing with WCF RIA Services Quickly and Effectively” and his blog http://www.nikhilk.net/). Also there is Mike Taulty – the best presenter ever - http://mtaulty.com/communityserver/blogs/mike_taultys_blog/default.aspx Currently I’m watching this three part series: 1. What's new in Silverlight 4 Part 1 by Mike Taulty - http://channel9.msdn.com/posts/matthijs/Whats-new-in-Silverlight-4-Part-1-by-Mike-Taulty/ 2. What's new in Silverlight 4: Part 2 by Mike Taulty - http://channel9.msdn.com/posts/matthijs/Whats-new-in-Silverlight-4-Part-2-by-Mike-Taulty/ 3. Silverlight 4 - A Guided Tour of the Managed Extensibility Framework (MEF) - http://channel9.msdn.com/posts/matthijs/Silverlight-4-A-Guided-Tour-of-the-Managed-Extensibility-Framework-MEF/

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >