Daily Archives

Articles indexed Wednesday April 14 2010

Page 20/122 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • PayPal for Indian Rupees(INR) any solution

    - by ahammed
    I am developing online shopping website, In shopping website all product are priced in Indian Rupees(INR). I am going to integrate My shopping cart to paypal payment gateway. I knew that pay pal does not support INR. So i have to convert INR to USD. Is there Any API service to convert INR to USD as automatically ?, If yes, give the details about that.

    Read the article

  • Changing Image In an ImageButton After Being Clicked?

    - by BuZzZzJaY
    Creating a game in Android using multiple ImageButtons to display an image from the drawable folder and I want to change the button to a different image after the button has been clicked on. Here is the code for my image button: <ImageButton android:id="@+id/b56" android:layout_width="45px" android:layout_height="45px" android:layout_gravity="center_vertical" android:src="@drawable/black" /> I can't find anything about how to change the actual image of the button. You can change the color of the button by using the following code in the java file: b32.setBackgroundColor(0xAA00AA00);

    Read the article

  • array with sessions, only prints one letter

    - by jolabero
    On login: $result = mysql_query("SELECT `id`, `username`, `email` FROM `users` WHERE `username` = '$username' AND `password` = '$passwd'"); $userdata = array('id','username','email'); $_SESSION['user'] = mysql_result($result, 0, $userdata); And when i want to print the users username echo $_SESSION['user']['username'] it only prints the first letter :/ whats wrong`?

    Read the article

  • Getting a Spring resource

    - by Javi
    Hello, I'm trying to read a css file with the Resources provided by Spring. My application looks like this: src src/com herer my classes inside packages WebContent WebContent/resources/style/myCSS.css -- the css I want to read WebContent/WEB-INF -- here is my application-context.xml I can get the css and read it by doing something like this: UrlResource file = new UrlResource("http://localhost:8080/myApp/resources/style/myCSS.css"); but it depends on the server and aplication names. I've tried to do it by other implementations of Resource Interface, but the file is not found cause I can't find out how to wite the path. I've tried with this: FileSystemResource file = new FileSystemResource("/WebContent/resources/style/myCSS.css"); I also tried with wildcards, but it doesn't find the file either. ApplicationContext ctx = new FileSystemXmlApplicationContext("classpath*:/WEB-INF/application-context-core.xml"); Resource file = ctx.getResource("file:**/myCSS.css"); How should I write the path to get the css. Thanks.

    Read the article

  • How do you implement a combobox filter using AJAX in ASP.NET?

    - by geocine
    To save some time on discussing my problem you could check the demo below: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx I already checked the ListBoxExtender on the Ajax Control Toolkit but it wouldn't give me fine results. What I want to do is to filter a listbox which is populated by over 3000 records from the database upon typing. It should not only filter the listbox with the starting letters but also the group of characters which could be found in between each item on the list. The list is a list of Item Name as a value and an Item Code as the key.

    Read the article

  • Assign delegate event handler from dynamically added child control

    - by mickyjtwin
    I have a control that handles commenting. In this control, I have set a delegate event handler for sending an email. I then have various types of controls, e.g. blog, articles etc, each of which may or may not have the commenting control added (which is done dynamically with me not knowing the id's), i.e. the commenting control is added outside this control. Each of these controls handles it's emailing differently(hence the event). What I'm trying to determine, is how to assign the event in the parent control. At the moment, I'm having to recursively search through all the controls on the page until I find the comment control, and set it that way. Example below explains: COMMENTING CONTROL public delegate void Commenting_OnSendEmail(); public partial class Commenting : UserControl { public Commenting_OnSendEmail OnComment_SendEmail(); private void Page_Load(object sender, EventArgs e) { if(OnComment_SendEmail != null) { OnComment_SendEmail(); } } } PARENT CONTROL public partial class Blog : UserControl { private void Page_Load(object sender, EventArgs e) { Commenting comControl = (Commenting)this.FindControl<Commenting>(this); if(comControl != null) { comCtrol.OnComment_SendEmail += new Commenting_OnSendMail(Blog_Comment_OnSendEmail); } } } Is there an easier way?

    Read the article

  • Adding RESTful route to Rails app

    - by macek
    I'm reading these two pages resources Adding more RESTful actions The Rails Guides page shows map.resources :photos, :new => { :upload => :post } And its corresponding URL /photos/upload This looks wonderful. My routes.rb shows this map.resources :users, :new => { :signup => :get, :register => :post } When I do: [~/my_app]$ rake routes I see the two new routes added signup_new_user GET /users/new/signup(.:format) register_new_user POST /users/new/register(.:format) Note the inclusion of /new! I don't want that. I just want /users/signup and /users/register (as described in the Rails Routing Guide). Any help?

    Read the article

  • jQuery block UI exceptions

    - by Chirantan
    I am using JQuery UI plugin blockUI to block UI for every ajax request. It works like a charm, however, I don't want to block the UI (Or at least not show the "Please wait" message) when I am making ajax calls to fetch autocomplete suggest items. How do I do that? I am using jquery autocomplete plugin for autocomplete functionality. Is there a way I can tell the block UI plug-in to not block UI for autocomplete?

    Read the article

  • What is the Proper approach for Constructing a PhysicalAddress object from Byte Array

    - by Paul Farry
    I'm trying to understand what the correct approach for a constructor that accepts a Byte Array with regard to how it stores it's data (specifically with PhysicalAddress) I have an array of 6 bytes (theAddress) that is constructed once. I have a source array of 18bytes (theAddresses) that is loaded from a TCP Connection. I then copy the 6bytes from theAddress+offset into theAddress and construct the PhysicalAddress from it. Problem is that the PhysicalAddress just stores the Reference to the array that was passed in. Therefore if you subsequently check the addresses they only ever point to the last address that was copied in. When I took a look inside the PhysicalAddress with reflector it's easy to see what's going on. public PhysicalAddress(byte[] address) { this.changed = true; this.address = address; } Now I know this can be solved by creating theAddress array on each pass, but I wanted to find out what really is the best practice for this. Should the constructor of an object that accepts a byte array create it's own private Variable for holding the data and copy it from the original Should it just hold the reference to what was passed in. Should I just created theAddress on each pass in the loop

    Read the article

  • C++, is it possible to obtain the dimension of an array?

    - by aaa
    hi. Suppose I have some pointer, which I want to reinterpret as static dimension array reference: double *p; double (&r)[4] = ?(p); // some construct? // clarify template< size_t N> void function(double (&a)[N]); ... double *p; function(p); // this will not work. // I would like to cast p as to make it appear as double[N] Is it possible to do so? how do I do it?

    Read the article

  • Strange exception while using linq2sql

    - by zerkms
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: mapping Source Error: Line 45: #endregion Line 46: Line 47: public db() : Line 48: base(global::data.Properties.Settings.Default.nanocrmConnectionString, mappingSource) Line 49: { this is what i get if i implement such class: partial class db { static db _db = new db(); public static db GetInstance() { return _db; } } db is a linq2sql datacontext why this hapenned and how to solve this?

    Read the article

  • send post data in jsf

    - by milostrivun
    I just cannot figure this out, it looks really simple but I'm relatively new at jsf. Here is the old stuff: Plain old html form tag like this: <form name="someForm" action="somewhere" method="post"> <input name="param1"/> <input name="param2" /> </form That is sending data by post to a location specified in the action attribute of the form. The new stuff: <h:form id="paymentForm"> <h:panelGroup> <h:inputText id="param1" value="#{facesView.param1}" ></h:inputText> <h:inputText id="param1" value="#{facesView.param2}" ></h:inputText> <h:panelGroup> <h:commandLink>Submit</h:commandLink> </h:panelGroup> </h:form> This other new stuff doesn't work. 1.How do I specify to this h:form where to go(like setting action in old html) because I need it to go to a totally new url. 2.how to pass params with POST? Any help is appreciated. Milos

    Read the article

  • Cake php menu generation

    - by RSK
    hai everyone........ I am trying to generate dynamic menu according to the user permission given with ACL component in cake php.. ie., if a user logins, i need to check which all actions are permitted for that specific user and according that list of actions i need to generate menu can any one help me to get all the permitted actions from the acos,aros,acos_aros tables thanks in advance

    Read the article

  • Passcode functionality for iPhone app?

    - by David Liu
    I was thinking about putting in PIN number functionality within my iPhone app (various examples can be seen here http://forums.mint.com/showthread.php?t=5956 ), but I was kinda stumped how to go about it. Should I just go with a hidden textfield and simulate the inputs with images?

    Read the article

  • Silverlight WCF service acting strange

    - by Caleb Sandfort
    Hi I have a silverlight project that calls into a wcf service. Everything works fine on my local machine. However when I deploy to a virtual machine, with the exact same query the wcf service returns, but the result is empty. I've tried debugging, but have not been able to get it to break in the wcf service. Any ideas what the problem could be, or how I could go about debugging it? Thanks I figured out what the problem is, but am not sure what the solution is. In my silverlight project the wcf service I am referencing is http://localhost/.../SilverlightApiService.svc I used fiddler on my vm to see the request that was made and instead of trying to contact the above service, it was trying to contact: http:///.../SilverlightApiService.svc So, for some reason my machine name is getting inserted in there instead of localhost. Any thoughts on this would be appreciated.

    Read the article

  • Connecting to mssql in Php - Extension Err

    - by John Doe
    <html> <head> <title>Connecting </title> </head> <body> <?php $host = "*.*.*.*"; $username = "xxx"; $password = "xxx"; $db_name = "xxx"; $db = mssql_connect($host, $username,$password) or die("Couldnt Connect"); $selected = mssql_select_db($db_name, $db) or die("Couldnt open database"); ?> </body> </html> My error message is: Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\php\dbase.php on line 12 I am using WampServer 2.0 on Php 5.3.0 When I check the extensions, php_mssql is Checked. I also checked the php.ini file to make sure it is not commented out. I have my file dbase.php saved in C:\wamp\www\php. I have tried stopping the service, closing everything, and running it again. I know the problem is that the extension file is not being included somehow. The below is copied from my php.ini file. Note I made all http = /http to avoid posting Links. ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; Windows: "\path1;\path2" include_path = "C:\wamp\bin\php\php5.3.0\ext" ; ; PHP's default setting for include_path is ".;/path/to/php/pear" ; /http://php.net/include-path ; The root of the PHP pages, used only if nonempty. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if you are running php as a CGI under any web server (other than IIS) ; see documentation for security issues. The alternate is to use the ; cgi.force_redirect configuration below ; /http://php.net/doc-root doc_root = ; The directory under which PHP opens the script using /~username used only ; if nonempty. ; /http://php.net/user-dir user_dir = ; Directory in which the loadable extensions (modules) reside. ; /http://php.net/extension-dir ; extension_dir = "./" ; On windows: ; extension_dir = "ext" extension_dir = "c:/wamp/bin/php/php5.3.0/ext/" ; Whether or not to enable the dl() function. The dl() function does NOT work ; properly in multithreaded servers, such as IIS or Zeus, and is automatically ; disabled on them. ; /http://php.net/enable-dl enable_dl = Off ; cgi.force_redirect is necessary to provide security running PHP as a CGI under ; most web servers. Left undefined, PHP turns this on by default. You can ; turn it off here AT YOUR OWN RISK ; You CAN safely turn this off for IIS, in fact, you MUST. ; /http://php.net/cgi.force-redirect ;cgi.force_redirect = 1 ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with ; every request. PHP's default behavior is to disable this feature. ;cgi.nph = 1 ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP ; will look for to know it is OK to continue execution. Setting this variable MAY ; cause security issues, KNOW WHAT YOU ARE DOING FIRST. ; /http://php.net/cgi.redirect-status-env ;cgi.redirect_status_env = ; ; cgi.fix_pathinfo provides real PATH_INFO/PATH_TRANSLATED support for CGI. PHP's ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ; /http://php.net/cgi.fix-pathinfo ;cgi.fix_pathinfo=1 ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate ; security tokens of the calling client. This allows IIS to define the ; security context that the request runs under. mod_fastcgi under Apache ; does not currently support this feature (03/17/2002) ; Set to 1 if running under IIS. Default is zero. ; /http://php.net/fastcgi.impersonate ;fastcgi.impersonate = 1; ; Disable logging through FastCGI connection. PHP's default behavior is to enable ; this feature. ;fastcgi.logging = 0 ; cgi.rfc2616_headers configuration option tells PHP what type of headers to ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that ; is supported by Apache. When this option is set to 1 PHP will send ; RFC2616 compliant header. ; Default is zero. ; /http://php.net/cgi.rfc2616-headers ;cgi.rfc2616_headers = 0 ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. ; /http://php.net/file-uploads file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ; /http://php.net/upload-tmp-dir upload_tmp_dir = "c:/wamp/tmp" ; Maximum allowed size for uploaded files. ; /http://php.net/upload-max-filesize upload_max_filesize = 2M Also, my php.ini file is saved in: C:\wamp\bin\apache\Apache2.2.11\bin

    Read the article

  • Boxy Submit Form

    - by jornbjorndalen
    I am using the boxy jQuery plugin in my page to display a form on a clickEvent for the fullCalendar plugin. It is working all right , the only problem I have is that the form in boxy brings up the confirmation dialog the first time the dialog is opened and when the user clicks "Ok" it submits the form a second time which generates 2 events on my calendar and 2 entries in my database. My code looks like this inside fullCalendar: dayClick: function(date, allDay, jsEvent, view) { var day=""+date.getDate(); if(day.length==1){ day="0"+day; } var year=date.getFullYear(); var month=date.getMonth()+1; var month=""+month; if(month.length==1){ month="0"+month; } var defaultdate=""+year+"-"+month+"-"+day+" 00:00:00"; var ele = document.getElementById("myform"); new Boxy(ele,{title: "Add Task", modal: true}); document.getElementById("title").value=""; document.getElementById("description").value=""; document.getElementById("startdate").value=""+defaultdate; document.getElementById("enddate").value=""+defaultdate; } I also use validators on the forms fields: $.validator.addMethod( "datetime", function(value, element) { // put your own logic here, this is just a (crappy) example return value.match(/^([0-9]{4})-([0-1][0-9])-([0-3][0-9])\s([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$/); }, "Please enter a date in the format YYYY-mm-dd hh:MM:ss" ); var validator=$("#myform").validate({ onsubmit:true, rules: { title: { required: true }, startdate: { required: true, datetime: true }, enddate: { required: true, datetime: true } }, submitHandler: function(form) { //this function renders a new event and makes a call to a php script that inserts it into the db addTask(form); } }); And the form looks like this: <form id ='myform'> <table border='1' width='100%'> <tr><td align='right'>Title:</td><td align='left'><input id='title' name='title' size='30'/></td></tr> <tr><td align='right'>Description:</td><td align='left'><textarea id='description' name='description' rows='4' cols='30'></textarea></td></tr> <tr><td align='right'>Start Date:</td><td align='left'><input id='startdate' name='startdate' size='30'/></td></tr> <tr><td align='right'>End Date:</td><td align='left'><input id='enddate' name='enddate' size='30' /></td></tr> <tr><td colspan='2' align='right'><input type='submit' value='Add' /></td></tr> </table> </form>

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >