Search Results

Search found 4656 results on 187 pages for 'sleepy john'.

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

  • Are all of the Oracle exceptions named?

    - by John O
    In particular, I've been trying to find the name of the ORA-0955 to improve code readability. Currently I'm using the following: EXCEPTION WHEN OTHERS THEN IF SQLCODE = -00955 What I would prefer is something like: EXCEPTION WHEN OBJECT_EXISTS THEN This seems cleaner to me and I would prefer that. But I've looked in SYS.STANDARD, and it lists relatively few named exceptions. Online documentation seems to mirror what's in SYS.STANDARD. Is there another package to look in? Some other resource?

    Read the article

  • Generate a valid array key from an URL string in PHP

    - by John Riche
    I have a PHP array with some predefined values: $aArray = array( 0 => 'value0', 1 => 'value1' ); I need to create a function where the string input will always return the same, valid, array key so that when I call: GiveMeAKey('http://www.google.com'); // May return 0 or 1 I receive always the same key (I don't care which one) from the array. Obvisously I can't store the relationship in a database and the string passed to the GiveMeAKey method can be any URL. I wonder if there is a way of doing that ?

    Read the article

  • Creative Technical Interview Questions for Developers

    - by John Shedletsky
    I do a good number of in-person technical interviews for new developers. I like to ask technical questions where I ask people to either code something up or develop an algorithm to solve a task. I feel my current repertoire is uninspired. In my opinion, the ideal interview question has these qualities: Multiple solutions, where some are obviously better than others, and some that involve subtle trade-offs (discussing tradeoffs is a good way to gauge someone's experience, in my opinion). Novelty - asking the "insert this element into a linked list" question is only good for weeding out people who never did their homework. Elegant - I like questions where the core problem isn't hidden in a lot of details. Everyone should be able to understand the problem, even if everyone can't solve it on the whiteboard. Elegant questions are difficult without involving undue amounts of "domain knowledge" or getting too narrow. Have you been on either side of an interview where someone (maybe you!) asked a particularly good programming or algorithms question?

    Read the article

  • jQuery selector to target any CSS name (of multiple present) starting with a prefix?

    - by John K
    I'm considering one selection statement that would target one of many css class names in a single class attribute value based on a string prefix. For example, I want any detail- prefixed class names to get targeted from the following sample links. <a href="eg.html" class="detail-1 pinkify another"> <a href="eg.html" class="something detail-55 minded"> <a href="eg.html" class="swing narrow detail-Z"> <a href="eg.html" class="swing narrow detail-Z detail-88 detail-A"> It's reminiscent of how [class|="detail"] prefix selector works on a scalar attribute value, and also of .hasClass(className), but my question needs both concepts applied simultaneously. Note: The detail- prefix won't necessarily be the first class name of the bunch.

    Read the article

  • How to access ASP.NET App Over a Network Using IP Address

    - by john doe
    My asp.net web app is hosted on this URL on my local machine: http://localhost:45433/ I want to access the same application from a different computer on the network. I tried replacing the localhost with my IP but it did not work. any ideas! UPDATE 1: Now, I am getting this error: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

    Read the article

  • Add text into a desktop application

    - by John
    Hello, I would like to come up with a simple application that would add a specific phrase into a specific location on a desktop application. I assume this isn't very hard, but I'm kind of new. Any help?? Thanks!

    Read the article

  • Function to set an auth_token

    - by john mossel
    In my form I have a hidden field: <input type="hidden" name="auth_token" value="<?php echo $auth_token; ?>"> This value is also stored in a session and a variable: $_SESSION['auth_token'] = hash('sha256', rand() . time() . $_SERVER['HTTP_USER_AGENT']); # TODO: put this in a function $auth_token = $_SESSION['auth_token']; When the form is submitted the two values are compared. It's a basic form token. Should this be made into two functions or just one when refactored? set_form_token() and get_form_token(), get_form_token() returning the session value, then I can compare it in my main code. What is the proper way of doing this?

    Read the article

  • 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

  • Binding to element in WPF: can the Path expression do math?

    - by John
    Hi I'm trying to bind a control to the parent's Height/width property using ElementName and a Path. However, I don't want to bind to the actual height, but to exactly half the height. Can the Path expression do the math? e.g. Path={ActualHeight/2} I couldn't find a way to do that. IS there any other clever approach? 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

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