Search Results

Search found 3423 results on 137 pages for 'tom daniel'.

Page 69/137 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • jquery IE Fadein and Fadeout Opacity

    - by Tom
    Hi Guys, I am getting this weird problem in IE with a CSS Overlay I am applying for a lightbox. Basically, I use fadein and fadeout for jquery - the problem is that everything works fine EXCEPT in IE. In IE - I get no fadein - rather it just goes straight to opacity background. On fadeout - it removes the "opacity" for < 1 sec second and renders the page a "solid color" before removing the overlay. Anyone know how to fix this bug ? Its really annoying - I am using all the correct filters etc its just the fadein and fadeout in IE ? Thx

    Read the article

  • Is O_NONBLOCK being set a property of the file descriptor or underlying file?

    - by Daniel Trebbien
    From what I have been reading on The Open Group website on fcntl, open, read, and write, I get the impression that whether O_NONBLOCK is set on a file descriptor, and hence whether non-blocking I/O is used with the descriptor, should be a property of that file descriptor rather than the underlying file. Being a property of the file descriptor means, for example, that if I duplicate a file descriptor or open another descriptor to the same file, then I can use blocking I/O with one and non-blocking I/O with the other. Experimenting with a FIFO, however, it appears that it is not possible to have a blocking I/O descriptor and non-blocking I/O descriptor to the FIFO simultaneously (so whether O_NONBLOCK is set is a property of the underlying file [the FIFO]): #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char **argv) { int fds[2]; if (pipe(fds) == -1) { fprintf(stderr, "`pipe` failed.\n"); return EXIT_FAILURE; } int fd0_dup = dup(fds[0]); if (fd0_dup <= STDERR_FILENO) { fprintf(stderr, "Failed to duplicate the read end\n"); return EXIT_FAILURE; } if (fds[0] == fd0_dup) { fprintf(stderr, "`fds[0]` should not equal `fd0_dup`.\n"); return EXIT_FAILURE; } if ((fcntl(fds[0], F_GETFL) & O_NONBLOCK)) { fprintf(stderr, "`fds[0]` should not have `O_NONBLOCK` set.\n"); return EXIT_FAILURE; } if (fcntl(fd0_dup, F_SETFL, fcntl(fd0_dup, F_GETFL) | O_NONBLOCK) == -1) { fprintf(stderr, "Failed to set `O_NONBLOCK` on `fd0_dup`\n"); return EXIT_FAILURE; } if ((fcntl(fds[0], F_GETFL) & O_NONBLOCK)) { fprintf(stderr, "`fds[0]` should still have `O_NONBLOCK` unset.\n"); return EXIT_FAILURE; // RETURNS HERE } char buf[1]; if (read(fd0_dup, buf, 1) != -1) { fprintf(stderr, "Expected `read` on `fd0_dup` to fail immediately\n"); return EXIT_FAILURE; } else if (errno != EAGAIN) { fprintf(stderr, "Expected `errno` to be `EAGAIN`\n"); return EXIT_FAILURE; } return EXIT_SUCCESS; } This leaves me thinking: is it ever possible to have a non-blocking I/O descriptor and blocking I/O descriptor to the same file and if so, does it depend on the type of file (regular file, FIFO, block special file, character special file, socket, etc.)?

    Read the article

  • Changing customErrors in web.config semi-dynamically

    - by Tom Ritter
    The basic idea is we have a test enviroment which mimics Production so customErrors="RemoteOnly". We just built a test harness that runs against the Test enviroment and detects breaks. We would like it to be able to pull back the detailed error. But we don't want to turn customErrors="On" because then it doesn't mimic Production. I've looked around and thought a lot, and everything I've come up with isn't possible. Am I wrong about any of these points? We can't turn customErrors on at runtime because when you call configuration.Save() - it writes the web.config to disk and now it's Off for every request. We can't symlink the files into a new top level directory with it's own web.config because we're on windows and subversion on windows doesn't do symlinks. We can't use URL-Mapping to make an empty folder dir2 with its own web.config and make the files in dir1 appear to be in dir2 - the web.config doesn't apply We can't copy all the aspx files into dir2 with it's own web.config because none of the links would be consistent and it's a horrible hacky solution. We can't change customErrors in web.config based on hostname (e.g. add another dns entry to the test server) because it's not possible/supported We can't do any virtual directory shenanigans to make it work. If I'm not, is there a way to accomplish what I'm trying to do? Turn on customErrors site-wide under certain circumstances (dns name or even a querystring value)?

    Read the article

  • Including a JSP Page Programatically

    - by Tom Tucker
    I need to include a JSP page in a Tag class. I believe the standard way to include a JSP page within another JSP page using API is this: request.getRequestDispatcher("included.jsp").include(request, response); However, I noticed that the included page is rendered at the top of the generated page, no matter where the code is located. On the other hand, the <jsp:include> action works as expected, rendering the included page where the tag appears in the JSP file. How do I include a JSP page in a class so that it behaves the same as the <jsp:include>? There's no way to invoke the <jsp:include> action within a Tag class, is there?

    Read the article

  • Why static fields are not initialized in time?

    - by Tom Brito
    Somebody tell me: class MyClass { private static MyClass myClass = new MyClass(); private static final Object obj = new Object(); public MyClass() { System.out.println(obj); // will print null once } } I wonder, isn't this a bug? Why static objects are not initialized before the constructor runs?

    Read the article

  • Can memory be cleaned up?

    - by Tom
    I am working in Delphi 5 (with FastMM installed) on a Win32 project, and have recently been trying to drastically reduce the memory usage in this application. So far, I have cut the usage nearly in half, but noticed something when working on a separate task. When I minimized the application, the memory usage shrunk from 45 megs down to 1 meg, which I attributed to it paging out to disk. When I restored it and restarted working, the memory went up only to 15 megs. As I continued working, the memory usage slowly went up again, and a minimize and restore flushed it back down to 15 megs. So to my thinking, when my code tells the system to release the memory, it is still being held on to according to Windows, and the actual garbage collection doesn't kick in until a lot later. Can anyone confirm/deny this sort of behavior? Is it possible to get the memory cleaned up programatically? If I keep using the program without doing this manual flush, I get an out of memory error after a while, and would like to eliminate that. Thanks.

    Read the article

  • Replicating SQL's 'Join' in Python

    - by Daniel Mathews
    I'm in the process of trying to switch from R to Python (mainly issues around general flexibility). With Numpy, matplotlib and ipython, I've am able to cover all my use cases save for merging 'datasets'. I would like to simulate SQL's join by clause (inner, outer, full) purely in python. R handles this with the 'merge' function. I've tried the numpy.lib.recfunctions join_by, but it critical issues with duplicates along the 'key': join_by(key, r1, r2, jointype='inner', r1postfix='1', r2postfix='2', defaults=None, usemask=True, asrecarray=False) Join arrays r1 and r2 on key key. The key should be either a string or a sequence of string corresponding to the fields used to join the array. An exception is raised if the key field cannot be found in the two input arrays. Neither r1 nor r2 should have any duplicates along key: the presence of duplicates will make the output quite unreliable. Note that duplicates are not looked for by the algorithm. source: http://presbrey.mit.edu:1234/numpy.lib.recfunctions.html Any pointers or help will be most appreciated!

    Read the article

  • PHP SAX parser for HTML?

    - by Daniel
    Hi. I need HTML SAX (not DOM!) parser for PHP able to process even invalid HTML code. The reason i need it is to filter user entered HTML (remove all attributes and tags except allowed ones) and truncate HTML content to specified length. Any ideas?

    Read the article

  • Dynamic URL -> Controller mapping for routes in Rails

    - by Daniel Beardsley
    I would like to be able to map URLs to Controllers dynamically based on information in my database. I'm looking to do something functionally equivalent to this (assuming a View model): map.route '/:view_name', :controller => lambda { View.find_by_name(params[:view_name]).controller } Others have suggested dynamically rebuilding the routes, but this won't work for me as there may be thousands of Views that map to the same Controller

    Read the article

  • Common Mercator Projection formulas for Google Maps not working correctly

    - by Tom Halladay
    I am building a Tile Overlay server for Google maps in C#, and have found a few different code examples for calculating Y from Latitude. After getting them to work in general, I started to notice certain cases where the overlays were not lining up properly. To test this, I made a test harness to compare Google Map's Mercator LatToY conversion against the formulas I found online. As you can see below, they do not match in certain cases. Case #1 Zoomed Out: The problem is most evident when zoomed out. Up close, the problem is barely visible. Case #2 Point Proximity to Top & Bottom of viewing bounds: The problem is worse in the middle of the viewing bounds, and gets better towards the edges. This behavior can negate the behavior of Case #1 The Test: I created a google maps page to display red lines using the Google Map API's built in Mercator conversion, and overlay this with an image using the reference code for doing Mercator conversion. These conversions are represented as black lines. Compare the difference. The Results: Check out the top-most and bottom-most lines: The problem gets visually larger but numerically smaller as you zoom in: And it all but disappears at closer zoom levels, regardless of screen orientation. The Code: Google Maps Client Side Code: var lat = 0; for (lat = -80; lat <= 80; lat += 5) { map.addOverlay(new GPolyline([new GLatLng(lat, -180), new GLatLng(lat, 0)], "#FF0033", 2)); map.addOverlay(new GPolyline([new GLatLng(lat, 0), new GLatLng(lat, 180)], "#FF0033", 2)); } Server Side Code: Tile Cutter : http://mapki.com/wiki/Tile_Cutter OpenStreetMap Wiki : http://wiki.openstreetmap.org/wiki/Mercator protected override void ImageOverlay_ComposeImage(ref Bitmap ZipCodeBitMap) { Graphics LinesGraphic = Graphics.FromImage(ZipCodeBitMap); Int32 MapWidth = Convert.ToInt32(Math.Pow(2, zoom) * 255); Point Offset = Cartographer.Mercator2.toZoomedPixelCoords(North, West, zoom); TrimPoint(ref Offset, MapWidth); for (Double lat = -80; lat <= 80; lat += 5) { Point StartPoint = Cartographer.Mercator2.toZoomedPixelCoords(lat, -179, zoom); Point EndPoint = Cartographer.Mercator2.toZoomedPixelCoords(lat, -1, zoom); TrimPoint(ref StartPoint, MapWidth); TrimPoint(ref EndPoint, MapWidth); StartPoint.X = StartPoint.X - Offset.X; EndPoint.X = EndPoint.X - Offset.X; StartPoint.Y = StartPoint.Y - Offset.Y; EndPoint.Y = EndPoint.Y - Offset.Y; LinesGraphic.DrawLine(new Pen(Color.Black, 2), StartPoint.X, StartPoint.Y, EndPoint.X, EndPoint.Y); LinesGraphic.DrawString( lat.ToString(), new Font("Verdana", 10), new SolidBrush(Color.Black), new Point( Convert.ToInt32((width / 3.0) * 2.0), StartPoint.Y)); } } protected void TrimPoint(ref Point point, Int32 MapWidth) { point.X = Math.Max(point.X, 0); point.X = Math.Min(point.X, MapWidth - 1); point.Y = Math.Max(point.Y, 0); point.Y = Math.Min(point.Y, MapWidth - 1); } So, Anyone ever experienced this? Dare I ask, resolved this? Or simply have a better C# implementation of Mercator Project coordinate conversion? Thanks!

    Read the article

  • what happens when .NET Framework is not installed?

    - by Daniel
    Hello. Does anyone know what error message will be displayed when someone tries to run an application developed using .NET on a computer where .NET Framework is not installed? ex) Windows XP original. will the error message tell you that .NET Framework is not installed? or will it not show any useful messages?

    Read the article

  • ASP.NET MVC: Is it "wrong" to use HTTP 500 via an AJAX request to return invalid form content?

    - by Daniel Schaffer
    Here's the situation: I've got two partial views. One has a form. What needs to happen is when the form is posted via an AJAX request, if the operation succeeds, the area with the second partial is repopulated with the content. However, if the posted data was invalid, the original partial is repopulated with an error message. I'm using jQuery and the ajaxForm plugin to handle the form posts and responses. Would it be "wrong"/bad coding/wtf-worthy to conditionally use $.html() to replace the content in one area when it's a 200, and a different area if it's a 500? To me, this idea smells, but I'm not sure how else to accomplish the goal.

    Read the article

  • Silverlight project builds in VS2008 but fails when using MSBuild

    - by Tom
    Hi, We have 2 Silverlight projects in the same solution; SLGlobalResource and SLData. SLData references SLGlobalResource (using references add reference projects). When we build it in debug within VS2008, everything builds fine and all is good. But when we build it using: msbuild TheSolution.sln /p:Configuration=Debug /t:rebuild SLData fails with the following error: ViewModels\ImportViewModel.cs : error CS0246: The type of name space "SLGlobalResource" could not be found (are you missing a using directive or an assembly reference?) This also happens in TeamCity (I guess because the TeamCity vs2008 runner uses MSBuild) Any ideas? Thanks Edit: There are actually 33 projects in total in the solution. I didn't think this was relevant before but now I'm thinking it could be - could this be a build order thing?

    Read the article

  • Custom ASP.NET MVC cache controllers in a shared hosting environment?

    - by Daniel Crenna
    I'm using custom controllers that cache static resources (CSS, JS, etc.) and images. I'm currently working with a hosting provider that has set me up under a full trust profile. Despite being in full trust, my controllers fail because the caching strategy relies on the File class to directly open a resource file prior to treatment and storage in memory. Is this something that would likely occur in all full trust shared hosting environments or is this specific to my host? The static files live within my application's structure and not in an arbitrary server path. It seems to me that custom caching would require code to access the file directly, and am hoping someone else has dealt with this issue.

    Read the article

  • iPhone: NSHTTPCookie is not saved across app restarts

    - by Tom van Zummeren
    In my iPhone app, I want to be able to reuse the same server-side session when my app restarts. A session on the server is identified by a cookie, which is sent on each request. When I restart the app, that cookie is gone and I can't use the same session anymore. What I noticed when I used the NSHTTPCookieStorage to look up the cookie I got from the server, is that [cookie isSessionOnly] returns YES. I get the impression that this is why cookies are not saved across restarts of my app. What would I have to do to make my cookie NOT session only? What HTTP headers do I have to send from the server?

    Read the article

  • Replacing string literal values in Visual Studio project templates

    - by Daniel A. White
    I notice when I create a project template from an existing project in my solution, it does a semi-string replace to update references. However, it does not replace string literals. It does update my web.config file, but not code files. The project template: namespace MyTemplateProject { class MyClass { public string GetStringValue() { return "MyProjectTemplate"; } } } The generated code when used as a template: namespace MyActualNewProject { class MyClass { public string GetStringValue() { return "MyProjectTemplate"; } } } How can I instruct the template maker to replace "MyProjectTemplate" wih "MyActualNewProject"?

    Read the article

  • Internet Explorer percent based layout issue

    - by Tom
    Heya, My goal is to make a layout that is 200% width and height, with four containers of equal height and width (100% each), using no javascript as the bear minimum (or preferably no hacks). Right now I am using HTML5, and CSS display:table. It works fine in Safari 4, Firefox 3.5, and Chrome 5. I haven't tested it yet on older versions. Nonetheless, in IE7 and IE8 this layout fails completely. (I do use the Javascript HTML5 enabling script /cc../, so it should not be the use of new HTML5 tags) Here is what I have: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta charset="UTF-8" /> <title>IE issue with layout</title> <style type="text/css" media="all"> /* styles */ @import url("reset.css"); /* Generall CSS */ .table { display:table; } .row { display:table-row; } .cell { display:table-cell; } /* Specific CSS */ html, body { //overflow:hidden; I later intend to limit the viewport } section#body { position:absolute; width:200%; height:200%; overflow:hidden; } section#body .row { width:200%; height:50%; overflow:hidden; } section#body .row .cell { width:50%; overflow:hidden; } section#body .row .cell section { display:block; width:100%; height:100%; overflow:hidden; } section#body #stage0 section header { text-align:center; height:20%; display:block; } section#body #stage0 section footer { display:block; height:80%; } </style> </head> <body> <section id="body" class="table"> <section class="row"> <section id="stage0" class="cell"> <section> <header> <form> <input type="text" name="q" /> <input type="submit" value="Search" /> </form> </header> <footer> <table id="scrollers"> </table> </footer> </section> </section> <section id="stage1" class="cell"> <section> content </section> </section> </section> <section class="row"> <section id="stage2" class="cell"> <section> content </section> </section> <section id="stage3" class="cell"> <section> content </section> </section> </section> </section> </body> </html> You can see it live here: http://www.tombarrasso.com/ie-issue/

    Read the article

  • Draw shadow under NSImage

    - by Tom Irving
    Currently I'm drawing an NSImage in a custom NSCell like so: - (void)drawInteriorWithFrame:(NSRect)theCellFrame inView:(NSView *)theControlView { // roundedCornerImage creates a new NSImage with rounded corners, rather than clipping. [[anIcon roundedCornerImage:5] drawInRect:anIconBox fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; } Very simply I'm wondering how to draw an image underneath it. On the iPhone, I would do this by using: CGContextSetShadow (currentContext, CGSizeMake(1, -1), 2); just before drawing the UIImage, but I'm unfamiliar with how to do it on the Mac. Any pointers would be great.

    Read the article

  • Using array as map value: Cant see the error

    - by Tom
    Hi all, Im trying to create a map, where the key is an int, and the value is an array int red[3] = {1,0,0}; int green[3] = {0,1,0}; int blue[3] = {0,0,1}; std::map<int, int[3]> colours; colours.insert(std::pair<int,int[3]>(GLUT_LEFT_BUTTON,red)); //THIS IS LINE 24 ! colours.insert(std::pair<int,int[3]>(GLUT_MIDDLE_BUTTON,blue)); colours.insert(std::pair<int,int[3]>(GLUT_RIGHT_BUTTON,green)); However, when I try to compile this code, I get the following error. g++ (Ubuntu 4.4.1-4ubuntu8) 4.4.1 In file included from /usr/include/c++/4.4/bits/stl_algobase.h:66, from /usr/include/c++/4.4/bits/stl_tree.h:62, from /usr/include/c++/4.4/map:60, from ../src/utils.cpp:9: /usr/include/c++/4.4/bits/stl_pair.h: In constructor ‘std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = int, _T2 = int [3]]’: ../src/utils.cpp:24: instantiated from here /usr/include/c++/4.4/bits/stl_pair.h:84: error: array used as initializer /usr/include/c++/4.4/bits/stl_pair.h: In constructor ‘std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = int, _U2 = int [3], _T1 = const int, _T2 = int [3]]’: ../src/utils.cpp:24: instantiated from here /usr/include/c++/4.4/bits/stl_pair.h:101: error: array used as initializer In file included from /usr/include/c++/4.4/map:61, from ../src/utils.cpp:9: /usr/include/c++/4.4/bits/stl_map.h: In member function ‘_Tp& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with _Key = int, _Tp = int [3], _Compare = std::less<int>, _Alloc = std::allocator<std::pair<const int, int [3]> >]’: ../src/utils.cpp:30: instantiated from here /usr/include/c++/4.4/bits/stl_map.h:450: error: conversion from ‘int’ to non-scalar type ‘int [3]’ requested make: *** [src/utils.o] Error 1 I really cant see where the error is. Or even if there's an error. Any help (please include an explanation to help me avoid this mistake) will be appreciated. Thanks in advance.

    Read the article

  • Inspecting variables in Xdebug problems

    - by tom
    I've been using xdebug to do php debugging (netbeans or eclipse). I am usually able to inspect variables OK. However, sometimes when I expand a disclosure triangle for a variable -- typically when the client is making an AJAX call -- it will result in an empty response being returned and causing the AJAX call to fail. Has anyone run into this? Is there a way to make PHP debugging with xdebug more robust? (Not being able to inspect variables defeats the purpose of a debugger. Thanks

    Read the article

  • AES code throwing NoSuchPaddingException: Padding NoPaddin unknown

    - by Tom Brito
    The following code is a try to encrypt data using AES with asymmetric key: import java.io.OutputStream; import java.math.BigInteger; import java.security.Key; import java.security.KeyFactory; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.RSAPrivateKeySpec; import java.security.spec.RSAPublicKeySpec; import javax.crypto.Cipher; public class AsyncronousKeyTest { private final Cipher cipher; private final KeyFactory keyFactory; private final RSAPrivateKey privKey; private AsyncronousKeyTest() throws Exception { cipher = Cipher.getInstance("AES/CBC/NoPaddin", "BC"); keyFactory = KeyFactory.getInstance("AES", "BC"); // create the keys // TODO should this numbers be random? RSAPrivateKeySpec privKeySpec = new RSAPrivateKeySpec(new BigInteger( "d46f473a2d746537de2056ae3092c451", 16), new BigInteger("57791d5430d593164082036ad8b29fb1", 16)); privKey = (RSAPrivateKey) keyFactory.generatePrivate(privKeySpec); } public void generateAuthorizationAct(OutputStream outputStream) throws Exception { // TODO Ticket #14 - GenerateAuthorization action KeyFactory keyFactory = KeyFactory.getInstance("AES", "BC"); // TODO should this numbers be random? RSAPublicKeySpec pubKeySpec = new RSAPublicKeySpec(new BigInteger("d46f473a2d746537de2056ae3092c451", 16), new BigInteger("11", 16)); RSAPublicKey pubKey = (RSAPublicKey) keyFactory.generatePublic(pubKeySpec); byte[] data = new byte[] {0x01}; byte[] encrypted = encryptAO(pubKey, data); outputStream.write(encrypted); } /** Encrypt the AuthorizationObject. */ public byte[] encryptAO(Key pubKey, byte[] data) throws Exception { cipher.init(Cipher.ENCRYPT_MODE, pubKey); byte[] cipherText = cipher.doFinal(data); return cipherText; } public byte[] decrypt(byte[] cipherText) throws Exception { cipher.init(Cipher.DECRYPT_MODE, privKey); byte[] decyptedData = cipher.doFinal(cipherText); return decyptedData; } public static void main(String[] args) throws Exception { System.out.println("start"); AsyncronousKeyTest auth = new AsyncronousKeyTest(); auth.generateAuthorizationAct(System.out); System.out.println("done"); } } but at line cipher = Cipher.getInstance(AesEncrypter.getTransformation(), "BC"); it throws NoSuchPaddingException: Padding NoPaddin unknown. What is this? And how to solve?

    Read the article

  • SubSonic IQueryable To String Array

    - by Daniel Draper
    Hey All, I have decided to use SubSonic (v3.0) for the first time and thoroughly enjoy it so far however I seem to have stumbled and I am hoping there is a nice neat solution. I have a users, roles and joining table. SubSonic (ActiveRecord) generated an entity User for my users table. A property of User is UserRoles and is of the type IQueryable this is my joining table. I want to convert the IQueryable column name RoleName to a string array. I have only just started playing with Linq as well and know of ToArray() but seem to be missing something or this isn't the function I want. I could iterate over each item in the UserRoles property but seems a little excessive. I appreciate your help! Cheers.

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >