Search Results

Search found 17501 results on 701 pages for 'stored functions'.

Page 24/701 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Handy Generic JQuery Functions

    - by Steve Wilkes
    I was a bit of a late-comer to the JQuery party, but now I've been using it for a while it's given me a host of options for adding extra flair to the client side of my applications. Here's a few generic JQuery functions I've written which can be used to add some neat little features to a page. Just call any of them from a document ready function. Apply JQuery Themeroller Styles to all Page Buttons   The JQuery Themeroller is a great tool for creating a theme for a site based on colours and styles for particular page elements. The JQuery.UI library then provides a set of functions which allow you to apply styles to page elements. This function applies a JQuery Themeroller style to all the buttons on a page - as well as any elements which have a button class applied to them - and then makes the mouse pointer turn into a cursor when you mouse over them: function addCursorPointerToButtons() {     $("button, input[type='submit'], input[type='button'], .button") .button().css("cursor", "pointer"); } Automatically Remove the Default Value from a Select Box   Required drop-down select boxes often have a default option which reads 'Please select...' (or something like that), but once someone has selected a value, there's no need to retain that. This function removes the default option from any select boxes on the page which have a data-val-remove-default attribute once one of the non-default options has been chosen: function removeDefaultSelectOptionOnSelect() {     $("select[data-val-remove-default='']").change(function () {         var sel = $(this);         if (sel.val() != "") { sel.children("option[value='']:first").remove(); }     }); } Automatically add a Required Label and Stars to a Form   It's pretty standard to have a little * next to required form field elements. This function adds the text * Required to the top of the first form on the page, and adds *s to any element within the form with the class editor-label and a data-val-required attribute: function addRequiredFieldLabels() {     var elements = $(".editor-label[data-val-required='']");     if (!elements.length) { return; }     var requiredString = "<div class='editor-required-key'>* Required</div>";     var prependString = "<span class='editor-required-label'> * </span>"; var firstFormOnThePage = $("form:first");     if (!firstFormOnThePage.children('div.editor-required-key').length) {         firstFormOnThePage.prepend(requiredString);     }     elements.each(function (index, value) { var formElement = $(this);         if (!formElement.children('span.editor-required-label').length) {             formElement.prepend(prependString);         }     }); } I hope those come in handy :)

    Read the article

  • SQL Server stored procedure to generate random passwords

    SQL Server is used to support many applications and one such feature of most applications is the storage of passwords. Sometimes there is a need to reset a password using a temporary password or generate a random password for a new user. In this tip I cover a simple stored procedure to generate random passwords that can be incorporated into your applications. Get Smart with SQL Backup Pro Powerful centralised management, encryption and more.SQL Backup Pro was the smartest kid at school Discover why.

    Read the article

  • Migrate to Natively Compiled SQL Server Stored Procedures for Hekaton

    In order to take full advantage of the In-Memory OLTP options in SQL Server 2014, you should migrate standard stored procedures that references Memory-Optimized tables to natively compiled ones. In this tip we will see how to achieve this goal. New! SQL Prompt 6 – now with tab historyWriting, exploring, and editing SQL just became even more effortless with SQL Prompt 6. Download a free trial.

    Read the article

  • How are undocumented functions discovered?

    - by Paska
    Hi all, I've always wondered how do you find undocumented / private API ? Example the Apple undocumented / private API, Play Station, Windows Phone 7, Win32 Kernel, Windows API, hidden callback, etc... What tools do hackers use to find out about private and undocumented functions? Where can I read about peoples' experiences delving into private APIs and reverse engineering techniques which reveal the secrets which are normally explained in API documentation? thanks, A

    Read the article

  • The PoSh DBA: Grown-Up PowerShell Functions

    Laerte Junior goes step-by-step through the process of tidying up and making more reusable an untidy collection of PowerShell routines, showing how pipelines and advanced functions can make PowerShell more effective in helping to automate many of the working DBA's chores. What are your servers really trying to tell you? Find out with new SQL Monitor 3.0, an easy-to-use tool built for no-nonsense database professionals.For effortless insights into SQL Server, download a free trial today.

    Read the article

  • How to Optimize Stored Procedures

    - by Derek D.
    There are many factors to speeding up stored procedures. Knowing these in advance can save you and your company many hours of headaches. Using these practices when writing procedures, you can turn your SQL Server into a fine-tuned machine. This tutorial will cover the specifics to help you tune your procedures optimally. Know [...]

    Read the article

  • DAX Statistical Functions

    Following on from his first four articles on using Data Analysis Expressions (DAX) with tabular databases, Robert Sheldon dives into some of the DAX statistical functions available, demonstrating which are the most useful and examples of how they work. The seven tools in the SQL DBA Bundle support your core SQL Server database administration tasks.Make backups a breeze! Enjoy trouble-free troubleshooting! Make the most of monitoring! Download a free trial now.

    Read the article

  • Map multiple functions over a single data item

    - by Linus Norton
    I'm in the process of learning Scala and I came across a scenario today where I need to map multiple functions over a single piece of data and wondered if there was a formal name for this. It sort of feels like the inverse of map. I'm not sure this is the correct way of expressing it, but this is what I did: dmap(x: Object, fns: List[Function]) = fns.map(_(x)) Is there a built in way to do something similar? Is there a formal name for this function?

    Read the article

  • where are apt-get files stored?

    - by loolooyyyy
    i have an ubuntu with three virtual machines running inside running ubuntu also i update the host using apt-get update but i can update VM's, it takes a long time + uses a lot of bandwith which i'm running out of,i want to transfer the updated files by apt-get to VMs, could you please tell me where are they? i'm not talking about the packages themselves stored in /var/cache/apt/archives, i want the file that stores list of available packages on mirror i have selected, thanks lot ps: i know this question has been asked somewhere but i cant find it!

    Read the article

  • Parsing Parameters in a Stored Procedure

    This article shows a clean non-looping method to parse comma separated values from a parameter passed to a stored procedure. NEW! Deployment Manager Early Access ReleaseDeploy SQL Server changes and .NET applications fast, frequently, and without fuss, using Deployment Manager, the new tool from Red Gate. Try the Early Access Release to get a 20% discount on Version 1. Download the Early Access Release.

    Read the article

  • calculated colum or stored proceedure or just php funcion needed ?

    - by mcgrailm
    I have an order table in MySQL database and is has a field/column which store the dattime stamp of when the order was placed and I need to calculate when the order must be shipped. I could probably figure out how to right a function to calculate the ship date and call that when ever needed but I think, not sure it may moake more sense to have the shipdate as a column that is somehow calculate in mysql. that being said I have Never used a stored procedure or created a calculated field. the later I think would be best but again not sure. I used to make calculated field all the time in FMP but I've gotten away from that program. if someone could point me in the right direction or tell me why it would be better to do it one way over another I'd appreciate it . thanks Mike

    Read the article

  • How to send a Timestamp field to Oracle stored proc. from Java despite the DB config?

    - by Alfabravo
    I'm making a request from a java webapp to an Oracle' stored procedure which happens to have a Timestamp IN parameter. In the testing environment, it works sending: SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss a"); input.setTimestampField(dateFormat.format(new Date())); But in the production environment, it raises an exception ORA-01830: date format picture ends before converting entire input string. I know the testing environment should be a replica of the production site, but it is not in my hands to set them properly. And I need to send the Timestamp field despite the way they setup the database. Any ideas? Thanks in advance.

    Read the article

  • Oracle: Use of notational parameters which calling functions in insert statements not allowed ?

    - by Sathya
    Why does Oracle 10 R2 not allow use of notational parameters while calling functions in insert statements ? In my app, I'm calling a function in an insert statement. If use notational method of parameter passing, I get an ORA-00907: Missing right parenthesis error message INSERT INTO foo (a, b, c) VALUES (c, F1(P1=>'1', P2=>'2', P3 => '3'), e) Changing the same to position based parameter passing, and the same code gets compiled with no errors. INSERT INTO foo (a, b, c) VALUES (c, F1('1','2','3'), e) Why is this so ?

    Read the article

  • calculated column or stored procedure or just php function needed ?

    - by mcgrailm
    I have an order table in MySQL database, having a field/column which stores the date timestamp of when the order was placed. I need to calculate when the order must be shipped. I could probably figure out how to write a function to calculate the ship date and call that when ever needed but I think, not sure it may make more sense to have the shipdate as a calculated column. That being said, I have never used a stored procedure or created a calculated field. The later I think would be best but again not sure. I used to make calculated field all the time in FMP but I've gotten away from that program.

    Read the article

  • does mysql stored procedures support data types like array, hash,etc?

    - by Yang
    i am creating a mysql function which takes in a varchar and change it to a int based on a mapping table. select name, convert_to_code(country) from users where sex = 'male' here, the convert_to_code() function takes in a country name (e.g. Japan, Finland..) and change it to country code which is an integer (e.g. 1001, 2310..) based on a mapping table called country_maping like below: country_name (varchar) | country_code (int) Japan | 1001 Finland | 2310 Canada | 8756 currently, the stored function need to select country_code from country_mapping where country_name = country_name and return the query result. is that possible to create a hash data struct in SP to optimize the process so that it will not need to perform the query for each row matches the where clause. thanks in advance!

    Read the article

  • Doubt in Stored Procedure MySql - how to return multiple values for a variable ?

    - by Eternal Learner
    Hi, I have a stored procedure below. I intend this procedure to return the names of all the movies acted by an actor. Create Procedure ActorMovies( In ScreenName varchar(50), OUT Title varchar(50) ) BEGIN Select MovieTitle INTO Title From Movies Natural Join Acts where Acts.ScreenName = 'ScreenName '; End; I make a call like Call ActorMovies(' Jhonny Depp',@movie); Select @move; The result I get is a Null set , which is not correct.I am expecting a set of movies acted by Jhonny Depp to be returned. I am not sure as to why this is happening?

    Read the article

  • How to return table name from stored procedure in dataset.

    - by Shantanu Gupta
    I used a dataset to store 15 tables that I need at the time of loading. When i filled all the tables using stored procedure it returns me all the table but name of the table doesn't comes as that of actual table name in a database. It takes all the table with table name as Table1, Table2, Table3... I want them to be with the name as they actually are in table. SELECT PK_GUEST_TYPE, [DESCRIPTION] FROM L_GUEST_TYPE SELECT PK_AGE_GROUP_ID, AGE_GROUP FROM L_AGE_GROUP SELECT PK_COMPANY_ID, COMPANY_NAME FROM M_COMPANY SELECT PK_COUNTRY_ID, COUNTRY FROM L_COUNTRY SELECT PK_EYE_COLOR_ID, [DESCRIPTION] FROM L_EYE_COLOR SELECT PK_GENDER_ID, [DESCRIPTION] FROM L_GENDER SELECT PK_HAIR_COLOR_ID, [DESCRIPTION] FROM L_HAIR_COLOR SELECT PK_STATE_PROVONCE_ID, [DESCRIPTION] FROM L_STATE_PROVINCE SELECT PK_STATUS_ID, [DESCRIPTION] FROM L_STATUS SELECT PK_TITLE_ID, [DESCRIPTION] FROM L_TITLE SELECT PK_TOWER_ID, [DESCRIPTION] FROM M_TOWER SELECT PK_CITY_ID, [DESCRIPTION] FROM L_CITY SELECT PK_REGISTER_TYPE_ID, [DESCRIPTION] FROM L_REGISTER_TYPE Here is my frontend coding to fill dataset. OpenConnection(); adp.Fill(ds); CloseConnection(true);

    Read the article

  • MySQL stored procedure to INSERT DELAYED but CREATE TABLE first if needed?

    - by dkamins
    I'm planning on doing a lot of INSERT DELAYED into MyISAM tables. But the tables might not exist yet. Let's say e.g. a new table will exist for each day. So instead of detecting absence of table in my client and creating then retrying the insert, it seems like a good case for a stored procedure ("function"). Is this possible, and what would it look like? Are there any downsides to this approach?

    Read the article

  • How do I select from a stored procedure in Sybase?

    - by Nick Fortescue
    My DBA has constructed me a stored procedure in a Sybase database, for which I don't have the definition. If I run it, it returns a resultset with a set of columns and values. I would like to SELECT further to reduce the rows in the result set. Is this possible? From this question it seems like I could insert the results into a temporary table, but I'm not sure I've got permissions to do this. Is there any way I can SELECT certain rows, or if not, can someone give me example code for simulating with a temporary table?

    Read the article

  • Trying to insert a row using stored procedured with a parameter binded to an expression.

    - by Arvind Singh
    Environment: asp.net 3.5 (C# and VB) , Ms-sql server 2005 express Tables Table:tableUser ID (primary key) username Table:userSchedule ID (primary key) thecreator (foreign key = tableUser.ID) other fields I have created a procedure that accepts a parameter username and gets the userid and inserts a row in Table:userSchedule Problem: Using stored procedure with datalist control to only fetch data from the database by passing the current username using statement below works fine protected void SqlDataSourceGetUserID_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { e.Command.Parameters["@CurrentUserName"].Value = Context.User.Identity.Name; } But while inserting using DetailsView it shows error Procedure or function OASNewSchedule has too many arguments specified. I did use protected void SqlDataSourceCreateNewSchedule_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { e.Command.Parameters["@CreatedBy"].Value = Context.User.Identity.Name; } DetailsView properties: autogen fields: off, default mode: insert, it shows all the fields that may not be expected by the procedure like ID (primary key) not required in procedure and CreatedBy (user id ) field . So I tried removing the 2 fields from detailsview and shows error Cannot insert the value NULL into column 'CreatedBy', table 'D:\OAS\OAS\APP_DATA\ASPNETDB.MDF.dbo.OASTest'; column does not allow nulls. INSERT fails. The statement has been terminated. For some reason parameters value is not being set. Can anybody bother to understand this and help?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >