Search Results

Search found 3650 results on 146 pages for 'cross'.

Page 42/146 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Rails - Dynamic cookie domains using Rack

    - by Tim B.
    I'm fairly new to Rails and Rack, but this guy had a seemingly straightforward write-up about using Rack to implement dynamic session domain middleware. The code looks good to and I've implemented it here on my local machine, but I'm still not able to transcend top level domains on a single login. Here's the middleware code: class SetCookieDomain def initialize(app, default_domain) @app = app @default_domain = default_domain end def call(env) host = env["HTTP_HOST"].split(':').first env["rack.session.options"][:domain] = custom_domain?(host) ? ".#{host}" : "#{@default_domain}" @app.call(env) end def custom_domain?(host) domain = @default_domain.sub(/^\./, '') host !~ Regexp.new("#{domain}$", Regexp::IGNORECASE) end end And then in environment.db: config.load_paths += %W(#{RAILS_ROOT}/app/middlewares) Lastly in production.db (and development.db): config.middleware.use "SetCookieDomain", ".example.org" Any help is greatly appreciated. EDIT: I'm running Rails 2.3.3 and Rack 1.0

    Read the article

  • CSS Differences Between IE and FF

    - by Joe Majewski
    I hope I'm not breaking any rules by asking a question that pertains to a project I'm working on. If you view my page here and view it in Firefox and again in Internet Explorer, the width of the main content boxes differs. In Firefox, everything aligns perfectly with the advertisement at the top of the page, but in IE, the width of the content boxes seems to fall short by about 20 or so pixels. My question is obvious by now, but what is causing the width in IE to fall short, and what would a simple solution be? If I happen to be breaking the rules by asking a question that is not generic enough to benefit others, then allow me to rephrase it; what would be the best approach to solving visual differences between browsers? Should I use a separate CSS file for IE, or is there a way to define lines in my CSS file that only get rendered by a specific browser? It would be best if someone could provide me with the necessary CSS to align things properly, but I would be more than happy to learn about how to make the CSS dynamic (if that's possible). Thanks everyone. :)

    Read the article

  • Why does this page look different between IE, Firefox & Chrome

    - by ripper234
    In Firefox it looks just like I want it to look, in IE it looks "a bit weird", and in Chrome it's all twisted. What non-standard HTML I am using that makes it looks so different between browsers? Specifically, how can I fix the Chrome & IE versions to look more like Firefox? Note that Chrome only goes haywire if all or almost all columns have the yellow stickies. If one or two columns are empty, then Chrome displays the page just like Firefox. The full HTML is at this pastebin.

    Read the article

  • Numbers localization

    - by Reza
    How can I set the variant of Arabic numeral without changing number characters ? Eastern Arabic ? ? ? ? ? ? ? ? ? ? Persian variant ? ? ? ? ? ? ? ? ? ? Western Arabic 0 1 2 3 4 5 6 7 8 9 here is a sample code: <!DOCTYPE html> <html> <meta charset="utf-8"> <head> <title></title> </head> <body> <div lang="fa">123456789</div> <div lang="ar">123456789</div> <div lang="en">123456789</div> </body> </html> Also note that in Windows text boxes (e.g. Run) numbers are displayed correctly according to surrounding text languages.

    Read the article

  • What's the current (as of April 2010) state of affairs regarding <object> vs <embed> in HTML?

    - by rvdm
    The age old question. <object> vs <embed>. From what I gather, <object> is the XHTML-compliant way of doing things, while <embed> is for legacy support. I'm currently building a Flash application that will contain a pre-made embedding code for users to copy and paste, and I'm wondering if it's feasible to simply dump the <embed> tag altogether. Which browsers would be unable to load my application if I gave my users an <object>-only embed code? Thanks :)

    Read the article

  • Need help/guidance about creating a desktop application with gui

    - by Somebody still uses you MS-DOS
    I'm planning to do an Desktop application using Python, to learn some Desktop concepts. I'm going to use GTK or Qt, I still haven't decided which one. Fact is: I would like to create an application with the possibility to be called from command line, AND using a GUI. So it would be useful for cmd fans, and GUI users as well. It would be interesting to create a web interface too in the future, so it could be run in a server somewhere using an html interface created with a template language. I'm thinking about two approaches: - Creating a "model" with a simple interface which is called from a desktop/web implementation; - Creating a "model" with an html interface, and embeb a browser component so I could reuse all the code in both desktop/web scenarios. My question is: which exactly concepts are involved in this project? What advantages/disadvantages each approach has? Are they possible? By naming "interface", I'm planning to just do some interfaces.py files with def calls. Is this a bad approach? I would like to know some book recommendations, or resources to both options - or source code from projects which share the same GUI/cmd/web goals I'm after. Thanks in advance!

    Read the article

  • Accessing ASP.NET Development Server from another pc on the network

    - by Paul Knopf
    I would like to test my web app in other browsers. I have installed Virtual PC to do just that. the ASP.NET development server does not allow remote connections so the virtual pc (another computer on the network) cannot access the website. I found this post that was started but there was no solution. I understand that using localhost will not work. I heard about using the machines ip, but how do I get that correct ip? Look at my lynksys router admin? If I were to get as far as getting my IP, im sure that the asp.net dev server does not allow remote connections. How do I enable it to do so?

    Read the article

  • Which browser versions do YouTube and Google Apps support?

    - by Alex
    Hi. We're building a site and wish to build for the same set of browsers Google Apps/Docs and YouTube support. Though not recommended, they seem to be detecting specific browsers/versions vs. features/functionality. What's the best way to support a minimum set of browsers while displaying a message to the users of older browsers to upgrade? What's the minimum set of browsers that the major sites are supporting? Thanks.

    Read the article

  • Why does this Javascript work in FF3.6? new Date("2010-06-09T19:20:30+01:00");

    - by thegaw
    Here's the sample code: var d = new Date("2010-06-09T19:20:30+01:00"); document.write(d); On FF3.6 this will give you: Wed Jun 09 2010 14:20:30 GMT-0400 (EST) Other browers tested; Chrome 5, Safari 4, IE7 give: Invalid Date I know there is limited to no support for ISO8601 dates, but does anyone know what and/or where the difference is in FF3.6 that allows this to work? My thought is that FF is just stripping out what it doesn't understand while the others are not. Has anyone else seen this and/or getting different results from the test script?

    Read the article

  • Sharing logic across different platforms

    - by Pranz
    Hello all, We have a business logic that works with the file systems on OS that we want to implement on both Linux and Windows platforms. The language we have selected is Python for Linux and C# for Windows. GUI is not a priority for now. We were looking for ways to abstract the business logic in a way that we dont have to repeat the business logic (ofcourse I understand since it is related to file system, some code will differ from platform to platform). Any ideas on how to implement it? Is C/C++ the only option. We dont want to use Java. Thanks, Pranz

    Read the article

  • Crossplatform development for iPhone & Android

    - by LeonixSolutions
    As far as I can see there doesn't seem to any mature environment for crossplatform development for iPhone & Android slate (but feel free to correct me). I don't know Ipad, I must admit. Any reason why plain Java wouldn't cut it? (maybe underlying things like database (I am not too concerned with hardware)) I am thinking to try to make everything browser based, although that won't get around the d/b & h/w issues, unless there is JS framework that does so. Any advice?

    Read the article

  • How to make IE and Firefox display hidden elements the same (IE shifts visible element)

    - by Dale
    Rendering the same html in IE and Firefox gives me a different result because in IE, the hidden checkbox is not ignored, from a layout perspective: <html><head> <style type="text/css"> <!-- #checkboxhide { position: relative; visibility: hidden; font-size: 8.5pt; font-weight: font-family: verdana;} //--> </style> </head><body> <table><tr> <td>|</td> <td><span id="checkboxhide"><input type="checkbox" hidden="" name="blah"></span>|Greetings Earthings</td> </tr></table> </body></html> How can I get the two (or more) browsers to show the same thing?

    Read the article

  • 3 div independently relative and top aligned

    - by Knu
    I have 3 div top aligned that should be relative to a previous div (not between them so i can't use floats or position:inline-block either). If you set display:none on 2 divs the last one shouldn't move. I can't use position:absolute because there's a relative footer underneath. I tried using a wrapper but it can't work cause the height of the divs is not fixed. The height of the wrapper gets completely ignored anyway (by the following footer) unless Im using relative children. vertical-align:top doesn't work either. Any ideas?

    Read the article

  • Embed form in another website - pitfalls

    - by Paddy
    Scenario: We provide a hosted site that clients pay to use internally (a tool to support their business workflow). We have a requirement to provide a form that the clients can 'embed' in their outward facing site. This form will permit a member of the public to enter some details to register an interest - this data will be pushed to our remote system. Question: I'm currently planning on creating a simple HTML page that the client's web guys can include in a simple fashion on their site (either using an iframe or an object tag). If I do this, am I going to run into difficulties when the user tries to submit the embedded form (as it will be going to different domain to the one they are currently browsing)? I had a look at google adsense and I see that they just provide a link to a JS file that renders their ads - I'm not sure I see the advantage in this, but if anybody has any bright ideas... Whatever technique that gets used, I'll have to authenticate the request as coming from my client's site(s).

    Read the article

  • Win32 reset event like synchronization class with boost C++

    - by fgungor
    I need some mechanism reminiscent of Win32 reset events that I can check via functions having the same semantics with WaitForSingleObject() and WaitForMultipleObjects() (Only need the ..SingleObject() version for the moment) . But I am targeting multiple platforms so all I have is boost::threads (AFAIK) . I came up with the following class and wanted to ask about the potential problems and whether it is up to the task or not. Thanks in advance. class reset_event { bool flag, auto_reset; boost::condition_variable cond_var; boost::mutex mx_flag; public: reset_event(bool _auto_reset = false) : flag(false), auto_reset(_auto_reset) { } void wait() { boost::unique_lock<boost::mutex> LOCK(mx_flag); if (flag) return; cond_var.wait(LOCK); if (auto_reset) flag = false; } bool wait(const boost::posix_time::time_duration& dur) { boost::unique_lock<boost::mutex> LOCK(mx_flag); bool ret = cond_var.timed_wait(LOCK, dur) || flag; if (auto_reset && ret) flag = false; return ret; } void set() { boost::lock_guard<boost::mutex> LOCK(mx_flag); flag = true; cond_var.notify_all(); } void reset() { boost::lock_guard<boost::mutex> LOCK(mx_flag); flag = false; } }; Example usage; reset_event terminate_thread; void fn_thread() { while(!terminate_thread.wait(boost::posix_time::milliseconds(10))) { std::cout << "working..." << std::endl; boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); } std::cout << "thread terminated" << std::endl; } int main() { boost::thread worker(fn_thread); boost::this_thread::sleep(boost::posix_time::seconds(1)); terminate_thread.set(); worker.join(); return 0; } EDIT I have fixed the code according to Michael Burr's suggestions. My "very simple" tests indicate no problems. class reset_event { bool flag, auto_reset; boost::condition_variable cond_var; boost::mutex mx_flag; public: explicit reset_event(bool _auto_reset = false) : flag(false), auto_reset(_auto_reset) { } void wait() { boost::unique_lock<boost::mutex> LOCK(mx_flag); if (flag) { if (auto_reset) flag = false; return; } do { cond_var.wait(LOCK); } while(!flag); if (auto_reset) flag = false; } bool wait(const boost::posix_time::time_duration& dur) { boost::unique_lock<boost::mutex> LOCK(mx_flag); if (flag) { if (auto_reset) flag = false; return true; } bool ret = cond_var.timed_wait(LOCK, dur); if (ret && flag) { if (auto_reset) flag = false; return true; } return false; } void set() { boost::lock_guard<boost::mutex> LOCK(mx_flag); flag = true; cond_var.notify_all(); } void reset() { boost::lock_guard<boost::mutex> LOCK(mx_flag); flag = false; } };

    Read the article

  • Is it okay to use zoom:1 in my css classes?

    - by Spines
    Whenever I find IE is displaying my website weird (different from chrome and firefox), I try putting a zoom:1 in the css class for the part that is being displayed weird. A lot of the time this fixes the problem and makes it look consistent with the other browsers. Is it a problem to use zoom:1? I know my CSS won't validate, but are there any real world problems that can arise if I rely too much on using zoom:1?

    Read the article

  • Javascript form validation only works in firefox

    - by Logic Artist
    Hello, I am relatively new to Javascript so I'm hoping this is a simple mistake. I building a generic form validation function that is called on the form's onSubmit. The function loops through all the form's child elements, looks for certain classes, and analyzes the contents of the appropriate fields. If it finds something missing or erroneous, it displays the appropriate error message div and returns false, thus preventing the form from being submitted to the php page. It works well in firefox 3.6.3, but in every other browser I've tested (Safari 4.0.4, Chrome 4.1, IE8) it seems to ignore the onSubmit and jump straight to the php processing page. HTML CODE: <form name='myForm' id='myForm' action='process_form.php' method='post' onSubmit="return validateRequired('myForm')"> <fieldset class="required radioset"> <label for='selection1'> <input type='radio' name='selection' id='selection1' value='1'/> Option 1 </label> <label for='selection2'> <input type='radio' name='selection' id='selection2' value='2'/> Option 2 </label> <label for='selection3'> <input type='radio' name='selection' id='selection3' value='3'/> Option 3 </label> <label for='selection4'> <input type='radio' name='selection' id='selection4' value='4'/> Option 4 </label> <div class='errorBox' style='visibility:hidden'> Please make a selection </div> </fieldset> <fieldset class="required checkset"> <label> Choice 1 <input type='checkbox' name='choices' id='choice1' value='1'/> </label> <label> Choice 2 <input type='checkbox' name='choices' id='choice2' value='2'/> </label> <label> Choice 3 <input type='checkbox' name='choices' id='choice3' value='3'/> </label> <label> Choice 4 <input type='checkbox' name='choices' id='choice4' value='4'/> </label> <div class='errorBox' style='visibility:hidden'> Please choose at least one </div> </fieldset> <fieldset class="required textfield" > <label for='textinput1'> Required Text: <input type='text' name='textinput1' id='textinput1' size='40'/> </label> <div class='errorBox' style='visibility:hidden'> Please enter some text </div> </fieldset> <fieldset class="required email textfield"> <label for='email'> Required Email: <input type='text' name='email' id='email' size='40'/> </label> <div class='errorBox' style='visibility:hidden'> The email address you have entered is invalid </div> </fieldset> <div> <input type='submit' value='submit'> <input type='reset' value='reset'> </div> </form> JAVASCRIPT CODE: function validateRequired(id){ var form = document.getElementById(id); var errors = 0; var returnVal = true; for(i = 0; i < form.elements.length; i++){ var elem = form.elements[i]; if(hasClass(elem,"required")){ /*RADIO BUTTON or CHECK BOX SET*/ if(hasClass(elem,"radioset") || hasClass(elem,"checkset")){ var inputs = elem.getElementsByTagName("input"); var check = false; for(j = 0; j < inputs.length; j++){ if(inputs[j].checked){ check = true; } } if(check == false){ errors += 1; showError(elem); } else { hideError(elem); } } /*TEXT FIELD*/ else if(hasClass(elem,"textfield")){ var input = elem.getElementsByTagName("input"); if(input[0].value == ""){ errors += 1; showError(elem); } else { hideError(elem); /*EMAIL ADDRESS*/ if(hasClass(elem,"email")){ if(isValidEmail(input[0].value) == false){ errors += 1; showError(elem); } else { hideError(elem); } } } } } } if(errors > 0){ returnVal = false; } else { returnVal = true; } return returnVal;} I know this is a lot of code to look at, but any help would be appreciated. Since it works fine in one browser, Im not sure how to start debugging. Thanks Andrew

    Read the article

  • Can't clone file-input element in Safari and Chrome. FF and Opera are OK

    - by Christian Fazzini
    This is very strange. I've got a simple form. I have a file input element outside this form. User clicks the file input element and selects a file. I clone the file input using this code: $('input[name="song[attachment]"]').clone(true).appendTo('form') In all browsers: FF, Opera, Safari, Chrome, when I inspect the form element, I see the cloned file input element inside the form. However, when I submit the form in FF and Opera it works. Safari and Chrome submits the form with an empty file input. I notice when the file input element is cloned and appended to the form element, it doesn't copy over its values. It only clones an empty input file element. Is this normal? Is there something wrong with my Jquery code? Or is this a security issue and that's why Safari and Chrome are not allowing me to do this? If the latter, why is FF and Opera doing otherwise?

    Read the article

  • Buttons size not equal in IE and Firefox

    - by Anurag
    I have few buttons on my jsp page and I am using the style as : .buttonblue { background-color: #003366; border-color: #99CCFF; color: #FFFFFF; font-family: Verdana,Arial,Helvetica; font-size: 8pt; font-weight: bold; height: 20px; display:inline; line-height: 1.2; text-align: center; margin-top: 2px; } In Firefox the buttons are bit smaller than IE6. I can not define the size of buttons as the caption changes the button size changes accordingly. I tried with width:auto but no success. Also, with overflow:visible the buttons in IE becomes bit smaller. Please help.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >