Search Results

Search found 986 results on 40 pages for 'mr carl'.

Page 10/40 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • table with black outer, but grey inner border

    - by Jan-Frederik Carl
    Hello, I want to create a html table with a 1pt black outer border and the same border around every td. Should look like this (only the borders, of course) link text I use <table border="1" style="border-collapse:collapse; border-color:Black; border-style:solid; border-width:1pt"> As a result I get a black outer, but grey inner borders.

    Read the article

  • R heatmaps - non-text labels?

    - by Carl
    I am making a heatmap plot; currently the axes are labeled by index number. However, the index number corresponds to a series of 1/0s, which my group typically represents with a row of filled(1) or unfilled(0) boxes (think chessboard, though not strictly alternating colors). I'd like to use that representation instead of the index numbers. Any suggestions? I've considered simply making the labels as a plot, and positioning that adjacent to the heatmap, but I'm not finding a convenient way to do that either. I will also appreciate answers that are more generically applicable. edit - current code: map <- data.matrix(read.csv("./heatmap.out", header=F, sep=" ")) # ...some clean-up p<-heatmap(map, Rowv=NA, Colv=NA, col=grey(10:0 / 10)) this simply labels the heatmap rows/cols by index number. heatmap.out is raw numeric data.

    Read the article

  • Running RSpec on Google App Engine via JRuby

    - by Carl
    I'm trying to write some tests (RSpec) against the AppEngine and its datastore. I've tried to load the environment and tests via: appcfg.rb run -S spec app/tests/ And I end up with the following error: spec:19: undefined method `bin_path' for Gem:Module (NoMethodError) I can run non-appengine specs just fine by running: spec app/tests/ Any suggestions on how to get RSpec up and running with JRuby and Google App Engine would be greatly appreciated. Thank you.

    Read the article

  • N2 CMS SlidingCurtain control is not visible

    - by Carl Raymond
    I just set up a new N2 site by starting with the MVC 2 Web Application template in Visual Studio, then following the directions in N2 CMS Developer Documentation in the section Integrating with Existing ASP.NET MVC Application. I have the basic site running now, but with one problem: the sliding curtain widget that holds the administrative controls is not visible in the upper right corner (when logged in, of course). I can make it visible the hard way by using Firebug to locate it in the DOM, and then disabling a couple of the CSS positioning elements. Once I do that, it seems to work normally. After I open it that way, I can click the various controls, or close it up (and I see the animation). But then it's off screen again. My master page has the sliding curtain just inside the <body> tag: <body> <n2:SlidingCurtain runat="server"> <n2:ControlPanel runat="server" /> </n2:SlidingCurtain> ... The site.css file generated in the base MVC site doesn't seem to do any positioning that would affect this. Firebug shows that right after by <body> tag, I have this: <div class="sc" id="SC" style="top: -2px; left: -574px;"><div class="scContent"> .... The style for <div class="sc" ...> is element.style { left:-574px; top:-2px; } .sc { background:#FFFFFF none repeat-x scroll 0 0; border-color:#CCCCBB; border-style:none solid solid none; border-width:1px; left:-200px; position:fixed; top:-200px; z-index:990; } If I disable both top: and both left: rules, the widget appears.

    Read the article

  • Initialize content of a jQuery remote tab on initial page load

    - by Carl
    I'm using the jQuery tabs library to create a set of remote (i.e., ajax loaded) tabs. However, to avoid the initial page load being empty until the ajax request finishes, I'd like to include the content for the initial tab with the initial page download. I've got this generally working by providing a div in the initial page load that matches the title of the tab, but even though this content appears immediately, as soon as I initialize the tabs it does the ajax request IN ADDITION which is both wasteful and causes a flicker. My basic question is how can I get jQuery tabs to NOT do an ajax request for the initially selected tab, and get this content as part of the initial page load, while still loading the other tabs dynamically. The complication is that I can't hard code the ids/hrefs for which tab is the "initial" one since the initial tab will change based on available content. I'm sure there is some kind of hacky way to do this with javascript rewriting the URLs of tabs dynamically before I initialize the tabs but I'm looking for a cleaner solution. Any ideas?

    Read the article

  • In JQuery 1.4.2 .ajax converts JSON wrong.

    - by Carl
    My code worked fine in JQuery 1.3.2, but in 1.4.2 it seems to be broken. What is should get in the post is something like this: ?pks=108;pks=107 What I now get is: ?pks[]=108;pks[]=107; When I trace this code through, the JSON object seems to be fine until it enters .ajax. Firebug after the response is received shows the post was: Parameters application/x-www-form-urlencoded pks[] 108 pks[] 107 Source pks%5B%5D=108&pks%5B%5D=107 Which is not what I got on JQuery 1.3.2. Where are those extra braces coming from?

    Read the article

  • 100% height with fixed footer and embedded Google Map

    - by Carl
    I have a problem with a layout - it's not online anywhere, just local, but if you copy and paste the code below into an html page and run it locally you will see the same page I do. It's very nearly there. What I'm trying to achieve is a page with no scrollbars using up all available vertical space. Yes, I can set "overflow:hidden" on the container declaration and that helps, but it's not quite right. I want to actually have the google map surrounded with a 1em border. I have this on 3 sides but the 100% height declaration on the content div crashes the bottom border. If you don't realise the implications of a percentage-sized google map div, then the parent HAS to have a height declared for it to work. As the footer is absolute and outside of the flow, there is no "bottom" border to work to and the layout just doesn't work. The content div 100% height basically seems to take its size from the viewport and not the containing div. It's driving me mad... just can't seem to work out how to do this and I'd really appreciate some input. Start here: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Google map test</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <style type="text/css"> html,body { margin:0; padding:0; height:100%; /* needed for container min-height */ background:fff; font-family:arial,sans-serif; font-size:small; color:#666; } h1 { font:1.5em georgia,serif; margin:0.5em 0; } h2 { font:1.25em georgia,serif; margin:0 0 0.5em; } div#container { position:relative; /* needed for footer positioning*/ margin:0 auto; /* center, not in IE5 */ width:960px; background:#fff; border-left:1px solid #ccc; border-right:1px solid #ccc; /*height:auto !important; real browsers */ height:100%; /* IE6: treaded as min-height*/ min-height:100%; /* real browsers */ } div#header { border-bottom:1px solid #ccc; border-left:1em solid #ccc; height:108px; position:relative; } div#header h1 { position:absolute; bottom: 0; left:0.5em; } div#header2 { border-bottom:1px solid #ccc; border-left:1em solid #999; height: 40px; position: relative; } div#header2 p { position:absolute; bottom: 0; left:0.5em; } div#headerInternal { border-bottom:1px solid #ccc; border-left:1em solid #cc3300; height: 40px; position: relative; } div#headerInternal p { position:absolute; bottom: 0; left:0.5em; } div#headerInternal2 { height: 40px; position: relative; } div#headerInternal2 p { position:absolute; bottom: 0; left:0.5em; } div#rightCol { float:right; width:29%; padding-bottom:5em; /* bottom padding for footer */ } div#content { float:left; width:70%; height:100%; /* fill that hole! */ border-right:1px solid #ccc; } div#content p { } div#footer { position:absolute; clear:both; width:100%; height:40px; bottom:0; /* stick to bottom */ background:#fff; border-top:1px solid #ccc; } div#footer p { padding:1em; margin:0; } .paddedContent { height:100%; margin: 1em; } </style> <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(52.397, 1.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } </script> </head> <body onload="initialize()"> <div id="container"> <div id="header"> <h1>Title here...</h1> </div> <div id="header2"> <p>Secondary menu...</p> </div> <div id="rightCol"> <div id="headerInternal2"> <p>Right Header</p> </div> <p class="paddedContent">This is the right column</p> </div> <div id="content"> <div id="headerInternal"> <p>Page Context Menu</p> </div> <div class="paddedContent"> <div id="map_canvas" style="width: 100%; height: 100%;"></div> </div> <div id="footer"> <p>This footer is absolutely positioned</p> </div> </div> </div> </body> </html>

    Read the article

  • Multithreaded IOCP Client Issue

    - by Carl
    I am writing a multithreaded client that uses an IO Completion Port. I create and connect the socket that has the WSA_FLAG_OVERLAPPED attribute set. if ((m_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) { throw std::exception("Failed to create socket."); } if (WSAConnectByName(m_socket, L"server.com", L"80", &localAddressLength, reinterpret_cast<sockaddr*>(&localAddress), &remoteAddressLength, &remoteAddress, NULL, NULL) == FALSE) { throw std::exception("Failed to connect."); } I associate the IO Completion Port with the socket. if ((m_hIOCP = CreateIoCompletionPort(reinterpret_cast<HANDLE>(m_socket), m_hIOCP, NULL, 8)) == NULL) { throw std::exception("Failed to create IOCP object."); } All appears to go well until I try to send some data over the socket. SocketData* socketData = new SocketData; socketData->hEvent = 0; DWORD bytesSent = 0; if (WSASend(m_socket, socketData->SetBuffer(socketData->GenerateLoginRequestHeader()), 1, &bytesSent, NULL, reinterpret_cast<OVERLAPPED*>(socketData), NULL) == SOCKET_ERROR && WSAGetLastError() != WSA_IO_PENDING) { throw std::exception("Failed to send data."); } Instead of returning SOCKET_ERROR with the last error set to WSA_IO_PENDING, WSASend returns immediately. I need the IO to pend and for it's completion to be handled in my thread function which is also my worker thread. unsigned int __stdcall MyClass::WorkerThread(void* lpThis) { } I've done this before but I don't know what is going wrong in this case, I'd greatly appreciate any efforts in helping me fix this problem.

    Read the article

  • Capturing Set Behavior with Mutating Elements

    - by Carl
    Using the Guava library, I have the following situation: SetMultimap<ImmutableFoo, Set<Foo>> setMM = HashMultimap.create(); Set<Foo> mask = Sets.newHashSet(); // ... some iteration construct { setMM.put(ImmutableFoo1, Sets.difference(SomeSetFoo1,mask)); setMM.put(ImmutableFoo1, Sets.difference(SomeSetFoo2,mask)); mask.add(someFoo); } that is, the same iteration to create the setMM is also used to create the mask - this can of course result in changes to hashCode()s and create duplicates within the SetMultimap backing. Ideally, I'd like the duplicates to drop without me having to make it happen, and avoid repeating the iteration to separately construct the multimap and mask. Any easy libraries/Set implementations to make that happen? Alternatively, can you identify a better way to drop the duplicates than: for (ImmutableFoo f : setMM.keySet()) setMM.putAll(f,setMM.removeAll(f)); revisiting the elements is probably not a performance problem, since I could combine a separate filter operation that needs to visit all the elements anyway.

    Read the article

  • How long does it take to iterate through a long loop?

    - by Carl Rosenberger
    On a modern 64-Bit machine, how long do you think it takes to iterate through all the positive long numbers? Below is a code snippet in Java to demonstrate the idea. Without running the code yourself, how long do you think this code is going to run? How long will similar code run in other programming languages? public class LongLoop { public static void main(String[] args) { long startTime = System.currentTimeMillis(); for (long i = 0; i < Long.MAX_VALUE; i++) { // do nothing, just loop } long stopTime = System.currentTimeMillis(); long duration = stopTime - startTime; System.out.println("Time taken: " + duration + " milliseconds"); } }

    Read the article

  • MVVM Light - master / child views and dependency properties

    - by Carl Dickinson
    I'm getting an odd problem when implementing a master / child view and custom dependency properties. Within my master view I'm binding the view model declaratively in the XAML as follows: DataContext="{Binding MainViewModelProperty, Source={StaticResource Locator}}" and my MainViewModel is exposing an observable collection which I'm binding to an ItemsControl as follows: <ItemsControl ItemsSource="{Binding Lists}" Height="490" Canvas.Top="10" Width="70"> <ItemsControl.ItemTemplate> <DataTemplate> <Canvas> <local:TaskListControl Canvas.Left="{Binding ListLeft}" Canvas.Top="{Binding ListTop}" Width="{Binding ListWidth}" Height="{Binding ListHeight}" ListDetails="{Binding}"/> </Canvas> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> TaskListControl in turn declares and bind to it's ViewModel and I've also defined a dependency property for the ListDetails property. The ListDetails property is not being set and if I remove the declarative reference to it's viewmodel the dependency property's callback does get fired. Is there a conflict with declaratively binding to viewmodels and definig dependency properties? I really like MVVM Light's blendability and want to perserve with this problem so any help would be apprectiated. If you'd like to receive the source for my project then please ask

    Read the article

  • Comet without AJAX

    - by Carl Whalley
    Suppose I only had the regular J2SE http libraries but wanted to write a client for comet, say in Android etc, but not limited to that, i.e. not using a WebView. Since there's no browser I'm assuming you'd have to open the long term connections yourself ... is this feasible?

    Read the article

  • Constraint Satisfaction Problem

    - by Carl Smotricz
    I'm struggling my way through Artificial Intelligence: A Modern Approach in order to alleviate my natural stupidity. In trying to solve some of the exercises, I've come up against the "Who Owns the Zebra" problem, Exercise 5.13 in Chapter 5. This has been a topic here on SO but the responses mostly addressed the question "how would you solve this if you had a free choice of problem solving software available?" I accept that Prolog is a very appropriate programming language for this kind of problem, and there are some fine packages available, e.g. in Python as shown by the top-ranked answer and also standalone. Alas, none of this is helping me "tough it out" in a way as outlined by the book. The book appears to suggest building a set of dual or perhaps global constraints, and then implementing some of the algorithms mentioned to find a solution. I'm having a lot of trouble coming up with a set of constraints suitable for modelling the problem. I'm studying this on my own so I don't have access to a professor or TA to get me over the hump - this is where I'm asking for your help. I see little similarity to the examples in the chapter. I was eager to build dual constraints and started out by creating (the logical equivalent of) 25 variables: nationality1, nationality2, nationality3, ... nationality5, pet1, pet2, pet3, ... pet5, drink1 ... drink5 and so on, where the number was indicative of the house's position. This is fine for building the unary constraints, e.g. The Norwegian lives in the first house: nationality1 = { :norway }. But most of the constraints are a combination of two such variables through a common house number, e.g. The Swede has a dog: nationality[n] = { :sweden } AND pet[n] = { :dog } where n can range from 1 to 5, obviously. Or stated another way: nationality1 = { :sweden } AND pet1 = { :dog } XOR nationality2 = { :sweden } AND pet2 = { :dog } XOR nationality3 = { :sweden } AND pet3 = { :dog } XOR nationality4 = { :sweden } AND pet4 = { :dog } XOR nationality5 = { :sweden } AND pet5 = { :dog } ...which has a decidedly different feel to it than the "list of tuples" advocated by the book: ( X1, X2, X3 = { val1, val2, val3 }, { val4, val5, val6 }, ... ) I'm not looking for a solution per se; I'm looking for a start on how to model this problem in a way that's compatible with the book's approach. Any help appreciated.

    Read the article

  • Remove GridView row with jQuery

    - by Jan-Frederik Carl
    Hello, I have a GridView and a asp:TextBox containing a Number. The GridView also contains cells with numbers (one in each row). I want to know wether a cell contains this number and if so, the whole row has to be removed. I want to do this via jQuery.

    Read the article

  • Overriding MIME Type in PHP

    - by Mr Carl
    My site is requesting a remote image which is being transferred with the wrong MIME type. I was wondering how might I override it in PHP to tell it that it's an image? I can't use header('Content-Type') because the image is being used in a HTML document. http://manga.justcarl.co.uk/N/Naruto/494/1 - one of the pages attempting to request an image... the image looks broken because it's trying to output it as html

    Read the article

  • what is the reason of Invalid Address specified to RtlFreeHeap

    - by carl
    the develop environment is vs2008, the language is c++, when I release the problem,at beginning it run with out problem but after several minutes it stop and show error like that : HEAP[guessModel.exe]: Invalid Address specified to RtlFreeHeap( 003E0000, 7D7C737B ). who can tell me the reason of the error. thank you very much.

    Read the article

  • Are we asking too much of transactional memory?

    - by Carl Seleborg
    I've been reading up a lot about transactional memory lately. There is a bit of hype around TM, so a lot of people are enthusiastic about it, and it does provide solutions for painful problems with locking, but you regularly also see complaints: You can't do I/O You have to write your atomic sections so they can run several times (be careful with your local variables!) Software transactional memory offers poor performance [Insert your pet peeve here] I understand these concerns: more often than not, you find articles about STMs that only run on some particular hardware that supports some really nifty atomic operation (like LL/SC), or it has to be supported by some imaginary compiler, or it requires that all accesses to memory be transactional, it introduces type constraints monad-style, etc. And above all: these are real problems. This has lead me to ask myself: what speaks against local use of transactional memory as a replacement for locks? Would this already bring enough value, or must transactional memory be used all over the place if used at all?

    Read the article

  • Using WSH (VBS) with iMacros - how do they do it?

    - by Carl
    (iMacros For Firefox 6.6.5.0; Firefox 3.6.3; Windows XP Pro SP3 w/all updates) I made an iMacro to select "load next 25" (comments) on a web page (CNN.COM). Unfortunately, iMacros doesn't appear to do looping (do the above until that string doesn't appear on the page anymore - i.e. all the comments are loaded). I tried putting {!iloop} in the TAG command, and it didn't work - then I read it wouldn't. So I tried the example at http://wiki.imacros.net/Loop_after_Query_or_Login I can't find any information on how to actually run the script in the above example. I searched Google and found VBS scripting is handled with .wsh files with Windows XP Pro. (The examples and other references there say Windows does VBS natively, so I looked up how with Google.) So I made the following .wsh file (modified the above example): Option Explicit Dim iim1, iret 'initialize iMacros instance set iim1 = CreateObject ("imacros") iret = iim1.iimInit() do while not iret < 0 iret = iim1.iimPlay("Load All CNN Comments") loop ' tell user we're done msgbox "End." ' exit iMacros instance and quit script iret = iim1.iimExit() Wscript.Quit() Here's the iMacro: (Load All CNN Comments.iim) VERSION BUILD=6650406 RECORDER=FX TAG POS=1 TYPE=A ATTR=TXT:Load<SP>next<SP>25 WAIT SECONDS=#DOWNLOADCOMPLETE# The iMacro works by itself - I press Play (left iMacro panel) and the next 25 comments load on the CNN.com page in the current tab. I put the .wsh file in the ...\iMacros\Macros directory - with the iMacro "Load All CNN Comments.iim" When I run the .wsh file (by just double clicking on it's icon - I created it with Notepad, and Windows gave it an icon for that file type - it's executable) I get the message from "Windows Script Host" - "There is no script file specified." I wasn't actually expecting it to work, as I don't see how Windows would know to call iMacros to run the iim macro. It would be nice if there was a simple, COMPLETE, example of how to use a VBS script with iMacros, that isn't bogged down with unnecessary complication like filling in a form, loading multiple pages, etc. I can't find ANY example. So what do I need to do to get this to work? I just installed iMacros yesterday, because I am constantly having the problem that there are hundred of comments after a CNN.com article, and loading 25 more at a time until they are all on the page makes it impractical to read any replies to my comments. It would also be nice if I could run the Macro from Firefox, rather than by double clicking on some file somewhere. Thanks for any help.

    Read the article

  • Uploading to S3 using Curl

    - by Carl Crawley
    Hi All, I'm currently using cURL to upload a file from my server to S3 using AJAX to call the script. So I have the following: $fullfilepath = '/server/sitepath/files/' . $_POST['file']; $upload_url = 'https://'.$_POST['buckets'].'.s3.amazonaws.com/'; $params = array( 'key'=>$_POST['key'], 'AWSAccessKeyId'=>$_POST['AWSAccessKeyId'], 'acl'=>$_POST['acl'], 'success_action_status'=>$_POST['success_action_status'], 'policy'=>$_POST['policy'], 'signature'=>$_POST['signature'], 'Content-Type'=>$_POST['Content-Type'], 'file'=>"@$fullfilepath" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_URL, $upload_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); $response = curl_exec($ch); curl_close($ch); echo $response; However, I'm getting an S3 error as follows when it posts and I'm unsure why because I'm not passing JSON to it. <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidPolicyDocument</Code><Message>Invalid Policy: Invalid JSON.</Message><RequestId>B29469C6151BE0E8</RequestId><HostId>BFPk6W2kt1b6hTtx0mEq6dWdN/IhO0gNR5bct//7LAOwJxm1C3PrxS4RPv1blzJ8</HostId></Error> I've googled it for the last hour or so and can't seem to figure it out. If I change the order of the Array fields, it gives me a different error - I believe the order of the posted fields is important somehow. any help would be much appreciated! C

    Read the article

  • ASP.NET Custom Validator Error Message: Control referenced by the property cannot be validated

    - by Jan-Frederik Carl
    Hello, I use ASP.NET and have a Button and a CustomValidator, which has to validate the button. <asp:Button ID="saveButton" runat="server" OnClick="SaveButton_Click" Text="Speichern" CausesValidation="true"/> <asp:CustomValidator runat="server" ID="saveCValidator" Display="Static" OnServerValidate="EditPriceCValidator_ServerValidate" ControlToValidate="saveButton" ErrorMessage=""> When loading the page, I receive the error message: "Control 'saveButton' referenced by the ControlToValidate property of 'saveCValidator' cannot be validated." What might be the problem? I searched on the net, but this didn´t help much.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >