Search Results

Search found 388 results on 16 pages for 'arnab sen gupta'.

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

  • 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

  • When using Query Syntax in C# "Enumeration yielded no results". How to retrieve output

    - by Shantanu Gupta
    I have created this query to fetch some result from database. Here is my table structure. What exaclty is happening. DtMapGuestDepartment as Table 1 DtDepartment as Table 2 Are being used var dept_list= from map in DtMapGuestDepartment.AsEnumerable() where map.Field<Nullable<long>>("GUEST_ID") == DRowGuestPI.Field<Nullable<long>>("PK_GUEST_ID") join dept in DtDepartment.AsEnumerable() on map.Field<Nullable<long>>("DEPARTMENT_ID") equals dept.Field<Nullable<long>>("DEPARTMENT_ID") select dept.Field<string>("DEPARTMENT_ID"); I am performing this query on DataTables and expect it to return me a datatable. Here I want to select distinct department from Table 1 as well which will be my next quest. Please answer to that also if possible.

    Read the article

  • How to restrict an access to some of the functions at third level in Classes (OOPs)

    - by Shantanu Gupta
    I have created a class say A which has some functions defined as protected. Now Class B inherits A and class C inherits B. Class A has private default constructor and protected parameterized constructor. I want Class B to be able to access all the protected functions defined in Class A but class C can have access on some of the functions only not all the functions and class C is inheriting class B. How can I restrict access to some of the functions of Class A from Class C ? Class A { private A(){} protected A(int ){} } Class B : A {} CLass C:B { }

    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

  • I want to get 2 values returned by my query. How to do, using linq-to-entity

    - by Shantanu Gupta
    var dept_list = (from map in DtMapGuestDepartment.AsEnumerable() where map.Field<Nullable<long>>("GUEST_ID") == DRowGuestPI.Field<Nullable<long>>("PK_GUEST_ID") join dept in DtDepartment.AsEnumerable() on map.Field<Nullable<long>>("DEPARTMENT_ID") equals dept.Field<Nullable<long>>("DEPARTMENT_ID") select new { dept_id=dept.Field<long>("DEPARTMENT_ID") ,dept_name=dept.Field<long>("DEPARTMENT_NAME") }).Distinct(); DataTable dt = new DataTable(); dt.Columns.Add("DEPARTMENT_ID"); dt.Columns.Add("DEPARTMENT_NAME"); foreach (long? dept_ in dept_list) { dt.Rows.Add(dept_[0], dept_[1]); } EDIT In the previous question asked by me. I got an answer like this for single value. What is the difference between the two ? foreach (long? dept in dept_list) { dt.Rows.Add(dept); }

    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

  • Reading bmp file for encrypting and decrypting txt file into it

    - by Shantanu Gupta
    I am trying to read a bmp file in C++(Turbo). But i m not able to print binary stream. I want to encode txt file into it and decrypt it. How can i do this. I read that bmp file header is of 54 byte. But how and where should i append txt file in bmp file. ? I know only Turbo C++, so it would be helpfull for me if u provide solution or suggestion related to topic for the same. int main() { ifstream fr; //reads ofstream fw; // wrrites to file char c; int random; clrscr(); char file[2][100]={"s.bmp","s.txt"}; fr.open(file[0],ios::binary);//file name, mode of open, here input mode i.e. read only if(!fr) cout<<"File can not be opened."; fw.open(file[1],ios::app);//file will be appended if(!fw) cout<<"File can not be opened"; while(!fr) cout<<fr.get(); // error should be here. but not able to find out what error is it fr.close(); fw.close(); getch(); } This code is running fine when i pass txt file in binary mode

    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

  • How to use group by for grouping varchar data.

    - by Shantanu Gupta
    I have a table that contains some data given below pk_map_id preferences ImmediateParent Department_Id -------------------- -------------------- -------------------- -------------------- 20 14 5 1 21 15 5 1 22 16 6 1 23 9 4 2 24 4 3 2 25 24 20 2 26 25 20 2 27 23 13 2 I want to group my records on behalf of department then immediate parent then preferences each seperated by ',' i.e. department Immediate Parent preferences 1 5,6 14,15,16 2 4,3,20,13 9,4,24,25,23 and this table also Immediate parent preferences 5 14,15 6 16 4 9 3 4 20 24,25 13 13 In actual scenario all these are my ids which are to be replaced by their string fields. I am using sql server 2k5

    Read the article

  • When should we use Views, Temporary Tables and Direct Queries ? What are the Performance issues in a

    - by Shantanu Gupta
    I want to know the performance of using Views, Temp Tables and Direct Queries Usage in a Stored Procedure. I have a table that gets created every time when a trigger gets fired. I know this trigger will be fired very rare and only once at the time of setup. Now I have to use that created table from triggers at many places for fetching data and I confirms it that no one make any changes in that table. i.e ReadOnly Table. I have to use this tables data along with multiple tables to join and fetch result for further queries say select * from triggertable By Using temp table select ... into #tx from triggertable join t2 join t3 and so on select a,b, c from #tx --do something select d,e,f from #tx ---do somethign --and so on --around 6-7 queries in a row in a stored procedure. By Using Views create view viewname ( select ... from triggertable join t2 join t3 and so on ) select a,b, c from viewname --do something select d,e,f from viewname ---do somethign --and so on --around 6-7 queries in a row in a stored procedure. This View can be used in other places as well. So I will be creating at database rather than at sp By Using Direct Query select a,b, c from select ... into #tx from triggertable join t2 join t3 join ... --do something select a,b, c from select ... into #tx from triggertable join t2 join t3 join ... --do something . . --and so on --around 6-7 queries in a row in a stored procedure. Now I can create a view/temporary table/ directly query usage in all upcoming queries. What would be the best to use in this case.

    Read the article

  • how to use trigger in Jquery to pass parameter data as well as control (this)

    - by Shantanu Gupta
    I am trying to use same validation funtion for all my controls. But I dont know much in jquery and not been able to pass event handler to the trigger. I want to pass textbox id to my custom function. How can i do this <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#txtFirstName").bind('focusout', function() { $(this).trigger("customblurfocus",[$(this).val(), $(this).val() + " Required !", "Ok !"]); } ); $(this).bind('customblurfocus',function(defaultInputValue,ErrorMessage,ValidMessage) {alert($(this).val()); if($(this).val()=="" || $(this).val()==defaultInputValue) { $(this).val(defaultInputValue); $(this).siblings("span[id*='error']").toggleClass("error_set").text(ErrorMessage).fadeOut(3000); } else { $(this).siblings("span[id*='error']").toggleClass("error_ok").text(ValidMessage).show(1000); } } ); }); </script>

    Read the article

  • Please help, looking for any answer for long time :How to use SqlDataSource Control to work with Dro

    - by Shantanu Gupta
    I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event. <asp:DropDownList ID="ddlCityName" runat="server" DataSourceID="dsCity" DataTextField="CityName" DataValueField="CityID" AutoPostBack="True" OnTextChanged="CityName_OnTextChanged"> </asp:DropDownList> <asp:SqlDataSource ID="dsCity" runat="server" ConnectionString="<%$ ConnectionStrings:GmapConnectionString %>" SelectCommand="SELECT * FROM [vcity]" ></asp:SqlDataSource> Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource. I have four columns in datasource i.e. name, id, address, phno. I want to fetch an address of a person who selects some value from ddl.

    Read the article

  • Am I trying to Implement Multiple Inheritance. How can I do this.

    - by Shantanu Gupta
    I have created a class say A which has some functions defined as protected. Now Class B inherits A and class C inherits B. Class A has private default constructor and protected parameterized constructor. I want Class B to be able to access all the protected functions defined in Class A but class C can have access on some of the functions only not all the functions and class C is inheriting class B. How can I restrict access to some of the functions of Class A from Class C ? EDIT: namespace Db { public Class A { private A(){} protected A(string con){assign this value} protected DataTable getTable(){return Table;} protected Sqlparameters setParameters(){return parameter;} } } namespace Data { public Class B:A { protected B():base("constring"){} protected DataTable output(){return getTable();} protected sqlparameter values(param IDataParameter[] parameter){} } } namespace Bsns { public Class C:B { protected C():base(){} protected DataTable show() {return values(setparameter());} } } EDIT I think what I am trying to do here is Multiple inheritance. Please check. Class A { //suppose 10 functions are declared } Class B:A { //5 functions declared which are using A's function in internal body } Class C:B { //using all functions of B but require only 4 functions of A to be accessible by C. }

    Read the article

  • How to return table name from stored procedure in dataset.

    - by Shantanu Gupta
    I used a dataset to store 15 tables that I need at the time of loading. When i filled all the tables using stored procedure it returns me all the table but name of the table doesn't comes as that of actual table name in a database. It takes all the table with table name as Table1, Table2, Table3... I want them to be with the name as they actually are in table. SELECT PK_GUEST_TYPE, [DESCRIPTION] FROM L_GUEST_TYPE SELECT PK_AGE_GROUP_ID, AGE_GROUP FROM L_AGE_GROUP SELECT PK_COMPANY_ID, COMPANY_NAME FROM M_COMPANY SELECT PK_COUNTRY_ID, COUNTRY FROM L_COUNTRY SELECT PK_EYE_COLOR_ID, [DESCRIPTION] FROM L_EYE_COLOR SELECT PK_GENDER_ID, [DESCRIPTION] FROM L_GENDER SELECT PK_HAIR_COLOR_ID, [DESCRIPTION] FROM L_HAIR_COLOR SELECT PK_STATE_PROVONCE_ID, [DESCRIPTION] FROM L_STATE_PROVINCE SELECT PK_STATUS_ID, [DESCRIPTION] FROM L_STATUS SELECT PK_TITLE_ID, [DESCRIPTION] FROM L_TITLE SELECT PK_TOWER_ID, [DESCRIPTION] FROM M_TOWER SELECT PK_CITY_ID, [DESCRIPTION] FROM L_CITY SELECT PK_REGISTER_TYPE_ID, [DESCRIPTION] FROM L_REGISTER_TYPE Here is my frontend coding to fill dataset. OpenConnection(); adp.Fill(ds); CloseConnection(true);

    Read the article

  • MySQL Throws NullReferenceException in Finalize... How are you coping with this?

    - by Cyril Gupta
    I am using MySQL with the .Net connector on 64 bit Windows. For some reason Mysql is throwing a NullReferenceException in Finalize. This is the problem here and it seems that its due to a bug described here. This bug was reported in 6.22, but I am getting the issue with 6.23 too so apparently it is not fixed. I am using MySQL both with the helper classes, and by instantiating the connection and the Mysqlcommand object. Does anybody have any idea what part of my code do I need to change to fix this issue? Cause even though this is a bug in Mysql this is not universal because I am not getting the problem in my other projects. MySQL bug report has no details on how to reproduce it either. Any suggestions?

    Read the article

  • When should we use private variables and when should we use properties.

    - by Shantanu Gupta
    In most of the cases we usually creates a private variable and its corresponding public properties and uses them for performing our functionalities. Everyone has different approach like some ppl uses properties every where and some uses private variables within a same class as they are private and opens it to be used by external environment by using properties. Suppose I takes a scenario say insertion in a database. I creates some parameters that need to be initialized. I creates 10 private variables and their corresp public properties which are given as private string name; public string Name { get{return name;} set{name=value;} } and so on. In these cases what should be used internally variables or properties. And in those cases like public string Name { get{return name;} set{name=value>5?5:0;} //or any action can be done. this is just an eg. } In such cases what should be done.

    Read the article

  • How to get a column value contained in SqlDataSource to a variable.

    - by Shantanu Gupta
    I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event. <asp:DropDownList ID="ddlCityName" runat="server" DataSourceID="dsCity" DataTextField="CityName" DataValueField="CityID" AutoPostBack="True" OnTextChanged="CityName_OnTextChanged"> </asp:DropDownList> <asp:SqlDataSource ID="dsCity" runat="server" ConnectionString="<%$ ConnectionStrings:GmapConnectionString %>" SelectCommand="SELECT * FROM [vcity]" ></asp:SqlDataSource> Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource. I have four columns in datasource i.e. name, id, address, phno. I want to fetch an address of a person who selects some value from ddl.

    Read the article

  • "select * into table" Will it work for inserting data into existing table

    - by Shantanu Gupta
    I am trying to insert data from one of my existing table into another existing table. Is it possible to insert data into any existing table using select * into query. I think it can be done using union but in that case i need to record all data of my existing table into temporary table, then drop that table and finally than apply union to insert all records into same table eg. select * into #tblExisting from tblExisting drop table tblExisting select * into tblExisting from #tblExisting union tblActualData Here tblExisting is the table where I actually want to store all data tblActualData is the table from where data is to be appended to tblExisting. Is it right method. Do we have some other alternative ?

    Read the article

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