Search Results

Search found 776 results on 32 pages for 'mk 89'.

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

  • How would you implement a hashtable in language x?

    - by mk
    The point of this question is to collect a list of examples of hashtable implementations using arrays in different languages. It would also be nice if someone could throw in a pretty detailed overview of how they work, and what is happening with each example. Edit: Why not just use the built in hash functions in your specific language? Because we should know how hash tables work and be able to implement them. This may not seem like a super important topic, but knowing how one of the most used data structures works seems pretty important to me. If this is to become the wikipedia of programming, then these are some of the types of questions that I will come here for. I'm not looking for a CS book to be written here. I could go pull Intro to Algorithms off the shelf and read up on the chapter on hash tables and get that type of info. More specifically what I am looking for are code examples. Not only for me in particular, but also for others who would maybe one day be searching for similar info and stumble across this page. To be more specific: If you had to implement them, and could not use built-in functions, how would you do it? You don't need to put the code here. Put it in pastebin and just link it.

    Read the article

  • java socket programming problem

    - by mk.persia
    Hi, what's wrong with my code? sorry about my bad English package sockettest; import java.io.*; import java.net.*; class sevr implements Runnable{ public void run() { ServerSocket sSkt = null; Socket skt = null; BufferedReader br = null; BufferedWriter bw = null; try{ System.out.println("Server: is about to create socket"); sSkt = new ServerSocket(6666); System.out.println("Server: socket created"); } catch(IOException e){ System.out.println("Server: socket creation failure"); } try{ System.out.println("Server: is listening"); skt = sSkt.accept(); System.out.println("Server: Connection Established"); } catch(IOException e){ System.out.println("Server: listening failed"); } try{ System.out.println("Server: creating streams"); br = new BufferedReader(new InputStreamReader(skt.getInputStream())); bw = new BufferedWriter(new OutputStreamWriter(skt.getOutputStream())); System.out.println("Server: stream done"); } catch(IOException e){ System.out.println("Server: stream failed"); } System.out.println("Server: reading the request"); try{ String line = null; while((line =br.readLine()) != null){ System.out.println("Server: client said- "+ line); } } catch(IOException e){ System.out.println("Server: reading failed"); } System.out.println("Server: reading fished"); System.out.println("Server: responding"); try{ bw.write("Hi! I am server!"); } catch(IOException e){ System.out.println("Server: responding failed"); } System.out.println("Server: responding finished"); System.out.println("Server: is finishing"); try { br.close(); bw.close(); skt.close(); sSkt.close(); } catch (IOException e) { System.out.println("Server: finishing failed"); } System.out.println("Server: done"); } } class clnt implements Runnable{ public void run() { Socket skt = null; BufferedReader br = null; BufferedWriter bw = null; try{ System.out.println("Client: about to create socket"); skt = new Socket(InetAddress.getLocalHost(),6666); System.out.println("Client: socket created"); } catch(IOException e){ System.out.println("Client: socket creation failure"); } try{ System.out.println("Client: creating streams"); br = new BufferedReader(new InputStreamReader(skt.getInputStream())); bw = new BufferedWriter(new OutputStreamWriter(skt.getOutputStream())); System.out.println("Client: stream done"); } catch(IOException e){ System.out.println("Client: stream failed"); } System.out.println("Client: requesting"); try{ bw.write("Hi! I am Client!"); } catch(IOException e){ System.out.println("Client: requesting failed"); } System.out.println("Client: requesting finished"); System.out.println("Client: reading the respond"); try{ String line = null; while((line =br.readLine()) != null){ System.out.println("Client: server said- "+ line); } } catch(IOException e){ System.out.println("Client: reading failed"); } System.out.println("Client: reading fished"); System.out.println("Clientrver: is finishing"); try { br.close(); bw.close(); skt.close(); } catch (IOException e) { System.out.println("Client: finishing failed"); } System.out.println("Client: done"); } } public class Main { public static void main(String[] args) { System.out.println("Main started"); Thread sThread = new Thread(new sevr()); Thread cThread = new Thread(new clnt()); sThread.start(); cThread.start(); try { sThread.join(); cThread.join(); } catch (InterruptedException ex) { System.out.println("joining failed"); } System.out.println("Main done"); } } output: Main started Server: is about to create socket Client: about to create socket Client: socket created Client: creating streams Server: socket created Server: is listening Server: Connection Established Server: creating streams Server: stream done Server: reading the request Client: stream done Client: requesting Client: requesting finished Client: reading the respond and it waits here forever!

    Read the article

  • How do I manage permissions on multiple items in SharePoint 2007?

    - by mk
    I'm relatively new to SharePoint and am trying to put a bunch of Word files (that were on our network file server) into SharePoint. We have set up a document library that, by default, gives everyone access to everything. This is the desired top-level permission set because most items will work well this way. The problem is that I have a bunch of documents I want to add and apply some specific permissions to. I can do this, but...please tell me there is some way I can do this for multiple documents at the same time. Attempting to do this one-by-one is a pain and I'm hoping for a better solution here. Thanks very much in advance.

    Read the article

  • how to load a module within python debugger

    - by MK
    This looks like something simple but I could not find the answer so far - I have just learnt python and need to start learning pdb. In my module I have the usual if __name__ == __main_ trick to execute some code when the module is run as a program. So far I have been running it via python -m mymod arg1 arg2 syntax Now I want to do exactly the same thing from inside pdb. Normally in C, I would just do gdb mybinary followed by run arg1 arg2 But I cannot figure out how to achieve the same thing in pdb. I am sure there has to be a simple way to achieve this but it is taking me too long to search for it.. Thanks for your help!

    Read the article

  • do not allow integrated windows authentication *for one of the domains*

    - by MK
    We have an ASP.NET web application which uses integrated windows authentication. It is accessed by users from two domains, A and B. A is the primary domain and B is an older domain which is going away. Web application is authenticating users using a group policy which only exists in domain A. Every user in domain B has an account in domain A. The application lives in domain A. There was no trust between the domains. So users from domain A would get silently authenticated and logged into the site. Users from domain B didn't get authenticated automatically and were prompted with the IE popup, to which they authenticated using their domain A credentials and everything worked. Now somebody has set up a trust between the domains and users from domain B get authenticated silently to IIS, and then their login fails (no group policy). So the question is: can I either programmatically or in IIS configuration make it so that users from domain B still get prompted even though there is trust between the domains? Is there a way to tell the server where IIS is running to ignore the trust relationship maybe?

    Read the article

  • portable way to deal with 64/32 bit time_t

    - by MK
    I have some code which is built both on Windows and Linux. Linux at this point is always 32bit but Windows is 32 and 64bit. Windows wants to have time_t be 64 bit and Linux still has it as 32 bit. I'm fine with that, except in some places time_t values are converted to strings. So when time_T is 32 bit it should be done with %d and when it is 64bit with %lld... what is the smart way to do this? Also: any ideas how I may find all places where time_t's are passed to printf-style functions to address this issue?

    Read the article

  • conditionally enabling constructor

    - by MK
    Here is how I can conditionally enable a constructor of a class : struct Foo { template<class T> Foo( T* ptr, boost::enable_if<is_arithmetic<T> >::type* = NULL ) {} }; I would like to know why I need to do the enabling via a dummy parameter. Why can I not just write : struct Foo { template<class T> Foo( boost::enable_if<is_arithmetic<T>, T>::type* = NULL ) {} };

    Read the article

  • Would this predicate work ? this came on my quiz to find the position of element X in a data structure called list

    - by M.K
    example: position(1,list(1,list(2,nil)),Z). Z = 1. position(3,list(1,list(2,list(3,nil)),Z). Z = 3. where Z is the position of element X in a data structure of a list in the above format Here was my solution: position(X,list(nil),0). %empty list position(X,list(X,T),1). %list with X as head or first element position(X,list(H,T),Z):- position(X,list(T,nil),Z1), %X is in tail of list (H,T) Z is Z1 + 1.

    Read the article

  • How do I size a second div to be 100% height underneath a fixed image?

    - by mk
    I'm using semi-transparent PNGs (due to the designer's overlapping of elements) and trying to achieve a layout that represents the design while still working well on the web. Thus I have simple HTML: <div id="right"> <div id="welcome"></div> <div id="welcomeRepeatingBottom"></div> </div> And I'm trying to use CSS as follows: #right { height: 100%; position: absolute; right: 0px; top: 0px; width: 430px; } #welcome { background-image: url("welcome.png"); height: 614px; width: 430px; position: absolute; top: 0px; left: 0px; } #welcomeRepeatingBottom { background: url("welcomeBottom.png") repeat-y; height: 100%; left: 0px; position: absolute; top: 614px; width: 430px; } The problem is...the #welcomeRepeatingBottom div can't overlap the #welcome div because of the transparency. What I really want is the #welcomeRepeatingBottom div to be height: 100% - 614px, but of course you can't do that. Am I missing something here or do I need to manipulate these values with JavaScript/JQuery?

    Read the article

  • Android: Trusting all Certificates using HttpClient over HTTPS

    - by psuguitarplayer
    Hi all, Recently posted a question regarding the HttpClient over Https (found here). I've made some headway, but I've run into new issues. As with my last problem, I can't seem to find an example anywhere that works for me. Basically, I want my client to accept any certificate (because I'm only ever pointing to one server) but I keep getting a javax.net.ssl.SSLException: Not trusted server certificate exception. So this is what I have: public void connect() throws A_WHOLE_BUNCH_OF_EXCEPTIONS { HttpPost post = new HttpPost(new URI(PROD_URL)); post.setEntity(new StringEntity(BODY)); KeyStore trusted = KeyStore.getInstance("BKS"); trusted.load(null, "".toCharArray()); SSLSocketFactory sslf = new SSLSocketFactory(trusted); sslf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); SchemeRegistry schemeRegistry = new SchemeRegistry(); schemeRegistry.register(new Scheme ("https", sslf, 443)); SingleClientConnManager cm = new SingleClientConnManager(post.getParams(), schemeRegistry); HttpClient client = new DefaultHttpClient(cm, post.getParams()); HttpResponse result = client.execute(post); } And here's the error I'm getting: W/System.err( 901): javax.net.ssl.SSLException: Not trusted server certificate W/System.err( 901): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:360) W/System.err( 901): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92) W/System.err( 901): at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:321) W/System.err( 901): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129) W/System.err( 901): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) W/System.err( 901): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) W/System.err( 901): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348) W/System.err( 901): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) W/System.err( 901): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) W/System.err( 901): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) W/System.err( 901): at me.harrisonlee.test.ssl.MainActivity.connect(MainActivity.java:129) W/System.err( 901): at me.harrisonlee.test.ssl.MainActivity.access$0(MainActivity.java:77) W/System.err( 901): at me.harrisonlee.test.ssl.MainActivity$2.run(MainActivity.java:49) W/System.err( 901): Caused by: java.security.cert.CertificateException: java.security.InvalidAlgorithmParameterException: the trust anchors set is empty W/System.err( 901): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:157) W/System.err( 901): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:355) W/System.err( 901): ... 12 more W/System.err( 901): Caused by: java.security.InvalidAlgorithmParameterException: the trust anchors set is empty W/System.err( 901): at java.security.cert.PKIXParameters.checkTrustAnchors(PKIXParameters.java:645) W/System.err( 901): at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:89) W/System.err( 901): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.<init>(TrustManagerImpl.java:89) W/System.err( 901): at org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl.engineGetTrustManagers(TrustManagerFactoryImpl.java:134) W/System.err( 901): at javax.net.ssl.TrustManagerFactory.getTrustManagers(TrustManagerFactory.java:226) W/System.err( 901): at org.apache.http.conn.ssl.SSLSocketFactory.createTrustManagers(SSLSocketFactory.java:263) W/System.err( 901): at org.apache.http.conn.ssl.SSLSocketFactory.<init>(SSLSocketFactory.java:190) W/System.err( 901): at org.apache.http.conn.ssl.SSLSocketFactory.<init>(SSLSocketFactory.java:216) W/System.err( 901): at me.harrisonlee.test.ssl.MainActivity.connect(MainActivity.java:107) W/System.err( 901): ... 2 more

    Read the article

  • Difference between "machine hardware" and "hardware platform"

    - by Adil
    My Linux machine reports "uname -a" outputs as below:- [root@tom i386]# uname -a Linux tom 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:34:33 EDT 2009 i686 i686 i386 GNU/Linux [root@tom i386]# As per man page of uname, the entries "i686 i686 i386" denotes:- machine hardware name (i686) processor type (i686) hardware platform (i386) Additional info: [root@tom i386]# cat /proc/cpuinfo <snip> vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU 5148 @ 2.33GHz stepping : 6 cpu MHz : 2328.038 cache size : 4096 KB </snip>

    Read the article

  • ensime scala errors (class scala.Array not found, object scala not found)

    - by Jeff Bowman
    I've installed ensime according to the README.md file, however, I get errors in the inferior-ensime-server buffer with the following: INFO: Fatal Error: scala.tools.nsc.MissingRequirementError: object scala not found. scala.tools.nsc.MissingRequirementError: object scala not found. at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:516) at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:43) at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:44) at scala.tools.nsc.symtab.Definitions$definitions$.UnitClass(Definitions.scala:89) at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:786) at scala.tools.nsc.Global$Run.(Global.scala:593) at scala.tools.nsc.interactive.Global$TyperRun.(Global.scala:473) at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:535) at scala.tools.nsc.interactive.Global.reloadSources(Global.scala:289) at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:300) at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:300) at scala.tools.nsc.interactive.Global.respond(Global.scala:276) at scala.tools.nsc.interactive.Global.reload(Global.scala:300) at scala.tools.nsc.interactive.CompilerControl$$anon$1.apply$mcV$sp(CompilerControl.scala:81) at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:132) at scala.tools.nsc.interactive.Global$$anon$2.run(Global.scala:192) also: INFO: Fatal Error: scala.tools.nsc.MissingRequirementError: class scala.Array not found. scala.tools.nsc.MissingRequirementError: class scala.Array not found. at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:516) at scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:474) at scala.tools.nsc.symtab.Definitions$definitions$.ArrayClass(Definitions.scala:217) at scala.tools.nsc.backend.icode.TypeKinds$REFERENCE.(TypeKinds.scala:258) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.(GenICode.scala:55) at scala.tools.nsc.backend.icode.GenICode.newPhase(GenICode.scala:43) at scala.tools.nsc.backend.icode.GenICode.newPhase(GenICode.scala:25) at scala.tools.nsc.Global$Run$$anonfun$4.apply(Global.scala:606) at scala.tools.nsc.Global$Run$$anonfun$4.apply(Global.scala:605) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62) at scala.collection.immutable.List.foreach(List.scala:46) at scala.tools.nsc.Global$Run.(Global.scala:605) at scala.tools.nsc.interactive.Global$TyperRun.(Global.scala:473) at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:535) at scala.tools.nsc.interactive.Global.reloadSources(Global.scala:289) at scala.tools.nsc.interactive.Global.typedTreeAt(Global.scala:309) at scala.tools.nsc.interactive.Global$$anonfun$getTypedTreeAt$1.apply(Global.scala:326) at scala.tools.nsc.interactive.Global$$anonfun$getTypedTreeAt$1.apply(Global.scala:326) at scala.tools.nsc.interactive.Global.respond(Global.scala:276) at scala.tools.nsc.interactive.Global.getTypedTreeAt(Global.scala:326) at scala.tools.nsc.interactive.CompilerControl$$anon$2.apply$mcV$sp(CompilerControl.scala:89) at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:132) at scala.tools.nsc.interactive.Global$$anon$2.run(Global.scala:192) Also none of the type identification works for me, I get 'NA' if I get anything at all. C-c t causes emacs to lock up. I'm running: Ubuntu 10.04 (64bit version) emacs 23.1.50.1 ensime from git (as of 3 May 2010) scala is version 2.8.0.RC1 java is 1.6.0_20 (from sun) here is a copy of the log: http://dl.dropbox.com/u/5309017/ensime.log Thanks! Jeff

    Read the article

  • Force SSRS 2008 to use SSRS 2005 CSV rendering

    - by Kash
    We are upgrading our report server from SSRS 2005 to SSRS 2008 R2. I have an issue with CSV export rendering for SSRS 2008 where the SUM of columns are appearing on the right side of the detail values in 2008 instead of the left side like in 2005 as shown in the below blocks. 117 and 131 are the sums of Column2 and Column3 respectively. SSRS 2005 CSV Output Column2_1,Column3_1,Column2,Column3 117,131,1,2 117,131,1,2 117,131,60,23 117,131,30,15 117,131,25,89 SSRS 2008 CSV Output Column2,Column3,Column2_1,Column3_1 1,2,117,131 1,2,117,131 60,23,117,131 30,15,117,131 25,89,117,131 I understand that the CSV renderer has gone through major changes in SSRS 2008 R2 with the support for charts and gauges and more importantly it provides 2 modes: the default Excel mode and Compliant mode. But neither mode helps fix this issue. The Compliant mode was supposed to be closest to that of 2005 but apparently it is not close enough for my case. My Question: Is there a way to force SSRS 2008 fall back a report to a backward compatibility mode so that it exports into a 2005 CSV format? Solution tried: a) Using 2005-based CRIs Based on this article on ExecutionLog2, if SSRS 2008 R2 encounters a report whose auto-upgrade is not possible (e.g. reports that were built with 2005-based CustomReportItem controls), those particular reports will be processed with the old Yukon engine in a "transparent backwards-compatibility mode". It seems like it falls back to its previous version mode (2005) and attempts to render it. So I tried using a 2005-based barcode CustomReportItem and deployed to a SSRS 2008 R2 report server, but it shows the same result as before though it suppressed the barcode. This would be because SSRS 2008 R2 finds a way to suppress part of the report output and displays the rest. It would be great to find a 2005-based CRI that makes SSRS 2008 R2 process it with its old Yukon engine. Please note that quite possibly, even if it uses the "old Yukon processing engine", it might still use the new CSV renderer hence it shows the same output. If that is true, then this option is moot. b) Using XML renderer We can use a custom XML renderer and then use XSLT to convert the xml to appropriate CSV but this would mean that we need to convert all our 200 reports. Hence this is not feasible. Please note that we do not have the option of having SSRS 2005 and SSRS 2008 R2 deployed side by side.

    Read the article

  • Java Errors with jRuby on Rails on Google App Engine

    - by John Wang
    I followed all of the instructions so far from: http://code.google.com/p/appengine-jruby/wiki/RunningRails and http://gist.github.com/268192 Currently, I'm just trying to get to hello world. I'm getting these errors when I just run the dev_appserver.rb 238:hello-world jwang392$ dev_appserver.rb . => Booting DevAppServer => Press Ctrl-C to shutdown server => Generating configuration files 2010-04-08 09:16:51.961 java[411:1707] [Java CocoaComponent compatibility mode]: Enabled 2010-04-08 09:16:51.964 java[411:1707] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000 Apr 8, 2010 7:17:05 PM com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1270754225387000] javax.servlet.ServletContext log: Warning: error application could not be initialized org.jruby.rack.RackInitializationException: no such file to load -- time from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25:in `boot!' from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/boot/rack.rb:10 from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1:in `load' from <script>:1 at org.jruby.rack.DefaultRackApplicationFactory $4.init(DefaultRackApplicationFactory.java:169) at org.jruby.rack.DefaultRackApplicationFactory.newErrorApplication(DefaultRac kApplicationFactory.java: 118) at org.jruby.rack.DefaultRackApplicationFactory.init(DefaultRackApplicationFac tory.java: 37) at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFacto ry.java: 26) at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletCon textListener.java: 40) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java: 530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java: 1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java: 188) at com.google.appengine.tools.development.AbstractContainerService.startup(Abs tractContainerService.java: 147) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerI mpl.java: 219) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser $ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServer Main.java: 113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMa in.java: 89) Caused by: org.jruby.exceptions.RaiseException: no such file to load -- time at (unknown).new(file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25) at Kernel.require(file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25) at JRuby::Rack::Booter.boot!(file:/Users/jwang392/hello-world/WEB-INF/ lib/jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:10) at (unknown).(unknown)(file:/Users/jwang392/hello-world/WEB-INF/lib/ jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1) at (unknown).(unknown)(file:/Users/jwang392/Dhello-world/WEB-INF/lib/ jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1) at Kernel.load(<script>:1) at (unknown).(unknown)(:1) Apr 8, 2010 7:17:05 PM com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1270754225913000] javax.servlet.ServletContext log: unable to create shared application instance org.jruby.rack.RackInitializationException: no such file to load -- time from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25:in `boot!' from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/boot/rack.rb:10 from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1:in `load' from <script>:1 at org.jruby.rack.DefaultRackApplicationFactory $4.init(DefaultRackApplicationFactory.java:169) at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackAppl icationFactory.java: 51) at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFacto ry.java: 27) at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletCon textListener.java: 40) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java: 530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java: 1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java: 188) at com.google.appengine.tools.development.AbstractContainerService.startup(Abs tractContainerService.java: 147) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerI mpl.java: 219) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser $ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServer Main.java: 113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMa in.java: 89) Caused by: org.jruby.exceptions.RaiseException: no such file to load -- time at (unknown).new(file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25) at Kernel.require(file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25) at JRuby::Rack::Booter.boot!(file:/Users/jwang392/hello-world/WEB-INF/ lib/jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:10) at (unknown).(unknown)(file:/Users/jwang392/hello-world/WEB-INF/lib/ jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1) at (unknown).(unknown)(file:/Users/jwang392/hello-world/WEB-INF/lib/ jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1) at Kernel.load(<script>:1) at (unknown).(unknown)(:1) Apr 8, 2010 7:17:05 PM com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1270754225915000] javax.servlet.ServletContext log: Error: application initialization failed org.jruby.rack.RackInitializationException: unable to create shared application instance at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFacto ry.java: 39) at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletCon textListener.java: 40) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java: 530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java: 1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java: 188) at com.google.appengine.tools.development.AbstractContainerService.startup(Abs tractContainerService.java: 147) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerI mpl.java: 219) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser $ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServer Main.java: 113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMa in.java: 89) Caused by: org.jruby.rack.RackInitializationException: no such file to load -- time from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25:in `boot!' from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/boot/rack.rb:10 from file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1:in `load' from <script>:1 at org.jruby.rack.DefaultRackApplicationFactory $4.init(DefaultRackApplicationFactory.java:169) at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackAppl icationFactory.java: 51) at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFacto ry.java: 27) ... 19 more Caused by: org.jruby.exceptions.RaiseException: no such file to load -- time at (unknown).new(file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25) at Kernel.require(file:/Users/jwang392/hello-world/WEB-INF/lib/jruby- rack-0.9.6.jar!/jruby/rack/booter.rb:25) at JRuby::Rack::Booter.boot!(file:/Users/jwang392/hello-world/WEB-INF/ lib/jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:10) at (unknown).(unknown)(file:/Users/jwang392/hello-world/WEB-INF/lib/ jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1) at (unknown).(unknown)(file:/Users/jwang392/hello-world/WEB-INF/lib/ jruby-rack-0.9.6.jar!/jruby/rack/boot/rack.rb:1) at Kernel.load(<script>:1) at (unknown).(unknown)(:1) The server is running at http://localhost:8080/ I'm at a loss at what step I may have missed. I checked my ruby version (1.8.7) and rails version (2.3.5), gem version (1.3.6) and google-appengine-0.0.10.1 ran: sudo gem install google-appengine curl -O http://appengine-jruby.googlecode.com/hg/demos/rails2/rails2_appengine.rb ruby rails2_appengine.rb sudo gem install rails_dm_datastore sudo gem install activerecord-nulldb-adapter put this in my config.ru file: run lambda { |env| Rack::Response.new('Hello World!').finish } and finally ran $ dev_appserver.rb .

    Read the article

  • Letters in base-conversion

    - by tech_geek23
    I have this code written so far and is correct, aside from not using A-F when the value is over 10: public class TenToAny { private int base10; private int newBase; public TenToAny() { } public TenToAny(int ten, int base) { base10 = ten; newBase = base; } public void setNums(int ten, int base) { base10 = ten; newBase = base; } public String getNewNum() { String newNum=""; int orig = base10; //int first = newBase - 1; while(orig > 0) { newNum = orig%newBase + newNum; orig = orig/newBase; } return newNum; } public String toString() { String complete = base10 + " base 10 is " + getNewNum() + " in base " + newBase; return complete; } } Obviously I don't have anything relating to values over 10 converting to A-F as I've never dealt with these before. Any help is appreciated. Here's my runner class: public class Lab09i { public static void main( String args[] ) { TenToAny test = new TenToAny(234, 9); out.println(test); test.setNums(100, 2); out.println(test); test.setNums(10, 2); out.println(test); test.setNums(15, 2); out.println(test); test.setNums(256, 2); out.println(test); test.setNums(100, 8); out.println(test); test.setNums(250, 16); out.println(test); test.setNums(56, 11); out.println(test); test.setNums(89, 5); out.println(test); test.setNums(23, 3); out.println(test); test.setNums(50, 5); out.println(test); test.setNums(55, 6); out.println(test); test.setNums(2500, 6); out.println(test); test.setNums(2500, 13); out.println(test); } } this is what my results should be: 234 base 10 is 280 in base 9 100 base 10 is 1100100 in base 2 10 base 10 is 1010 in base 2 15 base 10 is 1111 in base 2 256 base 10 is 100000000 in base 2 100 base 10 is 144 in base 8 250 base 10 is FA in base 16 56 base 10 is 51 in base 11 89 base 10 is 324 in base 5 23 base 10 is 212 in base 3 50 base 10 is 302 in base 4 55 base 10 is 131 in base 6 2500 base 10 is 9C4 in base 16 2500 base 10 is 11A4 in base 13

    Read the article

  • Can't interact with children of an itemRenderer in Flex 4 Gumbo

    - by BlueDude
    I thought this would be pretty easy but I'm running into all sorts of problems with this. I have an ItemRenderer with a an image and two labels. I want to assign separate mouse events to the image and two labels. It seems like the item renderer is treated like a single interactive piece and I haven't found a way to override that. I couldn't even disable the default rollover effect so I had to style the rollOverColor to match my background. Can anyone provide a solution? <s:DataGroup id="browserDataGroup" dataProvider="{model.userBoardList}" verticalCenter="0" left="10" rollOverColor="0x424242" itemRenderer="edu.xxxxx.components.board.BrowserItemRenderer"> <!--itemrenderer code below --> <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:ns="library://ns.adobe.com/flex/mx" buttonMode="true" useHandCursor="true" mouseChildren="true"> <s:states> <s:State name="up"/> <s:State name="over"/> </s:states> <s:layout> <s:VerticalLayout gap="2"/> </s:layout> <s:Group> <ns:Image id="image" source="{data.thumbnail}" addedEffect="Fade" completeEffect="Fade" removedEffect="Fade" width="130" height="89" horizontalCenter="0" verticalCenter="0"/> <s:Rect id="imageRect" width="130" height="89"> <s:stroke> <s:SolidColorStroke color="0xFFFFFF" joints="miter" pixelHinting="true"/> </s:stroke> </s:Rect> </s:Group> <s:Label text="{data.title}" color="0xFFFFFF" fontWeight="bold"/> <s:Group> <s:layout> <s:HorizontalLayout gap="3"/> </s:layout> <s:Label text="Edit" color="0xFFFFFF" click="trace('edit');" textDecoration.up="underline" textDecoration.over="none"/> <s:Label text="|" color="0xFFFFFF"/> <s:Label text="Delete" color="0xFFFFFF" click="trace('delete');" textDecoration.up="underline" textDecoration.over="none"/> </s:Group> </s:ItemRenderer>

    Read the article

  • Listing both null and not null in mysql query

    - by tomasz
    Let's say I have the table NAME | ID | REF foo1 | 1 | NULL foo2 | 2 | 1234 foo2 | 3 | 567 foo1 | 4 | NULL foo3 | 5 | 89 I'd like to count all instances of NULL and NOT NULL in one query so that I can say NAME | null | not null foo1 | 0 | 2 foo2 | 2 | 0 foo3 | 0 | 1 I could run these two queries select NAME,count(*) from TABLE where REF is not null select NAME,count(*) from TABLE where REF is null But I'm sure there must be a simple way to do it in one mysql query.

    Read the article

  • vim how to comma align

    - by anon
    I have a bunch of code of the form: someVector.push_back(Foo("some name", 1.0, 3.1415926); someVector.push_back(Foo("different length name", 89.0, 2.717); ... 20 more entries I want sufficient space to be inserted so that my code is comma aligned, i.e. the "1.0," 's comma and the "89.0"'s comma are aligned -- is there builtins to do this?

    Read the article

  • Use a JSON array with objects with javascript

    - by Fredrik Johansson
    Hi, I have a function that will get a JSON array with objects. In the function I will be able to loop through the array, access a property and use that property. Like this: Variable that I will pass to the function will look like this: [{"id":28,"Title":"Sweden"}, {"id":56,"Title":"USA"}, {"id":89,"Title":"England"}] function test(myJSON) { // maybe parse my the JSON variable? // and then I want to loop through it and access my IDs and my titles } Any suggestions how I can solve it? Regards, Fredrik

    Read the article

  • Convert number into words using flex.

    - by charlie
    Hi I am trying to convert an entry using a numeric stepper in flex into words to display in a textarea. i.e a user uses the stepper to enter "89" as a value and in the text area the words "Eighty nine" are displayed. After much searching i haven't found anything that helps - a few javascript functions but that is all. any help sample code would be much appreciated. thanks in advance.

    Read the article

  • Block specific IP block from my website in PHP

    - by iTayb
    I'd like, for example, block every IP from base 89.95 (89.95..). I don't have .htaccess files on my server, so I'll have to do it with PHP. if ($_SERVER['REMOTE_ADDR'] == "89.95.25.37") die(); Would block specific IP. How can I block entire IP blocks? Thank you very much.

    Read the article

  • Helicon ISAPI_REWRITE for masking folder

    - by Brian
    Hello, I would like to use the Helicon ISAPI_REWRITE module to rewrite a url: 123.45.67.89/folder to www.site.com I need to mask the IP/folder due to an IIS structure change. The reason why I don't want to get into, but it's valid based on the setup. Any help would be appreciated. Thanks.

    Read the article

  • jQuery AJAX Web service works only locally

    - by Greg
    Hi, I have a simple ASP.NET Web Service [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService] public class Service : System.Web.Services.WebService { public Service () { } [WebMethod] public string SetName(string name) { return "hello my dear friend " + name; } } For this Web Service I created Virtual Directory, so I can receive the access by taping http://localhost:89/Service.asmx. I try to call it via simple html page with jQuery. For this purpose I use function CallWS() { $.ajax({ type: "POST", data: "{'name':'Pumba'}", dataType: "json", url: "http://localhost:89/Service.asmx/SetName", contentType: "application/json; charset=utf-8", success: function (msg) { $('#DIVid').html(msg.d); }, error: function (e) { $('#DIVid').html("Error"); } }); The most interesting fact: If I create the html page in the project with my WebService and change url to Service.asmx/SetName everything works excellent. But if I try to call this webservice remotely - success function works but msg is null. After that I tried to call this service even via SOAP. It is the the same - locally it works excellent, but remotely - not at all. var ServiceUrl = 'http://localhost:89/Service.asmx?op=SetName'; function beginSetName(Name) { var soapMessage = '<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SetName xmlns="http://tempuri.org/"> <name>' + Name + '</name> </SetName> </soap:Body> </soap:Envelope>'; $.ajax({ url: ServiceUrl, type: "POST", dataType: "xml", data: soapMessage, complete: endSetName, contentType: "text/xml; charset=\"utf-8\"" }); return false; } function endSetName(xmlHttpRequest, status) { $(xmlHttpRequest.responseXML) .find('SetNameResult') .each(function () { var name = $(this).text(); alert(name); }); } In this case status has value "parseerror". Could you please help me to resolve this problem? What should I do to call another WebService remotely by url via jQuery. Thank you in advance, Greg

    Read the article

  • Bash and sort files in order

    - by Werner
    Hi, with a previous bash script I created a list of files: data_1_box data_2_box ... data_10_box ... data_99_box the thing is that now I need to concatenate them, so I tried ls -l data_* but I get ..... data_89_box data_8_box data_90_box ... data_99_box data_9_box but I need to get in the sucession 1, 2, 3, 4, .. 9, ..., 89, 90, 91, ..., 99 Can it be done in bash?

    Read the article

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