Search Results

Search found 1947 results on 78 pages for 'ole martin eide'.

Page 54/78 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Constructing colours for maximum contrast

    - by Martin
    I want to draw some items on screen, each item is in one of N sets. The number of sets changes all the time, so I need to calculate N different colours which are as different as possible (to make it easy to identify what is in which set). So, for example with N = 2 my results would be black and white. With three I guess I would get all red, all green, all blue. For all four, it's less obvious what the correct answer is, and this is where I'm having trouble.

    Read the article

  • Facebook graph api - delete like

    - by Martin
    Hi there, I'm developing an app for Facebook in PHP, part of which lists the user's "likes". I would like to add a link next to each like so that the user can manage their likes by deleting them where they see fit. Facebook mentions this in their graph api docs: "You can delete a like by issuing a DELETE request to /POST_ID/likes (since likes don't have an ID)." But each like must have an id - how else would you delete it? Has anyone done this before, any help will be appreciated.

    Read the article

  • Serialize in a human readable text format

    - by Martin Kirsche
    Is there a way in .NET 2.0 (C#) to serialize object like you do using XmlSerializer in a simple / customizable human readable format thats for instance looks like PXLS or JSON? Also I know that XML is human readable, I'm looking for something with less annoying redundancy, something that you can output to the console as a result for the user.

    Read the article

  • Special chars in Amazon S3 keys?

    - by Martin
    Is it possible to have special characters like åäö in the key? If i urlencode the key before storing it works, but i cant really find a way to access the object. If i write åäö in the url i get access denied (like i get if the object is not found). If i urlencode the url i paste in the browser i get "InvalidURICouldn't parse the specified URI". Is there some way to do this?

    Read the article

  • Qt: Styling QTabWidget

    - by Martin
    I'm using Qt and I have a QTabWidget setup in the Qt Designer Editor, you can see it in picture 1. As you can see after Tab4 there is an empty space all the way to the right edge, in someway I need to fill that space with a color, like in picture 2. Or another solution would be that the tabs float out to cover the whole screen. I use the following stylesheet right now: QTabWidget::tab-bar { } QTabBar::tab { background: gray; color: white; padding: 10px; } QTabBar::tab:selected { background: lightgray; } Is there a way to set the background color of the QTabBar using Qt stylesheets? Or can I get the tabs floating out to the edge using Qt stylesheets? Thanks!

    Read the article

  • Reverse engineering a bezier curve

    - by Martin
    Given a few sample points on a bézier curve, is it possible to work out the set of possible parameters of the curve? In my specific application there is a limited set of endpoints the curve may have, so I want to generate the set of possible curves, enumerate all of them and pick out all the ones which may end on a valid end point.

    Read the article

  • C++ Declarative Parsing Serialization

    - by Martin York
    Looking at Java and C# they manage to do some wicked processing based on special languaged based anotation (forgive me if that is the incorrect name). In C++ we have two problems with this: 1) There is no way to annotate a class with type information that is accessable at runtime. 2) Parsing the source to generate stuff is way to complex. But I was thinking that this could be done with some template meta-programming to achieve the same basic affect as anotations (still just thinking about it). Like char_traits that are specialised for the different types an xml_traits template could be used in a declaritive way. This traits class could be used to define how a class is serialised/deserialized by specializing the traits for the class you are trying to serialize. Example Thoughs: template<typename T> struct XML_traits { typedef XML_Empty Children; }; template<> struct XML_traits<Car> { typedef boost::mpl::vector<Body,Wheels,Engine> Children; }; template<typename T> std::ostream& Serialize(T const&) { // my template foo is not that strong. // but somthing like this. boost::mpl::for_each<typename XML_Traits<T>::Children,Serialize>(data); } template<> std::ostream& Serialize<XML_Empty>(T const&) { /* Do Nothing */ } My question is: Has anybody seen any projects/decumentation (not just XML) out there that uses techniques like this (template meta-programming) to emulate the concept of annotation used in languges like Java and C# that can then be used in code generation (to effectively automate the task by using a declaritive style). At this point in my research I am looking for more reading material and examples.

    Read the article

  • Managing Data Dependecies of Java Classes that Load Data from the Classpath at Runtime

    - by Martin Potthast
    What is the simplest way to manage dependencies of Java classes to data files present in the classpath? More specifically: How should data dependencies be annotated? Perhaps using Java annotations (e.g., @Data)? Or rather some build entries in a build script or a properties file? Is there build tool that integrates and evaluates such information (Ant, Scons, ...)? Do you have examples? Consider the following scenario: A few lines of Ant create a Jar from my sources that includes everything found on the classpath. Then jarjar is used to remove all .class files that are not necessary to execute, say, class Foo. The problem is that all the data files that class Bar depends upon are still there in the Jar. The ideal deployment script, however, would recognize that the data files on which only class Bar depends can be removed while data files on which class Foo depends must be retained. Any hints?

    Read the article

  • Recent OpenSLL book

    - by Martin
    Does anyone know of a more recent OpenSLL book then Network Security with OpenSSL: Cryptography for Secure Communications (http://www.opensslbook.com/). It is from 2002 and does not cover OpenSSL version 0.97+. Best would be a book for OpenSSL 1.0.0 but I guess that one is to recent.

    Read the article

  • How to change src (ajax ref in options (events: 'href') when calling refetchEvents

    - by Martin Glynn
    My site is for listing theatrical productions (http://theaterOnline.com) I want to use a drop down list to enable users to filter the listings by location or genre. The following code refreshes the screen: $("#cfilter").change(function() { $('#calendar').fullCalendar('refetchEvents' ) }) but I need to be able to change SRC in the ajax call below: $.ajax({ url: src, dataType: 'json', data: params, cache: options.cacheParam || false, success: reportEventsAndPop}) which is a passed parameter from eventSources[1] TIA for anyone who can help!

    Read the article

  • WPF style problem with custom control and textbox-derived class

    - by Martin
    I had the following situation: main application has app.xaml, which sets the style for TextBox controls a custom control is implemented in a separate DLL, and uses several TextBox controls The main application's TextBox style is applied to the custom control's TextBox controls. Cool! My problem comes in because I need to use a class derived from TextBox in the custom control. Now the main app's TextBox style is no longer applied. Can the custom control DLL have something like "app.xaml" where I can set the style for all my derived TextBox controls? Or can the main application somehow set the style for all TextBox-derived classes? Thanks!

    Read the article

  • find command in Linux

    - by Martin
    My goal is to find all pdf files on a remote machine, so I resort to the useless command find. So I type find . *.pdf or find ~ .pdf or find ~ ".pdf" and I get nothing. I do the same on my machine and I get nothing. I do a regular search from the menu on my machine and I find quite a few pdf files. Would somebody please tell me what am I doing wrong?

    Read the article

  • iPhone: Jump to next uitextfield in uitableview, how to?

    - by Martin
    In my iPhone project I'm using a UITableview with UITableViewCells containing UITextfields. I have seen in many apps that it is possible to use a next button to jump to the next textfield in the next cell. What is the best way to accomplish this? My idea is to get the indexPath of the cell with the textfield that is being editing and then get the next cell by cellForRowAtIndexPath. But how can I get the indexPath of the cell I'm currently editing? Thanks!

    Read the article

  • Catching error caused by InitialContext.lookup

    - by Martin Schröder
    I'm developing a command line client (Java SE6) that now needs to talk to a Glassfish 2.1 server. The code for setting up this connection is try { final InitialContext context = new InitialContext(); final String ejbName = GeneratorCancelledRemote.class.getName(); generatorCancelled = (GeneratorCancelledRemote) context.lookup(ejbName); } catch (Throwable t) { System.err.println("--> Could not call server:"); t.printStackTrace(System.err); runWithOutEJB = true; } I'm now testing it without a running server and the client (when run from Eclipse 4.2) just bombs with 31.10.2012 10:40:09 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700" org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2783) at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2804) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:261) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:274) at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:184) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:328) at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112) at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69) at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:134) at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:259) at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:204) at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.werkii.latex.generator.Generator.main(Generator.java:344) Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:244) ... 14 more Caused by: java.net.ConnectException: Connection refused: connect at sun.nio.ch.Net.connect(Native Method) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:532) at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105) at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332) ... 15 more It's o.k. for now (while I'm still in development) that it bombs, but it does this repeatedly and the catch clause is never reached (even though I'm catching Throwable) - the message is not printed. So how can I handle connection errors during lookup in my program?

    Read the article

  • Mirror a website with httrack while executing javascript

    - by Martin
    I want do save a mirror of www.youtube.com/tv. I obviously do not want to save the videos. I want the code running the website in a local copy, everything else can stay remote. The code I want is mainly contained in 2 files: live.js and app-prod.js. I tried using httrack. I have issue parsing the javascript to load anything past the first file: live.js. The %P parameter does not help. httrack www.youtube.com/tv +* -r6 --mirror -%P -j It doesn't go further than live.js because some javascript needs to be executed to load the next file. I know I can do this manually with any browser. I want to automate the process. Is httrack able to do this by itself? If yes, how?

    Read the article

  • Is there a Chrome extension to add mailto links to email addresses?

    - by Martin Burch
    Wait, wait, this is a programming question! I want to build an extension if none exists. Imagine this: you come across a webpage that says "Just send a message to [email protected]" but to actually send the email, you need to highlight the address and then cut and paste it into the recipient field of a new compose window of your email client of choice. Obviously life would be easier if it were simply a mailto: link, so you could click on it and have a new message created automatically. (Or if the page designer had used a form, perhaps ...) I was originally going to ask if there was an extension to enable similar functionality for unlinked twitter @username mentions but I thought this email address problem would be a simpler situation. If you think it would be useless, perhaps I should look at the twitter username problem instead. Thanks for your feedback.

    Read the article

  • Implementing a hilbert map of the internet

    - by Martin
    In the XKCD comic 195 a design for a map of the internet address space is suggested using a hilbert curve so that items from a similar IPs will be clustered together. Given an IP address, how would I calculate the 2D coordinates (in the range zero to one) that this IP is located on such a map?

    Read the article

  • How should I secure my webapp written using Wicket, Spring, and JPA?

    - by Martin
    So, I have an web-based application that is using the Wicket 1.4 framework, and it uses Spring beans, the Java Persistence API (JPA), and the OpenSessionInView pattern. I'm hoping to find a security model that is declarative, but doesn't require gobs of XML configuration -- I'd prefer annotations. Here are the options so far: Spring Security (guide) - looks complete, but every guide I find that combines it with Wicket still calls it Acegi Security, which makes me think it must be old. Wicket-Auth-Roles (guide 1 and guide 2) - Most guides recommend mixing this with Spring Security, and I love the declarative style of @Authorize("ROLE1","ROLE2",etc). I'm concerned about having to extend AuthenticatedWebApplication, since I'm already extending org.apache.wicket.protocol.http.WebApplication, and Spring is already proxying that behind org.apache.wicket.spring.SpringWebApplicationFactory. SWARM / WASP (guide) - This looks the newest (though the main contributor passed away years ago), but I hate all of the JAAS-styled text files that declare permissions for principals. I also don't like the idea of making an Action class for every single thing a user might want to do. Secure models also aren't immediately obvious to me. Plus, there isn't an Authn example. Additionally, it looks like lots of folks recommend mixing the first and second options. I can't tell what the best practice is at all, though.

    Read the article

  • How do I select distinct rows where a column may have a number of the same values but all their 2nd

    - by Martin Rose
    I have a table in the form: test_name| test_result | test1 | pass | test2 | fail | test1 | pass | test1 | pass | test2 | pass | test1 | pass | test3 | pass | test3 | fail | test3 | pass | As you can see all test1's pass while test2's and test3's have both passes and fails. Is there a SQL statement that I can use to return the distinct names of the tests that only pass? E.g. test1

    Read the article

  • Access Grails domain class from GroovyShell script

    - by Martin Dow
    I'm trying to use GroovyShell to evaluate some snippets of code from within a Grails application, but I don't seem to be able to access our Grails domain classes. For example when I try to evaluate something like this: Eval.me("my.package.MyDomainClass.get(1)") I see an error like this: groovy.lang.MissingPropertyException: No such property: my for class: Script1 Any thoughts on how I can get this to work? Thanks.

    Read the article

  • Android strace in Real device

    - by Martin Solac
    I have the following situation, I want to monitor the system calls on Android phones so I made an script to do that. With Android Emulator works perfectly (writes the traces of the application in a specific file on my Ubuntu). The problem is when I attach a real phone to analyze it, it says the following in the result file: ptrace attach failed: Operation not permitted I'm using this code to get it, but I don't understand why it works on the emulator and not in the rooted real device. This is the comand I use in perl: system("$dirTools/adb -s $Device shell strace -p $PID[1]>$dirRecordDataSet/$Date/$appName &"); Any suggestion? Thanks in advance

    Read the article

  • Best practice to include log4Net external config file in ASP.NET

    - by Martin Buberl
    I have seen at least two ways to include an external log4net config file in an ASP.NET web application: Having the following attribute in your AssemblyInfo.cs file: [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log.config", Watch = true)] Calling the XmlConfigurator in the Global.asax.cs: protected void Application_Start() { XmlConfigurator.Configure(new FileInfo("Log.config")); } What would be the best practice to do it?

    Read the article

  • Is there a current OpenSSL book?

    - by Martin
    Does anyone know of a more recent OpenSSL book than "Network Security with OpenSSL: Cryptography for Secure Communications" (http://www.opensslbook.com/)? It is from 2002 and does not cover OpenSSL version 0.97+. Best would be a book for OpenSSL 1.0.0 but I guess that one is too recent.

    Read the article

  • Determine when a NSOpenPanel will close

    - by Martin
    I'm trying to determine when an NSOpenPanel is closing before it actually closes. I need to do this so I can overlay another window with a screenshot of the open panel on top of it to be animated. Unfortunately, all the notifications that you seem to be able to access seem to fire AFTER the window's already been closed. This leads to a jarring stutter before you start your transition. I've tried: - using NSWindow delegate methods on the open panel (apparently, none of the NSWindow delegate methods work) - monitoring panel:userEnteredFilename:confirmed: (not called) - showing the dialog with a callback (callback happens AFTER the panel disappears)

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >