Search Results

Search found 4637 results on 186 pages for 'john rasch'.

Page 131/186 | < Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >

  • font-smoothing not applied to buttons

    - by David
    I have used this snippet to prevent webkit from changing antialiasing when using CSS transforms: html{ -webkit-font-smoothing: antialiased; } This works fine for most cases, however I noticed some weirdness in chrome when playing around with Bootstrap using this HTML: <button class="btn btn-inverse">John Doe</button> <a class="btn btn-inverse">John Doe</a>? This is how it looks in OSX/Chrome: Fiddle: http://jsfiddle.net/hY2J7/. In fact, it seems that it is not applied to buttons at all. Is there a safer technique to trigger the same antialiasing in webkit for all elements?

    Read the article

  • transition background-image/css change on hover?

    - by John Isaacks
    I have a thumb nail inside another div, when the thumbnail is hovered I want the parent div to fade/transition to the background of the thumbnail, then fade back to the original image after hover. I have this so far which changes the parent background to that of the thumbnail and back but with no transition. $(document).ready(function() { var originalBG; var hoverBG; $(".alt-img").hover( function () { originalBG = $(this).parent().css('backgroundImage'); hoverBG = $(this).css('backgroundImage'); $(this).parent().css('backgroundImage',hoverBG); }, function () { $(this).parent().css('backgroundImage',originalBG); } ); });

    Read the article

  • Pasting non-text data into browser-based apps

    - by John
    Imagine I want a user to be able to copy-paste a selection of pixels from MSPaint into a browser-based app. Is this possible using JavaScript in any current browsers? Will it become possible in HTML5? If not, is it feasible using something like Flex/Silverlight, or is it simply not possible at this time, and you'd have to save a file and manually upload it?

    Read the article

  • Static variables within functions in C++ - allocated even if function doesn't run?

    - by John C
    I've been reading up on C++ on the Internet, and here's one thing that I haven't been quite able to find an answer to. I know that static variables used within functions are akin to globals, and that subsequent invocations of that function will have the static variable retain its value between calls. However, if the function is never claled, does the static variable get allocated? Thanks

    Read the article

  • python dict.fromkeys() returns empty

    - by slooow
    I wrote the following function. It returns an empty dictionary when it should not. The code works on the command line without function. However I cannot see what is wrong with the function, so I have to appeal to your collective intelligence. def enter_users_into_dict(userlist): newusr = {} newusr.fromkeys(userlist, 0) return newusr ul = ['john', 'mabel'] nd = enter_users_into_dict(ul) print nd It returns an empty dict {} where I would expect {'john': 0, 'mabel': 0}. It is probably very simply but I don't see the solution.

    Read the article

  • Creating dynamic icons based on data entered into database from django forms

    - by John Hoke
    So I'm using Django to create a projects page with multiple forms for each project. Let's call them form 1, 2, 3, and 4. Once you create a project you can fill out any of these forms. I want to create "buttons" or links for each one of the forms that would show up on the main page. Now this is the part I need help with: Step 1. I want it so that if you click on a button for a form (say form 1) and none exists for that project yet a pop up would come up saying "This form does not exist yet, are you sure you want to create one?". And if you'd answer yes you would be directed to the form page. Step 2. But if that form does exist, I don't want any pop up to open and I want the link to take the user directly to that page. Step 3. My next problem is this. These forms are in order, so if you didn't create form 1 but created form 2, I don't want to give the user access to form 1. So in this scenario, if you click on form 1 I want a pop up to open and say "This form can no longer be created", and the link wouldn't function anymore. Basically the button will have 3 function. First it should look at the database and if data for that specific form exists it should do "Step 2", if data for that form and the proceeding forms don't exist it should do "Step 1", and if data for that form doesn't exist but data for proceeding form's does exist is should do "Step 3". Is this possible? Please help as I need to find a solution to this soon. Any help would be highly appreciated. Thank you

    Read the article

  • Should Wordpress be used to create a real estate listing site?

    - by John
    I have a real estate agent client who wants a website to list the properties he's selling. Although there are great 3rd party web apps out there that do this, he adamantly demands that I recreate a simple and custom website for him. I can do this quickly with a php framework like Code Igniter that comes with MVC, data access objects and data bind controllers. The database would be straightforward: t_page: generic content pages t_property: for each property on the market, has fields like address, price, #of bed rooms etc.. However, the client has heard many great things about Wordpress, and strongly advises that I build his real estate site with it. I've only used Wordpress to create blogs and relatively straightforward websites. SO I dont know how effective it is as a real estate property content management system or how effective it is for users to search for real estate properties based on attributes such as "# of bedrooms, square footage, is basement finished etc..." So my question is, is it a good idea to build a real estate agent website with Wordpress? Or should I try harder to convince him to build it with web framework like Code Igniter?

    Read the article

  • What is a Custom Class?

    - by John Saunders
    Many questions here on SO ask about custom classes. I, on the other hand, have no idea what they're talking about. "Custom class" seems to mean the same thing I mean when I say "class". What did I miss, back in the '80s, that keeps me from understanding? I know that it's possible to purchase a packaged system - for Accounting, ERP, or something like that. You can then customize it, or add "custom code" to make the package do things that are specific to your business. But that doesn't describe the process used in writing a .NET program. In this case, the entire purpose of the .NET Framework is to allow us to write our own code. There is nothing useful out of the box.

    Read the article

  • Getting every odd variable in a list?

    - by John
    If I make a list in Python and want to write a function that would return only odd numbers from a range 1 to x how would I do that? For example, if I have list [1, 2, 3, 4] from 1 to 4 (4 ix my x), I want to return [1, 3].

    Read the article

  • Localizing validation (error) messages in Grails

    - by John
    Hi, I try to localize error messages from the Domain classes. This is possible with the default error messages, e.g.: default.blank.message=Property [{0}] cannot be blank and localized attribute names, e.g.: customer.address.label=Customer address Where "Customer" is my domain class and address is its attribute. My problem is that I can't localize some attributes because I need specific error messages. E.g: has.to.be.a.number=Property [{0}] has to be a number contingent.size.label=Contingent size. But the message I get is "Property [size] has to be a number" instead of "Property [Contingent size] has to be a number". The messages I cant localize are following: - Property [{0}] has to be a number - Property [{0}] has to be a valid date // I can't use g:datePicker in this context

    Read the article

  • JQuery div tag has children in FireFox but not Chrome

    - by John Edwards
    I am using JQuery ajax to load images from a url, display them, and then place a button on top of each image. The code works in firefox, but in chrome, the div parent "photos" that should have all the children(one child div "photo" for each image received from the url) is 0. I have tried read() and load(), but nothing seems to work. If I run alert($('#photos').children().size()); in the Chrome console it returns the children. But at execution it returns 0. Any ideas? $(window).load(function () { $("p").text("The DOM is now loaded and can be manipulated."); //returns 0 in chrome, but 10 in firefox alert($('#photos').children().size()); $('#photos').children().each(function() { //do stuff

    Read the article

  • jQuery .ajax method executing but not firing error (or success)

    - by John Swaringen
    I'm having a very strange situation. I have a .NET Web Service (.asmx) that I'm trying to call via jQuery ajax to populate some <select></select>'s. The service is running System.Web.Services like it's supposed to and should be returning a JSON list. At least that's the way I understand that it will in .NET 3.5/4.0. The main problem is that the .ajax() function (below) seems to execute but the internal callbacks aren't executing. I know it's executing because I can do something before and after the function and both execute, so JavaScript isn't blowing up. $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: 'http://localhost:59191/AFEDropDownService/Service.asmx/GetAVP', data: "{}", dataType: "jsonp", crossDomain: true, success: function(list) { console.log(list); console.log("success!!"); }, error: function(msg) { console.log("error: " + msg.text); } }); If you need more of the code let me know. Or if you know a better way as I'm trying to build cascading <select></select's.

    Read the article

  • User class - 'load' data

    - by John
    <?php class User { private $id; private $username; public function __construct($id = null) { $this->id = $id; if (!is_null($this->id)) { $this->load(); } } public function load() { } } ?> In the 'load' method I am going to load all the information from the current user (id) But I wonder how is the best way to load all info. I could grab all data and then just assign all private variables, but I assume there must be another "cheaper" way to get all the data so I can use as such $this-variable; And not have to ASSIGN every single data row, I select in the load method. How?

    Read the article

  • Using * Width & Precision Specifiers With boost::format

    - by John Dibling
    I am trying to use width and precision specifiers with boost::format, like this: #include <boost\format.hpp> #include <string> int main() { int n = 5; std::string s = (boost::format("%*.*s") % (n*2) % (n*2) % "Hello").str(); return 0; } But this doesn't work because boost::format doesn't support the * specifier. Boost throws an exception when parsing the string. Is there a way to accomplish the same goal, preferably using a drop-in replacement?

    Read the article

  • django update object

    - by John
    Hi, How do I run an update and select statement on the same queryset rather than having to do 2 querys, ones to select the object and one to update the object? the sql would be something like update my_table set field_1 = 'some value' where pk_field = some_value Thanks

    Read the article

  • How can I delete a file in Sinatra after it has been sent via send_file?

    - by John Reilly
    I have a simple sinatra application that needs to generate a file (via an external process), send that file to the browser, and finally, delete the file from the filesystem. Something along these lines: class MyApp < Sinatra::Base get '/generate-file' do # calls out to an external process, # and returns the path to the generated file file_path = generate_the_file() # send the file to the browser send_file(file_path) # remove the generated file, so we don't # completely fill up the filesystem. File.delete(file_path) # File.delete is never called. end end It seems, however, that the send_file call completes the request, and any code after it does not get run. Is there some way to ensure that the generated file is cleaned up after it has been successfully sent to the browser? Or will I need to resort to a cron job running a cleanup script on some interval?

    Read the article

  • What's the most efficient way to repeatedly remove leading text using Vim?

    - by John Topley
    What's the most efficient way to remove the text 2010-04-07 14:25:50,773 DEBUG This is a debug log statement - from a log file like the extract below using Vim? 2010-04-07 14:25:50,772 DEBUG This is a debug log statement - 9,8 2010-04-07 14:25:50,772 DEBUG This is a debug log statement - 1,11 2010-04-07 14:25:50,772 DEBUG This is a debug log statement - 5,2 2010-04-07 14:25:50,772 DEBUG This is a debug log statement - 8,4 This is what the result should look like: 9,8 1,11 5,2 8,4 Note that on this occasion I'm using gVim on Windows, so please don't suggest any UNIX programs which may be better suited to the task—I have to do it using Vim.

    Read the article

  • Extending struts 2 "property" data tag

    - by John B.
    Hi, We are currently developing a project with Struts2. We have a module on which we display a large amount of data on read-only fields from a group of beans via the "property" Struts 2 data tag (i.e. <s:property value="aBeanProperty" /) on a jsp file. In some cases most of the fields might come empty, so a blank is being displayed on screen. Our customer is now requesting us to display default string (i.e. "N/A") whenever a property comes empty, so that it is displayed in place of the blank spaces currently shown. We are looking for a way to achieve this in a clean and maintainable way. The 'property' tag comes with a 'default' attribute on which one can define a default value in cases when the accessed property comes as null. However, most of our properties are empty strings, therefore it does not work in our case. Another solution we are thinking of is to define a base class for all of our beans, and define a util method which will validate if a string is null or empty and then return the default value. Then we would call this method from each bean getter. And yes this would be tiresome and kind of ugly :), therefore we are holding out on this one in case of a better solution. Now, we have in mind a solution which we think would be the best but have not had luck on how implement it. We are planning on extending the 'property' tag some way, defining a new 'default' attribute so that besides working on null properties, it also do so on empty strings ("", " ", etc). Therefore we would only need to replace the original s:property tag with our new custom tag, and the desired result would be achieved without touching java code. Do you have an idea on how to do this? Also, any other clever solution (maybe some sort of design pattern?) on how to default the values of a large amount of property beans are welcome too! (Or maybe, even there might be some tag that does this already in Struts2??) Thanks in advance.

    Read the article

  • Which ISO format should I use to store a user's language?

    - by John Himmelman
    Should I use ISO 639-1 (2-letter abbreviation) or ISO 639-2 (3 letter abbrv) to store the user's language? Both are official standards, but which is the de facto standard in the development community? I think ISO 639-1 would be easier to remember, and is probably more popular for that reason, but thats just a guess. The site I'm building will have a separate site for the US, Brazil, Russia, China, & the UK. http://en.wikipedia.org/wiki/ISO_639

    Read the article

  • How to get an array size

    - by John Doe
    I'd like to know how to get an array rows & columns size. For instance it would be something like this: int matrix[][] = { { 2, 3 , 4}, { 1, 5, 3 } } The size of this one would be 2 x 3. How can I calculate this without including other libraries but stdio or stdlib?

    Read the article

  • How to stop a MFC/win32 control re-painting

    - by John
    I have a CRichEditCtrl, and an algorithm works on its contents in-place, iterating through the contents and making changes. This seems to cause it to re-paaint every time, which causes flickering and a noticeable time to complete the operation, especially if the control starts scrolling. I wondered if there's a neat way for me to stop it repainting for a period. It's actually a custom subclass of CRichEditCtrl in use so I was thinking something like: void MyCustomEditCtrl::DoAlgorithm() { enableRepaint(false); ... //to the actual work ... enableRepaint(true); } What's the neatest approach? A custom on-paint handler which does nothing when an operation is in progress? Or can repainting actually be disabled?

    Read the article

< Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >