Search Results

Search found 374 results on 15 pages for 'shantanu gupta'.

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

  • Alert on moving to a different page of a grid when user changes contents of textboxes in a Grid

    - by Ashish Gupta
    In a ASP.NET application I have a paging RadGrid which shows up textbox in each row. Outside the grid, there is an OK button to save the content of all the textbox. If user changes text in any one or more of the textbox and without clicking on the "OK" button, tries to move to a different page number (of the grid by clicking on the page number), he should be prompted for confirmation of save or cancel the changes. I am guessing that one can write a Javascript function which would look for any form input control (textbox in my case) and detect changes and If there are changes, would prompt the user. However, I am not sure where I can call this function from? Any suggestion on this or a better way to achieve this would be appreciated. I am using RadGrid but I guess this should be applicable to GridView as well.

    Read the article

  • Validate a string in a table in SQL Server

    - by Ashish Gupta
    I need to check If a column value (string) in SQL server table starts with a small letter and can only contain '_', '-', numbers and alphabets. I know I can use a SQL server CLR function for that. However, I am trying to implement that validation using a scalar UDF and could make very little here...I can use 'NOT LIKE', but I am not sure how to make sure I validate the string irrespective of the order of characters or in other words write a pattern in SQL for this. Am I better off using a SQL CLR function? Any help will be appreciated.. Thanks in advance

    Read the article

  • Hudson XML error-- No module named dom.minidom

    - by Arnab Sen Gupta
    I am trying to send a simple XML file of the format given in http://wiki.hudson-ci.org/display/HUDSON/Monitoring+external+jobs . I was able to send it easily and was getting desired result!! Then I tried to build this XML file using python script and it was giving me the exact file that I wanted without any problem. But when I tried to run this and send it to Hudson, I was getting the error - "No module named dom.minidom" . I checked again by executing in Python IDLE and it ws working fine but when I tried to send it again, I was getting the same error.. plz help..

    Read the article

  • Crystal Report Portuguese language support

    - by Ravi Gupta
    Hi I am using Crystal Reports 10 with IIS Server. I wish to display some of the reports in Portuguese language. How can I configure Crystal Reports to display data in Portuguese ? I guess I will need to download a language pack for this but will it allow word-by-word conversion from English to Portuguese ? Grammatically correct sentences are not currently my concern. Any inputs will be greatly appreciated.

    Read the article

  • Mysqld Crashes immediately on running on Windows 7...?

    - by Cyril Gupta
    I am trying to run MySql 5.1 on Windows 7 Home Premium 64 bit. I have downloaded the MSI installer from the MYSql website and installed it. The installation is successful, but the service does not start. If I try to run MySql manually using the mysqld executable, it crashes immediately on running (error: mysqld.exe has stopped working). Earlier mysql was running on the machine, but I had some problem with it (wasn't executing big queries) and installed it again which somehow broke the program. I had installed it to work as a service which started giving me this isse, and now it won't work even if I don't install it as a service. I have tried removing the mysql folder and re-installing. Is there somewhere else where Mysql saves configuration info or other data? Has anyone else found this problem and solved it? How can I find out why the process is failing to run?

    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

  • os.environ() giving errors while setting for Hudson

    - by Arnab Sen Gupta
    I want a small python script to set the HUDSON_HOME environment variable. When using the shell, I can easily do this using set HUDSON_HOME=http://localhost:8080 But how can I do the same directly through python?? I don't want to do it by passing the command line to os.system().. can os.environ() be of any help?? I had in my script: import os os.environ('HUDSON_HOME')='http://localhost:8080' but it's probably setting it for the subprocss and not the parent shell..any way around this??

    Read the article

  • At what level should security be implemented in a social network web application ?

    - by Rajkumar Gupta
    I am developing a social web application in php/mysql, I would like to hear your advice about what would be a better way to implement security. I am planning something like this:- At the presentation level, I restricting the user to see only those items/content he is eligible to see with the rights he is eligible & at the database level, whenever my data is read/ written or updated I verify that the person has rights to such interactions with that part of data. So for each action there is 2 layers of security one at the view level & another at the database level. Would double checking be much overhead ? ofcourse this handles only with the internal security issues ..

    Read the article

  • how can i change selected value of drop list dynamically

    - by Deepak Gupta
    i want to pick the value from text box and then change the value of dropdown list according to that value <html> <head> <script> function change() { var value = document.getElementById('text').value; document.getElementById("Model").selectedvalue = value } </script> </head> <body> <asp:DropDownList ID="Model" AutoPostBack="false" runat="server" CssClass="styled"> <asp:ListItem Value="None">None</asp:ListItem> <asp:ListItem Value="Enum">Enum</asp:ListItem> <asp:ListItem Value="Sum">Sum</asp:ListItem> <asp:ListItem Value="Multi">Multi</asp:ListItem> <asp:ListItem Value="Xaxis">Xaxis</asp:ListItem> </asp:DropDownList> <input id="text" type="text"/> <input type="button" onclick="change();"/> </body> <html>

    Read the article

  • protobuf-net NOT faster than binary serialization?

    - by Ashish Gupta
    I wrote a program to serialize a 'Person' class using XMLSerializer, BinaryFormatter and ProtoBuf. I thought protobuf-net should be faster than the other two. Protobuf serialization was faster than XMLSerialization but much slower than the binary serialization. Is my understanding incorrect? Please make me understand this. Thank you for the help. Following is the output:- Person got created using protocol buffer in 347 milliseconds Person got created using XML in 1462 milliseconds Person got created using binary in 2 milliseconds Code below using System; using System.Collections.Generic; using System.Linq; using System.Text; using ProtoBuf; using System.IO; using System.Diagnostics; using System.Runtime.Serialization.Formatters.Binary; namespace ProtocolBuffers { class Program { static void Main(string[] args) { string XMLSerializedFileName = "PersonXMLSerialized.xml"; string ProtocolBufferFileName = "PersonProtocalBuffer.bin"; string BinarySerializedFileName = "PersonBinary.bin"; var person = new Person { Id = 12345, Name = "Fred", Address = new Address { Line1 = "Flat 1", Line2 = "The Meadows" } }; Stopwatch watch = Stopwatch.StartNew(); watch.Start(); using (var file = File.Create(ProtocolBufferFileName)) { Serializer.Serialize(file, person); } watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds.ToString()); Console.WriteLine("Person got created using protocol buffer in " + watch.ElapsedMilliseconds.ToString() + " milliseconds " ); watch.Reset(); watch.Start(); System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(person.GetType()); using (TextWriter w = new StreamWriter(XMLSerializedFileName)) { x.Serialize(w, person); } watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds.ToString()); Console.WriteLine("Person got created using XML in " + watch.ElapsedMilliseconds.ToString() + " milliseconds"); watch.Reset(); watch.Start(); using (Stream stream = File.Open(BinarySerializedFileName, FileMode.Create)) { BinaryFormatter bformatter = new BinaryFormatter(); //Console.WriteLine("Writing Employee Information"); bformatter.Serialize(stream, person); } watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds.ToString()); Console.WriteLine("Person got created using binary in " + watch.ElapsedMilliseconds.ToString() + " milliseconds"); Console.ReadLine(); } } [ProtoContract] [Serializable] public class Person { [ProtoMember(1)] public int Id {get;set;} [ProtoMember(2)] public string Name { get; set; } [ProtoMember(3)] public Address Address {get;set;} } [ProtoContract] [Serializable] public class Address { [ProtoMember(1)] public string Line1 {get;set;} [ProtoMember(2)] public string Line2 {get;set;} } }

    Read the article

  • I want to set the AutoCompleteMode property in ApplyCellStyleToEditingControl subroutine

    - by Ranjan Gupta
    Hi, I am creating a DataGridView Column. and it is working well. now I want to customise this column with AutoCompleteMode, and AutoCompleteSource properties to show the customised data. I made the properties for this columns, and these are also working well. but these properties are not working in the "ApplyCellStyleToEditingControl" subroutine. Please help me to use these column properties in the "ApplyCellStyleToEditingControl" subroutine. Public Class DataGridViewDataValueColumn Inherits DataGridViewColumn Dim m_AutoCompleteMode As AutoCompleteMode, _ m_AutoCompleteSource As AutoCompleteSource, _ m_AutoCompleteStringCollection As AutoCompleteStringCollection Public Sub New() MyBase.New(New DataValueCell()) End Sub Public Overrides Property CellTemplate() As DataGridViewCell Get Return MyBase.CellTemplate End Get Set(ByVal value As DataGridViewCell) ' Ensure that the cell used for the template is a DataValueCell. If (value IsNot Nothing) AndAlso _ Not value.GetType().IsAssignableFrom(GetType(DataValueCell)) _ Then Throw New InvalidCastException("Must be a DataValueCell") End If MyBase.CellTemplate = value End Set End Property Region "User Defined Properties" '&*--------------------------------------*&' <Description("Indicates the text completion behaviour of the combo box."), DefaultValue(AutoCompleteMode.None)> _ Public Property AutoCompleteMode() As AutoCompleteMode Get Return m_AutoCompleteMode End Get Set(ByVal value As AutoCompleteMode) m_AutoCompleteMode = value End Set End Property <Description("The source of complete strings used to automatic completion."), DefaultValue(AutoCompleteSource.None)> _ Public Property AutoCompleteSource() As AutoCompleteSource Get Return m_AutoCompleteSource End Get Set(ByVal value As AutoCompleteSource) m_AutoCompleteSource = value End Set End Property <Description("The autocomplete custom source.")> _ Public Property AutoCompleteCustomSource() As AutoCompleteStringCollection Get Return m_AutoCompleteStringCollection End Get Set(ByVal value As AutoCompleteStringCollection) m_AutoCompleteStringCollection = value End Set End Property End Region End Class '&*--------------------------------------*&' Class DataValueCell Inherits DataGridViewTextBoxCell Public Sub New() ' End Sub Public Overrides ReadOnly Property EditType As Type Get Return GetType(PCLDataGridViewTextBoxEditingControl) End Get End Property End Class '&*--------------------------------------*&' '&* Edit DataGridView Columns *&' '&*--------------------------------------*&' Class PCLDataGridViewTextBoxEditingControl Inherits DataGridViewTextBoxEditingControl Public Overrides Function EditingControlWantsInputKey(ByVal keyData As Keys, ByVal dataGridViewWantsInputKey As Boolean) As Boolean Select Case ((keyData And Keys.KeyCode)) Case Keys.Prior, Keys.Next, Keys.End, Keys.Home, Keys.Left, Keys.Up, Keys.Right, Keys.Down, Keys.Delete Return True End Select Return MyBase.EditingControlWantsInputKey(keyData, dataGridViewWantsInputKey) End Function Public Overrides Sub ApplyCellStyleToEditingControl(ByVal dataGridViewCellStyle As DataGridViewCellStyle) With DirectCast(Me, TextBox) '.AutoCompleteMode = DataGridViewDataValueColumn.AutoCompleteMode_Value '.AutoCompleteSource = DataGridViewDataValueColumn.AutoCompleteSource_Value '.AutoCompleteCustomSource = MyBase.AutoCompleteCustomSource End With End Sub End Class

    Read the article

  • Mathematics for AI/Machine learning ?

    - by Ankur Gupta
    I intend to build a simple recommendation systems for fun. I read a little on the net and figured being good at math would enable on to build a good recommendation system. My math skills are not good. I am willing to put considerable efforts and time in learning maths. Can you please tell me what mathematics topics should I cover? Also if any of you folks can point me to some online material to learn from it would be great. I am aware of MIT OCW, book like collective intelligence. Math Topics to cover and from where to read would really help.

    Read the article

  • Weird output of Throwable getMessage()

    - by Ravi Gupta
    Hi I have below pseudo code with throws an exception like this throw new MyException("Bad thing happened","com.stuff.errorCode"); where MyException extends Exception class. So the problem is when I try to get the message from MyException class by calling myEx.getMessage() it returns ???en_US.Bad thing happened??? instead of my original message i.e. Bad thing happened I have checked that MyException class doesn't overrides Throwable class's getMessage() behavior. Below is the how the call passes from MyException.getMessage() to Throwable.getMessage() public MyException(String msg, String sErrorCode){ super(msg); this.sErrorCode = sErrorCode; this.iSeverity = 0; } which then calls public Exception(String message) { super(message); } and finally public Throwable(String message) { fillInStackTrace(); detailMessage = message; } when I do a getMessage on myexception it calls Throwable's getMessage as below public String getMessage() { return detailMessage; } So ideally it should return the original message as I set when throwing the exception. What's the ???en_US thing ?

    Read the article

  • how to run vibrate continuously in iphone?

    - by aman-gupta
    Hi, In my application I m using following coding pattern to vibrate my iPhone device Header File:- AudioServices.h AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); //////////////////////////////////////////////////////////////// My problem is that when I run my application it gets vibrate but only for second but I want that it will vibrate continuously until I will stop it. How it could be possible .Please help me out its urgent Thanks in Advance

    Read the article

  • How to download file from particular url???

    - by greshi gupta
    NSURL * url = @"http://192.168.100.161/UploadWhiteB/wh.txt"; NSData * data = [NSData dataWithContentsOfURL:url]; if (data != nil) { NSLog(@"\nis not nil"); NSString *readdata = [[NSString alloc] initWithContentsOfURL:(NSData *)data ]; I write this code to download a file from given url... but i get an error on line NSData * data = [NSData dataWithContentsOfURL:url]; uncaught exception....so please help me out..

    Read the article

  • iPhone code forUIImageViewControllerPickerSourceTypeCamera

    - by aman-gupta
    - (IBAction)pickAndDecode:(id) sender { UIImagePickerControllerSourceType sourceType; int i = [sender tag]; switch (i) { case 0: sourceType = UIImagePickerControllerSourceTypeCamera; break; case 1: sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; break; case 2: sourceType = UIImagePickerControllerSourceTypePhotoLibrary; break; default: sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; } [self pickAndDecodeFromSource:sourceType]; } - (void) updateToolbar { self.cameraBarItem.enabled = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]; self.savedPhotosBarItem.enabled = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]; self.libraryBarItem.enabled = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]; self.archiveBarItem.enabled = true; self.actionBarItem.enabled = (self.result != nil) && ([self.result actions] != nil) && ([self.result actions].count > 0); } - (void)pickAndDecodeFromSource:(UIImagePickerControllerSourceType) sourceType { [self reset]; // Create the Image Picker if ([UIImagePickerController isSourceTypeAvailable:sourceType]) { UIImagePickerController* picker = [[UIImagePickerController alloc] init]; picker.sourceType = sourceType; picker.delegate = self; picker.allowsImageEditing = YES; // [[NSUserDefaults standardUserDefaults] boolForKey:@"allowEditing"]; // Picker is displayed asynchronously. [self presentModalViewController:picker animated:YES]; } else { NSLog(@"Attempted to pick an image with illegal source type '%d'", sourceType); } } Where I Put this line in my above codes; [picker setShowsCameraControls:FALSE]; please help me so that i can change the real view of iPhone camera according to my view which i have designed

    Read the article

  • Copy constructor with more than one parameter

    - by Ravi Gupta
    I am learning C++ and was reading copy constructor from the C++: The Complete Reference. The books says that It is permissible for a copy constructor to have additional parameters as long as they have default arguments defined for them. However, in all cases the first parameter must be a reference to the object doing the initializing. But I am confused that how we are going to pass those additional parameters? I am sure there should be some way which is not given in the book and which I am unable to figure out. Can anyone help me out? EDIT: Also is it possible to pass these extra parameters in all three cases i.e. ¦ When one object explicitly initializes another, such as in a declaration ¦ When a copy of an object is made to be passed to a function ¦ When a temporary object is generated (most commonly, as a return value)

    Read the article

  • Stable URL of acts_as_taggable plugin in Ruby on Rails

    - by Rakesh Gupta
    Hi, In one of my applications on Ruby on Rails, I am using acts_as_taggable plugin. Coding was doing fine and suddenly it started giving following error. RuntimeError (acts_as_taggable_on_steroids has been moved to github: http://github.com/jviney/acts_as_taggable_on_steroids): app/models/post.rb:2 app/controllers/post_controller.rb:324:in post_scoper' app/controllers/post_controller.rb:221:indefault' C:\MyApp\script\server:3 -e:2:in `load' -e:2 Rendered rescues/_trace (94.0ms) Rendered rescues/_request_and_response (15.0ms) Rendering rescues/layout (internal_server_error) When trying installing the plugin from above URL, it says plugin has been moved. Does anyone have idea, what is the stable URL of acts_as_taggable plugin? Thanks in advance

    Read the article

  • Using Jquery to add items in Listbox from Textbox

    - by Pratik Gupta
    I am stuck somewhere using jquery to append the list box from a text box. here is my jquery $("#btnAddSvc").click(function () { var svc = $("#<%= txtServiceName.ClientID %>").val(); //Its Let you know the textbox's value svc.appendTo("#<%=lstSvcName.ClientID %>"); }); I am using asp.net (c#) to develop my code <asp:Button ID="btnAddSvc" runat="server" Text=">>" Font-Size="Medium" /> <asp:ListBox ID="lstSvcName" runat="server" SelectionMode="Multiple" ToolTip="Selected Service Names" Width="169px"></asp:ListBox> can someone please help as i am not able to get the values in list box.

    Read the article

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