I would like to know how you would run a stored procedure from a page and just "let it finish" even if the page is closed. It doesn't need to return any data.
I'm building a bulletin board site (in 2010) and I'm sure this must be simple but again it doesn't seem so. Anyway on my default page I have a query webpart showing the latest items and what I need is just a button at the top of the page "Add new item" which would show the popup and allow users to complete the form just like it works on the display list items form.
I've looked at AllItems.aspx but can't even see the "Add new item" button to copy!
Any ideas?
Thanks
Dan
I'm not a fan of these learn how to program in X amount of days books. Some even boast, learn how to program in 24 hours. This is a joke and an insult to me as a software engineer who went through a rigorous discipline in computer science and mathematics.
So a question to the community, have you benefited from these become a programmer quick books?
Wikipedia says:
Selection algorithms: Finding the min,
max, both the min and max, median, or
even the k-th largest element can be
done in linear time using heaps.
All it says is that it can be done, not how.
Can you give me some start on how this can be done using heaps?
Hi,
I don'T really understabd how regular expressions works even after I read this tutorial http://www.webcheatsheet.com/php/regular_expressions.php
Here is what I need to find:
And it should return: http://link
Here is what I tried:
$find = preg_match_all('/<link type="text/html" rel="alternate" href=".*',$file,$patterns2);
You can laught :)
Thanks in advance for your help and your time :)
What is the best way to transcode audio and video to show on the web?
I need to do it programmatically. I'd like to do something like YouTube or Google Video where users can upload whatever format they want, and I encode it to flv, mp3, and/or mp4. I could do it on our server, but I would rather use an EC2 instance or even a web service. We have a Windows 2008 server.
If you have a handle to a Spinner object in an Android activity, can you programmatically pop open the spinner options - thereby forcing the user to choose an option even though they did not click on the spinner themselves?
In Java, the hash code for a String object is computed as
s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
using int arithmetic, where s[i] is the ith character of the string, n is the length of the string, and ^ indicates exponentiation.
Why is 31 used as a multiplier?
I understand that the multiplier should be a relatively large prime number. So why not 29, or 37, or even 97?
this is my view code
<%=collection_check_boxes(nil, :admin_ids, Admin.all, :id, :name )%>
but when i try get the value in the controller i get always an empty value if the user doesnt check any item
and the length is always more than zero
when i write this code
arr = params[:admin_ids] ||= []
puts arr.length
ther arr.length is 1 even if the user doesnt select any of the items
how can i get an array of selected items only with no empty values
Even if I have different modules in my jee application including myproject-web and myproject-ejb; is it possible to call (or inject) my ejb session bean which is in the ejb module from a managed bean which is in the web module?
When I asked before, I see the following declaration:
@EJB private BeanInterface yourbean
However, I wanna learn that whether it is possible or not, to call each other between different contexts (one of it in ejb context, the other one -managed bean- is in web context)?
Any help would be appreciated
Best wishes
Bariscan
Since I cannot pre-render all the images in PNGs and real-time image transformation functions are required, namely:
skew
perspective
(like the transform action found in Photoshop)
Which API (CoreAnimation? OpenGL ES?) should I look into? Even better, is there any sample code around? Thanks!
I erroneously wrote this code in python:
name = input("what is your name?")
if name == "Kamran" or "Samaneh":
print("That is a nice name")
else:
print("You have a boring name ;)")
It always prints out "That is a nice name" even when the input is neither "Kamran" nor "Samaneh".
Am I correct in saying that it considers "Samaneh" as a true? why?
By the way, I already noticed my mistake. The correct form is:
if name == "Kamran" or name == "Samaneh":
I am able to successfully add a resource to a file using UpdateResource and then remove it using: UpdateResource(HANDLE, "TYPE", "NUMER", 1033, IntPtr.Zero, 0);
When I add a resource to the file it will add another even though there is an existing resource exactly the same, also I cannot remove any existing resources. When I try to remove an existing resource using that line I get the error ERROR_INVALID_PARAMETER.
Any ideas?
I'm trying to curve text this effect using CSS3, HTML Canvas, or even SVG (see image below for example)? Is this possible? If so, how can I achieve this effect?
Hi,
After doing a long search on stackoverflow i didn't find any one talked about this even if it's a big choice, the Question is what's the best in order to prevent both of XSS and SQL injection, Escaping the data then store it in the DB or Store it as it is and escape when output it?
Note: it is better if you give some examples of practics if possible.
Thanks
I am trying to read the Excel Named range using OLEDB using the below code
"Select * from [MyNamedRange1]"
everything works fine only when the source excel sheet is not opened if it is open then i am not able to read the range names using OLEDB it simply hangs
Where as i am able to execute the query
"Select * from [Sheet1$]"
even if the workbook is open or closed...
Any work arounds for reading the range by OLEDB only i dont want to go for interop...
I have too many ranges defined in the excel file
In my browser cookies are creating by name _utma,_utmb and so on if i reject cookie creation.I think this cookie is for google analytics.Anybody know how google creating this cookie even browser not supporting cookie creaton.Thanks
The script I'm using is
if($profile['username'] == $user['username']) {
$db->query("UPDATE users SET newcomments = 0 WHERE username = '$user[username]'");
echo "This is a test";
}
(Note that $db-query is exactly the same as mysql_query)
For some very odd reason, the MySQL query is being performed even if the defined condition is false
The "This is a test" works properly and only appears when the condition is met, but the MySQL query is performed anyway
Whats the problem with it?
I'm starting getting tired of this exception. Can't handle it, even so I'm using this:
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Still no success, Can anyone explain me, how I should handle it in a nice way. Or how to detect that it have fired this message and close the application, because I'm starting it automatically everytime it closes.
Is there a way i could run a job only once using Quartz (java). I understand it does not make sense to use Quartz in this case but the thing is i have multiple jobs and they are run multiple times so i am using Quartz.
Is this even possible.
I have a website that can be accessed from www.blahblah.com and special.blahblah.com. The www site always works but occasionly I get a 'Content controls have to be top-level controls in a content page or a nested master page that references a master page' error on the special site.
It's exactly the same code running in both situations and the offending page doesn't even have a master page. Why would it work all the time on one and fail sometimes on the other?
Hello,
Hoping to get some feedback from someone more experienced here. I haven't dealt with the dreaded floating-point calculation before...
Is my understanding correct that with Ruby BigDecimal types (even with varying precision and scale lengths) should calculate accurately or should I anticipate floating point shenanigans?
All my values within a Rails application are BigDecimal type and I'm seeing some errors (they do have different decimal lengths), hoping it's just my methods and not my object types...
Thanks!
I've the same problem as described here
In the generated SQL Informix expects catalog:schema.table but what's actually generated is
catalog.schema.table
which leads to a syntax error.
Setting:
hibernate.default_catalog=
hibernate.default_schema=
had no effect.
I even removed schema and catalog from the table annotation, this caused a different issues : the query looked like that ..table same for setting catalog and schema to an empty string.
Versions
seam 2.1.2
Hibernate Annotations 3.3.1.GA.CP01
Hibernate 3.2.4.sp1.cp08
Hibernate EntityManager 3.3.2.GAhibernate
Jboss 4.3 (similar to 4.2.3)
Hi,
I am using vi(not Vim) and I would like to continually undo the changes made. u works for a single command undo and Ufor a single line undo. But Is there a way to undo continuously like vim(I recall a command in vim can even undo changes by time!) in vi?
Thanks in Advance.