Search Results

Search found 348 results on 14 pages for 'joseph carp'.

Page 12/14 | < Previous Page | 8 9 10 11 12 13 14  | Next Page >

  • Reset selection of wx.lib.calendar.Calendar control?

    - by Joseph
    I have a wx.lib.calendar.Calendar control (not wx.lib.calendar.CalendarCtrl!). I am selecting a number of days using the following function call: self.cal.AddSelect([days], 'green', 'white') This works, and draws the days highlighted. However, I cannot work out how to reverse this (i.e., clear the selection so the days go back to their normal colouring). Any hints, please?

    Read the article

  • How to change the wordpress header request

    - by Joseph Carrington
    Let us say that I have a form to search by multiple tags in wordpress. <input type="checkbox" name="my_tags[]" value="tag1" /> <input type="checkbox" name="my_tags[]" value="tag2" /> I want to make it so that when my plugin sees that my_tags[] is set, it rewrites the request to say mysite.com/?tag=tag1+tag2 I know to use add_query_arg to put in the tag, and to use the query_vars filters to allow my arguments to be sent, but what do i hook into to get the arguments that were sent after the request, but before wp parses the request?

    Read the article

  • Rails, different routes for production app.

    - by Joseph Silvashy
    Well, maybe not just different routes. Here is the issue at hand, we have an app that we want to present the users with a "beta sign-up" form when the app is running in production, but we still want to be able to login, however in development the app should function normally. For example in development the app's root path would be the page that show's all the products (using a store as an example) but in production we want the app to present the user with a beta page that just has a form for leaving an email, but also be able to sign-in for users that have accounts. We don't need any help with authentication, that's all sorted out more just the setup of redirecting users to the beta page in production so they can't explore the site unless they are logged in. We are using Devise so I thought maybe we could put something in our application controller that's like: before_filter :authenticate_user! if ENV['RAILS_ENV'] == 'production' But that doesn't seem like it works.

    Read the article

  • Nginx redirect if cookie present

    - by Joseph Silvashy
    I've seen some limited resources on checking for cookies with Nginx, but I couldn't really find the answer I was looking for, hopefully some of you Nginx masters can give me a hand. Essentially I have a vhost that I'd like to redirect to a different domain unless the user has a cookie, here is what I've created: server { listen 80; server_name rerecipe.com; if ($http_cookie ~* "ngl_beta_pass" ) { # set $beta off; root /home/deploy/apps/rerecipe/current/public; passenger_enabled on; rack_env production; break; } rewrite ^/(.*) http://beta.rerecipe.com/$1 permanent; } But it doesn't seem to work, I get the error: [emerg]: "root" directive is not allowed here in /opt/nginx/conf/nginx.conf:45 I'm not sure how to proceed here, any ideas guys?

    Read the article

  • When loading shopping cart in Magento with a new Payment module, I get an error I haven't been able

    - by Joseph
    I am trying to add a new payment module into Magento. However, even after commenting out the vast majority of the code, I still get the following error: Fatal error: Call to a member function isAvailable() on a non-object in /var/www/html/app/code/core/Mage/Payment/Helper/Data.php on line 71 I am using Magento 1.4.0.1, and have disabled the cache. I even emptied the cache several times just in case. The only code currently not commented out is based on the tutorials here and here. The error occurs when the cart is loaded either from the administration area or the front end. Is there anyone out there that has run into a similar issue? I would post code, but I am not sure what needs to be posted. Thanks for the assistance.

    Read the article

  • Rails editing multiple records at once

    - by Joseph Silvashy
    I feel like this might be really simple but I'm just not getting it right, so I have like a settings page in my app and I want each setting to be like a key value store, for example: +-------------------+--------------------------------+ | setting | value | +-------------------+--------------------------------+ | twitter_username | something | +-------------------+--------------------------------+ | facebook_url | http://facebook.com/someguy | +-------------------+--------------------------------+ My form looks something like this: <% form_tag set_admin_settings_path, :method => :put do %> <ol> <% for setting in @settings %> <li class="field"> <label><%= setting.setting_name.humanize %></label> <%= text_field_tag "[setting_value][]", setting.setting_value %> </li> <% end %> <li class="submit"> <%= submit_tag "Update settings" %> </li> </ol> <% end %> Everything renders fine but when I try to save the form, nothing is saved :(

    Read the article

  • How do I load content with ujs, jquery and rails?

    - by Joseph Silvashy
    I'm trying to figure out the best way to insert content into a light box using rails UJS. I have a link that looks like this: <%= link_to "login", login_path, :remote => true %> Which produces html as such: <a data-remote="true" href="/login">login</a> So this all works great, and I've created the view file: user_sessions/new.js.erb which also loads just fine, but my question what is the preferred method of inserting appending the html into the page? Like I already have the login form on the non-js page, so can't I just load that partial into the page? Any ideas would be very welcomed.

    Read the article

  • Where I can get icons for my app?

    - by joseph
    Hello, I am looking for some icons for my app. I need some icons that represent UML, for example New diagram, new activity, new "arrow" or something that connects two activities or something like that. And lot more. And they should be free for commercial use.

    Read the article

  • How to find whole graph coverage path in dynamic state-flow diagram?

    - by joseph
    Hello, As I've been researching algorithms for path finding in graph, I found interesting problem. Definition of situation: 1)State diagram can have p states, and s Boolean Fields, and z Int Fields 2)Every state can have q ingoing and r outgoing transitions, and h Int fields (h belongs to z - see above) 3)Every transition can have only 1 event, and only 1 action 4)every action can change n Boolean Fields, and x Int Fields 5)every event can have one trigger from combination of any count of Boolean Fields in diagram 6)Transition can be in OPEN/CLOSED form. If the transition is open/closed depends on trigger2 compounded from 0..c Boolean fields. 7) I KNOW algorithm for finding shortest paths from state A to state B. 8) I KNOW algorithm for finding path that covers all states and transitions of whole state diagram, if all transitions are OPEN. Now, what is the goal: I need to find shortest path that covers all states and transitions in dynamically changing state diagram described above. When an action changes some int field, the algorithm should go through all states that have changed int field. The algorithm should also be able to open and close transition (by going through transitions that open and close another transitions by action) in the way that the founded path will be shortest and covers all transitions and states. Any idea how to solve it? I will be really pleased for ANY idea. Thanks for answers.

    Read the article

  • Should I cache the XRDS file returned in openid?

    - by Joseph
    In the initial part of the openid sequence, I request the OP (e.g. Yahoo.com) and get back the XRDS file which tells me the actual URL I need to use for the rest of the openid process. So, can I cache this initial file. E.g. if I have hundreds of users using a Yahoo openid, I would only have to do the initial fetch once every hour?

    Read the article

  • How to delete from table if count is greater than 20

    - by joseph
    Hi, I have a mysql table that I need to only contain 20 newest records before adding additional records. New rows are added daily so I would like it first delete any records that are greater than the 20 allowed starting with the earliest. The table contains an auto increment "id" column so I can easily determine which is the earliest records. Thanks for any help.

    Read the article

  • Can I pass a string variable into an <a href> tag for a website link?

    - by Joseph
    I am somewhat new to web developing, so I am trying to learn along the way. I have a div that is 500 x 500. Inside of that div I have two divs that are each 250x500. So my outer div is filled up with the two inner divs. I have it setup so that when I click on the first div (the left one) a java script is called, and a prompt pop up box asks for a website URL which is then stored inside of a string variable. How can I make it so that the second div (the right one) takes the string variable from the alert box from the left div and puts it into an a href tag so that I can link to the website from the right div? Can a a href tag accept a value from a variable for its link? Maybe I am going about this all wrong, is there a better way I should be approaching this? Any help is appreciated!!

    Read the article

  • php soapclient returns null but getPreviousResults has proper results

    - by Joseph.Chambers
    I've ran into trouble with SOAP, I've never had this issue before and can't find any information on line that helps me solve it. The following code $wsdl = "path/to/my/wsdl"; $client = new SoapClient($wsdl, array('trace' => true)); //$$textinput is passed in and is a very large string with rows in <item></item> tags $soapInput = new SoapVar($textinput, XSD_ANYXML); $res = $client->dataprofilingservice(array("contents" => $soapInput)); $response = $client->__getLastResponse(); var_dump($res);//outputs null var_dump($response);//provides the proper response as I would expect. I've tried passing params into the SoapClient constructor to define soap version but that didnt' help. I've also tried it with the trace param set to false and not present which as expected made $response null but $res was still null. I've tried the code on both a linux and windows install running Apache. The function definition in the WSDL is (xxxx is for security reasons) <portType name="xxxxServiceSoap"> <operation name="dataprofilingservice"> <input message="tns:dataprofilingserviceSoapIn"/> <output message="tns:dataprofilingserviceSoapOut"/> </operation> </portType> I have it working using the __getLastResponse() but its annoying me it will not work properly. I've put together a small testing script, does anyone see any issues here. //very simplifed dataset that would normally be //read in from a CSV file of about 1mb $soapInput = getSoapInput("asdf,qwer\r\nzzxvc,ewrwe\r\n23424,2113"); $wsdl = "path to wsdl"; try { $client = new SoapClient($wsdl,array('trace' => true,'exceptions' => true)); } catch (SoapFault $fault) { $error = 1; var_dump($fault); } try { $res = $client->dataprofilingservice(array("contents" => $soapInput)); $response = $client->__getLastResponse(); echo htmlentities($client->__getLastRequest()); echo '<hr>'; var_dump($res); echo "<hr>"; echo(htmlentities($response)); } catch (SoapFault $fault) { $error = 1; var_dump($fault); } function getSoapInput($input){ $rows = array(); $userInputs = explode("\r\n", $input); $userInputs = array_filter($userInputs); // $inputTemplate = " <contents>%s</contents>"; $rowTemplate = "<Item>%s</Item>"; // $soapString = ""; foreach ($userInputs as $row) { // sanitize $row = htmlspecialchars(addslashes($row)); $xmlStr = sprintf($rowTemplate, $row); $rows[] = $xmlStr; } $textinput = sprintf($inputTemplate, implode(PHP_EOL, $rows)); $soapInput = new SoapVar($textinput, XSD_ANYXML); return $soapInput; }

    Read the article

  • Curls and file_get_contents times out when loading a page

    - by Joseph
    Im trying to grab the content of this page(http://www.alluc.org/movies/watch-hot-tub-time-machine-2010-online/186214.html) using curl or file_get_contents but it doesnt work, it loads when i just open it in the browser, but not otherwise. Here are my settings for CURL: curl_setopt($ch1, CURLOPT_INTERFACE, "$use_proxy"); curl_setopt($ch1, CURLOPT_URL, $url); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch1, CURLOPT_REFERER, 'http://'.$domain); curl_setopt($ch1, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"); curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, TRUE); echo curl_setopt($ch1, CURLOPT_HEADER, 1); curl_setopt($ch1, CURLOPT_VERBOSE, true); It works fine for other sites just not this one for some reason, any clue as to how to make it work ? Thanx. Heres the info from curl_getinfo($ch1): [url] => http://www.alluc.org/movies/watch-hot-tub-time-machine-2010-online/186214.html [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0 [namelookup_time] => 0.002578 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0

    Read the article

  • how to create internal frame?

    - by joseph
    I created class NewProject extends JInternalFrame. Then I create New...Action named "NEW", localised in File menu. I put code NewProject p = new NewProject(); p.setVisible(true); to the ActionPerformed method of the action. But when I run the module and click "NEW" in file menu, nothing appears. Where can be problem?

    Read the article

  • Rails: creating a model in the new action

    - by Joseph Silvashy
    I have an interesting situation, well it's probably not that unique at all, but I'm not totally sure how to tackle it. I have a model, in this case a recipe and the user navigates to the new path /recipes/new however the situation is that I need to be able to have the user upload images and make associations to that model in the new action, but the model doesn't have an ID yet. So I assume I need to rethink my controller, but I don't want to have redirects and whatnot, how can accomplish this? Here is the basic controller, barebones obviously: ... def new # I should be creating the model first, so it has an ID @recipe = Recipe.new end def create @recipe = Recipe.new(params[:recipe]) if @recipe.save redirect_to @recipe else render 'new' end end ... update Perhaps I can have a column thats like state which could have values like new/incomplete/complete or what-have-you. I'm mostly trying to figure out what would also be most efficient for the DB. It would be nice if I could still have a url that said '/new', instead of it be the edit path with the id, for usability sake, but I'm not sure this can be simply accomplished in the new action of my controller. Thoughts?

    Read the article

  • Strange PHP syntax

    - by Joseph
    I've been working on php for some time but today when I saw this it came as new to me: if(preg_match('/foo.*bar/','foo is a bar')): echo 'success '; echo 'foo comes before bar'; endif; To my surprise it also runs without error. Can anyone enlighten me?

    Read the article

  • Rails, making certain multiparameter attributes optional?

    - by Joseph Silvashy
    Is there a method already part of Rails for making certain parameters option when part of a multiparameter attribute, for example say I'm prompting a user for their birthday, when saved the has may look like this: "birthday(2i)"=>"8", "birthday(3i)"=>"17", "birthday(1i)"=>"1980"}, ... But the issue arises when say I want to allow the user to just provide their month and day, making the year optional, how would this work being a datetime object, I'm assuming you can't do this as a date object... but any ideas would be helpful. Happy new year.

    Read the article

  • Running ARM assembly code in Android

    - by Robert Joseph Dacunto
    I've been following the guide posted here, trying to get this Hello, World program to run on my Samsung Galaxy S3. It's rooted already, and I successfully pushed the "hello" file onto the sdcard. Now when I enter the shell as the superuser (# instead of $), and try to run the file, I get "cannot execute - permission denied". I used chmod 755 hello to see if that would fix it, still nothing. Is there something I'm missing? This is my first time fiddling around with Android, just got the phone, and wanted to see if I could get this to work. Very new to it all. Thanks!

    Read the article

  • PHP CURL works fine from localhost not from server

    - by Joby Joseph
    I have 2 servers, srv1 and srv2. All client sites are stored in srv2 and all authentication details are stored in srv1. Each time a client site is loaded, the site in srv2 sends a curl request to srv1 to validate. I am always getting bool(false) when I print the curl response using var_dump. But if I am requesting for validation from my local wamp installation(localhost) it is perfectly returning the response. According to my understanding srv2 is blocking srv1 ip or something like that. Any help or suggestions will be greatly appreciated. The solution is really urgent as all my clients are stuck with invalid authorization message. Edit: Now when i tested curl in srv2 is working fine i think. Because I am able to fetch other websites without any trouble. But I am not able to fetch data from srv1. I can view a page from srv1 through browser url but not through curl.

    Read the article

  • making "Untraceable"-like calls

    - by infoquad
    In the movie Untraceable(http://www.imdb.com/title/tt0880578/), the killer(Joseph Cross as KillWithMe.com's webmaster) makes a telephone call with a computer and using some software(that convert's the actor's voice to female) fakes himself as a girl. While the converting part may be technologically difficult to accomplish at this time, I wanted to ask whether it is possible to make calls with a computer, record the conversations and play an mp3 file so the other person hears it? How can this be done?

    Read the article

< Previous Page | 8 9 10 11 12 13 14  | Next Page >