The problem I'm having is, using the POCO templates, generating my POCO classes the first time only and not overwriting them when the templates are re-ran. I know this sounds hokey and the reason is that I'm actually changing these templates and trying to generate metadata classes rather than the actual POCO classes, but these metadata c...
I'm working on a PoSh project that generates CSharp code, and then Add-Types it into memory.
The new types use existing types in an on disk DLL, which is loaded via Add-Type.
All is well and good untill I actualy try to invoke methods on the new types. Here's an example of what I'm doing:
$PWD = "."
rm -Force $PWD\TestClassOne*
$code...
I have an ASP.net page which contains some controls.
I generate this controls by code, [Actually I have a method which uses a stringBuilder and add Serverside tag as flat string on it]
My page shows the content correctly but unfortunately my controls became like a Client-side control
For example I had a LoginView on my generated code ...
I set VC++ to generate ASM for a method which calls sqrt, to see if it's generating FPU or SSE instructions. However when sqrt is called, I don't see the ASM. I only see a call to some function __CIsqrt, which I assume is some system sqrt function. I can't see any ASM for that to know what it is doing?
...
Does anybody know how to insert a "@RunWith anotation" above the class signature, using eclipse templates?
Ex.:
@RunWith(Parameterized.class)
public class MyClassTest {
...
@Parameters
public static Collection<Object[]> parameters() {
List<Object[]> list = new ArrayList<Object[]>();
list.add(new Object[] { "mind...
I know I wouldn't need this with Typemock, however, with something like MoQ , I need to use the adapter pattern to enable the creation of mocks via interfaces for code I don't control.
For example, TcpClient is a .NET class, so I use adapter pattern to enable mocking of this object, b/c I need an interface of that class. I then produce...
Is it possible via script/tool to generate authomatically many delete statements based on the tables fk relations, using Oracle PL/SQL?
In example: I have the table: CHICKEN (CHICKEN_CODE NUMBER) and there are 30 tables with fk references to its CHICKEN_CODE that I need to delete; there are also other 150 tables foreign-key-linked to th...
There is an SAP server that has some webservices I need to use, so I am trying to use wsimport to generate the client stubs.
I don't want to find all the wsdls and schemas that are referenced and modify them to do it locally, as that isn't sustainable, if they service should change.
So, how can I use wsimport to fetch a wsdl and genera...
When using code generation templates in visual studio, is it possible to get the current location of the .tt file when the 'custom tool' runs? Suppose my custom template lives in
c:\projects\something\template.tt
When it does its magic, is there a way to return the path above?
<#=PathOfCurrentTTFile #>
(so that PathOfCurrentTTFile =...
Do you know of a .NET library for generating javascript code?
I want to generate javascript code based on information in my .NET application. I would like to be able to create an AST-like datastructure (using C#) and have it turned into valid javascript. I need to be able to create functions, statements, expressions etc., so I need som...
One of our vendors provides a web service API to allow their customers to validate data in a database. As part of their SDK, they provide a WSDL (Web Service Definition Language) file that, according to their documentation, can "be read by software applications and application development tools. An application tool such as Microsoft's ...
I have turned on "Treat warnings as errors" for my VS project which mean that I get errors for missing documentation (nice reminder for this particular project).
However, part of the code is generated by a custom tool which does not insert xml documentation so I'm looking for away to ignore the missing xml documentation for the generate...
Basically, I do lots of one-off code generation, large-scale refactorings, etc. etc. in Java.
My tool language of choice is Python, but I'll take whatever solutions you can offer.
Here is a simplified illustration of what I would like, in a pseudocode
Generating an implementation for an interface
search within my project:
for eac...
Yes, it is possible to generate tests on boundary values for functions like "Sum" or "Divide". Pex is a good tool here.
But more often we create tests on business behaviour. Let's consider example from classic Beck's tdd book:
[Test]
public void ShouldRoundOnCreation()
{
Money money = new Money(20.678);
Assert.AreEqual(20.68,money.Amou...
Situation: Automatically generated memebers, such as MenuStrip items, have their (automatically generated) names based on the text entered when the item was created. My most common situation is creating a menu-strip and adding menu-items by entering their text (using the graphical designer).
Since my GUI is in Hebrew, all these members ...
I am new to java. I was wondering if there is a tool to copy fields and method easily.
E.g if I have
private String foo; // with getter/setters
I should be able to select foo and type bar car in a textbox and the tool should generate fields bar and car with their getter/setters.
EDIT : I use eclipse and know how to use the ide. Bu...
Does anyone know of any tools for generating ASP.NET MVC CRUD User Interfaces (E.g. the controllers and views for Admin tools), given:
A set of model objects.
A set of repositories for retrieving those objects.
Thanks
...
how can I write a .py file from python such that its type should not be like 'ASCII file with Windows CRLF'
because when i run file.write(data) inside windows it write the file but when I try to
eval(open(file.py).read()) it fails and gives syntax error because of windows CRLF on each line......
see the error log - traceback
ERROR:we...
I'm using Visual Studio 2008. I've added a control on a page but can't reference it in code-behind file. When I looked at the Code-Gen file, I didn't find my new control. It looks like Visual Studio didn't update Code Gen file to include my control. Is there a way to manually re-generate that Code Gen file?
...
Hi,
I'm trying to do a convex hull approach and the little problem is that I need to get all sets of three consecutive vertices, like this:
private void isConvexHull(Ponto[] points) {
Arrays.sort(points);
for (int i = 0; i <points.length; i++) {
isClockWise(points[i],points[i+1],points[i+2]);
}
...