hi
What options/properties should use to show a main from scrolbars when I want to?
or always visible in Delphi 2010
The help is as too often useless
thanks
Pw
My send mail task works fine for email ids like [email protected] but it throws error for email ids like [email protected].
is there any way i can make it work for such ids also?
Thanks.
Im building an ad-system where users can dynamically create 'fields' for each ad type.
My models and example values:
AdType:
| id | name
|----|-----
| 1 | Hotel
| 2 | Apartment
AdOption:
| id | ad_type_id | name
|----|------------|-----
| 1 | 1 | Star rating
| 2 | 1 | Breakfast included?
| 3 | 2 | Number of rooms
AdValue: (Example after saving)
| id | ad_id | ad_option_id | value
|----|-------|---------------|------
| 1 | 1 | 1 (stars) | 5
| 2 | 1 | 2 (breakfast) | true
Ad: (Example after saving)
| id | description | etc....
|----|-----------------|--------
| 1 | very nice hotel | .......
So lets say I want to create a new ad, and I choose Hotel as the ad type.
Then I need my view to dynamically create fields like this: (I'm guessing?)
[Label] Star rating:
[hidden_field :ad_id] [hidden_field :ad_option_id] [text_field :value]
[Label] Breakfast included?
[hidden_field :ad_id] [hidden_field :ad_option_id] [text_field :value]
And also, how to save the values when the ad record is saved
I hope this is understandable. If not just ask and I'll try to clarify.
I'm using Zend_Navigation to create my nav. I want the URL to be domain.com/me and not domain.com/index/me. What is wrong with my config XML:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<nav>
<home>
<label>Home</label>
<controller>index</controller>
<action>index</action>
<pages>
<me>
<label>Me</label>
<module>default</module>
<controller>index</controller>
<action>me</action>
<resource>user</resource>
<privilege>logout</privilege>
</me>
</pages>
</home>
</nav>
</config>
Can Any One explain this Language how we converted to CFG
Give a CFG for the CFL: {ai bj ck | i ? j or j ? k } //ai mean a^i
I have the answer but I need an explaination (Step By Step)
The answer :
S --> S1|S2
S1 --> A Eab|Eab B|S1 c
A --> a|aA B--> b|bB
Eab --> Q|a Eab b
S2 --> Eac C|A Eac
C --> c|cC
Eac --> Q|B|a Eac c
Hi, I can connect to the access database and run functions etc from c#, I can even get a hold of the button I need to click, but I can't make it think it's been clicked.
nonManagedDb.DoCmd.OpenForm("frmMaintenance", Access.AcFormView.acNormal, MissingVal, Access.AcFormOpenDataMode.acFormReadOnly, Access.AcWindowMode.acWindowNormal, MissingVal);
var RunRep = (CommandButton)nonManagedDb.Forms["frmMaintenance"].Controls["btnDailySheetsReport"];
That's as afar as I've gotten with this, I've tried reflection to grab it's event and invoke it but it's classed as a COM object only so that's out.
var result = (
from contact in db.Contacts
where contact.ContactID == id
join referContactID in db.ContactRefferedBies on contact.ContactID equals referContactID.ContactID
join referContactName in db.Contacts on contact.ContactID equals referContactID.ContactID
orderby contact.ContactID descending
select new ContactReferredByView
{
ContactReferredByID = referContactID.ContactReferredByID,
ContactReferredByName = referContactName.FirstName + " " + referContactName.LastName
}).Single();
Problem is in this line:
join referContactName in db.Contacts on contact.ContactID equals referContactID.ContactID
where referContactID.ContactID is called from the above join line. How to nest these two joins?
Thanks in advance!
Ile
Hi
I have a submit button and am styling it using the following css:
.subm
{
background-color:Transparent;
background-image:url(Images/Button_Send.png);
background-repeat:no-repeat;
width:82px;
height:30px;
display:block;
border:none;
outline:none;
overflow:visible;}
.subm:hover
{
background-color:Transparent;
background-image:url(Images/Button_Send_Over.png);
background-repeat:no-repeat;
width:82px;
height:30px;
display:block;
border:none;
outline:none;
overflow:visible;
}
Here is the html:
<input type="submit" class="subm" value="" />
Nothing surprising. However, what annoys me is that when the submit button is clicked in IE it moves the image up a couple of pixels cutting them off which makes it look, hmm, good word, 'naff.' How can I compensate or stop this?
I have tried expanding the image and leaving a couple of blank pixels at the top but it still does the same thing!
Thanks R.
I have a Rails app that lets users create tutorials and quizzes. There are many users taking the quizzes and many quizzes in a tutorial. My client wants the quiz results to persist when a student navigates away from the quiz. So the use case would be:
User starts to take quiz
User answers some of the questions
User navigates away from quiz to check a fact in the tutorial
User goes back to quiz and their answers are still there
User finishes quiz and submits
Now this would be pretty easy to do if I enforced a "Save" submit so that the answers could be stored in a session or whatever, but the client (and I agree) thinks people will not remember to save before navigating away.
Looking for advice on how to approach this. I'm thinking an observer and cookies.
I'm trying to convert a preexisting javascript function into a jQuery function.
The function comes from http://javascript.internet.com/forms/zip-to-state.html
and aims to convert a user-entered zip code into a state. I'm using jQuery 1.3.2, with all the necessary plugins, but I'm not very familiar with jQuery syntax and how to convert this from plain ol' Javascript syntax.
The setState function takes two parameters, the zip code element and the state element, so I'm trying to do something like this:
$('$zip_code').change( function () { setState($(this), $('#state')); });
Any thoughts on this syntax? Thanks, Dakota
function getState(zip) {
if ((parseInt(zipString.substr(zip / 4, 1), 16) & Math.pow(2, zip % 4)) && (zip.length == 5))
for (var i = 0; i < stateRange.length; i += 7)
if (zip <= 1 * stateRange.substr(i, 5))
return stateRange.substr(i + 5, 2);
return null;
}
function setState(txtZip, optionBox) {
if (txtZip.value.length != 5 || isNaN(txtZip.value / 4)) {
optionBox.options[0].selected = true;
alert("Please enter a 5 digit, numeric zip code.");
return;
}
var state = getState(txtZip.value);
for (var i = 0; i < optionBox.options.length; i++)
if (optionBox.options[i].value == state)
return optionBox.options[i].selected = true;
for (var i = 0; i < optionBox.options.length; i++)
if (optionBox.options[i].value == "XX")
return optionBox.options[i].selected = true;
}
Hi i am having the follow code
<div id="container">
<div class="element NOTME"></div>
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
</div>
the code below select the inputs inside container with class element
$("#container .element input[name^='myname']").each
How can i rewrite the above code (the selector actually) that will exclude when has class NOTME
Thanks
Hi,
I wrote a AS3 script, i have 2 fields to validate, i.e email and name.
For email i use:
function isValidEmail(Email:String):Boolean {
var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+.[\w.-]*[a-z][a-z]$/i;
return emailExpression.test(Email);
}
How about name field? Can you show me some sample code?
EDIT:
Invalid are:
blank
between 4 - 20 characters
Alphanumeric only(special characters not allowed)
Must start with alphabet
A co-worker of mine had downloaded a vb example project a while back to see how to make a call or two, he discovered it today again, and noticed that while sitting in the IDE the time/date is updating automatically when the entire project is not even running.
How does this work, we looked around for code but can't find anything giving it away.
Any ideas?
Hi all,
Frequent visitor but first post here on StackOverflow, I'm hoping that you guys might be able to help me out with this. I'm fairly new to Obj-C and XCode, and I'm faced with this really... weird... problem. Googling hasn't turned up anything whatsoever. Basically, I get an EXC_BAD_ACCESS signal on a line that doesn't do any dereferencing or anything like that that I can see. Wondering if you guys have any idea where to look for this. I've found a work around, but no idea why this works... The line the broken version barfs out on is the line:
LevelEntity *le = entity;
where I get my bad access signal.
Here goes:
THIS VERSION WORKS
NSArray *contacts = [self.body getContacts];
for (PhysicsContact *contact in contacts)
{
PhysicsBody *otherBody;
if (contact.bodyA == self.body)
{
otherBody = contact.bodyB;
}
if (contact.bodyB == self.body)
{
otherBody = contact.bodyA;
}
id entity = [otherBody userData];
if (entity != nil)
{
LevelEntity *le = entity;
CGPoint point = [contact contactPointOnBody:otherBody];
}
}
THIS VERSION DOESNT WORK
NSArray *contacts = [self.body getContacts];
for (NSUInteger i = 0; i < [contacts count]; i++)
{
PhysicsContact *contact = [contacts objectAtIndex:i];
PhysicsBody *otherBody;
if (contact.bodyA == self.body)
{
otherBody = contact.bodyB;
}
if (contact.bodyB == self.body)
{
otherBody = contact.bodyA;
}
id entity = [otherBody userData];
if (entity != nil)
{
LevelEntity *le = entity;
CGPoint point = [contact contactPointOnBody:otherBody];
}
}
Here, the only difference between the two examples is the way I enumerate through my array. In the first version (which works) I use for (... in ...), where as in the second I use for (...; ...; ...). As far as I can see, these should be the same.
This is seriously weirding me out. Anyone have any similar experience or idea whats going on here? Would be really great :)
Cheers,
Alex
I downloaded these zip files from the link http://netbeans.org/downloads/zip.html with the hope that this way I will have a fine grained control over the installation process.
But I stand clueles. I can't tell how to install Netbeans from these, there is no installation guide for this.
Any ideas how to install Netbeans this way.
I am not able to insert data into my data, i dont know what the problem is. Here is the code:
mysql_select_db("mitestore", $con); */
if ((isset($_POST['product_name'])) && (strlen(trim($_POST['product_name'])) 0)) {
$product_name = stripslashes(strip_tags($_POST['product_name']));
$sql="INSERT INTO sell (product_name) VALUE ('$_POST[product_name]')";
} else {$product_name = 'Please enter the product name.';}
if ((isset($_POST[''])) && (strlen(trim($_POST['how_old'])) 0)) {
$how_old = stripslashes(strip_tags($_POST['how_old']));
$sql="INSERT INTO sell (how_old) VALUE ('$_POST[how_old]')";
} else {$how_old = 'Please enter how old your product is';}
if ((isset($_POST['which_block'])) && (strlen(trim($_POST['which_block'])) 0)) {
$which_block = stripslashes(strip_tags($_POST['which_block']));
$sql="INSERT INTO sell (which_block) VALUE ('$_POST[which_block]')";
} else {$which_block = 'Please enter which block are you from';}
if ((isset($_POST['room_no'])) && (strlen(trim($_POST['room_no'])) 0)) {
$room_no = stripslashes(strip_tags($_POST['room_no']));
$sql="INSERT INTO sell (room_no) VALUE ('$_POST[room_no]')";
} else {$room_no = 'Please enter the room no:';}
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Success!";
mysql_close($con)
?
Initially i had this code and it worked for me.
mysql_select_db("database", $con);
$sql="INSERT INTO sell ( product_name, how_old , selling_price, negotiable, which_block, room_no)
VALUES
('$_POST[product_name]','$_POST[how_old]','$_POST[selling_price]','$_POST[negotiable]','$_POST[which_block]','$_POST[room_no]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Your product is added.";
mysql_close($con)
?
But i don't know how to validate each field individually.
I am using asp.net mvc and jquery to make ajax requests and when the session times out after an ajax request the full sigin page gets loaded into my ajax div.
How can I display a modal popup instead of making a redirect when a session times out?
My User entity class have several member variables (e.g. String firstName) which are persisted and some transient variables (e.g. transient boolean selected) which are not. I have used the transient variable to capture a checkbox selection, but invariably the value never gets set and procesed properly until I set another bean value along with it.
i.e. If User has firstName (mapped to a text field) and selected (mapped to a checkbox)
If I just selected the value doesn't seem to be set on an update
If I had selected the checkbox and the firstName field, the "selected" value is captured properly
Can anyone tell me why this is happening?
Hi
What is the difference between a abandon Session and a cookie timeout, what if the session is abandon and the cookie is still alive, is that can lead to a problem?
<sessionState timeout="1" />
<authentication mode="Forms">
<forms loginUrl="login.aspx" timeout="1" />
</authentication>
Thanks
Hey there, I'm trying to implement a way to slide&fade controls around (more than one at the same time possibly) elegantly. So in other words, say i had a picture in the top left corner, and a texbox in the bottom right corner, i'd like to be able to have them slide. not just snap. slide, to the opposite corners and replace eachothers position. Ive been working for awhile but have not come up with anything efficient, even just some of the basic math calculations would be a great start.
We have a C# web app where users will connect using a digital certificate stored in their browsers.
From the examples that we have seen, verifying their identity will be easy once we enable SSL, as we can access the fields in the certificate, using Request.ClientCertificate, to check the user's name.
We have also been requested, however, to sign the data sent by the user (a few simple fields and a binary file) so that we can prove, without doubt, which user entered each record in our database.
Our first thought was creating a small text signature including the fields (and, if possible, the md5 of the file) and encrypt it with the private key of the certificate, but...
As far as I know we can't access the private key of the certificate to sign the data, and I don't know if there is any way to sign the fields in the browser, or we have no other option than using a Java applet. And if it's the latter, how we would do it (Is there any open source applet we can use? Would it be better if we create one ourselves?)
Of course, it would be better if there was any way to "sign" the fields received in the server, using the data that we can access from the user's certificate. But if not, any info on the best way to solve the problem would be appreciated.
Hi, im using C# dll in VC++ application.I have somedetails in VC++ like
PageNumer
pageTitle
PageDesc
BoxDetail
I have to pass this to C# Dll.
So i made one structure in VC++,then i pas that to C#.But i could't do that.Pls help mw.
VC++ Function:
struct SCS3OverVwPg
{
__int32 iOvrPgNo;
char sOvrPgTitle[30]; //OverView Page Title
};
void CToolTab::SendOverview()
{
SCS3OverVwPg *pOverVw = 0;
pOverVw = new SCS3OverVwPg;
Globals1::gwtoolbar->SetTree(pOverVw);
}
C# function:
public struct SCS3Over
{
Int32 iOvrPgNo;
char[] sOvrPgTitle;
}
public void SetTree(SCS3Over x)
{
MessageBox.Show("Data received");
}
If i do like this,it shows error
error C2664: 'Tabcontrol::ToolBar::SetTree' : cannot convert parameter 1 from 'SCS3OverVwPg *' to 'SCS3Over'
IF i change name in C# dll to SCS3OverwPg,
it show error of structure redifinition
Pls help me.
Hi, We have a similar problem. We have a web application running under default appdomain. It was working fine until a week before...Suddenly it has encountered a problem. Below message is taken from event logs.
Event code: 4005 Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired.
Application uses FormsAuthentication and gets the roles from aspnetdb.. After the error, when user logins to the page, it does not redirects to the default.aspx. Again login.aspx comes up. On the other hand application works fine on development server(localhost), but not on www(IIS 6.0).
Does any one has an idea?
Thanks,
Ilknur
I have some data in db,now i m making them to display in the front end so,i ii have a update button,if i click it the selected values to come to database
http://dpaste.com/hold/180761/
Thnx in advance.
Hi, I want to create an html page inside a asp.net page using c# and then request that html page. The flow is, I'll be creating a request that will give me a response with some values. Those values will be stored in hidden fields in the html page I'm creating on the fly and then requesting. I figure it would be something like below but I'm not sure if it would work, I've also received some "Thread Aborting" errors. So, does anyone know the proper way to do this or at least direct me to a nice article or something?
StringBuilder builder = new StringBuilder();
builder.Append("<html><head></head>");
builder.Append("<body onload=\"document.aButton.submit();\">");
builder.Append("<input type=\"hidden\" name=\"something\" value=\"" + aValue + "\">");
HttpContext.Current...Response.Write(builder.ToString());
... end response