Search Results

Search found 171 results on 7 pages for 'ankit soni'.

Page 7/7 | < Previous Page | 3 4 5 6 7 

  • Extracting numeric value from output of a uder defined aggregate in netezza using bash script

    - by Ankit
    I am executing a shell script to execute my user defined aggregate which is taking inputs yavg=nzsql -c 'select avg(x) from Input1' which is giving output like this AVG ---------- 2.000000 (1 row) I want to pass only the numeric(double) value which is 2.0000(where xavg is expected) from this to S4(x,y,$xavg,$yavg) where x and y are the whole column from table Input1, xavg=nzsql -c 'select avg(y) from Input1' Below is my InputTable.txt which is a text file from which I am popluating my "Input1" table in the shell script. 1 2 3 2 1 2 3 2 1 nzsql -c 'create table Input1(x integer, y integer, v integer)' nzload -t Input1 -df InputTable.txt nzsql -c 'select * from Input1 yavg=`nzsql -c 'select avg(x) from Input1'` xavg=`nzsql -c 'select avg(y) from Input1' nzsql -c 'select S4(x,y,$xavg,$yavg) from test' Below is the output : xavg := AVG ---------- 2.000000 (1 row) yavg := AVG ---------- 1.666667 (1 row) and i am passing this value to S4(x,y,$xavg,$yavg) which is a User defined aggregate

    Read the article

  • What does it mean to say "Instance variables are not over-rided" in java?

    - by Ankit
    I am aware of the concept called field hiding in java. But still I am having a confusion in relation to instance variable being not over-ridden. According to my present knowledge, overriding a method of super-class means that the JVM will call the sub-class's over-ridden method though the super-class's method is available to the sub-class. And I read the similar thing for field hiding via the link:- Hiding Fields So, in any case we are over-ridding the instance if we change the values of the inherited instance variable in the sub-class. I am confused please help. I am using the following super-class:- public class Animal{ File picture; String food; int hunger; int width, height; int xcoord, ycoord; public void makeNoise(){ ......... } public void eat(){ ............. } public void sleep(){ .......... } public void roam(){ ............. } } It has sub-classes like Tiger, cat, dog,hippo etc. The sub-classes over-ride the makeNoise(), eat and roam() method. But each sub-class also uses a different set of values for instance variables. So as per my confusion, I am kind-of overriding all the instance variables and 3 methods of the super-class Animal; and I still have the super-class instance variables available to the sub-class with the use of the super keyword.

    Read the article

  • How to create a workboook specific Excel Add in

    - by Ankit
    I would like to create a excel Add in which creates some additional toolbars and Menu buttons. But I want this addin to load only when a specific workbook is opened. I dont want to load the Addin if anyother workbook is open. I would like to know what are the possible ways to solve this problem and what is the best approach to implement this Add in (XLA or VSTO or COM Addin)

    Read the article

  • BECOMING A JAVA PROGRAMMAR

    - by ANKIT
    SUR I HAVE NO KNOWLEDGE OF JAVA .BUT I DEFINTELY WANT TO BECOME A JAVA PROGRAMMER. AND I WANT TO MAKE MY OWN GAME WITH THE HELP OF JAVA . SUGEST ME THE RIGHT PATH . AND HOW SHOULD I PROCEEDE WITH MY CAREER

    Read the article

  • How to include a dynamic page contents into a template ?

    - by Ankit
    Hi All, I have to include a dynamic page content into my template, Say I have a left panel which gets the data dynamically through a view. Now, I have to include this left panel into all my pages but I do not want to duplicate the code for all the pages. Is there any way, I can write a single script and include it in all my templates to display the left panel in all my pages? Thanks in advance.

    Read the article

  • menu item in drupal

    - by ankit
    I am working in drupal 6 And I want that in particaular menu it show only 3 item whenever new item is added earliest must be disable.And it show only latest 3 item like in news only it show only latest news and last one is removed.note: It does not apply on all menu. please help me out.

    Read the article

  • How to remove an element from set using Iterator?

    - by ankit
    I have a scenario that I am iterating over a set using iterator. Now I want to remove 1st element while my iterator is on 2nd element. How can I do it. I dont want to convert this set to list and using listIterator. I dont want to collect all objects to be removed in other set and call remove all sample code. Set<MyObject> mySet = new HashSet<MyObject>(); mySet.add(MyObject1); mySet.add(MyObject2); ... Iterator itr = mySet.iterator(); while(itr.hasNext()) { // Now iterator is at second element and I want to remove first element }

    Read the article

  • Multiple Row Selection in UIPickerView

    - by medma
    hi frends, Today I have a problem related to uipicker. I want to select multiple rows in picker, so I have an idea to show my data in a table and add this table as subview to picker. I have tried a lot but didn't succeed. Please help if u can?? Thanx Ankit

    Read the article

  • Getting the valid email address.

    - by user219315
    Hi In a MVC application i want to validate the email addresses. I want to get the valid emailID from the list.If I use the emailaddress from the address book of any mail account then the name of the user get appended with the emailID .eg:"Ayushi Soni" ,.. and then copy these address to a textbox in an MVC application. Now I want to retrieve the actual EmailID from the list ignoring the name that is appended.Is there any utitliy or jquery that we can use to filter this out and validate the filtered email. I donot want to use regex,substring method for this. Thanks. skothari

    Read the article

  • JQuery + WCF + HTTP 404 Error

    - by hangar18
    HI All, I've searched high and low and finally decided to post a query here. I'm writing a very basic HTML page from which I'm trying to call a WCF service using jQuery and parse it using JSON. Service: IMyDemo.cs [ServiceContract] public interface IMyDemo { [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)] Employee DoWork(); [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)] Employee GetEmp(int age, string name); } [DataContract] public class Employee { [DataMember] public int EmpId { get; set; } [DataMember] public string EmpName { get; set; } [DataMember] public int EmpSalary { get; set; } } MyDemo.svc.cs public Employee DoWork() { // Add your operation implementation here Employee obj = new Employee() { EmpSalary = 12, EmpName = "SomeName" }; return obj; } public Employee GetEmp(int age, string name) { Employee emp = new Employee(); if (age > 0) emp.EmpSalary = 12 + age; if (!string.IsNullOrEmpty(name)) emp.EmpName = "Server" + name; return emp; } WEb.Config <system.serviceModel> <services> <service behaviorConfiguration="EmployeesBehavior" name="MySample.MyDemo"> <endpoint address="" binding="webHttpBinding" contract="MySample.IMyDemo" behaviorConfiguration="EmployeesBehavior"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="EmployeesBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="EmployeesBehavior"> <webHttp/> </behavior> </endpointBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> MyDemo.htm <head> <title></title> <script type="text/javascript" language="javascript" src="Scripts/jquery-1.4.1.js"></script> <script type="text/javascript" language="javascript" src="Scripts/json.js"></script> <script type="text/javascript"> //create a global javascript object for the AJAX defaults. debugger; var ajaxDefaults = {}; ajaxDefaults.base = { type: "POST", timeout : 1000, dataFilter: function (data) { //see http://encosia.com/2009/06/29/never-worry-about-asp-net-ajaxs-d-again/ data = JSON.parse(data); //use the JSON2 library if you aren’t using FF3+, IE8, Safari 3/Google Chrome return data.hasOwnProperty("d") ? data.d : data; }, error: function (xhr) { //see if (!xhr) return; if (xhr.responseText) { var response = JSON.parse(xhr.responseText); //console.log works in FF + Firebug only, replace this code if (response) alert(response); else alert("Unknown server error"); } } }; ajaxDefaults.json = $.extend(ajaxDefaults.base, { //see http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/ contentType: "application/json; charset=utf-8", dataType: "json" }); var ops = { baseUrl: "/MyService/MySample/MyDemo.svc/", doWork: function () { //see http://api.jquery.com/jQuery.extend/ var ajaxOptions = $.extend(ajaxDefaults.json, { url: ops.baseUrl + "DoWork", data: "{}", success: function (msg) { console.log("success"); console.log(typeof msg); if (typeof msg !== "undefined") { console.log(msg); } } }); $.ajax(ajaxOptions); return false; }, getEmp: function () { var ajaxOpts = $.extend(ajaxDefaults.json, { url: ops.baseUrl + "GetEmp", data: JSON.stringify({ age: 12, name: "NameName" }), success: function (msg) { $("span#lbl").html("age: " + msg.Age + "name:" + msg.Name); } }); $.ajax(ajaxOpts); return false; } } </script> </head> <body> <span id="lbl">abc</span> <br /><br /> <input type="button" value="GetEmployee" id="btnGetEmployee" onclick="javascript:ops.getEmp();" /> </body> I'm just not able to get this running. When I debug, I see the error being returned from the call is " Server Error in '/jQuerySample' Application. <h2> <i>HTTP Error 404 - Not Found.</i> </h2></span> " Looks like I'm missing something basic here. My sample is based on this I've been trying to fix the code for sometime now so I'd like you to take a look and see if you can figure out what is it that I'm doing wrong here. I'm able to see that the service is created when I browse the service in IE. I've also tried changing the setting as mentioned here Appreciate your help. I'm gonna blog about this as soon as the issue is resolved for the benefit of other devs Thanks -Soni

    Read the article

  • Sending URL as a parameter using javascript

    - by Prashant Singh
    I have to send a name and a link from client side to the server. I thought of using AJAX called by Javascript to do this. This is what I mean. I wished to make an ajax request to a file called abc.php with parameters :- 1. http://thumbs2.ebaystatic.com/m/m7dFgOtLUUUSpktHRspjhXw/140.jpg 2. Apple iPod touch, 3rd generation, 32GB To begin with, I encoded the URL and tried to send it. But the server says status Forbidden Any solution to this ? UPDATE :: It end up calling to http://abc.com/addToWishlist.php?rand=506075547542422&image=http://thumbs1.ebaystatic.com/m/mO64jQrMqam2jde9aKiXC9A/140.jpg&prod=Flat%20USB%20Data%20Sync%20Charging%20Charger%20Cable%20Apple%20iPhone%204G%204S%20iPod%20Touch%20Nano Javascript Code :: function addToWishlist(num) { var myurl = "addToWishlist.php"; var myurl1 = myurl; myRand = parseInt(Math.random()*999999999999999); var rand = "?rand="+myRand ; var modurl = myurl1+ rand + "&image=" + encodeURI(storeArray[num][1]) + "&prod=" + encodeURI(storeArray[num][0]); httpq2.open("GET", modurl, true); httpq2.onreadystatechange = useHttpResponseq2; httpq2.send(null); } function useHttpResponseq2() { if (httpq2.readyState == 4) { if(httpq2.status == 200) { var mytext = httpq2.responseText; document.getElementById('wish' + num).innerHTML = "Added to your wishlist."; } } } Server Code <?php include('/home/ankit/public_html/connect_db.php'); $image = $_GET['image']; $prod = $_GET['prod']; $id = $_GET['id']; echo $prod; echo $image; ?> As I mentioned, its pretty basics More Updates : On trying to send a POST request via AJAX to the server, it says :- Refused to set unsafe header "Content-length" Refused to set unsafe header "Connection"

    Read the article

< Previous Page | 3 4 5 6 7