Search Results

Search found 80 results on 4 pages for 'darko romanov'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • How to make iPhone application accept incorrect server certificate but only specific one?

    - by Igor Romanov
    I need to work with private HTTPS API and client has incorrect certificate on the host. Certificate is for www.clienthost.com and I'm working with api.clienthost.com. So I need to connect via HTTPS to api.clienthost.com ignoring incorrect certificate but still make sure it is the one for www.clienthost.com and not something else. I found this answer: http://stackoverflow.com/questions/933331/how-to-use-nsurlconnection-to-connect-with-ssl-for-an-untrusted-cert and it seems to solve half of my problem but I'm trying to figure out how to still check certificate for host is one I expect to see and not different.

    Read the article

  • Changing order of children of an SWT Composite

    - by Alexey Romanov
    In my case I have two children of a SashForm, but the question applies to all Composites and different layouts. class MainWindow { Sashform sashform; Tree child1 = null; Table child2 = null; MainWindow(Shell shell) { sashform = new SashForm(shell, SWT.NONE); } // Not called from constructor because it needs data not available at that time void CreateFirstChild() { ... Tree child1 = new Tree(sashform, SWT.NONE); } void CreateSecondChild() { ... Table child2 = new Table(sashform, SWT.NONE); } } I don't know in advance in what order these methods will be called. How can I make sure that child1 is placed on the left, and child2 on the right? Alternately, is there a way to change their order as children of sashform after they are created? Currently my best idea is to put in placeholders like this: class MainWindow { Sashform sashform; private Composite placeholder1; private Composite placeholder2; Tree child1 = null; Table child2 = null; MainWindow(Shell shell) { sashform = new SashForm(shell, SWT.NONE); placeholder1 = new Composite(sashform, SWT.NONE); placeholder2 = new Composite(sashform, SWT.NONE); } void CreateFirstChild() { ... Tree child1 = new Tree(placeholder1, SWT.NONE); } void CreateSecondChild() { ... Table child2 = new Table(placeholder2, SWT.NONE); } }

    Read the article

  • Cross-platform GUI toolkits with WPF-style composition capabilities

    - by Alexey Romanov
    A huge advantage of WPF over, say, WinForms is its composability. To quote Programming WPF: One level up, WPF provides its “content model,” which allows any control to host any group of other controls. You don’t have to build special BitmapButton or IconComboBox classes; you put as many images, shapes, videos, 3D models, or whatever into a Button (or a ComboBox, ListBox, etc.) as suit your fancy. Are there any cross-platform GUI frameworks (preferably with Java bindings) out there which also let you do this?

    Read the article

  • SWT Composite consructor throws IllegalArgumentException on a non-null argument

    - by Alexey Romanov
    This piece of code (in Scala) val contents = { assert(mainWindow.detailsPane != null) new Composite(mainWindow.detailsPane, SWT.NONE) } throws an exception: Exception occurred java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.widgets.Widget.error(Unknown Source) at org.eclipse.swt.widgets.Widget.checkParent(Unknown Source) at org.eclipse.swt.widgets.Widget.<init>(Unknown Source) at org.eclipse.swt.widgets.Control.<init>(Unknown Source) at org.eclipse.swt.widgets.Scrollable.<init>(Unknown Source) at org.eclipse.swt.widgets.Composite.<init>(Unknown Source) at main.scala.NodeViewPresenter$NodeViewImpl.<init>(NodeViewPresenter.scala:41) According to the documentation, IllegalArgumentException should only be thrown when the parent is null, but I am checking for that. detailsPane is a CTabFolder. Can anybody say why this could happen?

    Read the article

  • Svn merging trunk and branches

    - by Darko Petreski
    Hi All, I have a huge project. I need to make a branch - this will be version 2 of the project, but I also need to keep the trunk and change it in parallel with the branch 1 as bug fix to the version 1. I need to merge bug fixes from the trunk to the branch 1 while adding new features to the branch. At the end I need to merge all changes back in the trunk and make new tag from it. So I need bug fix for version 1, new branch for version 2 and of course merging bug fixes in the version 2. I am using svn but the svn makes problems all the time. I cannot merge anything without conflicts. Can someone give me an advice what to do? Regards

    Read the article

  • Flex 3 multiple upload progress monitoring

    - by Darko Z
    I have a Flex3 application which has to be capable of uploading multiple files and monitoring each files individual progress using a label NOT a progress bar. My problem is that a generic progress handler for the uploads has no way (that I know of) of indicating WHICH upload it is that is progressing. I know that a file name is available to check but in the case of this app the file name might be the same for multiple uploads. My question: With a generic progress handler how does one differentiate between 2 multiple uploads with the same file name? EDIT: answerers may assume that I am a total newb to Flex... because I am.

    Read the article

  • Good Haskell coding standards

    - by Alexey Romanov
    Could someone provide a link to a good coding standard for Haskell? I've found this and this, but they are far from comprehensive. Not to mention that the HaskellWiki one includes such "gems" as "use classes with care" and "defining symbolic infix identifiers should be left to library writers only."

    Read the article

  • How do I set up Scala plugin for NetBeans to copy the Scala runtime library?

    - by Alexey Romanov
    Versions: NetBeans 6.8, Scala Kit 0.16.1 When I compile my project, I get the following output: init: deps-jar: Compiling 2 source files to F:\MyProgramming\NorvigSpellChecker\build\classes compile: Created dir: F:\MyProgramming\NorvigSpellChecker\dist Building jar: F:\MyProgramming\NorvigSpellChecker\dist\NorvigSpellChecker.jar Not copying the libraries. To run this application from the command line without Ant, try: java -jar "F:\MyProgramming\NorvigSpellChecker\dist\NorvigSpellChecker.jar" jar: BUILD SUCCESSFUL (total time: 3 seconds) Of course, the libraries should be copied, so I can't actually run it by using this command line. I don't see any options to copy the library in the project configuration. The plugin uses Ant for building, but I don't have any experience with it; presumably it should be easy enough to tell Ant to copy the libraries. Here is build-impl.xml, what should I do in build.xml?

    Read the article

  • Performance implications of finalizers on JVM

    - by Alexey Romanov
    According to this post, in .Net, Finalizers are actually even worse than that. Besides that they run late (which is indeed a serious problem for many kinds of resources), they are also less powerful because they can only perform a subset of the operations allowed in a destructor (e.g., a finalizer cannot reliably use other objects, whereas a destructor can), and even when writing in that subset finalizers are extremely difficult to write correctly. And collecting finalizable objects is expensive: Each finalizable object, and the potentially huge graph of objects reachable from it, is promoted to the next GC generation, which makes it more expensive to collect by some large multiple. Does this also apply to JVMs in general and to HotSpot in particular?

    Read the article

  • SWT: cleaning up before application exit

    - by Alexey Romanov
    What is the best way for an SWT application to clean up resources before application exit? I see two options: 1) Add a DisposeListener to main window (or better, to the Display). Will it get run if an uncaught exception happens? 2) Use a shutdown hook. Any problems to be aware of there which aren't mentioned in Design of the Shutdown Hooks API?

    Read the article

  • Custom onsynctopreference for XUL textbox

    - by Alexey Romanov
    I wanted to enable custom shortcuts in my Firefox extension. The idea is that the user just focuses on a textbox, presses key combination, and it's shown in the textbox and saved to a preference. However, I couldn't get it to work. With this XUL <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="chrome://mozapps/skin/pref/pref.css" type="text/css"?> <!DOCTYPE window SYSTEM "chrome://nextplease/locale/nextplease.dtd"> <prefwindow id="nextpleaseprefs" title="&options.title;" buttons="accept, cancel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="nextplease.general" label="&options.general.title;" image="chrome://nextplease/skin/Sound Mixer.png"> <preferences> <preference id="nextkey" name="nextplease.nextkey" type="int"/> </preferences> <vbox flex="1"> <hbox align="center"> <label value="&options.general.nextKey;" /> <textbox id="nextkey" flex="1" editable="false" onkeyup="return nextplease.handleKeySelection(this, event);" preference-editable="true" preference="nextkey" onsynctopreference="alert('syncing'); return nextplease.syncKeySelector(this);"/> </hbox> </vbox> </prefpane> <script type="application/x-javascript" src="chrome://nextplease/content/nextpleaseCommon.js" /> <script type="application/x-javascript" src="chrome://nextplease/content/nextpleaseOptions.js" /> </prefwindow> the event in onkeyup works. But when I click the OK button, I don't see a "syncing" alert. Why isn't onsynctopreference working? Is it impossible to have custom onsynctopreference attribute for a textbox?

    Read the article

  • Number of concurrent connections in Silverlight

    - by Darko Z
    Hi guys, Is there currently a way to programatically determine from within a Silverlight app the maximum number of concurrent connections that the browser will allow? I know I can do this on the server then pass it as a parameter, but I would like to know if its possible in Silverlight. This is for all versions of Silverlight including Silverlight 4 RC.

    Read the article

  • Creating a Type object corresponding to a generic type

    - by Alexey Romanov
    In Java, how can I construct a Type object for Map<String, String>? System.out.println(Map<String, String>.class); doesn't compile. One workaround I can think of is private Map<String, String> dummy() { throw new Error(); } Type mapStringString = Class.forName("ThisClass").getMethod("dummy", null).getGenericReturnType(); Is this the correct way?

    Read the article

  • Scala methods ending in _=

    - by Alexey Romanov
    I seem to remember Scala treating methods ending in _= specially, so something like this: object X { var x: Int = 0; def y_=(n : Int) { x = n }} X.y = 1 should call X.y_=(1). However, in 2.8.0 RC1, I get an error message: <console>:6: error: value y is not a member of object X X.y = 1 ^ Interestingly, just trying to call the method without parentheses fails as well: scala> X.y_= 1 <console>:1: error: ';' expected but integer literal found. X.y_= 1 ^ Am I misremembering something which does actually exist or did I just invent it out of whole cloth?

    Read the article

  • Improving MVP in Scala

    - by Alexey Romanov
    The classical strongly typed MVP pattern looks like this in Scala: trait IView { } trait Presenter[View <: IView] { // or have it as an abstract type member val view : View } case class View1(...) extends IView { ... } case object Presenter1 extends Presenter[View1] { val view = View1(...) } Now, I wonder if there is any nice way to improve on it which I am missing...

    Read the article

  • Passing array to another class - Objective C

    - by Darko Hebrang
    I manage to pass the following array from MessagesTableViewController.m to arraySelectedCategory in another class called MessageDetailViewController.m: self.messageDetailViewController.arraySelectedCategory = [[NSMutableArray alloc] initWithObjects:@"Value 1",@"Value 2", @"Value 3", nil]; but how do I hand over an array stored in: NSMutableArray *categories; self.messageDetailViewController.arraySelectedCategory = ????? Thanks!

    Read the article

  • What is CTabFolderPageManager?

    - by Alexey Romanov
    This Eclipse bug mentions something called CTabFolderPageManager, which seems like it could be useful for me. However, searching for CTabFolderPageManager doesn't give any results. Is it a future feature for SWT (given that the bug report is from 2007, this would be surprising)? Or did I just fail at searching for it?

    Read the article

  • Scala Hoogle equivalent?

    - by Alexey Romanov
    Hoogle allows you to search many standard Haskell libraries by either function name, or by approximate type signature. I find it very useful. Is there anything like Hoogle for Scala? Search in ScalaDoc 2 only finds types and packages by name.

    Read the article

  • Running a method after the constructor of any derived class

    - by Alexey Romanov
    Let's say I have a Java class abstract class Base { abstract void init(); ... } and I know every derived class will have to call init() after it's constructed. I could, of course, simply call it in the derived classes' constructors: class Derived1 extends Base { Derived1() { ... init(); } } class Derived2 extends Base { Derived2() { ... init(); } } but this breaks "don't repeat yourself" principle rather badly (and there are going to be many subclasses of Base). Of course, the init() call can't go into the Base() constructor, since it would be executed too early. Any ideas how to bypass this problem? I would be quite happy to see a Scala solution, too.

    Read the article

  • Writing functions of tuples conveniently in Scala

    - by Alexey Romanov
    Quite a few functions on Map take a function on a key-value tuple as the argument. E.g. def foreach(f: ((A, B)) ? Unit): Unit. So I looked for a short way to write an argument to foreach: > val map = Map(1 -> 2, 3 -> 4) map: scala.collection.immutable.Map[Int,Int] = Map(1 -> 2, 3 -> 4) > map.foreach((k, v) => println(k)) error: wrong number of parameters; expected = 1 map.foreach((k, v) => println(k)) ^ > map.foreach({(k, v) => println(k)}) error: wrong number of parameters; expected = 1 map.foreach({(k, v) => println(k)}) ^ > map.foreach(case (k, v) => println(k)) error: illegal start of simple expression map.foreach(case (k, v) => println(k)) ^ I can do > map.foreach(_ match {case (k, v) => println(k)}) 1 3 Any better alternatives?

    Read the article

  • Scala: getting the name of the class the trait is mixed in

    - by Alexey Romanov
    Given an instance of a class, we can obviously return its name: trait MixedInClassDiscovery { val className = this.getClass.getName } class AClass extends MixedInClassDiscovery { ... this.className // returns "AClass" ... } But this way uses reflection, once for every instance of AClass. Can the same be done once for every class, instead? One solution which comes to mind is to mix it into companion objects instead of classes themselves.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >