Theres a firefox add on i would like to edit. I never made a plugin before and have looked at one before. Is there a tutorial or something on how to -edit- one? I do not know how to test the add on and ext
By default during the build process maven is removing the empty directories.
Do you know if a parameter can be specified in the pom to instruct maven to include empty directories in the generated target/test-classes folder?
I'd like to provide a browser page to help non-techies run the various tests I've created using the standard django test framework.
The ideal would be for a way to display all the tests found for an application with tick boxes against each one, so the user could choose to run all tests or just a selection.
Output would be displayed in a window/frame for review.
Anyone know of such a thing?
I'm trying to use a function in assembly in a C project, the function is supposed to call a libc function let's say printf() but I keep getting a segmentation fault.
In the .c file I have the declaration of the function let's say
int do_shit_in_asm()
In the .asm file I have
.extern printf
.section .data
printtext:
.ascii "test"
.section .text
.global do_shit_in_asm
.type do_shit_in_asm, @function
do_shit_in_asm:
pushl %ebp
movl %esp, %ebp
push printtext
call printf
movl %ebp, %esp
pop %ebp
ret
Any pointers would be appreciated.
as func.asm -o func.o
gcc prog.c func.o -o prog
Unfortunately, Java has no syntax for multi-line string literals. No problem if the IDE makes it easy to work with constructs like
String x = "CREATE TABLE TEST ( \n"
+ "A INTEGER NOT NULL PRIMARY KEY, \n"
...
What is the fastest way to paste a multi-line String from the clipboard into Java source using Eclipse (in a way that it automagically creates code like the above).
Hello there,
I am using C and my knowledge is very basic.
I want to scan a file and get the contents after the first or second line only ...
I tried :
fscanf(pointer,"\n",&(*struct).test[i][j]);
But this syntax simply starts from the first line =\
How is this possible ?
Thanks.
I'm trying to use regular expression to extract the comments in the heading of a file.
For example, the source code may look like:
//This is an example file.
//Please help me.
#include "test.h"
int main() //main function
{
...
}
What I want to extract from the code are the first two lines, i.e.
//This is an example file.
//Please help me.
Any idea?
I have a web app that is using the 3.5 framework. I wanted to know how can I detect what webhost is rendering the page.
If the server is localhost, then send email notification to [email protected]
If the server is QA, then send email to [email protected]
Thanks
I'd to use DW cs 4 but before to buy I want to test javascript code hints.
However that feature doesn't work at all.
I have an external .js library and then into an html file I load it
but when I type functions or object by name nothing happen.
Any idea?
I'm using Hibernate annotations and have a VERY basic data object:
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class State implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
private String stateCode;
private String stateFullName;
public String getStateCode() {
return stateCode;
}
public void setStateCode(String stateCode) {
this.stateCode = stateCode;
}
public String getStateFullName() {
return stateFullName;
}
public void setStateFullName(String stateFullName) {
this.stateFullName = stateFullName;
}
}
and am trying to run the following test case:
public void testCreateState(){
Session s = HibernateUtil.getSessionFactory().getCurrentSession();
Transaction t = s.beginTransaction();
State state = new State();
state.setStateCode("NE");
state.setStateFullName("Nebraska");
s.save(s);
t.commit();
}
and get an
org.hibernate.MappingException: Unknown entity: $Proxy2
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:628)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1366)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
....
I haven't been able to find anything referencing the $Proxy part of the error - and am at a loss.. Any pointers to what I'm missing would be greatly appreciated.
hibernate.cfg.xml
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:hsql://localhost/xdb</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="current_session_context_class">thread</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">update</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<mapping class="com.test.domain.State"/>
in HibernateUtil.java
public static SessionFactory getSessionFactory(boolean testing ) {
if ( sessionFactory == null ){
try {
String configPath = HIBERNATE_CFG;
AnnotationConfiguration config = new AnnotationConfiguration();
config.configure(configPath);
sessionFactory = config.buildSessionFactory();
} catch (Exception e){
e.printStackTrace();
throw new ExceptionInInitializerError(e);
}
}
return sessionFactory;
}
I don't normally use VB, and even less vba for excel, but I'm writing a function inside a macro and seem to not understand even the basics of creating a function
For example
Public Function test() As Integer
return 1
End Function
This gives a compile error.
This is profoundly stupid, but how do I make a function return an integer in vba?
Hi, I have SharePoint setup, and for a test I added a Task List, added a few columns, and tested it out. I wanted to modify the task list task page, not the task list page. I can edit the task list page, but I cannot edit the task list task page. I am missing the Edit Page button from site actions on that page. How can I edit the page of the actual task? Thanks.
Hello :)
I need to test a piece of code which only seems to fail on Windows XP RTM. Unfortunately, all my disks came slipstreamed with SP2 on-disk. Is there any way to install an RTM install using my SP2 CD and key?
Billy3
PS: Not sure if this belongs on SU or not -- please vote it over there if you think so.
In my Excel sheet with column Changeset I am getting the changeset like:
C:\ccviews\hgdasdff-9302\dfcsz\ahgrt\kjhssl\ASGHLS@@\main\ajsdkljlat\hahdasdhfk\1\test.txt\sub\hsdaklfl\3
I need to use split function in a Perl script so that there will be two ouput (input as the above string)
the part before @@ (e.g-here C:\ccviews\hgdasdff-9302\dfcsz\ahgrt\kjhssl\ASGHLS)
the last character of the string (e.g-here 3)
I try all methods but in my google map on the marker doesn't work events, I try enable events and write (clickable: true), but it did not help, in test server working good, but on phpfox marker not clickable, help me please correct it
go to it http://iguansystems.com/phpfoxdev/index.php?do=/pages/24/quickstart/step2/ link
login - [email protected], and pass- tryuser
in center frontend right at "Primary Venue" have "Can't find venue? Add New" click on "Add New" and window with a map open
I am creating a kiosk application and I want to ensure it is always, no matter what, on top of other Windows applications and the Windows task bar.
I am already blocking Windows keyboard commands (alt-tab, etc) but there are still situations that could cause an application to launch and steal the screen.
Is it possible to hook into Windows from .NET and continually test whether the application has focus and is on top, and if not then give it focus and make it on top?
same as in title? I have a test server with mentioned OS and my app is .net 3.5 based. I do want to know if win 2008 r2 comes with service pack 1 for .net 3.5 from the box. And does it come with .net 3.5 sp1 family update as WELL, since after I downloaded the update, the installer says I do not have software required to update. Could some win 2008 guru perhaps explain it to me?
thanks
luke
When a test project is craeted two other files are also created.
Suppose My Project Name is TestProject1:
Folder: TestProject1,
LocalTestRun.testrunconfig,
TestProject1.sln,
TestProject1.suo,
TestProject1.vsmdi
And one more folder named: TestResults
My requirement is i have many project and folders in solution and wanted to move the .vsmdi file and .tesrunconfig file and testrun folder to my specified location.
Can i do this, if yes how can i do it.
I have an XML file located at a location such as
http://example.com/test.xml
I'm trying to parse the XML file to use it in my program with xPath like this but it is not working.
Document doc = builder.parse(new File(url));
How can I get the XML file?
First time using "JSON" and I've just been working away at my dissertation and I'm integrating a few features from the steam API.. now I'm a little bit confused as to how to create arrays.
function test_steamAPI()
{
$api = ('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.get_Steam_api().'&steamids=76561197960435530');
$test = decode_url($api);
var_dump($test['response']['players'][0]['personaname']['steamid']);
}
//Function to decode and return the data.
function decode_url($url)
{
$decodeURL = $url;
$data = file_get_contents($url);
$data_output = json_decode($data, true);
return $data_output;
}
So ea I've wrote a simple method to decode Json as I'll be doing a fair bit..
But just wondering the best way to print out arrays..
I can't for the life of me get it to print more than 1 element without it retunring an error e.g. Warning: Illegal string offset 'steamid' in /opt/lampp/htdocs/lan/lan-includes/scripts/class.steam.php on line 48
string(1) "R"
So I can print one element, and if I add another it returns errors.
EDIT -- Thanks for help,
So this was my solution:
function test_steamAPI()
{
$api = ('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.get_Steam_api().'&steamids=76561197960435530,76561197960435530');
$data = decode_url($api);
foreach($data ['response']['players'] as $player)
{
echo "Steam id:" . $player['steamid'] . "\n";
echo "Community visibility :" . $player['communityvisibilitystate'] . "\n";
echo "Player profile" . $player['profileurl'] ."\n";
}
}
//Function to decode and return the data.
function decode_url($url)
{
$decodeURL = $url;
$json = file_get_contents($decodeURL);
$data_output = json_decode($json, true);
return $data_output;
}
Worked this out by taking a look at the data.. and a couple json examples, this returns an array based on the Steam API URL (It works for multiple queries.... just FYI) and you can insert loops inside for items etc.. (if anyone searches for this).
I have tried using the My.Computer.Network.DownloadFile method but unfortunately it is slow.
Executing the simple command below takes ~5-10 secs, which I would say is a lot longer than expected for downloading a 9 kb file.
`My.Computer.Network.DownloadFile("http://www.google.dk", "j:\temp\test.html")`
I am connecting via a high-speed connection (10GB) from a Win7 machine. Do anyone know of any explanations for this behavior?
Hope that you can help me out with this.
Kristoffer
I have to build OEM versions of a COM library (DLL).
Does anyone know a tool (ressource hacker) which may replace some of my interface guids after build time?
I just want to build and test one DLL and generate the OEM versions afterwards.
Hello everyone,
I am trying to solve the following implementation problem in Mathematica 7.0 for some days now and I do not understand exactly what is happening so I hope someone can give me some hints.
I have 3 functions that I implemented in Mathematica in a source file with extension *.nb.
They are working okay to all the examples. Now I want to put these functions into 3 different packages. So I created three different packages with extension .*m in which I put all the desired Mathematica function.
An example in the "stereographic.m" package which contain the code:
BeginPackage["stereographic`"]
stereographic::usage="The package stereographic...."
formEqs::usage="The function formEqs[complexBivPolyEqn..."
makePoly::usage="The function makePoly[algebraicEqn] ..."
getFixPolys::usage="The function..."
milnorFibration::usage="The function..."
Begin["Private`"]
Share[];
formEqs[complex_,{m_,n_}]:=Block[{complexnew,complexnew1, realeq, imageq, expreal,
expimag, polyrealF, polyimagF,s,t,u,v,a,b,c,epsilon,x,y,z},
complexnew:=complex/.{m->s+I*t,n->u+I*v};
complexnew1:=complexnew/.{s->(2 a epsilon)/(1+a^2+b^2+c^2),t->(2 b
epsilon)/(1+a^2+b^2+c^2),u->(2 c epsilon)/(1+a^2+b^2+c^2),v->(-
epsilon+a^2 epsilon+b^2 epsilon+c^2
epsilon)/(1+a^2+b^2+c^2)};
realeq:=ComplexExpand[Re[complexnew1]];
imageq:=ComplexExpand[Im[complexnew1]];
expreal:=makePoly[realeq];
expimag:=makePoly[imageq];
polyrealF:=expreal/.{a->x,b->y,c->z};
polyimagF:=expimag/.{a->x,b->y,c->z};
{polyrealF,polyimagF}
]
End[]
EndPackage[]
Now to test the function I load the package
Needs["stereographic`"]
everything is okay. But when I test the function for example with
formEqs[x^2-y^2,{x,y}]
I get the following ouput:
{Private`epsilon^2 + 2 Private`x^2 Private`epsilon^2 +
Private`x^4 Private`epsilon^2 -
6 Private`y^2 Private`epsilon^2 +
2 Private`x^2 Private`y^2 Private`epsilon^2 +
Private`y^4 Private`epsilon^2 -
6 Private`z^2 Private`epsilon^2 +
2 Private`x^2 Private`z^2 Private`epsilon^2 +
2 Private`y^2 Private`z^2 Private`epsilon^2 +
Private`z^4 Private`epsilon^2,
8 Private`x Private`y Private`epsilon^2 +
4 Private`z Private`epsilon^2 -
4 Private`x^2 Private`z Private`epsilon^2 -
4 Private`y^2 Private`z Private`epsilon^2 -
4 Private`z^3 Private`epsilon^2}
Of course I do not understand why Private` appears in front of any local variable which I returned in the final result. I would want not to have this Private` in the computed output.
Any idea or better explanations which could indicate me why this happens?
Thank you very much for your help.
Best wishes,
madalina
Almost all of my JUnit tests are written with the following signature:
public void testSomething() throws Exception
My reasoning is that I can focus on what I'm testing rather than exception handling which JUnit appears to give me for free. But am I missing anything by doing this? Is it against best practice? Would I gain anything by explicitly catching specific exceptions in my test and then fail()'ing on them?