Search Results

Search found 163 results on 7 pages for 'pankaj'.

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

  • How to create a voldemort store?

    - by Pankaj
    I am trying to understand the Voldemort java API. I am new to non relational databases, so as I understand, Voldemort's store can be compared to a table in relational model. I saw the following code in the documentation. String bootstrapUrl = "tcp://localhost:6666"; StoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl)); // create a client that executes operations on a single store StoreClient client = factory.getStoreClient("test"); Here, we got a Store client based on the an existing store (test). How can I actually create a store for Voldemort through java?

    Read the article

  • Array Intersect giving wrong output

    - by Pankaj Khurana
    Hi, I need to find common elements between two arrays. My code is: $sql="SELECT DISTINCT fk_paytbl_discounts_discountid as discountid from paytbl_discounts_students WHERE fk_vtiger_cf_601='".$categoryid."'"; $discountstudentinfo=$objdb->customQuery($sql,false); $sql1="SELECT DISTINCT fk_paytbl_discounts_discountid as discountid from paytbl_discounts_variants WHERE fk_vtiger_products_productid='".$variantid."'"; $discountvariantinfo=$objdb->customQuery($sql1,false); $commondiscount=array_intersect($discountvariantinfo,$discountstudentinfo); First array Array ( [0] => Array ( [discountid] => 2 ) [1] => Array ( [discountid] => 8 ) [2] => Array ( [discountid] => 5 ) [3] => Array ( [discountid] => 4 ) ) Second array Array ( [0] => Array ( [discountid] => 1 ) [1] => Array ( [discountid] => 5 ) ) Common array Array ( [0] => Array ( [discountid] => 1 ) [1] => Array ( [discountid] => 5 ) ) Common array should have only discountid 5 but its showing 1 also. Please help me on this Thanks

    Read the article

  • javascript error handling

    - by pankaj
    I have a javascript function for checking errors which I am calling on OnClicentClick event of a button. Once it catch a error I want to stop execution of the click event. But in my case it always it always executes the onclick event. Following is my function: function DisplayError() { if (document.getElementById('<%=txtPassword.ClientID %>').value.length < 6 || document.getElementById('<%=txtPassword.ClientID %>').value.length > 12) { document.getElementById('<%=lblError.ClientID %>').innerText = "Password length must be between 6 to 12 characters"; return false; } var str = <%=PhoneNumber()%>; if(str.length <10) { alert('<%=phoneNum%>'.length); document.getElementById('<%=lblError.ClientID %>').innerText = "Phone Number not in correct format"; return false; } } button html code: <asp:Button runat="server" Text="Submit" ID="btnSubmit" ValidationGroup="submit" onclick="btnSubmit_Click" OnClientClick="DisplayError()"/> It should not execute the button click event once it satisfies any of the IF condition in the javascript function.

    Read the article

  • Remove %20 from URL using jquery

    - by Pankaj
    hello all When i am trying to get query string value from URL using JQuery, It replace space to %20 for each 1 space.If there are 3space then my query string value contain %20 3times. i want to replace these %20 back with space using Jquery, so that i can use these query string value. How can i do this.

    Read the article

  • Rails: Extracting the raw url from the request

    - by pankajbhageria
    I am working with Rails 2.2. The required behaviour is as follows: I have a link(with a ajax link embedded) xyz.com/admin#page1 When I go to the above page, I should be redirected to the login page, if I am not logged in. After I log in, I should be taken back to xyz.com/admin#page1 For this I need to store the url in session when I visit any page. The problem is that when I do request.uri, I get xyz.com/admin But I want to store xyz.com/admin#page1 Regards, Pankaj

    Read the article

  • In an asp.net, how to get a reference of a custom webcontrol from a usercontrol?

    - by AJ
    Hi I have a page which holds a custom webcontrol and a usercontrol. I need to reference of webcontrol in usercontrol class. So, I make the declaration of webcontrol as public in page class. But, when I do “this.Page.”, I don’t see the webcontrol listed in list provided by intellisense. Most probably, I am missing something. In an asp.net page, how to get a reference of a custom webcontrol from a usercontrol? Please advise. Thanks Pankaj

    Read the article

  • adding custom fields dynamically to a model

    - by pankajbhageria
    I have a model called List which has many records: class List has_many :records end class Record end The table Record has 2 permanent fields: name, email. Besides these 2 fields, for each List a Record can have 'n' custom fields. For example: for list1 I add address(text), dob(date) as custom fields. Then while adding records to list one, each record can have values for address and dob. Is there any ActiveRecord plugin which provides this type of functionality? Or else could you share your thoughts on how to model this? Thanks in advance, Pankaj

    Read the article

  • RIM blackberry Record 3GP video

    - by pankaj_shukla
    Hi All, I am writing an application that can record a 3GP video. I have tried both MMAPI and Invoke API. But have following issues. Using MMAPI: 1. When I record to stream, It records video in RIMM streaming format. when I try to play this video player gives error "Unsupported media format.". 2. When I record to a file. It will create a file of size 0. Using Invoke API: 1. In MMS mode it does not allow to record a video more than 30 seconds. 2. In Normal mode size of the file is very large. 3. Once I invoke camera application I do not have any control on application. Here is my source code: _player = javax.microedition.media.Manager .createPlayer("capture://video?encoding=video/3gpp&mode=mms"); // I have tried every encoding returns from System.getProperty("video.encodings") method _player.realize(); _videoControl = (VideoControl) _player.getControl("VideoControl"); _recordControl = (RecordControl) _player.getControl("RecordControl"); _volumeControl = (VolumeControl) _player.getControl("VolumeControl"); String videoPath = System.getProperty("fileconn.dir.videos"); if (videoPath == null) { videoPath = "file:///store/home/user/videos/"; } _recordControl.setRecordLocation(videoPath + "RecordedVideo.3gp"); _player.addPlayerListener(this); Field videoField = (Field) _videoControl.initDisplayMode( VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field"); _videoControl.setVisible(true); add(videoField); _player.start(); ON start menu item Selection: try { _recordControl.startRecord(); } catch (Exception e) { _player.close(); showAlert(e.getClass() + " " + e.getMessage()); } On stop menuItem selection: try { _recordControl.commit(); } catch (Exception e) { _player.close(); showAlert(e.getClass() + " " + e.getMessage()); } Please let me if I am doing something wrong. Thanks, Pankaj

    Read the article

< Previous Page | 3 4 5 6 7