What's the simplest/canonical way to create an empty file in C#/.Net? Simplest way I can find so far:
System.IO.File.WriteAllLines(filename, new string[0]);
I have the following code
/* Errors exist, have user correct them */
if($form->num_errors > 0)
{
return 1; //Errors with form
}
/* No errors, add the new account to the */
else if($database->addLeagueInformation($subname, $subformat, $subgame, $subseason, $subwindow, $subadmin, $subchampion, $subtype))
{
return 0; //New user added succesfully
}
else
{
return 2; //Registration attempt failed
}
I want to add the following to it
$databases->addLeagueTable($name)
This should happen at the same time as addLeagueInformation.
Any ideas?
Hi
I want Image button with two state(normal , mouse over). that button must change image with Mouse Over event trigger automatically.
this image button must be a user control. Also i want to set image for each state form code in which form i use that user control.
Solution is using a template with "Value Converter" but i don't know how?
When I indent if-then-else construct in emacs lisp, the else block doesn't indent properly. What I get is:
(defun swank-clojure-decygwinify (path)
"Convert path from CYGWIN UNIX style to Windows style"
(if (swank-clojure-cygwin)
(replace-regexp-in-string "\n" "" (shell-command-to-string (concat "cygpath -w " path)))
(path)))
where else form is not indented at the same level as the then form. Is there an obvious way to fix this?
Software: Microsoft Access 2007 SP2
Database File Version: Access 2000
I have an access program that I inherited from a previous employee. It uses forms for reports and since I don't have much experience in access I have continued to do this. I have created a copy of the program for another project and modified it to suit.
I am having trouble getting more then one chart to print. All the charts display in form view, they all have the same properties (excepting data, position, etc.) For some reason they are not printing. They don't even show up in the print preview.
I am thinking it must be something with the graphs themselves as they sometimes lose all information. I have to open the graphs in edit mode and change the data source from column to row and back again so that it gets redrawn. (Refresh doesn't fix it)
So right now I don't even have a clue as to where to look so ideas are welcome.
Edit #1
It seems to be a problem with linking to an unbound form.
Subform Field Linker:
Can't build a link between unbound forms.
The query for the main form is
SELECT tTest.ixTest, tMotorTypes.ixMotorType, tMotorTypes.asMotorType, tMotorTypes.fDeprecated, tTestType.asTest, tTest.asSerialNum, tTest.asOrderNum, tTest.asFrameNum, tTest.asRotorNum, tTest.asOperator, tTest.iStation, tTest.dtTestDate, tTest.ixTestType
FROM tMotorTypes
INNER JOIN (tTestType
INNER JOIN tTest ON tTestType.ixTestType=tTest.ixTestType)
ON tMotorTypes.ixMotorType=tTest.ixMotorType;
The query for the chart is:
SELECT qGraphRSTTemperatures.Frequency, qGraphRSTTemperatures.[Drive End], qGraphRSTTemperatures.[Non Drive End], qGraphRSTTemperatures.[Air In], qGraphRSTTemperatures.Core
FROM qGraphRSTTemperatures
ORDER BY qGraphRSTTemperatures.ixTemperature;
Query qGraphRSTTemperatures:
SELECT tElectricalData.dblFrequency AS Frequency, tTemperatures.dblDrvEnd AS [Drive End], tTemperatures.dblNonDrvEnd AS [Non Drive End], tTemperatures.dblAirIn AS [Air In], tTemperatures.dblCore AS Core, tSubTest.ixTest, tTemperatures.ixTemperature
FROM (tSubTest INNER JOIN tElectricalData ON tSubTest.ixSubTest = tElectricalData.ixSubTest)
LEFT JOIN tTemperatures ON tElectricalData.ixElectrical = tTemperatures.ixElectrical
WHERE (((tSubTest.ixSubTestType)=5))
ORDER BY tSubTest.ixTest, tTemperatures.ixTemperature;
So how come, in the form view it shows the graph with the correct data when linked thus:
Child field: ixTest
Master field: ixTest
but won't print the graph.
The graph will print if I remove the links, but then I have all the data from chart query as it is not limited by ixTest.
edit #2
It seems to be a data retrieval/rendering issue in printing. Is there anything in printing that changes the context of records with respect to parent/child relationships?
I have a PDF copy of a file for creating a report. Based on this form, we will generate a report.
Is there any way that I can fill out the needed fields on the PDF form using python? How?
Hi,
Ok, let's assume we are working with ASP.NET MVC 2 (latest and greatest preview) and we want to create AJAX user interface with jQuery. So what are our real options here?
Option 1 - Pass Json from the Controller to the view, and then the view submits Json back to the controller. This means (in the order given):
User opens some View (let's say - /Invoices/January) which has to visualize a list of data (e.g. <IEnumerable<X.Y.Z.Models.Invoice>>)
Controller retrieves the Model from the repository (assuming we are using repository pattern).
Controller creates a new instance of a class which we will serialize to Json. The reasaon we do this, is because the model may not be serializable (circular reference ftl)
Controller populates the soon-to-be-serialized class with data
Controller serializes the class to Json and passes it the view.
User does some change and submits the 'form'
The View submits back Json to the controller
The Controller now must 'manually' validate the input, because the Json passed does not bind to a Model
See, if our View is communicating to the controller via Json, we lose the Model validation, which IMHO is incredible disadvantage. In this case, forget about data annotations and stuff.
Option 2 - Ok, the alternative of the first approach is to pass the Models to the Views, which is the default behavior in the template when you start a new project.
We pass a strong typed model to the view
The view renders the appropriate html and javascript, sticking to the model property names. This is important!
The user submits the form. If we stick to the model names, when we .serialize() the form and submit it to the controller it will map to a model.
There is no Json mapping. The submitted form directly binds to a strongly typed model, hence, we can use the model validation. E.g. we keep the business logic where it should be.
Problem with this approach is, if we refactor some of the Models (change property names, types, etc), the javascript we wrote would become invalid. We will have to manually refactor the scripting and hope we don't miss something. There is no way you can test it either.
Ok, the question is - how to write an AJAX front end, which keeps the business logic validation in the model (e.g. controller passes and receives a Model type), but in the same time doesn't screw up the javascript and html when we refactor the model?
I have a Panel on windows Form with few controls inside panel,
Can i make panel completely transparent.
(It should give the feel that controls are placed directly on Form)
I need an simple way to check whether a string that is sent to my function is of the form:
(x + n)(x + m)
//the +'s can be minus'
//n and m represent a double
//x represents the char 'x'
Is there a simple string format that I can use to check that this is the form. As opposed to checking each character singularly.
The whitespace will be removed to save any confusion.
Regards
Lloyd
If I have a map of three countries, and their borders form the outline of a sea, is their a way with SVG to give that bound area attributes and style?
Another example might be three triangles which form a third triangle in the center (like the triforce). If someone wanted to make that middle empty area glow (or whatever)...
Hi.
I'm looking for a way to customize display of spring MVC tags from this taglib:
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
Is there a way to customize display of those tags as in Struts2 .ftl templates?
I currently have a PHP form that uses AJAX to connect to MySQL and display records matching a user's selection (http://stackoverflow.com/questions/2593317/ajax-display-mysql-data-with-value-from-multiple-select-boxes)
As well as displaying the data, I also place an 'Edit' button next to each result which displays a form where the data can be edited. My problem is editing unique records since currently I only use the selected values for 'name' and 'age' to find the record. If two (or more) records share the same name and age, I am only able to edit the first result.
Today, I have looked into HTML code of facebook.com, and found something like this:
<input type="hidden" value="€,´,€,´,?,?,?" name="charset_test"/>
It's repeated two times inside the <form>...</form>.
Any idea what this code might be useful for - some kind of server-side client charset detection? As far as I know, browser charset is being transmitted in HTTP request anyway (an "Accept-Charset" header).
Question How can I change <s:submit> to <s:a> in struts tag?
I want to send parameters to next page(action) by post (not get)
<s:form action="products" method="post" theme="simple">
<s:hidden name="code" value="%{code}"/>
<s:submit type="button" method="selectSale" value="see"/>
</s:form>
i have web form running in asp.net & c#.net,
The form has a devexpress aspxtextbox and the another ordinary textbox with a button.
The scenario is enter a text longer than the width of the text box in the ordinary text box.
on clicking the button it enters the text in to devexpress aspxtextbox ,increasing the width of the devexpress aspx text box inspite of width given as 50 px.
how to maintain the fixed width for devexpress aspx text box
Question: How can you use the JQuery Auto-Completion plugin to suggest a location ("City, State") for an input field?
Meaning, someone wants to type in "Chicago, IL" ... so they begin typing "Chi" and it auto-suggestions "Chicago, IL".
My biggest hurdles is finding a service that I can query to find out all US city+state names.
I essentially want to do what the StackOverflow "Tags" input form works but form "City, State" auto completion.
I'm tying to hide my slug fields in the admin by setting editable=False but every time I do that I get the following error:
KeyError at /admin/website/program/6/
Key 'slug' not found in Form
Request Method: GET
Request URL: http://localhost:8000/admin/website/program/6/
Exception Type: KeyError
Exception Value:
Key 'slug' not found in Form
Exception Location: c:\Python26\lib\site-packages\django\forms\forms.py in __getitem__, line 105
Python Executable: c:\Python26\python.exe
Python Version: 2.6.4
Any idea why this is happening
I'm somewhat new to grails (not groovy though) and I'm working on a sample CRUD application. The issue I'm trying to solve is how to set a property on a bean based on a radio button before I update it in the database. Is the Form Helper http://www.grails.org/plugin/form-helper plugin the way to go? Will the bean have its value set regardless of if the button is actually clicked by the user or if it is left at its default value?
thanks,
Jeff
I've created a form that posts to a cfm file. When running a script onLoad that fills in the form values and tries to submit...The site takes me back to the login screen.
function f()
{
document.getElementById("email").value = "[email protected]";
document.getElementById("password").value = "asdf";
document.getElementById("form1").submit();
}
Please help!
Hi,
I have a parent form, with some child windows (not forms - just windows, for example label controls) inside it. Under certain circumstances, I want one of those child windows to be drawn "above" the others, to display a message over the entire main form.
I've tried setting HWND_TOPMOST and HWND_TOP on the child windows, but it doesn't seem to have any effect at all. Am I doing something wrong, or do HWND_TOPMOST and HWND_TOP only work on forms, as opposed to controls within forms?
Thanks.
I have created a pdf using tcpdf in php. i have a table with one row and one column. when i put the content from a form which is a textarea, the content in the form flows out of the table border. how can i make it so that it is contained in the border itslef???
I need to represent an IEEE 754-1985 double (64-bit) floating point number in a human-readable textual form, with the condition that the textual form can be parsed back into exactly the same (bit-wise) number.
Is this possible/practical to do without just printing the raw bytes?
If yes, code to do this would be much appreciated.