How is it possible to make a input field editable in javascript. I mean onFocus putting it in insert mode so that values can be overwritten. Any suggestions ???
my urls look like:
www.example.com/{languagecode}/{controller}/{action}/{id}
where language code is en-us, etc.
From the OnActionExecuting event, how can I get these values?
I am getting this error.
No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).
I deleted all the cookies, values from sessions table. Restarted my server.Still geting the same error and this code was working yesterday.
I'm working on a college exercise and have the following question:
What is the domain of the "country" table?
My understanding of domain is that it defines the possible values of an attribute.
This means that the table "country" doesn't have a domain, but the various attributes in the table "country" have their own domains.
For example the attribute "SurfaceArea" has the domain FLOAT(10,2) and the attribute "Name" has the domain CHAR(52).
Is this correct?
I need to process an XML DOM, preferably with JDOM, where I can do XPath search on nodes. I know the node names or paths, but I want to ignore namespaces completely because sometimes the document comes with namespaces, sometimes without, and I can't rely on specific values. Is that possible? How?
i have one default.xml file where i am storing all default values.suppose if invalid file with the same default.xml name exists i have to display message in the status bar.
I am reading a file in the following format
1001 16000 300 12.50
2002 24000 360 10.50
3003 30000 300 9.50
where the items are: loan id, principal, months, interest rate.
I'm not sure what it is that I am doing wrong with my input string stream, but I am not reading the values correctly because only the loan id is read correctly. Everything else is zero. Sorry this is a homework, but I just wanted to know if you could help me identify my error.
if( inputstream.is_open() ){
/** print the results **/
cout << fixed << showpoint << setprecision(2);
cout << "ID " << "\tPrincipal" << "\tDuration" << "\tInterest" << "\tPayment" <<"\tTotal Payment" << endl;
cout << "---------------------------------------------------------------------------------------------" << endl;
/** assign line read while we haven't reached end of file **/
string line;
istringstream instream;
while( inputstream >> line ){
instream.clear();
instream.str(line);
/** assing values **/
instream >> loanid >> principal >> duration >> interest;
/** compute monthly payment **/
double ratem = interest / 1200.0;
double expm = (1.0 + ratem);
payment = (ratem * pow(expm, duration) * principal) / (pow(expm, duration) - 1.0);
/** computer total payment **/
totalPayment = payment * duration;
/** print out calculations **/
cout << loanid << "\t$" << principal <<"\t" << duration << "mo" << "\t" << interest << "\t$" << payment << "\t$" << totalPayment << endl;
}
}
when i try to select and update the same table mysql gives error
error
#1241 - Operand should contain 1 column(s)
The trigger is
DELIMITER $$
CREATE TRIGGER visitor_validation
BEFORE INSERT ON ratingsvisitors
FOR EACH ROW
BEGIN
SET @ifexists = (SELECT * FROM ratingcounttracks WHERE userid=New.vistorid AND likedate=New.likevalidation AND countfor=New.likeordislike);
IF (@ifexists = NULL) THEN
INSERT INTO ratingcounttracks(userid, likedate, clickcount,countfor) values (New.vistorid, New.likevalidation ,'1',New.likeordislike);
ELSE
UPDATE ratingcounttracks SET clickcount=clickcount+1 WHERE userid=New.vistorid AND likedate=New.likevalidation AND countfor=New.likeordislike;
END IF;
END$$
i have to render a graph in my web page.i have desigened a class( in C#) file which contain a event for rendering a graph(pie chart).In that event i pass some value i.e
legends which is a string[] and value which is double[] to draw the graph.
But i want that instead of inserting the value directly into the event, pass that value with some function like
public void insertvalue(string[] legends,double[] values)
{
}
how could i do that plese help me????????
And i am using Zedgraphweb control to render the graph.
ie, if the factor variable is Climate, with 4 possible values: Tropical, Arid, Temperate, Snow, and a node in my rpart tree is labeled as "Climate:ab", what is the split?
Hi, I'm trying to write a query that returns the shortest string value in the column. For ex: if ColumnA has values ABCDE, ZXDR, ERC, the query should return "ERC". I've written the following query, but I'm wondering if there is any better way to do this?
BTW, the query should return a single value.
select distinct ColumnA from
(
select ColumnA, rank() over (order by length(ColumnA), ColumnA) len_rank from TableA where ColumnB = 'XXX'
)
where len_rank <= 1
Thank you.
Hi!
In order to make function calls to our back-end php code we've implemented something called an ActionProxy like this:
function ActionProxy(action, input, callback){
$.post("ActionProxy.php?method="+action,
{ data: input},
function(data, textStatus, XMLHttpRequest){
//return data.ResponseWhatever
}
});
The problem we're having is that using data outside the ActionProxy is impossible due to variable scope limitations (we assume), setting
var res = data.ResponseWhatever
or
return data.ResponseWhatever
is pretty futile. How would one handle these responses most appropriately so that functions calling the actionproxy can access the response values?
I'm having trouble with a JVM running an app, whose heap memory looks like a comb. It's constantly jumping from 1.5 GB to 3 GB and slowly deteriorating to higher values. I'm using G1 GC algorithm, but have no idea how to configure it.
I do not have access to the code of the app I'm running and, needless to say, it's a rather large app.
So, bottom line, does anyone know of a good guide to configure GC in Java?
To get a list of a content type's cck fields, I was hoping to use:
drupal_get_schema('content_type_mycontenttype');
but that leaves out fields with multiple values. Is there a simple call to use to get such a list?
I have written this function in Scala to calculate the fibonacci number given a particular index n:
def fibonacci(n: Long): Long = {
if(n <= 1) n
else
fibonacci(n - 1) + fibonacci(n - 2)
}
However it is not efficient when calculating with large indexes. Therefore I need to implement a function using a tuple and this function should return two consecutive values as the result.
Can somebody give me any hints about this? I have never used Scala before. Thanks!
Hi folks,
I have name, phone number and E-mail infomation of a contact. I just want to insert the additional email and phone for the existing contact. My questions are
How to find the contact is already existing or not?
How to insert the values on the additional or secondary address option?
Thanks in Advance.
Hi,
I've an object (basically a VO) in Java and I don't know it's type. I need to know values which are not null in that object. Can someone please help me to do this?
hi all , please need help for an asterisk
I created a write func odbc list records files in sql table:
[R]
dsn=connector
write=INSERT INTO ast_records (filename,caller,callee,dtime) VALUES
('${ARG1}','${ARG2}','${ARG3}','${ARG4}')
prefix=M
and set it in dialplan :
exten = _0X.,n,Set(
M_R(${MIXMONITOR_FILENAME}\,${CUSER}\,${EXTEN}\,${DTIME})= )
when I excute it I get an error : ast_func_write: M_R Function not registered:
Does anyone know whether it's possible to modify the workflow actions of a SharePoint Designer workflow template programmatically? For example, one has a SendEmail action and I'd like to modify the values of the To or the Bcc through code.
Thanks in advance
I would like to set some values in the node before actually writing the data to the DB. I already have it working by modifying book_nodeapi but I would like to do it from outside the code, some _alter option that allows me to leave the module code untouched would be great.
Thanks
Is there a command that will convert ASCII into blob?
I have the following table:
sample_table:
-------------
id : NUMBER
type : NUMBER
version : NUMBER
data : BLOB
When doing the following command:
insert into sample_table values (1, 0, 1, '');
I'm getting the following error: ORA-01465: invalid hex number.
How is it possible for sizeof(class) to return two different values depending on context? The class itself should have the same size right irrespective of where I ask this question? I see a smaller value when querying class size from main() and another when I query class size from an extended class.
Simply, I would like to have an iPhone app that logs in to a web server with inputted username and password values and then maintains this login, so that the user can POST data to the server.
Is this just an issue of using cookies? If so, how do you perform a check to verify the user is logged in?
Thanks.
In .Net, is it possible for process A to modify the values of some static data members from process B?
When running under the same AppDomain, it's possible to do so via Reflection, but about doing so between different process? (via Reflection also. I'm not looking to use functions such as Win32::ReadProcessMemory)