How can i return Last Insert Id on my store procedure using MySQL and use them with Nhibernate?
When i am inserting recording using Nhibernate + mysql store procedure then i am getting error that result not found
IQuery qry = session.CreateSQLQuery(string.Format("{0})", qryString)).AddScalar("ProductID", NHibernateUtil.Int32);
qry.List();
tx.Commit();
Hello All
I am creating a custom calender, I need to show online 5 working days in calendar and i have month/year as a input.
Can anyone help me, where i should start work on it?
Hello All
I added shortcut key on my control using jquery.
$(function() {
shortcut.add("ctrl+r", function() { SomeFunctionHere(); });
});
how can i find that this key already added in my control?
Hi,
I have added a link on a page clicking on which generates a pdf and asks for download for which i have used fpdf class.
My new requirement is that clicking on the link should generate n number of pdf with different content and should ask for downloading these pdfs.
I am unable to find out the method to accomplish the same.
Please help me on this.
Thanks
Hi,
I have a moodle installation in which there is a column in mdl_user table called firstaccess whose type is bigint(10) and contains date in following format 1266839570.
I am writing a query for accessing users according to date filters. For e.g. i want to check which users firstaccess is greater than '2010-04-12'. How can i convert the date? These two date formats are different. I think firstaccess is unix timestamp. Should i change the '2010-04-12' into unix timestamp or there is a way to convert firstaccess i.e 1266839570 to yyyy-mm-dd format.
Please help me on this.
Thanks
Hi,
when i try "eval" function as eval ("020 * 05 + 05") it is returning 85 instead off 105.
Can someone explain me why eval function behave like this? Also suggest any to over cum this problem.
I am facing a problem on load pdf on browser. its working fine but slow in load. That's why i want to display a loading message / gif until it's fully loaded so the user isn't looking at a blank screen.
My question is same as previous question
http://stackoverflow.com/questions/1138232/html-embedded-pdfs-onload
I have a tab on my page, when i click on this tab, i need to show a pdf file on page(browser).
For this i am writing function on control like this
public ActionResult PricedPdf(string projID,string fileName)
{
byte[] bArr = new byte[] { };
bArr =getdata();
return File(bArr, System.Net.Mime.MediaTypeNames.Application.Pdf, fileName+".pdf");
}
Now my problem is when i render this, page only show some unreadable data not pdf.
hi i am trying to use nsuser defaults to save some default values in database. I am able to save the values in the nsuserdefault(even checked it in nslog).
Now i need the values in app delegate when the application is restarted. But i am not getting anything in the nsuserdefault. Following is my code from my class where i save the values in nsuserdefault:
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
[prefs setObject:appDel.dictProfile forKey:@"dict"];
NSLog(@"%@",[prefs valueForKey:@"dict"]);
Following is my code from App Delegagte:
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
NSLog(@"%@",[prefs valueForKey:@"dict"]);
the above code always returns me null.
Can some one please help me
I need to import a text file into a temporary table and from that select portions of it to insert in different tables. I wanted to use 'LOAD DATA INFILE'.
Is there any way, i can use 'Load data infile' in a stored procedure.
I am using mysql.
LOAD DATA LOCAL INFILE 'C:\\MyData.txt' INTO TABLE
tempprod fields terminated by ',' lines terminated by '\r\n';
SELECT * FROM product p;
I am working an iphone app where i am giving the option of downloading an image to user's iphone. Following is my code for downloading of image.
UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress]]];
NSString *pngFilePath = [[[NSString stringWithFormat:@"%@/",docDir] stringByAppendingString:[NSString stringWithFormat:@"%@",couponID]] stringByAppendingString:@".png"];
NSData *data1 = [NSData dataWithData:UIImagePNGRepresentation(image)];
[data1 writeToFile:pngFilePath atomically:YES];
My above code works fine but now i want to give option of deleting the image downloaded from above code. Can some one please advice me how can i delete a image file from iphone.
Hi,
I have a wordpress page in which i have a form(used machform which redirects & stores data in session) submitting it redirects to another wordpress page. Now i want to use session value in the second page. I am new to wordpress, can i use php tags inside a page through admin interface so that i can retrieve the session value?
Please help me on this
Thanks
Hi
I want to install osqa on windows local system for this i have downloaded bitnami-djangostack-1.1.1-2-windows-installer.exe which has in built django,python,mysql & apache.
I have run a django example given on the django website. Its working fine.
But i am confused how to install osqa. I have downloaded the source code available on osqa site and readed the installation instruction(requires django 1.1.1).
But how to make it working?
Please help me on this
Thanks
I want to write a .htaccess file for redirecting my subdomains and URL's last variable to a new location. Here is what I want to do:
http(s)://abc.example.com/books
I want my internal URL to be like:
http://example.com/?name=abc&type=books
I have already gotten the subdomain redirect to work but I am not able to do subdomain with variable in last part of URL.
How can I accomplish this?
Hello All
I am inserting Product on database, My Product Model like this
public class Product
{
public int ProductID { get; set; }
public string ProductNumber { get; set; }
public string Description { get; set; }
public string KeyWords { get; set; }
}
here my ProductNumber is coming on counter table
Table- Counter
Field- Counter- int
when product insert then its ProductNumber come from Counter table, after insert counter increase 1. In update counter not increase.
How can i insert Product in such situation using Nhibernate?
Thanks
hi,
I am working in a app where i have data in uitableview. It is like a drill down application. User will click on a row and will go to next page showing more records in a uitableview. But problem in my case is that i dont know upto how many level user can drill. The number of levels are not fixed. So now i am thinking to create and add the viewcontrollers programically. Is it possible?? if yes how?
thanks in advance.
Hi i have a uitableview, i am displaying some data of about 200 rows in it. Data will be displayed in several sections which will be determined at run time. I am able to get sections but i am not able to display data for a particular section in correct order. I have data in the form of dictionaries in an array.
My Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
TeraGoAppDelegate *appDel = (TeraGoAppDelegate *)[[UIApplication sharedApplication] delegate];
UITableViewCell *cell = nil;
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
cell.textLabel.text = [(NSMutableDictionary *)[appDel.arrEqp objectAtIndex:countEqpIndex] objectForKey:@"EQP_NAME"];
cell.textLabel.font = [UIFont fontWithName:@"Arial" size:14];
if(![[(NSMutableDictionary *)[appDel.arrEqp objectAtIndex:indexPath.row] objectForKey:@"select"] isEqualToString:@"0"])
{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
else
cell.accessoryType = UITableViewCellAccessoryNone;
}
// Set up the cell...
return cell;
}
I am trying to use indexPath.row but its values initialises from 0 in every section I can not get data from array in this case as i dont have index of array to get data. How will i get the index of array whose values i need to display????