Anytime I use 'script table as' - 'Insert To' (or other command), the script generated automatically places the database name in the script. Such as:
INSERT INTO [DatabaseName].[dbo].[tblToBeInserted] ...
While not a huge problem to just delete it, it has slipped by a few times and the script breaks if run on a different server with a different database name but has the same schema. (Such as running on [DatabaseName.Test])
Is there an option I can change, or can I modify the output in any way to remove this?
My test page is processed if believe to trace in 46 ms, while 11 of them I am doing this
20:53:06.111597 system.db.CDbConnection Opening DB connection
20:53:06.118046 system.db.CDbCommand Querying SQL: SHOW COLUMNS FROM `questions`
20:53:06.122476 system.db.CDbCommand Querying SQL: SHOW CREATE TABLE `questions`
Is this obligatory?
I need to generate random integer between 1-n (where n is a positive whole number) to use for a unit test. I don't need something overly complicated to ensure true randomnesses - just an old fashioned random number.
How would I do that?
I need to know if there is some way to replace any string as @ or * or ? or & without to put the "\" before it
Example
perl -pe 'next if /^#/; s/\@d\&/new_value/ if /param5/' test
in this example need to replace the @d& with new_value
but I need to put the "\" before @ or &
can be other way without to put the "\" because I have random char that can be in the old value.
Hi,
I have stored procedure that takes input parameter of table type.
procedure test( name samptable type);
My table has the structure like
table:
samptable(
name chracter varying;
address text[];
)
So how shoul i pass the values to the function to fill the table.
This is my SQL:
SELECT `tbl`.*, 123 AS `test` FROM `tbl` GROUP BY `test`
It works when I run it directly in MySQL. But PDO says:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'test' in 'field list'
Why so? How to cure this problem? I'm using Zend_Db.
I am trying to set the class for an intent to the address listed in a string value, so that I can launch a given activity. The string is composed dynamically during runtime.
Is there anyway to make something like the code below run:
String target=com.test.activity1.class;
Intent intent=new intent();
intent.setClass(this, target);
Thanks
I'm totally blocked on this.
See this pastie for sample code: http://pastie.org/990040
The first test will fail.
The user model validates an associated address model, but is only supposed to do it if a flag is true. In practice it does it all the time.
What is going on?
Can you load a binary file onto an iPhone using xcode? We are an OEM that needs to QA test an application from a third party developer that owns the source code. They only provide us with the binary.
Hy i have to test if a string begins with 00 or with +
Say i have the string 0090 or +41 if the string begins with 0090 return true, elseif string begins with +90 replace the + with 00 else return false
The last two digits can be from 0-9
How do i do that in php?
I hope i could explain my question clear?
Assuming a very simple program that:
-ask a name.
-store the name in a variable.
-display the variable content on the screen.
It's so simple that is the first thing that one learns.
But my problem is that I don't know how to do the same thing if I enter the name using japanese characters.
So, if you know how to do this in C++, please show me an example (that I can compile and test)
Thanks.
I'm trying to avoid using an in memory database for testing (though I might have to do this if the following is impossible). I'm using NHibernate 3.0 with LINQ. I'd like to be able to mock session.Query<T>() to return some dummy values but I can't since it's an extension method and these are pretty much impossible to test.
Does anyone have any suggestions (other than using an in memory database) for testing session queries with LINQ?
I created podcast rss feed - http://topdj-test.com.ua/podcast/audio-files/12/3/
And I set up "<image>" and "<itunes:image>" tags. But when I put this feed to iTunes, the picture of podcast wasn't shown in iTunes in artwork section.
What have I done wrong?
I have the following simple code:
ofstream output("test");
output << 'a';
When I do an octal dump of the file, I get this:
0000000 000141
0000001
I can see that 000141 (in base 8) is 8 bits wide and 0000001 is probably EOF.
What is the first byte of all 0's and why is it there? I know it is null is ascii
but what is its purpose?
I'm trying to use animate function to change the height and opacity for a DIV. The div has a image background in CSS, it works fine on Firefox and Safari, but when i test it on IE the background is being removed. This is my code:
if (jQuery.support.opacity) {
jQuery('#list_box').animate({opacity: '1',height: '300px',top: newTop},{duration: 300});
} else {
jQuery('#list_box').animate({filter: 'alpha(opacity=100)',height: '300px',top: newTop},{duration: 300});
}
How can i fix it?
I need a way to make sure my script won't block the viewed page,
if the server serving the script is down (port 80 is blocked for some reason).
Currently when I test it and take down the server (Apache), or close the firewall,
I see in the browser that it is trying to load the resource (script in that case), without success for long seconds, until it aborts.
Is there a nice way to get past this issue?
Is there any unit testing framework for C like JUnit and Nunit for java and .NET?
Or how do we test a piece of code written in C for different scenarios?
Thanks in advance......
I'm looking for a python project to use as example to learning python.
The project should have these features:
is almost fully unit tested
use consistently the code convention recommended by PEP 8
it's elements are almost fully documented
Extra point features are:
building, assembling, and release automation
EDIT:
The Question is too generic. I prepared a more specific question about the unit-test part.
I want to get better at JQuery, but I don't know what type of application I should make to test my skills. What would you suggest that would not be too hard so I would get frustrated as a beginner.
Any help is appreciated.
Thanks!
(sorry if I sound like a noob, by the way =P)
I'm using maven to build the project and compile failed because I put class Test2 in Test.java,
but is it because of maven or simply because java itself doesn't support this?
BTW,how can I open a maven project with eclipse?
I have a function, for example
function test(p1:int=7,p2:Boolean=true,p3:uint=0xffff00,p4:Number=55.5)
{
//instructions
}
How to change only p4, for example, and parameters p1,p3,p3 was still default?
Next time I want to change for example only p2, and parameters p1,p3,p4 was still default?
etc.
sorry, im sure this is asked a bunch, but i couldnt find it.
in myModule.py:
from myModule.subModule import myClass
i am working on myClass, and want to stay in my ipython session and test it. reload(myModule) doesnt re-compile myClass.
how can i do this?