Search Results

Search found 832 results on 34 pages for 'still dummy'.

Page 25/34 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Retrieve position of a google maps v3 marker to Qt in a desktop app with QtWebKit

    - by nelas
    I'm building a Qt app with Python where you can point and click at a (google) map and get the coordinates of the location. The map is shown through a QWebView loading a simple HTML page and the user can create markers by clicking. Screenshot of the widget after clicking on the map: However, I'm having trouble to retrieve the just-clicked location coordinates back to Qt (so that I can use them as variables -- and, for example, show them in the QLineEdits on the topleft corner above, as current location of the marker). This is the relevant part of the HTML file: <script type="text/javascript"> var map; function initialize() { var local = new google.maps.LatLng(-23.4,-40.3); var myOptions = { zoom: 5, center: local, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); google.maps.event.addListener(map, 'rightclick', function(event) { placeMarker(event.latLng); }); } function placeMarker(location) { var clickedLocation = new google.maps.LatLng(location); var marker = new google.maps.Marker({ position: location, map: map }); map.setCenter(location); } function dummyTxt() { return 'This works.'; } </script> I've been trying with evaluateJavaScript, but was not able to retrieve the coordinates. I tried to created a function to access the position with marker.getPosition(), but with no luck. The dummy below works though.. newplace = QWebView.page().mainFrame().evaluateJavaScript(QString('dummyTxt()')) >>> print newplace.toString() This works. Any suggestions on how to get the coordinates back to Qt?

    Read the article

  • Converting a PHP associative array to a JSON associative array

    - by Extrakun
    I am converting a look-up table in PHP which looks like this to JavaScript using json_encode: AbilitiesLookup Object ( [abilities:private] => Array ( [1] => Ability_MeleeAttack Object ( [abilityid:protected] => [range:protected] => 1 [name:protected] => MeleeAttack [ability_identifier:protected] => MeleeAttack [aoe_row:protected] => 1 [aoe_col:protected] => 1 [aoe_shape:protected] => [cooldown:protected] => 0 [focusCost:protected] => 0 [possibleFactions:protected] => 2 [abilityDesc:protected] => Basic Attack ) .....snipped... And in JSON, it is: {"1":{"name":"MeleeAttack","fof":"2","range":"1","aoe":[null,"1","1"],"fp":"0","image":"dummy.jpg"},.... The problem is I get a JS object, not an array, and the identifier is a number. I see 2 ways around this problem - either find a way to access the JSON using a number (which I do not know how) or make it such that json_encode (or some other custom encoding functions) can give a JavaScript associative array. (Yes, I am rather lacking in my JavaScript department). Note: The JSON output doesn't match the array - this is because I do a manual json encoding for each element in the subscript, before pushing it onto an array (with the index as the key), then using json_encode on it. To be clear, the number are not sequential because it's an associative array (which is why the JSON output is not an array).

    Read the article

  • Run a .java file using ProcessBuilder

    - by David K
    I'm a novice programmer working in Eclipse, and I need to get multiple processes running (this is going to be a simulation of a multi-computer system). My initial hackup used multiple threads to multiple classes, but now I'm trying to replace the threads with processes. From my reading, I've gleaned that ProcessBuilder is the way to go. I have tried many many versions of the input you see below, but cannot for the life of me figure out how to properly use it. I am trying to run the .java files I previously created as classes (which I have modified). I eventually just made a dummy test.java to make sure my process is working properly - its only function is to print that it ran. My code for the two files are below. Am I using ProcessBuilder correctly? Is this the correct way to read the output of my subprocess? Any help would be much appreciated. David primary process package Control; import java.io.*; import java.lang.*; public class runSPARmatch { /** * @param args */ public static void main(String args[]) { try { ProcessBuilder broker = new ProcessBuilder("javac.exe","test.java","src\\Broker\\"); Process runBroker = broker.start(); Reader reader = new InputStreamReader(runBroker.getInputStream()); int ch; while((ch = reader.read())!= -1) System.out.println((char)ch); reader.close(); runBroker.waitFor(); System.out.println("Program complete"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } subprocess package Broker; public class test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("This works"); } }

    Read the article

  • Eclipse says I don't implement Enumeration, but I do

    - by Harm De Weirdt
    Goodmorning everybody, I'm having a little problem with a project for school. We are told to make an Iterator that implements Enumeration over a Hashmap. So i made this Enumeration: public Enumeration<Object> getEnumeration() { return new Enumeration<Object>() { private int itemsDone = 0; Collection<Long> keysCollection = getContent().keySet(); Long [] keys = keysCollection.toArray(new Long[keysCollection.size()]); @Override public boolean hasMoreElements() { if(itemsDone < getContent().size() +1 ) { return true; }else { return false; } } @Override public Object nextElement() { return getContent().get(keys[itemsDone++]); } }; } This goes in my Backpack class public class Backpack extends Item implements Carrier, Enumeration<Object>{ The hashmap is returned by getContent(). The problem now is that eclipse keeps telling me I havent implemented the methods from Enumeration. If I use the quick fix it just adds the hasMoreElements() and nextElement() dummy methods in my class. Somehow it doesn't see these methods in the inner class.. Can anyone help me please? Any help is appreciated.

    Read the article

  • php - correct search expression for bbpress

    - by billn
    I have a very purdy styled search box in my wordpress install, and looking for continuity I want the same for my bbpress forum - currently I'm failing. For WP I have: <div id="search"> <form action="<?php bloginfo('home') ?>" method="get"> <div class="hiddenFields"></div> <p><input name="s" id="s" maxlength="100" size="18" /><input class="submit" id="submit-button" type="submit" value="submit" /></p></form> </div> For bbPress The form 'method="get"' gets kicked out and of-course I need another expression. bbpress generally seems to use: <div class="search"><?php search_form(); ?></div> This wrecks everything - I get no styling attributes at all other than position... I can make it look fine (and consistent) with by removing the - but then it's obviously just a dummy with no search - any ideas to fix the latter? Thanks <div id="search"> <div class="hiddenFields"></div> <p><input name="s" id="s" maxlength="100" size="18" /><input class="submit" id="submit-button" type="submit" value="submit" /></p> </div>

    Read the article

  • Does Team Foundation support cross-app workitem groups?

    - by drachenstern
    We're currently using Visual Source Safe and BugNet and looking to migrate up and away from VSS. I've been pushing for either SVN ( a) we're an ASP.NET shop, b) DCVS is not an option - no matter how much I like Hg ;-) or TFS. Well we finally got a new dev server, so I talked the boss into installing TFS on it (30 day trial). In the meantime, we had started experimenting with FogBugz. We really like FogBugz for about 80% of what we want to do, and the other 20% is probably stuff that we don't know what we want. I'm pushing for TFS because it allows for IDE integrated (mostly) everything. He's pushing for FogBugz because he can group tasks by customer and then project and manage everything from one dashboard. (which means I lose most of my IDE integration - no huge loss I agree) Does TFS support a single dashboard that would span all our solutions (in this case each solution is a full app that we sell to a vertical market client) and let us assign workitems to each solution-spanning-group? So for instance I think we envision something like this: PROJECT1 - Bugtracker and workitems PROJECT2 - Bugtracker and workitems PROJECT3 - Bugtracker and workitems CUSTOMER1 - Deployment schedules, required features, specific notes (Uses PROJECT1, PROJECT2) CUSTOMER2 - Deployment schedules, required features, specific notes (Uses PROJECT2, PROJECT3) CUSTOMER3 - Deployment schedules, required features, specific notes (Uses PROJECT1, PROJECT3) Hopefully that makes sense. naturally it's more complicated than this but I think I've given the details enough to paint a picture. I offered the option of creating dummy projects per customer but he doesn't like that and it doesn't really give us the single dashboard view that we're hoping to end up with (and that FogBugz as we've sorta implmented things does do now). Has anyone got a good suggestion on a management app that would accomplish what both of us want?

    Read the article

  • how to push different local git branches to heroku/master

    - by lsiden
    Heroku has a policy of ignoring all branches but 'master'. While I'm sure Heroku's designers have excellent reasons for for this policy (I'm guessing for storage and performance optimization), the consequence to me as a developer is that whatever local topic branch I may be working on, I would like an easy way to switch Heroku's master to that local topic branch and do a "git push heroku -f" to over-write master on Heroku. What I got from reading the "Pushing Refspecs" section of http://progit.org/book/ch9-5.html is git push -f heroku local-topic-branch:refs/heads/master What I'd really like is a way to set this up in the config file so that "git push heroku" always does the above, replacing local-topic-branch with the name of whatever my current branch happens to be. If anyone knows how to accomplish that, please let me know! The caveat for this, of course, is that this is only sensible if I am the only one who can push to that Heroku app/repository. A test or QA team might manage such a repository to try out different candidate branches, but they would have to coordinate so that they all agree on what branch they are pushing to it on any given day. Needless to say, it would also be a very good idea to have a separate remote repository (like Github) without this restriction for backing everything up to. I'd call that one "origin" and use "heroku" for Heroku so that "git push" always backs up everything to origin, and "git push heroku" pushes whatever branch I'm currently on to Heroku's master branch, overwriting it if necessary. Can anybody tell me if this would work? [remote "heroku"] url = [email protected]:my-app.git push = +refs/heads/*:refs/heads/master I'd like to hear from someone more experienced before I begin to experiment, although I suppose I could create a dummy app on Heroku and experiment with that. As for fetching, I don't really care if the Heroku repository is write-only. I still have a separate repository, like Github, for backup and cloning of all my work. Footnote: This question is similar to, but not quite the same as http://stackoverflow.com/questions/1489393/good-git-deployment-using-branches-strategy-with-heroku

    Read the article

  • UIView animation only animating some of the things I ask it to

    - by Ben
    I have a series of (say) boxes on the screen in a row, all subviews of my main view. Each is a UIView. I want to shift them all left and have a new view also enter the screen from the right in lockstep. Here's what I'm doing: // First add a dummy view offscreen UIView * stagingView = /* make this view, which sets up its width/height */ CGRect frame = [stagingView frame]; frame.origin.x = /* just off the right side of the screen */; [stagingView setFrame:frame]; [self stagingView]; And then I set up animations in one block for all of my subviews (which includes the one I just added): [UIView beginAnimations:@"shiftLeft" context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(_animationDidStop:context:)]; [UIView setAnimationDuration:0.3]; for (UIView * view in [self subviews]) { CGRect frame = [view frame]; frame.origin.x -= (frame.size.width + viewPadding); [view setFrame:frame]; } [UIView commitAnimations]; Here's what I expect: The (three) views already on screen get shifted left and the newly staged view marches in from the right at the same time. Here's what happens: The newly staged view animates in exactly as expected, and the views already on the screen do not appear to move at all! (Or possibly they jump without animation to their end locations). And! If I comment out the whole business of creating the new subview offscreen... the ones onscreen do animate correctly! Huh? (Thanks!)

    Read the article

  • Is it possible to make a persistent connection between a Python web service and a .Net WCF Client?

    - by Ad Hock
    I have a .Net 3.5 SOAP client written in C# using the WCF. It's expecting basicHTTPBinding and a persistent connection with HTTP/1.1. I'm trying to create a Python 2.6 application that will act as a web-service for the client. My problem is that the client keeps closing the connection and opening a new one for every command to the web service. How does the .Net WCF client know to stay open when connecting with a .Net Service? When I create a dummy .Net web service the client connects fine and the connection remains persistent. From what I can tell, when connected to a .Net server, there are no special HTTP headers being sent, that makes sense since HTTP/1.1 assumes a persistent connection unless otherwise specified (right?). However, with the python web service I accept/open a connection and eventually the client will send a TCP FIN and the connection will close (the client never sends a FIN or RST when connecting to a .Net service). The communication goes something like this: Incoming -- HTTP Header for SOAP Command #1 Outgoing -- HTTP Header with a Continue Incoming -- Body of Command #1 Outgoing -- ACK Command #1 (HTTP headers and body) Incoming -- HTTP Header for SOAP Command #2 Outgoing -- HTTP Header with a Continue Incoming -- TCP FIN <Connection closes> <New connection opens and SOAP command #2 (with full HTTP headers) is sent> I'm using a SocketServer.ThreadingTCPServer as the server and a BaseHTTPServer.BaseHTTPRequestHandler for any requests. The handler is actually a derived class of that with a do_POST method to handle the HTTP headers. I've looked at WireShark captures and I'm stumped. I've tried setting socket options to SO_KEEPALIVE and SO_REUSEADDR in the server but that didn't seem to change anything. What am I missing?

    Read the article

  • Using Build Manager Class to Load ASPX Files and Populate its Controls

    - by Sandhurst
    I am using BuildManager Class to Load a dynamically generated ASPX File, please note that it does not have a corresponding .cs file. Using Following code I am able to load the aspx file, I am even able to loop through the control collection of the dynamically created aspx file, but when I am assigning values to controls they are not showing it up. for example if I am binding the value "Dummy" to TextBox control of the aspx page, the textbox remains empty. Here's the code that I am using protected void Page_Load(object sender, EventArgs e) { LoadPage("~/Demo.aspx"); } public static void LoadPage(string pagePath) { // get the compiled type of referenced path Type type = BuildManager.GetCompiledType(pagePath); // if type is null, could not determine page type if (type == null) throw new ApplicationException("Page " + pagePath + " not found"); // cast page object (could also cast an interface instance as well) // in this example, ASP220Page is a custom base page System.Web.UI.Page pageView = (System.Web.UI.Page)Activator.CreateInstance(type); // call page title pageView.Title = "Dynamically loaded page..."; // call custom property of ASP220Page //pageView.InternalControls.Add( // new LiteralControl("Served dynamically...")); // process the request with updated object ((IHttpHandler)pageView).ProcessRequest(HttpContext.Current); LoadDataInDynamicPage(pageView); } private static void LoadDataInDynamicPage(Page prvPage) { foreach (Control ctrl in prvPage.Controls) { //Find Form Control if (ctrl.ID != null) { if (ctrl.ID.Equals("form1")) { AllFormsClass cls = new AllFormsClass(); DataSet ds = cls.GetConditionalData("1"); foreach (Control ctr in ctrl.Controls) { if (ctr is TextBox) { if (ctr.ID.Contains("_M")) { TextBox drpControl = (TextBox)ctr; drpControl.Text = ds.Tables[0].Rows[0][ctr.ID].ToString(); } else if (ctr.ID.Contains("_O")) { TextBox drpControl = (TextBox)ctr; drpControl.Text = ds.Tables[1].Rows[0][ctr.ID].ToString(); } } } } } } }

    Read the article

  • F# Async problem.

    - by chrisdew
    Hi, I've written a dummy http server as an exercise in F#. I'm using Mono 2.4.4 on Ubuntu 10.04 x86_64, with MonoDevelop. The following code fails to compile with the error: Error FS0039: The field, constructor or member 'Spawn' is not defined (FS0039) Could someone try this in VisualStudio please, I don't know whether this is a Mono problem, or my problem. I have tried several Async examples from the F# book, and they also all produce similar messages about Async.* methods. Thanks, Chris. #light open System open System.IO open System.Threading open System.Net open System.Net.Sockets open Microsoft.FSharp.Control.CommonExtensions printfn "%s" "Hello World!" let headers = System.Text.Encoding.ASCII.GetBytes("HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Length: 37\r\nDate: Sun, 13 Jun 2010 05:30:00 GMT\r\nServer: FSC/0.0.1\r\n\r\n") let content = System.Text.Encoding.ASCII.GetBytes("<html><body>Hello World</body></html>") let serveAsync (client : TcpClient) = async { let out = client.GetStream() do! out.AsyncWrite(headers) do! Async.Sleep 3000 do! out.AsyncWrite(content) do out.Close() } let http_server (ip, port) = let server = new TcpListener(IPAddress.Parse(ip),port) server.Start() while true do let client = server.AcceptTcpClient() printfn "new client" Async.Spawn (serveAsync client) http_server ("0.0.0.0", 1234)

    Read the article

  • Problems when handling orientation changes

    - by nixau
    Hi all, I need to handle orientation changes in my Android application. For this purpose I decided to use OrientationEventListener convenience class. But his callback method is given somewhat strange behavior. My application starts in the portrait mode and then eventually switches to the lanscape one. I have some custom code executing in the callback onOrientationChanged method that provides some additional UI handling logic - it has a few calls to findViewById. What is strange is that when switching back from landscape to portrait mode onOrientationChanged callback is called twice, and what's even worse - the second call is dealing with bad Context - findViewById method starts returning null. These calls are made right from the MainThread @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); listener = new OrientationListener(); } @Override protected void onResume() { super.onResume(); // enabling listening listener.enable(); } @Override protected void onPause() { super.onPause(); // disabling listening listener.disable(); } I've replicated the same behavior with a dummy Activity without any logic except for one that deals with orientation hadling. I initiate orientation switch from the Android 2.2 emulator by pressing Ctrl+F11 What could be wrong? Upd: Inner class that implements OrientationEventListener private class OrientationListener extends OrientationEventListener { public OrientationL() { super(getBaseContext()); } @Override public void onOrientationChanged(int orientation) { toString(); } } }

    Read the article

  • How to properly develop and deploy features for existing asp.net applications on IIS

    - by Tomh
    My question actually consists of multiple questions. I'm frequently reading about companies who deploy a small subset of features for a select amount of customers using the live "database". Ruby on Rails and its ecosystem have deployment tools and database migrations to deploy or rollback such features in a live production or staging environment. My question, how is this done for an asp.net (mvc in particular) application? How do you test your newly released features against live data? Do you have any tools to modify the existing database and roll back changes if necessary? Do you make backups before deployment? Update Maybe I should point out that my question is not really clear, getting more answers here will help me phrase the question better. To make it easier I will describe a situation I'm commonly seeing with some of my clients. My clients have large deployments of popular web applications. They do not have staging/QA/testing servers. (yes this is not optimal). The data their apps consist of are images, xml files, user uploads and data in Sql Server. Having a few records, of their production database and a couple of dummy files is not a substitute of testing against real data in my opinion. How would you design a workflow that can create a acceptable environment to mimic a production environment before going live?

    Read the article

  • Load Balancing of PHP/MYSQL script without big code changes

    - by DR.GEWA
    Sorry for my Dummy Question, but... I am making a script on php/mysql (codeigniter) and I am extremally interested in knowing if there is a way without big architectural changes of the script make a load balancing. I mean, that for example now I will rent a medium dedicated server with 2GB ram, 200GB memory and good processor, and this will be enough lets say half year for the users which will come. But when they will become more and more, and as its a social net and at nights the server is waiting to have 500-1500 or 5000-8000 users online, I wander if there is a way for lets say just add second server with some config which will bear next pressure. After again one and so on... ???? <? if($answer=YES) { how(??); } esle{ whatToDo(??); } ?> If there is no way, than maybe you could point to a easiest way of load balancing solution.... I will be extremally thanksfull if you can tell me for such purposes , should I move lets say to PostgreSQl or FireBird? Which of them will be more easy in the future to handle ? I am getting on the mysite.com/users/show/$userId page something like 60queries for all data... maybe too much, but anyway....after some optimization it can be 20-30....

    Read the article

  • Mocking attributes - C#

    - by bob
    I use custom Attributes in a project and I would like to integrate them in my unit-tests. Now I use Rhino Mocks to create my mocks but I don't see a way to add my attributes (and there parameters) to them. Did I miss something, or is it not possible? Other mocking framework? Or do I have to create dummy implementations with my attributes? example: I have an interface in a plugin-architecture (IPlugin) and there is an attribute to add meta info to a property. Then I look for properties with this attribute in the plugin implementation for extra processing (storing its value, mark as gui read-only...) Now when I create a mock can I add easily an attribute to a property or the object instance itself? EDIT: I found a post with the same question - link. The answer there is not 100% and it is Java... EDIT 2: It can be done... searched some more (on SO) and found 2 related questions (+ answers) here and here Now, is this already implemented in one or another mocking framework?

    Read the article

  • strict aliasing and alignment

    - by cooky451
    I need a safe way to alias between arbitrary POD types, conforming to ISO-C++11 explicitly considering 3.10/10 and 3.11 of n3242 or later. There are a lot of questions about strict aliasing here, most of them regarding C and not C++. I found a "solution" for C which uses unions, probably using this section union type that includes one of the aforementioned types among its elements or nonstatic data members From that I built this. #include <iostream> template <typename T, typename U> T& access_as(U* p) { union dummy_union { U dummy; T destination; }; dummy_union* u = (dummy_union*)p; return u->destination; } struct test { short s; int i; }; int main() { int buf[2]; static_assert(sizeof(buf) >= sizeof(double), ""); static_assert(sizeof(buf) >= sizeof(test), ""); access_as<double>(buf) = 42.1337; std::cout << access_as<double>(buf) << '\n'; access_as<test>(buf).s = 42; access_as<test>(buf).i = 1234; std::cout << access_as<test>(buf).s << '\n'; std::cout << access_as<test>(buf).i << '\n'; } My question is, just to be sure, is this program legal according to the standard?* It doesn't give any warnings whatsoever and works fine when compiling with MinGW/GCC 4.6.2 using: g++ -std=c++0x -Wall -Wextra -O3 -fstrict-aliasing -o alias.exe alias.cpp * Edit: And if not, how could one modify this to be legal?

    Read the article

  • python VTE Terminal weirdness

    - by mykhal
    i'm trying to use the terminal from python VTE binding (python-vte from debian squeeze) as a virtual terminal emulator (just for ANSI/control chars text processing) in interactive python console, everything looks (almost) all right: >>> import vte >>> term = vte.Terminal() >>> term.feed("a\nb") >>> print repr(term.get_text(lambda *a: True).rstrip()) 'a\n b' however, launching this code (little modified) as python script, different result is yielded: $ python vte_wiredness_1.py '' strangely enough, pasting the code back into the (new) interactive python session also yields empty string: >>> import vte >>> term = vte.Terminal() >>> term.feed("a\nb") >>> print repr(term.get_text(lambda *a: True).rstrip()) '' >>> first thing caming on my mind was that the only difference between the two cases is the timing - there had to be some delay before get_text. unfortunately, preluding get_text with some seconds sleep did not help then i thought it has something to do with X window environment. but the results are the same pure linux console (with some warning on missing graphics). i wonder what causes such an unpredictable behavior (interactive console - pasted vs typed, and it's not the delay.. ant the interactive console has nothing to do with the vte terminal object.. i guess) can someone explain what is happening? is it possible to use the VTE Term such way? that the "b" letter in the output is preceded by the space, is another strangeness (all consecutive lines are preceded by more spaces.. looks like I have to send carriage return before the string.) (the lambda *a: True get_text method argument i'm using is a dummy callback, it's is some SlotSelectedCallback.. for its explanation i'd be grateful as well :) )

    Read the article

  • git doesn't show where code was removed.

    - by Andrew Myers
    So I was tasked at replacing some dummy code that our project requires for historical compatibility reasons but has mysteriously dropped out sometime since the last release. Since disappearing code makes me nervous about what else might have gone missing but un-noticed I've been digging through the logs trying to find in what commit this handful of lines was removed. I've tried a number of things including "git log -S'add-visit-resource-pcf'", git blame, and even git bisect with a script that simply checks for the existence of the line but have been unable to pinpoint exactly where these lines were removed. I find this very perplexing, particularly since the last log entry (obtained by the above command) before my re-introduction of this code was someone else adding the code as well. commit 0b0556fa87ff80d0ffcc2b451cca1581289bbc3c Author: Andrew Date: Thu May 13 10:55:32 2010 -0400 Re-introduced add-visit-resource-pcf, see PR-65034. diff --git a/spike/hst/scheduler/defpackage.lisp b/spike/hst/scheduler/defpackage.lisp index f8e692d..a6f8d38 100644 --- a/spike/hst/scheduler/defpackage.lisp +++ b/spike/hst/scheduler/defpackage.lisp @@ -115,6 +115,7 @@ #:add-to-current-resource-pcf #:add-user-package-nickname #:add-value-criteria + #:add-visit-resource-pcf #:add-window-to-gs-params #:adjust-derived-resources #:adjust-links-candidate-criteria-types commit 9fb10e25572c537076284a248be1fbf757c1a6e1 Author: Bob Date: Sun Jan 17 18:35:16 2010 -0500 update-defpackage for Spike 33.1 Delivery diff --git a/spike/hst/scheduler/defpackage.lisp b/spike/hst/scheduler/defpackage.lisp index 983666d..47f1a9a 100644 --- a/spike/hst/scheduler/defpackage.lisp +++ b/spike/hst/scheduler/defpackage.lisp @@ -118,6 +118,7 @@ #:add-user-package-nickname #:add-value-criteria #:add-vars-from-proposal + #:add-visit-resource-pcf #:add-window-to-gs-params #:adjust-derived-resources #:adjust-links-candidate-criteria-types This is for one of our package definition files, but the relevant source file reflects something similar. Does anyone know what could be going on here and how I could find the information I want? It's not really that important but this kind of things makes me a bit nervous.

    Read the article

  • Java: reusable encapsulation with interface, abstract class or inner classes?

    - by HH
    I try to encapsulate. Exeption from interface, static inner class working, non-static inner class not working, cannot understand terminology: nested classes, inner classes, nested interfaces, interface-abstract-class -- sounds too Repetitive! Exception 'illegal type' from interface apparently because values being constants(?!) static interface userInfo { File startingFile=new File("."); String startingPath="dummy"; try{ startingPath=startingFile.getCanonicalPath(); }catch(Exception e){e.printStackTrace();} } Working code but no succes with non-static inner class import java.io.*; import java.util.*; public class listTest{ public interface hello{String word="hello word from Interface!";} public static class hej{ hej(){} private String hejo="hello hallo from Static class with image"; public void printHallooo(){System.out.println(hejo);} } public class nonStatic{ nonStatic(){} //HOW TO USE IT? public void printNonStatic(){System.out.println("Inside static class with an image!");} } public static void main(String[] args){ //INTERFACE TEST System.out.println(hello.word); //INNNER CLASS STATIC TEST hej h=new hej(); h.printHallooo(); //INNER CLASS NON-STATIC TEST nonStatic ns=new nonStatic(); ns.printNonStatic(); //IS there a way to it without STATIC? } } Output The above code works but how non-staticly? Output: hello word from Interface! hello hallo from Static class with image! StaticPrint without an image of the class! Related Nesting classes inner classes? interfacses

    Read the article

  • Looking for good PHP editor or IDE with 'IntelliSense'

    - by Andrew
    Hello, I'm looking for suitable PHP Editor or IDE with syntax auto-completion. I've tried trial versions of programs like Zend Studio, PHPDesigner, NetBeans PHP, NuSphere PhpED, and similar -- but none of them fully satisfied me. I quite liked hint window with detailed info about what function does and what it returns. Also I liked the way NetBeans auto-complete code (for example inserts all required parameters in function declaration as "dummy fields" and then you can jump between them using TAB in order to edit them). On the other hand, environment of NetBeans doesn't belong to the nicest. In this regard I prefer PHPDesigner with its sleek and light interface. At this moment I don't use any of the debugging options, since I don't know yet how to use profiller, breakpoints, watches and what not, so at this point my only concern is good autocompletion. For this purpose NetBean would be great choice, but with future in mind I am not sure debugging will be good in NetBeans, especially as I would prefer to use remote Linux server for this. So in short, I'm looking for editor that: Have similar code auto-completion (IntelliSense) like NetBeans Allow you to debug code using remote server (or sets up own debugging server like PHPDesigner does) without need to run Apache and similar on local computer Is preferably easy to use / intuitive interface Any ideas?

    Read the article

  • How to MakeTable ReadOnly including contents like images

    - by GustlyWind
    I have a table which has two text boxes and a image beside it to click and open a popup. In read-only mode based on condition I am able to make text boxes read-only but images are not becoming read-only.One solution I had is the anchor tag associated with image calls for JavaScript where I can check for a dummy click when it is in read-only mode. The problem here is the function is common and effects everywhere. So is there a way to make the entire table read-only so that no extra workaround needs to done. Edited for code <table> <tr> <td class="lightbg" colspan='4'>&nbsp; Expires:<input type="TEXT" value="" id="element1" name="expireDate" size="10" maxlength="20" class="" onChange="javascript:validateDateEntry('element1',true);;"> Period:<input type="TEXT" value="" id="element2" name="refershDate" size="10" maxlength="20" class="" onChange="javascript:validateDateEntry('element2',true);;"> &nbsp; <a href="javascript:doCalendar('element1');"> <img src="/PWM/images/images_2006/calendarbtn.gif" border="0" alt="Click to select date from calendar" align="absmiddle"> </a> </td> </tr> <tr> <td colspan='4'><b>*</b>Times are in the WFM Server's Time Zone.</td></tr> </table> Thanks

    Read the article

  • StructureMap problems with bidirectional/circular dependencies

    - by leozilla
    I am currently integrating StructureMap within our business layer but have problems because of bidirectional dependencies. The layer contains multiple manager where each manager can call methods on each other, there are no restrictions or rules for communication. This also includes possible circular dependencies like in the example below. I know the design itself is questionable but currently we just want StructureMap to work and will focus on further refactoring in the future. Every manager implements the IManager interface internal interface IManager { bool IsStarted { get; } void Start(); void Stop(); } And does also have his own specific interface. internal interface IManagerA : IManager { void ALogic(); } internal interface IManagerB : IManager { void BLogic(); } Here are to dummy manager implementations. internal class ManagerA : IManagerA { public IManagerB ManagerB { get; set; } public void ALogic() { } public bool IsStarted { get; private set; } public void Start() { } public void Stop() { } } internal class ManagerB : IManagerB { public IManagerA ManagerA { get; set; } public void BLogic() { } public bool IsStarted { get; private set; } public void Start() { } public void Stop() { } } Here is the StructureMap configuration i use atm. I am still not sure how i should register the managers so currently i use a manual registration. Maybee someone could help me with this too. For<IManagerA>().Singleton().Use<ManagerA>(); For<IManagerB>().Singleton().Use<ManagerB>(); SetAllProperties(convention => { // configure the property injection for all managers convention.Matching(prop => typeof(IManager).IsAssignableFrom(prop.PropertyType)); }); After all i cannot create IManagerA because StructureMap complians about the circular dependency between ManagerA and ManagerB. Is there an easy and clean solution to solve this problem but keep to current design? br David

    Read the article

  • How to- NSAttributedString to CGImageRef

    - by kroko
    Hello! I'm writing a QuickLook plugin. Well, everything works. Just want to try it make better ;). Thus the question. Here is a function that returns thumbnail image and that I'm using now. QLThumbnailRequestSetImageWithData( QLThumbnailRequestRef thumbnail, CFDataRef data, CFDictionaryRef properties); ); http://developer.apple.com/mac/library/documentation/UserExperience/Reference/QLThumbnailRequest_Ref/Reference/reference.html#//apple_ref/c/func/QLThumbnailRequestSetImageWithData Right now I'm creating a TIFF - encapsulated it into NSData. An example // Setting CFDataRef CGSize thumbnailMaxSize = QLThumbnailRequestGetMaximumSize(thumbnail); NSMutableAttributedString *attributedString = [[[NSMutableAttributedString alloc] initWithString:@"dummy" attributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSFont fontWithName:@"Monaco" size:10], NSFontAttributeName, [NSColor colorWithCalibratedRed:0.0 green:0.0 blue:0.0 alpha:1.0], NSForegroundColorAttributeName, nil] ] autorelease]; NSImage *thumbnailImage = [[[NSImage alloc] initWithSize:NSMakeSize(thumbnailMaxSize.width, thumbnailMaxSize.height)] autorelease]; [thumbnailImage lockFocus]; [[NSColor whiteColor] set]; NSRectFill(NSMakeRect(0, 0, thumbnailMaxSize.width, thumbnailMaxSize.height)); [attributedString drawInRect:NSMakeRect(0, 0, thumbnailMaxSize.width, thumbnailMaxSize.height)]; [thumbnailImage unlockFocus]; (CFDataRef)[thumbnailImage TIFFRepresentation]; // This is data // Setting CFDictionaryRef (CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys:@"kUTTypeTIFF", (NSString *)kCGImageSourceTypeIdentifierHint, nil ]; // this is properties However QuickLook provides another function to return thumbnail image, namely QLThumbnailRequestSetImage( QLThumbnailRequestRef thumbnail, CGImageRef image, CFDictionaryRef properties); ); http://developer.apple.com/mac/library/documentation/UserExperience/Reference/QLThumbnailRequest_Ref/Reference/reference.html#//apple_ref/c/func/QLThumbnailRequestSetImage I have a feeling that passing CGImage to the QL instead of TIFF data would help in speeding things up. However- I have never worked with CG context before. I know, the documentation is there :), but anyways- could anyone give an example how to turn that NSAttributed string into CGImageRef. An example is worth 10 times reading the documentation ;) Any help appreciated. Thanks in advance!

    Read the article

  • When is onBind or onCreate called in an android service browser plugin?

    - by anselm
    I have adapted the example plugin of the android source and the browser recognises the plugin without any problem. Here is an extract of AndroidManifest.xml: <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> <service android:name="com.domain.plugin.PluginService"> <intent-filter> <action android:name="android.webkit.PLUGIN" /> </intent-filter> </service> </application> <uses-sdk android:minSdkVersion="7" /> <uses-permission android:name="android.webkit.permission.PLUGIN"></uses-permission> The actual Service class looks like so: public class PluginService extends Service { @Override public IBinder onBind(Intent arg0) { Log.d("PluginService", "onBind"); return null; } @Override public void onCreate() { Log.d("PluginService", "onCreate"); // TODO Auto-generated method stub super.onCreate(); AssetInstaller.getInstance(this).installAssets("/data/data/com.domain.plugin"); } } The AssetInstaller code is supposed to extract some files required by the actual plugin into the /data/data/com.domain.plugin directory, however wether onBind nor onCreate are called. But I get lot's of debug trace of the actual libnpplugin.so file I'm using. So the puzzle is when and under what circumstance is the Service bound or created in case of a browser plugin. As things look the service seems to be a dummy service. Having said that, is there another intent that can be executed at installation time probably? The only solution I see right now is installing the needed files from the native plugin code instead. Any ideas? I know this is quite a tricky question ;)

    Read the article

  • Runtime Exception when using Custom Healthmonitoring event in medium trust

    - by Elementenfresser
    Hi, I'm using custom healthmonitoring events in ASP.NET We recently moved to a new server with default High Trust Permissions. Literature says that healthmonitoring and custom events should work under Medium or higher trust (http://msdn.microsoft.com/en-us/library/bb398933.aspx). Problem is it doesn't. In less than high trust I get a SecurityException saying The application attempted to perform an operation not allowed by the security policy It works in Full trust or when I remove the inheritance of System.Web.Management.WebErrorEvent. Any suggestions anyone? Here is the super simple code behind with a custom event defined: public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { try { CallCustomEvent(); } catch (Exception ex) { Response.Write(ex.Message); throw ex; } } /// <summary> /// this metho is never called due to lacking permissions... /// </summary> private void CallCustomEvent() { try { //do something useful here } catch (Exception) { //code to instantiate the forbidden inheritance... WebBaseEvent.Raise(new CustomEvent()); } } } /// <summary> /// custom error inheriting WebErrorEvent which is not allowed in high trust? can't believe that... /// </summary> public class CustomEvent : WebErrorEvent { public CustomEvent() : base("test", HttpContext.Current.Request, 100001, new ApplicationException("dummy")) { } } and the Web Config excerpt for high trust: <system.web> <trust level="High" originUrl="" />

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >