Good day guys! I just want a little help on how to reference a repeater control in a function. Im using c#.net. My code below: private void Load_Childrean_byTypeID(int TypeID, **repeatername reference here**) { SqlDataAdapter mycommand = new SqlDataAdapter("Select Id, FoamType_ChildName, ChildIcon_ClassName, ParentTypeID From tbl_ProductType_Children Where ParentTypeID = " + TypeID, Conn); DataSet ds = new DataSet(); mycommand.Fill(ds); repeatername.DataSource = ds; repeatername.DataBind(); mycommand.Dispose(); ds.Dispose(); } A repeater reference should be put next on the TypeID specified in **bold text**. Thank you!

Member Avatar
Member Avatar
+0 forum 1

I have some doubts concerning some basic C++ concepts, and would be very thankful, if someone would kindly clear the doubts: a) Every variable of a data type occupies a specific amount of memory, like int occupies 2 bytes and so on. So, if I declare a reference variable as, [CODE]int &y = int x;[/CODE] How much memory does the reference variable occupy? b) Suppose I have a structure named "person", like: [CODE]struct person { //Data members... }[/CODE] and I also have a class named "person", in the same program, like: [CODE]class person { //Class members }[/CODE] and then if …

Member Avatar
Member Avatar
+0 forum 17

Hi All, I would greatly appreciate considered recommendations on books pertaining to HTML5, CSS and Javascript, for starters, either as dedicated subject reference or in some combination. If a combintion of these subjects are addressed in a given book then additional subject matter (such as game applications, jQuery, mobile applications, etc.). After being away from the industry for about the last 15 years, I've recently decided to get back into the IT field - first by getting a firm grasp of fundamental website mechanics, design and creation, and then re-acquainting myself with IBM (formerly Lotus) Notes and Domino. My initial …

Member Avatar
Member Avatar
+0 forum 5

why this code not work ?? # include <stdio.h> void get_values(float *r, float *v); float do_calculations(float resistance, float voltage ) ; void display_answer(float current); main() { float resistor; float volts; float current; //explain_program(); get_values(*r, *v); current = do_calculations(resistor, volts); display_answer(current); } void explain_program() { printf("This program calculates the current in amps. \n"); printf("Please enter the value of R in ohms and v in volts .\n"); } void get_values(float *r, float *v) { float resistance; printf("\n\n Input the resistance in ohms = "); scanf("%f", &*r); // scan resistance printf("Input the voltage in volts ="); // scan volts scanf("%f", &*v); //*r = …

Member Avatar
Member Avatar
+0 forum 4

Dim item As String = InputBox("Enter Item ordered", "Place an order") Dim quantity As Integer = InputBox("Enter Quantity odered", "Quantity ordered") Dim price As Integer = InputBox("Enter price", "Price each") Dim item As String = InputBox("Enter Item ordered", "Place an order") Dim WrapCharacter As String WrapCharacter = Chr(13) + Chr(10) If Where <> 0 Then txtSales.Focus() txtSales.SelectionStart = Where - 1 txtSales.SelectionLength = Len(item) Do While txtSales.Text = txtSales.Text & "Item : " & item & vbNewLine & "Quantity : " & InStr(txtSales.Text, quantity) + quantity & vbNewLine & "Price :" & price & vbNewLine & WrapCharacter & vbNewLine Loop …

Member Avatar
Member Avatar
+0 forum 3

I'd like to find an algorithm book that's either meant to be or good to use as a reference. By "reference" I mean that it contains all the basic algorithms (machine-learning algorithms especially) like QuickSort, Logistical Regression, Clustering. Preferably, including both the mathimicatical definition as well as psuedo code, or even real code (preferably in Java, Python, or C++, but any code is better than none). I just want a book that I can crack open whenever I need to implement a certain algorithm. Internet recources on algorithms are suprisingly sparse, especially compared to "regular" programming.

Member Avatar
Member Avatar
+0 forum 4

Hi guys, I have small problem with my example code. Any hint? #include <iostream> using namespace std; class A{ public: int a; A(int i){a = i;} A(const A& rhs) // copy constructor { a = 2; } A(const A&& rhs) // move constructor { a = 3; } }; void print(A a) { cout << a.a << endl; } A createA() { A a(1); return a; } int main(){ A a = createA(); print(a);// This will invoker copy constructor and output is 2 print(createA()); // This should invoke move constructor because this object here is rvalue right? } Output is: …

Member Avatar
Member Avatar
+0 forum 6

Hello, I have another question about dynamically compiled code. I am using the VBCodeProvider class to compile, test, and run "scripts" that users type into my program (Code Below). Public Function Compile(ByVal vbCode As String, ByVal argsString As String) As Object Dim oCodeProvider As VBCodeProvider = New VBCodeProvider ' Obsolete in 2.0 framework ' Dim oICCompiler As ICodeCompiler = oCodeProvider.CreateCompiler Dim oCParams As CompilerParameters = New CompilerParameters Dim oCResults As CompilerResults Dim oAssy As System.Reflection.Assembly Dim oType As Type Try ' Setup the Compiler Parameters ' Add any referenced assemblies oCParams.ReferencedAssemblies.Add("system.dll") oCParams.ReferencedAssemblies.Add("system.xml.dll") oCParams.ReferencedAssemblies.Add("system.data.dll") oCParams.CompilerOptions = "/t:library" oCParams.GenerateInMemory = True ' …

Member Avatar
Member Avatar
+0 forum 5

I keep getting loads of linker errors that probably have something to do with virtual-functions/definitions and/or static class members... I've seen several relevant posts but none of the solutions suggested work, can you see wht the problem is here? My projects consists of 3 files: BALLS.H #include <iostream> using namespace std; class Ball{ //Abstract Class!! protected: //no Balls will be constructed int durability; bool hidden; public: Ball(int dur=0) :durability(dur), hidden(false){} virtual void hit(){} virtual void rest()=0; virtual int get_state() {} }; class Basket : public Ball { public: Basket(int L1) :Ball(L1) { cout<<"New basketball!"<<endl; count++; } void rest(){} int get_state(); …

Member Avatar
Member Avatar
+0 forum 3

I have an array ($arr) of arrays ($ar) in which I want to describe the columns in a report. The salient elements include the column headings and the MYSQL field to use: Array ( "City", 12, 29,"Y", "City_date", "City_Total" ), Array ( "Atmos", 8, 23, "Y", "Atmos_date", "Atmos_Total" ), etc. The headings work well but I do not get the contents of "City_date" or "City_total" using: reset($ar); foreach ($arr as $ar){;but to no avail. $d = $ar[4]; $a = $ar[5]; echo '<td><span class="blue">' . $d . '</span><br><span class="red">' . $a . '</span></td>' ; };, The result is a column with …

Member Avatar
Member Avatar
+0 forum 29

I get error #91 at line 114 (Object reference not set to an instance of an object). What do I need to do to correct that. (I get the error either pre-declaring X or as it is now) Thanks Dim iterAAA As Single = 1 54: 55: Dim arraydciP(3) As String Dim quantosDCIa1nosP As Single 59: Dim quantosDCIa2nosP As Single 60: Dim quantosDCIa3nosP As Single 61: Dim quantosDCIa4nosP As Single 62: 72: Dim arrayoa(3) As Object 73: arrayoa(0) = oa1 74: arrayoa(1) = oa2 75: arrayoa(2) = oa3 76: arrayoa(3) = oa4 77: Dim arrayop(3) As Object 78: arrayop(0) = …

Member Avatar
Member Avatar
+0 forum 1

I don't know if what I would like to accomplish is possible in VB, but here it is. Lets say my program creates a set of labels at run time. These labels will be named Label_n (n being an index value to uniquely identify the object). Later in my program, I would like to set the text of one of these labels, say Label_4. Is there a way to add a variable as part of another variables reference? I invision this similarly to concatenation like "Label_" + index Thank you in advance for any help or other suggestions.

Member Avatar
Member Avatar
+0 forum 2

Hi guys, I am confused on how can I access a same class reference object , that is created in class ReadInoiceFile, and be accessed in ReadErrorFile. To be more specific: I have a class called Transaction And then I have a class called ReadInvoiceFile. And finally I have a class called ReadErrorFile. So if I create a reference object of Transaction in ReadInvoiceFile and use the mutator method setOrderNumber to set a value of a variable called OrderNumber, how can I get access to that value in class ReadErrorFile. Because if I create a reference object of Transacton in …

Member Avatar
Member Avatar
+0 forum 3

Hi I have a set of Checkboxes each with a Textbox next it to. I have the following code, which is meant to loop through each CheckBoxe and if checked if gets the text contained in the textbox, these are linked through the tag of the checkbox, i have used it before and it worked fine but this time i am getting the following error: Null Reference Exception was unhandled Object reference not set to an instance of an object. I have checked by simply getting get the tag and the value of the linked textbox and both are populating …

Member Avatar
Member Avatar
+0 forum 7

i am a beginner. i need online tutorial for shell scripting. there are many on the web.. which one to choose??

Member Avatar
Member Avatar
+0 forum 2

i have a problem when updating database. i need to update stock value in other table and count it and update to another table again. here the code : 'in every row on 'SalesDetailBindingSource' For Each SalesDetailData In SalesDetailBindingSource MsgBox("SalesDetailData : " & SalesDetailBindingSource.Count) 'dim use to take parameter Dim SalesDetailDataRow = CType(CType(SalesDetailData, DataRowView).Row, myDataSet.SalesDetailRow) Dim paramTransactionNumber = TransactionNumberTextBox.Text 'parameter need : (paramProductId) Dim paramProductId = SalesDetailDataRow.ProductId 'row to find in table 'SalesDetail' Dim SalesDetailRow As myDataSet.SalesDetailRow SalesDetailRow = myDataSet.SalesDetail.FindByTransactionNumberProductId(paramTransactionNumber, paramProductId) 'in every row found For Each SalesDetailRowToFind In SalesDetailRow.Table.Rows 'here is the problem (i think) 'update to 'Stock' table …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to make a program for my computer science class and it requires that I run output to the console as well as to a file. I'm looking for a way to intialize a string at the beginning of the program and pass the variable by reference to my functions. The functions will then append strings to the intialized variable. I need to be able to also set precision and justification for floating point variables that will be appended to the string. I am working with stringstream right now but every time I return the output string that I …

Member Avatar
Member Avatar
+0 forum 2

Hello, When i compile i get theses undefiend reference to extern lobal variable. In my code, i try to do an file that define it and extern it on SystemeBataille.cpp call th definitor on main.cpp but same error. If i place my extern on an specific function exemple SystemeBataille::placeExternHere i get an not declared error. First question: Do my file for defined variables is useful and do something wrong? Second Question: Do as a beginner i'm better to place all in same file with one and only header with variables as protected? and Thirth Question: There an way for define …

Member Avatar
Member Avatar
+0 forum 7

double & val = 66.6; //illegal const double & val = 66.6; //legal I was just doing some demo programs and came through the above concept but not able to identify what exactly the need of the above concept . what magic exactly const is doing in the second case ? can anyone please let me know where exactly we can use this concept in real time programming

Member Avatar
Member Avatar
+0 forum 3

Hi all, To begin, I'm not certain this is the proper place to start this question, but I believe this to be a linux-linker related error rather than a code based one. I've also searched far and wide for a solution online, but others have solved the problem simply include -lblob in the build which I have already done without success. I'm using cvblobslib with openCV, and as per their instructions I've compiled their code to create libblob.a. I've copied this into /usr/local/lib and executed 'sudo ldconfig'. This should have registered the library. Here are the relevent snippets from the …

Member Avatar
Member Avatar
+0 forum 1

I have two forms that share data between eachother. 1. In Designer view of Form2 I establish a public variable. public bool isMyFormValid 2. When I attempt to access the variable in Form1 like this... if (Form2.isMyFormValid = true) { //do this} C Sharp no likey... I get this message: Error 1 An object reference is required for the non-static field, method, or property 'WindowsFormsApplication1.Form2.isMyFormValid' C:\Users\tthompso\documents\visual studio 2010\Projects\practice\practice\Form1.cs 89 23 practice Clearly there is a basic principal I'm not understanding. Can someone point me to a referece that explains this concept or provide a helpful example?

Member Avatar
Member Avatar
+0 forum 3

hi i am trying to build an application coded in C# and i has using MSFileIO = Microsoft.VisualBasic.FileIO; and giving an error "Error 1 The type or namespace name 'FileIO' does not exist in the namespace 'Microsoft.VisualBasic' (are you missing an assembly reference?) UZipDotNet " how do i add the assembly refenence, ? where can i download it from appreciate a reply thanks

Member Avatar
Member Avatar
+0 forum 1

Button1.DoDragDrop(BackgroundImage, DragDropEffects.None) Throws an error ' Object reference not set to an instance of an object. ' First time I've used DoDragDrop, and first time with 2012 :)

Member Avatar
+0 forum 0

class Account { Long accNum, pwd} public class Banker { public static void main(String r[]) { new Banker().go(); // do more stuff } void go() { Account a1 = new Account(); a1.accNum = new Long("1024"); Account a2 = a1; Account a3 = a2; a3.pwd = a1.accNum.longValue(); a2.pwd = 4455L; } } It says in solution when line 5, "//do more stuff" is reached, four objects are eligible for GC. Three I know is Banker(), Account() and Long("1024"). My doubt is which is the fourth one? It says in solution that "Account object has two *Long* objects associated with it". So …

Member Avatar
Member Avatar
+0 forum 2

I am trying to implement a function sameMonth from a class to compare two user entered months. My class is declared in a header file "Date.h": #include <iostream> using namespace std; class Date { private: string month; int day; int year; public: Date(); Date(string aMonth, int aDay, int aYear); void setMonth(string month); void setDay(int aDay); void setYear(int aYear); string getMonth(); int getDay(); int getYear(); void printDate(); bool sameMonth(string aMonth, string aMonth2); }; The function sameMonth itself exists in another file "Date.cpp" bool sameMonth(string aMonth, string aMonth2) { if (aMonth == aMonth2) { cout << "The two months entered are the …

Member Avatar
Member Avatar
+0 forum 1

# convert2.py # PPython Monty # Lab 2 Ch 2, PE 4 # A program to convert temperatures from Celsius to Fahrenheit and # vice versa def main(): # description of program print("This program converts Celsius temperatures to Fahrenheit and") print("vice versa.") conversion = ("C") n = eval(input("How many temperatures would you like converted?: ")) for i in range(n): conversion = input("Enter 'F' to convert to Fahrenheit, 'C' to convert to Celsius or a number: ") if conversion == ("F"): F = 9/5 * C + 32 elif conversion == "C": C = (F - 32) * 5/9 else: C …

Member Avatar
Member Avatar
+0 forum 8

Given: Sour extends Blue extends Pan `Pan p4 = new Sour();` Then set of 6 new statements given and asked to choose which ones will compile. They are: 1. `Pan p5 = p4;` 2. `Pan p6 = (Blue)p4;` 3. `Blue b2 = (Blue)b4;` 4. `Blue b3 = (Sour)p4;` 5. `Sour s1 = (Blue)p4;` 6. `Sour s2 = (Sour)p4;` Answer: 5th one won't compile. Rest all will compile and run without exception. Doubt: As a beginner I have understood that LHS should be usually a super class and **RHS should be subclass if downcast not required** like shown in original statement …

Member Avatar
Member Avatar
+0 forum 6

Compiles fine. But at runtime it gives ClassCastException. My doubt is that why is it so even though st which is of type Sample1 gets casted to Sample2 and generates exception even though Sample2 IS-A Sample1.

Member Avatar
Member Avatar
+0 forum 4

I am trying to use function reference, to return values from an array inside an function. I need to echo info to 8 different places on a page, and was trying to do this by using a refernce. But havent much exp. in that, so as of now, I am able to only reference the 2 first items in the array, and echo them out in their divs. I get errors when I try to reference any higher indexes: This is the function, getting the data: function &default_main_data( $con ) { // Default til main divs når siden indlæses: $sql …

Member Avatar
Member Avatar
+0 forum 2

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick frmDisplayLockerInfo.Show() frmDisplayLockerInfo.TextBox2.ReadOnly = False frmDisplayLockerInfo.TextBox3.ReadOnly = False frmDisplayLockerInfo.TextBox4.ReadOnly = False frmDisplayLockerInfo.TextBox5.ReadOnly = False frmDisplayLockerInfo.TextBox6.ReadOnly = False frmDisplayLockerInfo.TextBox7.ReadOnly = False frmDisplayLockerInfo.TextBox8.ReadOnly = False frmDisplayLockerInfo.TextBox9.ReadOnly = False frmDisplayLockerInfo.TextBox10.ReadOnly = False frmDisplayLockerInfo.TextBox11.ReadOnly = False frmDisplayLockerInfo.TextBox12.ReadOnly = False frmDisplayLockerInfo.TextBox13.ReadOnly = False frmDisplayLockerInfo.TextBox15.ReadOnly = False frmDisplayLockerInfo.TextBox14.ReadOnly = False Dim i As Integer Dim ds As New DataSet i = DataGridView1.CurrentRow.Index Label1.Text = i frmDisplayLockerInfo.TextBox1.Text = DataGridView1.Item(0, i).Value frmDisplayLockerInfo.TextBox13.Text = DataGridView1.Item(1, i).Value frmDisplayLockerInfo.TextBox15.Text = DataGridView1.Item(2, i).Value frmDisplayLockerInfo.TextBox12.Text = DataGridView1.Item(3, i).Value frmDisplayLockerInfo.TextBox2.Text = DataGridView1.Item(4, i).Value frmDisplayLockerInfo.TextBox3.Text = DataGridView1.Item(5, i).Value 'Dim DS As New DataSet 'If …

Member Avatar
Member Avatar
+0 forum 5

The End.