I want tocreate a box like this with title:
Can any one please let me know if there is a default CSS tag to do this? Or do I need tocreate my custom style?
So I have a product model that looks like
belongs_to :seller
has_many :coupons
And coupon model that looks like
belongs_to :seller
belongs_to :product
And in my Products controller I use
@seller = current_user
@coupon = @seller.coupons.create(params[:coupon])
tocreate the coupons for the seller
While the coupon is being created, I need to associate it with the product too, i.e When a new coupon is created it should be saved for the seller AS WELL AS for the product.
I am trying tocreate a form in drupal 6 that has multiple items on the same line. More specificly, I want a right alligned form what has a textfield, dropdown-box, and button all on the same line.
I know howtocreate the items, but drupal tends to put them all on seperate lines. How do I put it on one line?
Thanks
Hi,
i am quite confused about the difference between a FOREIGN KEY and CHECK constraint.
they appear to me to achieve the same result.
I mean I could create a table and enforce a Foreign key on another table, but i could create
a CHECK to ensure the value in in another table.
What is the difference and when to use the one or the other?
thanks
I have set new division on postgress pg_operator table because i want tath when is division by zero return 0.
i have write this:
create operator / ( procedure = zero_division, leftarg = double precision, rightarg = double precision);
where zero_division is:
CREATE OR REPLACE FUNCTION zero_division(double precision, double precision)
RETURNS double precision AS
'select case when $2 = 0 then 0 else $1 / $2::real end;'
LANGUAGE sql IMMUTABLE
COST 100;
when i run value/ 0 i get error of division.
i have a litle project for which i would like to remove all files outside of and not needed by the c:\windows operating system. therefore i need tocreate a list of what i want to keep i.e. boot.ini c:\windows etc and then delete everything else. i have seen examples using forFile, but i can be sure that extension will be on the machine. does anyone have any ideas how i can create the exclude list and then do the delete?
I was looking at using iText tocreate both a pdf and html version of a document with RTF as a possible option. According to this question this is no longer possible with iText. Is there a library that will allow me tocreate a document in Java and output it as both PDF and HTML? The ability to output RTF would be nice but is not required.
I have a User Control for searching container numbers. If the user enters a container number that's new to the system then I want to tell the VM "I have a new record to add".
The MVVM method avoids using Events to communicate with the VM as they create code-behind. Should I create a Dependency Property to trigger the VM but I don't think I've seen other controls with a "NewRecord" property?
Any thoughts?
for a table valued function in sql why cant we write sql statements inside begin and end tags like-
create function dbo.emptable()
returns Table
as
BEGIN --it throws an error
return (select id, name, salary from employee)
END
go
while in scalar valued function we can use these tags like
create function dbo.countemp()
returns int
as
begin
return (select count(*) from employee)
end
go
is there any specific rule where we should use BEGIN & END tags
How can I check if a user exists?
Im doing an installer for a mysql database, and I need to check if a user exits, if not create user, if yes delete user and create it again.
this so i can execute the script without worries.
thanks.
I am new to Git. I have created a master repository in a linux server. The same server is going to be used by 5 groups of 3 users each. I want tocreate one local repository for each group. And the group members in turn should create one local repository for each of them, play with the contents and committ the modificatons to the group's local repository. How should i go about doing this?
Hi,
I am using C language and Linux as my programming platform.
I am learning howtocreate a daemon, and I want tocreate a log file so that I write a debug message in my daemon. My question is where should I put the log file in my system. Should I put it in the var folder?
Please advice.
Many thanks.
I am using wamp server 2.0 on Windows XP. Whenever I create a table with some uppercases in name, it is converted to lowercase.
For example:
I create: UserInfo
phpmyadmin convert it to: userinfo
from where can I fix this. Thanks
Hello.
In my program, I need to make use of an ElementTree object in various functions in my program.
More specifically, I am doing this:
tree = etree.parse('somefile.xml')
I am passing this tree around in my program.
I was wondering whether this is a good approach, or can I do this:
Create a global tree (I come from a
C++ background and I know global is
bad)
Create the tree again wherever required.
Or is my approach ok?
I am setting up a new SVN server on Ubuntu Linux. Where is a good place (best practice) to put the repositories? Should I create a new user? The server will be accessed via http:// so no need tocreate user accounts etc (as was the case for svn://).
Many thanks in advance
I have a entity manager em1 .em1 starts a transcation tx on db1 table1.Now inside tx i call a API getdata().This API creastes a new entitymanger em2 and return 1 record.Now if entity manger em1 tries to delete the record returned by em1 , it hangs.Code times out.Is the record locked by em1.How can ii solve this problem?
create em1
//em1 start transcation tx1
tx1.start
Object r = getData();
em1 tried to delete r //code hangs here
tx1.commit
Object getData(){
create em2
return data found using em2
}
I've banging my head for hours, it seems simple enough, but here goes:
I'd like tocreate a view using multiple select statements that outputs a Single record-set
Example:
CREATE VIEW dbo.TestDB
AS
SELECT X AS 'First'
FROM The_Table
WHERE The_Value = 'y'
SELECT X AS 'Second'
FROM The_Table
WHERE The_Value = 'z'
i wanted to output the following recordset:
Column_1 | Column_2
'First' 'Second'
any help would be greatly appreciated!
-Thanks.
I have one controller on which i have Save button click event. Im using same controller and view for Add and Edit purpose. My code is as per below
[HttpPost]
[Button(ButtonName = "Save")]
[ActionName("Create")]
[ValidateAntiForgeryToken(Salt = "PostData")]
public ActionResult Save(Ntegra m_Ntegra,FormCollection form)
{}
As Im Using ActionName("Create") here so button can not work for ActionName("Edit"). can anyone tell me how i can achive my requirnment!!
Thanks for help...... :)
Hello,
So when your using ASP.NET Wizards tocreate a login, it uses a set of auto generated tables using the aspnet_regsql.exe tool...
When you create a user using the wizard it generates a very long userID
"a40cf936-1596-4560-a26c-450792e2c8c0" I want to add users using another program that connects to this database... but how does visual studio auto-generate this ID. I want to auto-generate it as well
Any ideas? Thanks in advance.
-Scott
I've created a label and used setPixmap to attach a .png image to the label. I've also setWindowFlags to disable the title bar and create a frameless window. Because I've disabled those, it also disables the ability to drag anything around, so I want tocreate mouseevents (unless there's a better method) to position my label anywhere on the screen exactly like dragging the frame of a window. How would I do that? An example and brief explanation would be greatly appreciated.
I am using ubuntu(apache) for my php application.i need tocreate a timestamp for authenticated call of a webservice.In php i getting only 10 digit timestamp like 1273229733.But i need tocreate like 1273229613000 .How can i solve this problem.help me please.
Anyone knows howto implement XXTEA in MySQL?
For example - SELECT xxtea_encrypt('text here', 'key here');
possible implementation is by creating a FUNCTION in MySQL using CREATE FUNCTION statement, e.g.
CREATE FUNCTION xxtea_encrypt
XXTEA Procedures here...
RETURN encrypted string
Thanks & Best regards
CREATE OR REPLACE PROCEDURE p_createLocaltable
IS
table_already_exist EXCEPTION;
PRAGMA EXCEPTION_INIT (table_already_exist, -00955);
BEGIN
create table local_table as
select * from supplied_table
where rownum < 1;
EXCEPTION
when table_already_exist then
DBMS_OUTPUT.put_line('Table already exists , does not need to recreate it');
END;
can anyone see any problem of the above code?
I am trying tocreate a type of recorded data transaction that I can replay on a different database.
For example I am capturing an order into a system, when I save that I want to be able to "export" a sql script that I can run on another database tocreate the same order.
I am using NHibernate and I am trying to catch the sql query string for the save operation to save to a file, but with no success.
Hello,
A class A possesses an instance c of a class C. Another class B has to modify c through C::setBlah(); method.
Is it bad tocreate an accessor C getC(); in A and then use A.getC().setBlah() ?
Or should I create a method A::setBlah(); that would call C::setBlah(); ? Isn't it annoying if there are several methods like that ?