I found a bit of code which im unsure about in this poorly documented project im on. To be honest I havent got a clue what is going here. public void TestMethod(ISystemScriptingInterface system, ScriptEventArgs eventArgs) { var databaseScriptingInterface = system.GetInterface("database") as IDatabaseScriptingInterface; if (databaseScriptingInterface == null) { throw system.GetException(LocalisedSystemText.InternalServerError(), "Database scripting interface was not found", "Test Class", "Running test method", " Scripting.DatabaseInterfaceNotFound"); } if (databaseScriptingInterface != null) { } } Does any one know what is going on or can give me some good reading material to understand this better Cheers.

Member Avatar
Member Avatar
+0 forum 2

Hello, I have a particular set up of cast operators and constructors which is leading to a compile-time ambiguity error. I am wondering if somebody can explain why this is happening and what can be done to fix it. For example, here we have 2 classes: class A { int val; public: A(){val=0;} A(const A& o){val=o.val;} A(int i){val=i;} A&operator=(const A&o){val=o.val;return *this;} A&operator=(int i){val=i;return *this;} operator int(){return val;} }; class B { int val; public: B(int i){val=i;} operator A(){return A(val);} operator double(){return 0.0;} }; They work fine but don't really do anything at all. The purpose of the A operator in …

Member Avatar
Member Avatar
+0 forum 4

Hello good day. Thank you for trying to help. My problem is as follows. A few columns in my table, use a JComboBox as the editor for their cells. Each cell, in a row (via JComboBox) presents the same choices to the user. The user is allowed to choose from the options, just not the same option more than once for that row. That being said what I wish to accopmlish is this: Whenever selections are made from any JComboBox the next cells should present as options the remaining unselected choices. So basically whenever a particular choice is made, I …

Member Avatar
Member Avatar
+0 forum 23

I am new to C and am trying to read the characters in a string serially but I keep getting the error > makes pointer from integer without a cast This is my code void UART1PutChar(char Ch) { //char data; //transmit only if Tx buffer is empty while(U1STAbits.UTXBF ==1); U1TXREG = Ch; } // Send a zero-terminated string to UART 1 void UART1SendStringSerially(char *string) { while(*string) UART1PutChar(*string++); } int main(void) { UART1SendStringSerially('Hello'); } Why do I get such an error? How can this be solved? Thanks

Member Avatar
Member Avatar
+0 forum 2

I understand that when casting a string to a float, php will evaluate from left to right and stop at the first invalid character. So for example, the string "1-23" will cast to a 1. I need to evaluate the entire string though, so that the string "1-23" would not successfully cast. Is this possible?

Member Avatar
Member Avatar
+0 forum 2

I have looked into Cast and Convert, but I cannot find a way to do this. I need to convert four digits into an hour format. For instance, 0800 would become 8:00 or 1530 would become 15:30. I cannot use functions, I'm using a special form of SQL. Any suggestions? Thanks in advance!

Member Avatar
Member Avatar
+0 forum 4

How can I cast a base class to a derived on at runtime. What I am trying to do is the following: I need a system which will hold the subscriptions, where a certain type of message, has an assigned Subscriber. When a message is received, it will bi forwarded to this system, which will do a lookup if there are any subscribers to this kind of message and if so, message is forwarded to subscriber. I have an abstract base class called Response, followed by an abstract layers eg. AFResponse : Response, and then there are the actual (concrete) …

Member Avatar
Member Avatar
+0 forum 1

I just stumbled over this: [ICODE]mysql> select "abc" = 0; +-----------+ | "abc" = 0 | +-----------+ | 1 | +-----------+ 1 row in set, 1 warning (0.06 sec) mysql> show warnings; +---------+------+-----------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------+ | Warning | 1292 | Truncated incorrect DOUBLE value: 'abc' | +---------+------+-----------------------------------------+ 1 row in set (0.06 sec)[/ICODE] What's happening here? Where are the implicit type casts documented?

Member Avatar
Member Avatar
+0 forum 1

Hi I'm looking for an efficient way of converting an array of integers to an array of doubles. Currently I'm doing this: [CODE]int *a = new int[1000]; //And then assign values to the indexes double *b = new double[1000]; for(int i = 0; i < 1000; i++) { b[i] = (double) a[i]; }[/CODE] But this seems extremely inefficient to me, especially if you do this with large arrays over and over again. Isn't there some other way to do the conversion, such as cast or so?

Member Avatar
Member Avatar
+0 forum 5

Hello I am getting the above error message with my program. The line giving the error is marked. What I am trying to do is create a file, (new.ppm) and have it then returned onto stdout. [code=c] FILE *fp; fp = fopen("new.ppm", "w+"); //creates the new file fprintf(fp, "P3\n%d %d\n255\n", harg, warg); while (hcount < harg){ while (wcount < warg){ fprintf(fp, "%d ", cr); fprintf(fp, "%d ", cb); fprintf(fp, "%d ", cg); wcount += 1; } fprintf(fp, "\n"); wcount = 0; hcount += 1; } char buf[1024]; int buflen; while((buflen = read(fp, buf, 1024)) > 0) //this line is throwing …

Member Avatar
Member Avatar
+0 forum 5

Here's an easy one for you experts :P What is casting and parsing? How exactly are they different? After explaining, could anyone possibly tell me how to cast/parse the various types from and to each other? (the types being: int, double, char and String) Also, in which situations would I end up using either one of these? Thanks :D

Member Avatar
Member Avatar
+0 forum 1

I get the following error from running this code. Was wondering if 'i' and 'j' are considered objects. If yes is there any way i could cast them..... How do i write a better for loop for this.... array2D = [[0 for i in range(10)]for j in range(10)] for i in array2D: for j in array2D[0]: array2D[i][j] = 2; Traceback (most recent call last): File "/Users/yasinyaqoobi/Documents/workspace/Python_Hello_World/src/2dArray/__init__.py", line 7, in <module> array2D[i][j] = 2; TypeError: list indices must be integers

Member Avatar
Member Avatar
+0 forum 5

Hi, I'm hoping someone out there has the answer to this question: How does one convert a table column's data type from INT to CHAR/VARCHAR? Background: I'm trialing some ID card software and it uses Access as its backend. It has ODBC capability and I'm able to connect to my website's MySQL db alright and even import a number of columns in my table (DATE, other VARCHAR columns). However, whenever I try to import the column that's INT (a two or three digit number), I get a type mismatch (on the ID card end I've chosen every predefined option they …

Member Avatar
Member Avatar
+0 forum 1

Hi all, In one RTOS, i'm debugging one issue which is, program is crashing one point always when it send a 8-bit value (Lets call it 'Int8 rogue_int')to a function (lets call it 'Infected( Int16 )' ) whose definition is taking that variable as 16-bit variable. Before entering to that last function Infected(..), value for 'rogue_int' is proper but as soon as it enters to Infected(..) fn it is having some junk value and it hits a assert. normally my thinking is casting 8-bit to 16-bit variable should not result any issue but there could not be any other problem …

Member Avatar
Member Avatar
+0 forum 2

Okay, I'm trying to learn C# (coming from c++). I found this code on a tutorial. When I try to compile it I get this error "cannot implicitly convert from 'int' to 'string'" I thought it was supposed to convert it from string to int??? [CODE] int Number; Number = int.Parse(Console.ReadLine()); [/CODE]

Member Avatar
Member Avatar
+0 forum 1

my assignment is to retrieve data from a txt file and output how many tests were input, average of all the tests, and then list the letter grade beside each text what i have so far: [CODE] private StreamReader strRead; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { int[] gradeArray = new int[24]; // array to hold grades string gradeValue = ""; // string to hold current grade; strRead = new StreamReader("Grades.txt"); // streamreader for input file int traverseGradeArray = 0; // index used for gradeArray. int averageGrades = 0; int totalGrades = 0; int numberofGrades …

Member Avatar
Member Avatar
+0 forum 3

Have you ever wanted to meet Neil Armstrong, the first man on the moon? So have I, but we probably never will. However, if you’re free in mid-July and don’t mind traveling to Toronto, you can meet [URL=http://www.geraldmweinberg.com/Site/Home.html] Gerald “Jerry” Weinberg[/URL], the man generally cited as the industry’s first software tester. He’ll be speaking at the [URL=http://www.associationforsoftwaretesting.org/drupal/] Conference of the Association for Software Testing[/URL], aka CAST, a clunky name but a great learning opportunity for people in our business. Conference organizers announced today that due to popular demand for his sold-out July 14 engagement, Jerry will host his full-day tutorial …

Member Avatar
+0 forum 0

The End.