Thursday, 3 October 2013

'xmlrpclib.Fault: Request contains to few param' error when using ldtp

'xmlrpclib.Fault: Request contains to few param' error when using ldtp

I've been trying to use the Windows implementation of LDTP (Cobra) for
testing a stand-alone application within Python. It seems to work fine at
first, albeit running slow most of the time. For example I was able to
select menu items:
selectmenuitem('Sample App','File;New')
However, when I tried to execute any of the following lines:
waittillguiexist('Sample App', 'btnOK')
rightclick('Sample App','tblcBRANCH')
I get the following error in Python:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build\bdist.win-amd64\egg\ldtp\client.py", line 69, in __call__
File "C:\Python27\lib\xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "build\bdist.win-amd64\egg\ldtp\client.py", line 186, in request
xmlrpclib.Fault: <Fault 0: 'Request contains too few param elements based on
method signature.'>
I assume that I may still encounter this error with other functions. Are
there any problems with my installation of LDTP? Any help is very much
appreciated.

Wednesday, 2 October 2013

SVN TO GIT Convert

SVN TO GIT Convert

Just want to how can I convert the below SVN Command into GIT
ssh user@server svn info svn+ssh://svn/TPTDev/MyProject/trunk

Xcode 5 iOS7 Storyboard Examples

Xcode 5 iOS7 Storyboard Examples

I am fairly new to Xcode/iOS.Objective C. Writing a new iPad app and I
want to use Storyboards. For the life of me I cannot find any tutorials or
examples of Storyboards in Xcode 5/iOS7. It seems Storyboards have changed
quite a bit.
Any pointers to where to begin?

How to show money format in C#

How to show money format in C#

Hi I am having a problem in displaying the amount using this kind of
format: 0,000.00 . I am using a grid view and data reader to show the
amount from mySQL Database with Decimal as my datatype, my output only
shows 0000.00
Can you help me how to resolve this problem? Thank You.
private void DisplayOrderDetails(int nOrderNo)
{
OpenConnection();
SqlCommand cmdSelect = new SqlCommand();
cmdSelect.Connection = cn;
cmdSelect.CommandType = CommandType.Text;
cmdSelect.Transaction = trnOrder;
cmdSelect.CommandText =
"SELECT OrderDetailNo, OrderNo, PackagingOutside,
Quantity, Unit, ProductNo, ProductName, " +
"ProductSize, PackagingInside, " +
"SellingDiscount1, SellingDiscount2, SellingDiscount3,
SellingDiscount4, " +
"SellingPrice, Amount FROM OrderDetails WHERE OrderNo = '"
+ nOrderNo + "'";
SqlDataAdapter daDetail = new SqlDataAdapter();
daDetail.SelectCommand = cmdSelect;
DataSet ds = new DataSet();
daDetail.Fill(ds, "OrderDetails");
grdDetails.DataSource = null;
grdDetails.DataSource = ds.Tables["OrderDetails"];
DisplayTotal();
}
private void DisplayTotal()
{
double dTotal = 0;
//for encountering errors in the future
try
{
for (int nRow = 0;
nRow <= dsDetail.Tables["OrderDetails"].Rows.Count - 1;
nRow++)
{
dTotal = dTotal +
Convert.ToDouble(dsDetail.Tables["OrderDetails"].Rows[nRow]["Amount"].ToString());
}
}
catch //(Exception ex)
{
//MessageBox.Show(ex.Message);
}
lblTotal.Text = String.Format("{0:#,###,##0.00}", dTotal);
}

How can I launch an activity from a location on the screen, like on the home screen or in recent apps?

How can I launch an activity from a location on the screen, like on the
home screen or in recent apps?

I want to create a "maximizing" effect from a dialog into my full
activity, so I want the opening animation to show the activity expanding
from a box to full size.
The stock launcher has done this this since Jelly Bean (pressing an app
shortcut will zoom into the application from that icon's location and the
Recent Apps menu has done this since ICS.

Tuesday, 1 October 2013

Extern variable has different values in different C files

Extern variable has different values in different C files

I'm trying to use a shared variable in multi C files. So, I write a
program to use its value:
In the path: sonnh\epan\dissectors\socket_sonnh.h , I defined a extern
variable: extern int ServerSocket;
In the path: sonnh\tshark.c , after #include
<epan/dissectors/socket_sonnh.h> I create the init value ServerSocket =
socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
In the path: sonnh\epan\dissectors\packet-camel.c, after #include
"socket_sonnh.h" I want to use the value of ServerSocket by command i =
send(ServerSocket, cSendBuff, 20, 0);
The flow of code is: after creation of ServerSocket in tshark.c --> (call
func in other file) --> (somewhere I don't know) --> call func in
packet-camel.c to send socket. I know this because i check the log.
But actually, I check the value of ServerSocket at the top and bottom of
tshark.c, it is always 336, but the value of this in packet-camel.c is
always 0. i think it is extern variable , so it keeps its value while
running in different files but in this case, i cannot see the value of
ServerSocket being the same with the value of 336 as seen in tshark.c.
Could you please help me to find out why and how can I solve this problem
to have the value of ServerSocket in packket-camel.c (using shared
variable). Thank you so much.

For a 2nd order linear ODE,find the interval where some non-trivial solutions remain bounded and some become unbounded

For a 2nd order linear ODE,find the interval where some non-trivial
solutions remain bounded and some become unbounded

$$y^{''}+(2\alpha-3)y^{'}+\alpha(\alpha-3)y = 0$$
Determine all values of $\alpha$, if any, for which some non-trivial
solutions remain bounded and some become unbounded as $t \rightarrow
\infty$.
The general solution I got is
$$y(t) = C_1e^{(3-\alpha)t}+C_2e^{-at}$$
And I think the interval is $(-\infty,3]$, but this is not the correct
answer. Can anyone help me?

How to enable log messages during boot process

How to enable log messages during boot process

I'm using Linaro Raring Ubuntu for Cubieboard A20.
How can I enable the log messages in boot process?
I've already read this post:
How to enable boot messages to be printed on screen during boot up?
But I don't have grub, it's a SDCARD boot with a DOS partition and .scr,
.bin files and uDev.txt file.

How to solve this question(set cardinality)?

How to solve this question(set cardinality)?


about the cardinality and power set, how to find the bijection?