Thursday, October 3, 2013

i want to write trigger for 3 tables and any insert to these 3 tables should update in the 4th table(combination of 3 tables based on join)

i want to write trigger for 3 tables and any insert to these 3 tables
should update in the 4th table(combination of 3 tables based on join)

i have 3 tables A,B,C. I have a stored procedure of these 3 tables with
join condition inserted in 4th table D. now what i want is "ANY INSERT OR
UPDATE"made to these 3 tables(A,B,C) should update 4th table D. Can any
one please tel how to write trigger in pl/sql?

Wednesday, October 2, 2013

Huge firefox CSS issues

Huge firefox CSS issues

I made the following site: http://like-minded.us
to view it you'll have to log in from http://like-minded.us/wp-admin with
the credentials
username: stackoverflow pw: hellothere
then you will be taken to the dashboard - try to go to like-minded while
logged in and you'll be able to view it. The thing basically doesn't
render on firefox, and there is a problem in Safari that appears like it
didn't load a script or hit an error. I would love help with making it
compatible for both, but I am currently focused on Mozilla. I can't seem
to figure out how to find out where the problems in CSS are, and which
ones are the main ones preventing the site from rendering. I also am not
sure if the problem is in CSS in the first place. Can anybody point me in
the right direction? Sorry if there are not enough details, I tried to
cover everything I could think of. The site displays perfectly in Chrome.

Upload multiple files with jquery and coldfusion cffile

Upload multiple files with jquery and coldfusion cffile

Not really a question... Just wanted to post this somewhere because I
couldnt find it elsewhere. Now that I've cobbled together a working demo I
thought i would share. This works equally well on Coldfusion and Railo
CFML servers.
The problem is that for CFML developers is that CFFILE doesn't work with
<input type="file" multiple> ... traditionally if you wanted to upload 3
files and use CFFILE on the back end you would have to include 3 separate
file inputs on your calling page.
Here is my solution shaved down for simplicity. It uses Jquery $.ajax to
make several calls to CFFILE and returns the results to a div on the
calling page. Im sure there is a better way to do this and my code is
probably a complete hack but the below example works. Hope this helps
someone.
multiFileUpload.cfm
<!DOCTYPE html>
<CFPARAM Name="URL.contractID" defualt="">
<head>
<title>Multi File Upload</title>
<script>
$( document ).ready(function() {
$('#submitFrm').on("click", function(e){
e.preventDefault();
//The jquery.each() statement loops through all the files
selected by user
$.each($('#multiFile')[0].files, function(i, file) {
var data = new FormData();
data.append('file-0', file);
ajaxUpload(data);
}); //end .each statement
}); //end submitFrm's click function
function ajaxUpload(data){
console.log("ajaxUpload function called");
$.ajax({url: "multiFileUploadAction.cfm",
data: data,
cache: false,
contentType: false, //this is need for this to work with coldfusion
processData: false, //this is need for this to work with coldfusion
type: 'POST',
success: function(returnData){
console.log(returnData);
//here is where you would update your calling
//page if successfull
$("#msgDiv").html($("#msgDiv").html() + "<p>"
+ returnData + "</p>
},
error: function(returnData){
console.log(returnData);
}
}); //end .ajax call
} //end ajaxUpload function
}); //end onDocument ready
</script>
<style>
</style>
</head>
<body>
<form action="multiFileUploadAction.cfm" Method="POST"
enctype="multipart/form-data" class="well" id="multiFileFrm">
<input type="file" name="multiFile" id="multiFile" multiple />
<button class="btn btn-primary" id="submitFrm" >Submit</button>
<cfoutput>
<input type="hidden" Name="contractID" id="contractID"
value="#URL.contractID#">
</cfoutput>
</form>
<div id="msgDiv" style="display:none;"></div>
</body>
</html>
This is my proccessing page... again stripped down to the bare minimum:
multiFileUploadAction.cfm
<CFOUTPUT>
<CFTRY>
<cffile action="upload"
filefield="file-0"
destination="#expandpath("\images")#"
nameConflict="makeUnique">
<cfcatch>
#cfcatch.Message#
</cfcatch>
</cftry>
<cfcontent reset="true" />Uploaded #cffile.serverFile#
</CFOUTPUT>
<!---
<cfdump var="#form#">
--->
Thats it... in my production code i create a JSON response that includes
the saved file name and path to the file (because of the 'makeUnique' it
could be different then what was sent) I also process the file to create a
thumbnail and send it's name and path back to the calling page. That way
on the calling page I can display a thumbnail. Hope someone finds this
helpful.

need help for my lessonplanner application

need help for my lessonplanner application

Im working on my project which is a simple lesson planner.
does anyone have any codes for saving an input lesson and a date from a
datepicker to sqlite?and put the lesson in a list in another intent. and
when the lesson is click it go to another intent showing us the lesson and
the date and allowing us to edit or delete it.
please help.

how to set height of uilabel equal to uitableviewcell

how to set height of uilabel equal to uitableviewcell

I have a grouped style Tableview which have uilabels in Tableviewcell. Now
i want to set height of uilabels equal to height of cell how can i do
ths???
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:nil];
if (cell == nil) {
cell = [[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier];
}
// here i want to make height of label equal to height of cell
UILabel *category = [[UILabel alloc] initWithFrame:CGRectMake(95,1,140,25)];
category.font = [UIFont fontWithName:@"Arial" size:14.0f] ;
category.textAlignment = NSTextAlignmentRight;
[category setBackgroundColor:[UIColor clearColor]];
[cell addSubview:category];
}

Tuesday, October 1, 2013

Can someone explain why f(n) + o(f(n)) = theta(f(n))?

Can someone explain why f(n) + o(f(n)) = theta(f(n))?

According to this page:
http://math.stackexchange.com/questions/195935/proof-that-a-function-plus-a-lower-growth-function-is-theta-the-first-function
The statement: f(n) + o(f(n)) = theta(f(n)) appears to be true. Where: o =
little-O, theta = big theta
This does not make intuitive sense to me. We know that o(f(n)) grows
asymptotically faster than f(n). How, then could it be upper bounded by
f(n) as is implied by big theta?
Here is a counter-example:
let f(n) = n, o(f(n)) = n^2. n + n^2 is NOT in theta(n)
It seems to me that the answer in the previously linked stackexchange
answer is wrong. Specifically, the statement below seems as if the poster
is confusing little-o with little-omega.
Since g(n) is o(f(n)), we know that for each &#1013;>0 there is an
n&#1013; such that |g(n)|<&#1013;|f(n)| whenever n¡Ýn&#1013;
Thank you.

Apply a theme to an activity in Adnroid-Eclipse?

Apply a theme to an activity in Adnroid-Eclipse?

I know how to apply a theme to a whole application, but where would I go
to apply a theme to just a single activity?

Why does the compiler cast automatically without going further in the inheritance=?iso-8859-1?Q?=3F_=96_stackoverflow.com?=

Why does the compiler cast automatically without going further in the
inheritance? – stackoverflow.com

While I try to run following code snippet, it's executing wrong overload
method. I'm confused why it does that? [testB.TestMethod(testValue) method
execute the public double TestMethod(double ...

Should I say "I miss you today when I drop by your office"? – ell.stackexchange.com

Should I say "I miss you today when I drop by your office"? –
ell.stackexchange.com

I want to write a note to a person that I could not find him at his
office, but he does not expect that I would be there If I write "I miss
you today when I drop by your office" Does it sound ...