Search Results

Search found 2403 results on 97 pages for 'alex peta'.

Page 37/97 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • Why is it so difficult to get a working IDE for Scala?

    - by Alex R
    I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far. This was the original error. See below for update: Scala signature Predef has wrong version Expected 5.0 found: 4.1 in .... scala-library.jar I tried both versions 2.7.6 and 2.8 RC1 of scala-*.jar, the result was the same. JDK is 1.6.u20. UPDATE Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in. Then I setup a project from scratch through the wizards: new project from scratch JDK is 1.6.u20 accept the default (project) instead of global / module accept the download of Scala 2.8.0beta1 into project's lib folder Created a new class: object hello { def main(args: Array[String]) { println("hello: " + args); } } For my efforts, I now have a brand-new error :) Here it is: Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)] Thanks

    Read the article

  • "Launch Failed. Binary Not Found." Snow Leopard and Eclipse C/C++ IDE issue.

    - by Alex
    Not a question, I've just scoured the internet in search of a solution for this problem and thought I'd share it with the good folks of SO. I'll put it in plain terms so that it's accessible to newbs. :) (Apologies if this is the wrong place -- just trying to be helpful.) This issue occurs with almost any user OS X Snow Leopard who tries to use the Eclipse C/C++ IDE, but is particularly annoying for the people (like me) who were using the Eclipse C/C++ IDE in Leopard, and were unable to work with Eclipse anymore when they upgraded. The issue occurs When users go to build/compile/link their software. They get the following error: Launch Failed. Binary Not Found. Further, the "binaries" branch in the project window on the left is simply nonexistent. THE PROBLEM: is that GCC 4.2 (the GNU Compiler Collection) that comes with Snow Leopard compiles binaries in 64-bit by default. Unfortunately, the linker that Eclipse uses does not understand 64-bit binaries; it reads 32-bit binaries. There may be other issues here, but in short, they culminate in no binary being generated, at least not one that Eclipse can read, which translates into Eclipse not finding the binaries. Hence the error. One solution is to add an -arch i686 flag when making the file, but manually making the file every time is annoying. Luckily for us, Snow Leopard also comes with GCC 4.0, which compiles in 32 bits by default. So one solution is merely to link this as the default compiler. This is the way I did it. THE SOLUTION: The GCCs are in /usr/bin, which is normally a hidden folder, so you can't see it in the Finder unless you explicitly tell the system that you want to see hidden folders. Anyway, what you want to do is go to the /usr/bin folder and delete the path that links the GCC command with GCC 4.2 and add a path that links the GCC command with GCC 4.0. In other words, when you or Eclipse try to access GCC, we want the command to go to the compiler that builds in 32 bits by default, so that the linker can read the files; we do not want it to go to the compiler that compiles in 64 bits. The best way to do this is to go to Applications/Utilities, and select the app called Terminal. A text prompt should come up. It should say something like "(Computer Name):~ (Username)$ " (with a space for you user input at the end). The way to accomplish the tasks above is to enter the following commands, entering each one in sequence VERBATIM, and pressing enter after each individual line. cd /usr/bin rm cc gcc c++ g++ ln -s gcc-4.0 cc ln -s gcc-4.0 gcc ln -s c++-4.0 c++ ln -s g++-4.0 g++ Like me, you will probably get an error that tells you you don't have permission to access these files. If so, try the following commands instead: cd /usr/bin sudo rm cc gcc c++ g++ sudo ln -s gcc-4.0 cc sudo ln -s gcc-4.0 gcc sudo ln -s c++-4.0 c++ sudo ln -s g++-4.0 g++ Sudo may prompt you for a password. If you've never used sudo before, try just pressing enter. If that doesn't work, try the password for your main admin account. OTHER POSSIBLE SOLUTIONS You may be able to enter build variables into Eclipse. I tried this, but I don't know enough about it. If you want to feel it out, the flag you will probably need is -arch i686. In earnest, GCC-4.0 worked for me all this time, and I don't see any reason to switch now. There may be a way to alter the default for the compiler itself, but once again, I don't know enough about it. Hope this has been helpful and informative. Good coding!

    Read the article

  • Is this so bad when using MySQL queries in PHP?

    - by alex
    I need to update a lot of rows, per a user request. It is a site with products. I could... Delete all old rows for that product, then loop through string building a new INSERT query. This however will lose all data if the INSERT fails. Perform an UPDATE through each loop. This loop currently iterates over 8 items, but in the future it may get up to 15. This many UPDATEs doesn't sound like too good an idea. Change DB Schema, and add an auto_increment Id to the rows. Then first do a SELECT, get all old rows ids in a variable, perform one INSERT, and then a DELETE WHERE IN SET. What is the usual practice here? Thanks

    Read the article

  • How can I set fancyBox's contents dynamically?

    - by alex
    I have tried $('.selector').fancybox({ scrolling : 'no', titleShow : false, type : 'inline', content : '<p>hello</p>' But it did not work I have also tried adding the option onComplete: function() { $('#fancybox-inner').html(contents); } Except then when fancyBox is closed, it will not launch again. How can I dynamically set the contents of fancyBox, and retain all of it's functionality? Thanks

    Read the article

  • How does C# lambda work?

    - by Alex
    I'm trying to implement method Find that searches the database. I want it to be like that: var user = User.Find(a => a.LastName == "Brown"); Like it's done in List class. But when I go to List's source code (thanks, Reflector), I see this: public T Find(Predicate<T> match) { if (match == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } for (int i = 0; i < this._size; i++) { if (match(this._items[i])) { return this._items[i]; } } return default(T); } How can I implement this thing? I need to get those parameters to make the search.

    Read the article

  • Java Anagram Solver

    - by Alex
    I can work out how to create anagrams of a string but I don't know how I can compare them to a dictionary of real words to check if the anagram is a real word. Is there a class in the Java API that contains the entire English dictionary?

    Read the article

  • matplotlib: how to refresh figure.canvas

    - by Alex
    Hello, I can't understand how to refresh FigureCanvasWxAgg instance. Here is the example: import wx import matplotlib from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.figure import Figure class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, wx.NewId(), "Main") self.sizer = wx.BoxSizer(wx.VERTICAL) self.figure = Figure(figsize=(1,2)) self.axe = self.figure.add_subplot(111) self.figurecanvas = FigureCanvas(self, -1, self.figure) self.buttonPlot = wx.Button(self, wx.NewId(), "Plot") self.buttonClear = wx.Button(self, wx.NewId(), "Clear") self.sizer.Add(self.figurecanvas, proportion=1, border=5, flag=wx.ALL | wx.EXPAND) self.sizer.Add(self.buttonPlot, proportion=0, border=2, flag=wx.ALL) self.sizer.Add(self.buttonClear, proportion=0, border=2, flag=wx.ALL) self.SetSizer(self.sizer) self.figurecanvas.Bind(wx.EVT_LEFT_DCLICK, self.on_dclick) self.buttonPlot.Bind(wx.EVT_BUTTON, self.on_button_plot) self.buttonClear.Bind(wx.EVT_BUTTON, self.on_button_clear) self.subframe_opened = False def on_dclick(self, evt): self.subframe = SubFrame(self, self.figure) self.subframe.Show(True) self.subframe_opened = True def on_button_plot(self, evt): self.axe.plot(range(10), color='green') self.figurecanvas.draw() def on_button_clear(self, evt): if self.subframe_opened: self.subframe.Close() self.figure.set_canvas(self.figurecanvas) self.axe.clear() self.figurecanvas.draw() class SubFrame(wx.Frame): def __init__(self, parent, figure): wx.Frame.__init__(self, parent, wx.NewId(), "Sub") self.sizer = wx.BoxSizer(wx.VERTICAL) self.figurecanvas = FigureCanvas(self, -1, figure) self.sizer.Add(self.figurecanvas, proportion=1, border=5, flag=wx.ALL | wx.EXPAND) self.SetSizer(self.sizer) self.Bind(wx.EVT_CLOSE, self.on_close) def on_close(self, evt): self.GetParent().subframe_opened = False evt.Skip() class MyApp(wx.App): def OnInit(self): frame = MainFrame() frame.Show(True) self.SetTopWindow(frame) return True app = MyApp(0) app.MainLoop() I'm interested in the following sequence of operations: run a script resize the main frame press Plot button double click on plot press Clear button Now I get a mess on main frame plot. If I resize the frame it redraws properly. My question is what should I add to my code to do that without resizing? Thanks in advance.

    Read the article

  • Tips on implementing a custom UITextView interface on the iPhone?

    - by Alex
    I am trying to implement a control to edit text that will display the text in multiple colors. None of the solutions I have attempted yet have been good enough. UITextView cannot accomplish this. All of the text must be the same color. Using CoreGraphics to draw the text does not allow the text to be selected. Using a UIWebView, DIV and PRE tags cannot be set to contentEditable on Mobile Safari. Currently playing with using an off-screen TEXTAREA and an on-screen DIV to show the rendered text. This works pretty well, except supporting all of these at the same time seems impossible: click-to-type, click-to-move-cursor, click-and-hold-select/copy/paste. Anyone have any tips on this predicament? I've been trying to find any preexisting library out there that will accomplish this in a good way, to no luck. I'm open to any ideas!

    Read the article

  • Using a Generic Repository pattern with fluent nHibernate

    - by alex
    I'm currently developing a medium sized application, which will access 2 or more SQL databases, on different sites etc... I am considering using something similar to this: http://mikehadlow.blogspot.com/2008/03/using-irepository-pattern-with-linq-to.html However, I want to use fluent nHibernate, in place of Linq-to-SQL (and of course nHibernate.Linq) Is this viable? How would I go about configuring this? Where would my mapping definitions go etc...? This application will eventually have many facets - from a WebUI, WCF Library and Windows applications / services. Also, for example on a "product" table, would I create a "ProductManager" class, that has methods like: GetProduct, GetAllProducts etc... Any pointers are greatly received.

    Read the article

  • Facebook Graph API - authorization types?

    - by Alex Cook
    I'm struggling with the new Facebook Graph API, perhaps someone here can help. Here is what I want to do: provide a ‘login w/ FB’ button, throw to /authorize, get a code, throw to /access_token, get an access_token, and be able to hit https://graph.facebook.com/me for info about the user. When I try to use type=client_cred in the /authorize call, I get an access_token that lets me hit URLs with userIDs or names, but not /me. I receive an error stating I need a valid token. If I can't hit /me, how do I figure out who the current user is? What exactly should I use in the type param if I want a website to access a users data? I've seen posts with type=web_server, etc, but I can't seem to find a sure fire way to do, what I think, is pretty simple... Thanks ahead of time for any help thats provided...

    Read the article

  • Recommended Post-SP1 Visual Studio 2008 Hotfixes

    - by Alex Angas
    Today I had to reinstall. I used to have some hotfixes installed for VS2008 but no longer have them and can't remember why they were necessary. I'm expecting any security-related hotfixes to come through Microsoft Update, but I'm interested in VS bug fixes. Does anyone have a list of hotfixes that they recommend installing for Visual Studio 2008 SP1?

    Read the article

  • Tools for conceptual website design

    - by Alex Tang
    What tools (apart from Visio) will generate visually pleasing website site maps or diagrams of a conceptual website? We want to present nice diagrams to our client, but we're unsure about where to get started—we're all coders, not designers. Visio shapes or stencils are quite old. What tools are others in the industry using?

    Read the article

  • click events issue in jquery.

    - by alex
    I don't know if the title explain this situation well. Below is a code i wrote to create div elements when the button is pressed. Then By clicking on any of the created divs, we can change the div background by choosing a color from the drop down box. However if i click on another div and tried to change the color by selecting another color from the drop down, the previously clicked divs also gets affected by the new color. Why is this happening. I only want the selected div to change color, without affecting the previously clicked divs. I read allot of threads on this site, some of which talks about unbinding clicks, but I'm unable to solve the problem. Thanks for the help. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> <style> .aaa { width:100px; height:100px;background-color:#ccc;margin-bottom:5px;} p{widht:500px; height:500px; margin:0px; padding:0px;border:2px solid red;color:#000;} </style> <select id="item_select" name="item"> <option value="1">red</option> <option value="2">blue</option> <option value="3">green</option> </select> <button>Click to create divs</button> <p id="ptest"></p> <script type="text/javascript"> var dividcount = 1; $("button").click(run); function run(){ var myDiv = $('<div id=lar'+dividcount+' class=aaa></div>'); $(myDiv).clone().appendTo('#ptest'); $(dividcount++); $("div").bind('click',(function() { var box = $("div").index(this); var idd = (this.id); $("#"+idd).text("div #"+idd); $("select").change(function(){ var str= $("select option:selected").text(); $("#"+idd).css("background-color",str); }); })); }; </script>

    Read the article

  • WCF client encrypt message to JAVA WS using username_token with message protection client policy

    - by Alex
    I am trying to create a WCF client APP that is consuming a JAVA WS that uses username_token with message protection client policy. There is a private key that is installed on the server and a public certificate file was exported from the JKS keystore file. I have installed the public key into certificate store via MMC under Personal certificates. I am trying to create a binding that will encrypt the message and pass the username as part of the payload. I have been researching and trying the different configurations for about a day now. I found a similar situation on the msdn forum: http://social.msdn.microsoft.com/Forums/en/wcf/thread/ce4b1bf5-8357-4e15-beb7-2e71b27d7415 This is the configuration that I am using in my app.config <customBinding> <binding name="certbinding"> <security authenticationMode="UserNameOverTransport"> <secureConversationBootstrap /> </security> <httpsTransport requireClientCertificate="true" /> </binding> </customBinding> <endpoint address="https://localhost:8443/ZZZService?wsdl" binding="customBinding" bindingConfiguration="cbinding" contract="XXX.YYYPortType" name="ServiceEndPointCfg" /> And this is the client code that I am using: EndpointAddress endpointAddress = new EndpointAddress(url + "?wsdl"); P6.WCF.Project.ProjectPortTypeClient proxy = new P6.WCF.Project.ProjectPortTypeClient("ServiceEndPointCfg", endpointAddress); proxy.ClientCredentials.UserName.UserName = UserName; proxy.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.CurrentUser, StoreName.My, X509FindType.FindByThumbprint, "67 87 ba 28 80 a6 27 f8 01 a6 53 2f 4a 43 3b 47 3e 88 5a c1"); var projects = proxy.ReadProjects(readProjects); This is the .NET CLient error I get: Error Log: Invalid security information. On the Java WS side I trace the log : SEVERE: Encryption is enabled but there is no encrypted key in the request. I traced the SOAP headers and payload and did confirm the encrypted key is not there. Headers: {expect=[100-continue], content-type=[text/xml; charset=utf-8], connection=[Keep-Alive], host=[localhost:8443], Content-Length=[731], vsdebuggercausalitydata=[uIDPo6hC1kng3ehImoceZNpAjXsAAAAAUBpXWdHrtkSTXPWB7oOvGZwi7MLEYUZKuRTz1XkJ3soACQAA], SOAPAction=[""], Content-Type=[text/xml; charset=utf-8]} Payload: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><o:UsernameToken u:Id="uuid-5809743b-d6e1-41a3-bc7c-66eba0a00998-1"><o:Username>admin</o:Username><o:Password>admin</o:Password></o:UsernameToken></o:Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ReadProjects xmlns="http://xmlns.dev.com/WS/Project/V1"><Field>ObjectId</Field><Filter>Id='WS-Demo'</Filter></ReadProjects></s:Body></s:Envelope> I have also tryed some other bindings but with no success: <basicHttpBinding> <binding name="basicHttp"> <security mode="TransportWithMessageCredential"> <message clientCredentialType="Certificate"/> </security> </binding> </basicHttpBinding> <wsHttpBinding> <binding name="wsBinding"> <security mode="Message"> <message clientCredentialType="UserName" negotiateServiceCredential="false" /> </security> </binding> </wsHttpBinding> Your help will be greatly aprreciatted! Thanks!

    Read the article

  • TCP connection lost problems in c#

    - by alex
    Hi: In my application, I have a server listening on a port on localhost for client connection. Then I have clients running and establishes connection with the server. I used tcpListner in c# for the server and the clients were written in perl using Inet function. The connection between clients and server were established without a problem and a message from client is received by the server. However, after about 3 to 4 seconds, the connection is lost. I use netstat -a to see if the status of the connection is still "established". The result is "Close_wait" after I use netstat command on DOS. How can I debug this problem? Which side is causing the lost of connection? Thanks

    Read the article

  • Richtextbox wpf binding

    - by Alex Maker
    To do DataBinding of the Document in a WPF RichtextBox, I saw 2 Solutions so far, which are to derive from the RichtextBox and add a DependencyProperty, and also the solution with a "proxy". Neither the first or the second are satisfactory. Does somebody know another solution, or instead, a commercial RTF control which is capable of DataBinding? The normal Textbox ist not an alternative, since we need text formating. Any idea?

    Read the article

  • How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?

    - by Alex R
    I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far. I've been able to edit programs (within syntax highlighting and completion... yay!). But I'm unable to run even the simplest "Hello World". This was the original error: Scala signature Predef has wrong version Expected 5.0 found: 4.1 in .... scala-library.jar But that was yesterday with IDEA 9.0.1. See below... UPDATE Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in. Then I setup a project from scratch through the wizards: new project from scratch JDK is 1.6.u20 accept the default (project) instead of global / module accept the download of Scala 2.8.0beta1 into project's lib folder Created a new class: object hello { def main(args: Array[String]) { println("hello: " + args); } } For my efforts, I now have a brand-new error :) Here it is: Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)] FINAL UPDATE I uninstalled 9.0.2 EA and reinstalled 9.0.1, but this time went with the 2.7.3 version of Scala rather than the default 2.7.6, because 2.7.3 is the one shown in the screen-shots at the IntelliJ website (I guess the screen-shots prove that they actually tested this version!). Now everything works!!!

    Read the article

  • Eclipse CSS plugin support css imports

    - by Alex Ivasyuv
    Hi, Is there any CSS plugin for Eclipse, which supports import CSS files to profile, e.g. like Spket IDE makes it for JavaScript files. In result, I want to get the following functionality: In any html/css file, where defined css class/id, I perform clicking on it, and it dispatches me to appropriate css file which responsables for that style, or shows me in left side panel it styles. Does anyone know such plugin for CSS Eclipse? Thanks,

    Read the article

  • Help with Kohana 3 and a CRON

    - by alex
    I've set up a CRON to call a URL in Kohana 3. php /home/user/public_html/index.php my/route/in/bootstrap.php It seems to access the URL fine. However, I have received this error (send back in an email that my host sends per CRON) Undefined index: HTTP_HOST SYSPATH/classes/kohana/url.php [ 40 ] Source of url.php Which is in a Kohana system file. Is this because the CRON job is not sending HTTP headers? How would I fix this and get it to work (hopefully without hacking the core files). Or am I doing the CRON wrong?

    Read the article

  • Minimal way to render Wiki Syntax (for example MoinMoin Wiki)

    - by Alex
    I enjoy using to Wikis to document all kind of stuff (recently I used MoinMoin, so I am used to that syntax). No I am looking for a more light weight solution, for documents were setting up a moinmoin server is to much hassle. What is the "easiest" way to render a .txt file in Wiki syntax. (for example by displaying it, or converting it to HTML). it should work on Linux, but the more platform in-dependent, the better. Maybe there is even a Javascript based solution?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >