Search Results

Search found 314 results on 13 pages for 'jesse ramos'.

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Can Ruby Fibers be Concurrent?

    - by Jesse J
    I'm trying to get some speed up in my program and I've been told that Ruby Fibers are faster than threads and can take advantage of multiple cores. I've looked around, but I just can't find how to actually run different fibers concurrently. With threads you can dO this: threads = [] threads << Thread.new {Do something} threads << Thread.new {Do something} threads.each {|thread| thread.join} I can't see how to do something like this with fibers. All I can find is yield and resume which seems like just a bunch of starting and stopping between the fibers. Is there a way to do true concurrency with fibers?

    Read the article

  • In Lisp, Avoid "Cannot open load file" when using require

    - by Jesse
    I am working on a custom .emacs file that I will be able to use on several different computers. I would like to be able to load a mode if it exists on the system. If it does not exist I would like Emacs to stop showing the error: File error: Cannot open load file, X. For example: (require 'darkroom-mode) Results in: File error: Cannot open load file, darkroom-mode I am using file-exists-p to test if certain other files exist but for this test I would assume I need to search my load-path. I am new to Lisp so this is stumping me.

    Read the article

  • Dataflow Pipeline holding on to memory

    - by Jesse Carter
    I've created a Dataflow pipeline consisting of 4 blocks (which includes one optional block) which is responsible for receiving a query object from my application across HTTP and retrieving information from a database, doing an optional transform on that data, and then writing the information back in the HTTP response. In some testing I've done I've been pulling down a significant amount of data from the database (570 thousand rows) which are stored in a List object and passed between the different blocks and it seems like even after the final block has been completed the memory isn't being released. Ram usage in Task Manager will spike up to over 2 GB and I can observe several large spikes as the List hits each block. The signatures for my blocks look like this: private TransformBlock<HttpListenerContext, Tuple<HttpListenerContext, QueryObject>> m_ParseHttpRequest; private TransformBlock<Tuple<HttpListenerContext, QueryObject>, Tuple<HttpListenerContext, QueryObject, List<string>>> m_RetrieveDatabaseResults; private TransformBlock<Tuple<HttpListenerContext, QueryObject, List<string>>, Tuple<HttpListenerContext, QueryObject, List<string>>> m_ConvertResults; private ActionBlock<Tuple<HttpListenerContext, QueryObject, List<string>>> m_ReturnHttpResponse; They are linked as follows: m_ParseHttpRequest.LinkTo(m_RetrieveDatabaseResults); m_RetrieveDatabaseResults.LinkTo(m_ConvertResults, tuple => tuple.Item2 is QueryObjectA); m_RetrieveDatabaseResults.LinkTo(m_ReturnHttpResponse, tuple => tuple.Item2 is QueryObjectB); m_ConvertResults.LinkTo(m_ReturnHttpResponse); Is it possible that I can set up the pipeline such that once each block is done with the list they no longer need to hold on to it as well as once the entire pipeline is completed that the memory is released?

    Read the article

  • Problems With Eclipse and Ruby Plugin

    - by Jesse J
    I installed Eclipse and then the Ruby Development Tools (RDT), but it would crash when I try to alter certain features, like having line numbers, how far back to have history, and the code coloring scheme didn't work fully. I decided to try to uninstall Eclipse by doing sudo aptitude remove eclipse and then sudo aptitude install eclipse but instead it installed it back with the broken Ruby plugin. I also tried aptitude purge but that didn't help either. How can I freshly reinstall eclipse and get a properly working Ruby plugin?

    Read the article

  • Shared Variable Among Ruby Processes

    - by Jesse J
    I have a Ruby program that loads up two very large yaml files, so I can get some speed-up by taking advantage of the multiple cores by forking off some processes. I've tried looking, but I'm having trouble figuring how, or even if, I can share variables in different processes. The following code is what I currently have: @proteins = "" @decoyProteins = "" fork do @proteins = YAML.load_file(database) exit end fork do @decoyProteins = YAML.load_file(database) exit end p @proteins["LVDK"] P displays nil though because of the fork. So is it possible to have the forked processes share the variables? And if so, how?

    Read the article

  • How to modulate every texture unit in OpenGL ES 1.1?

    - by Jesse Beder
    I have two textures and a "blend factor", and I'd like to mix them, modulated by the current color; in effect, I want to use the following shader: gl_FragColor = gl_Color * mix(tex0, tex1, blendFactor); I'm using OpenGL ES 1.1, targeting all versions of the iPhone, so I can't use shaders, and I have two texture units. My best attempt is: // texture 0 glActiveTexture(GL_TEXTURE0); image1.Bind(); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); // texture 1 glActiveTexture(GL_TEXTURE1); image2.Bind(); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_INTERPOLATE); glTexEnvi(GL_TEXTURE_ENV, GL_SRC0_RGB, GL_PREVIOUS); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR); glTexEnvi(GL_TEXTURE_ENV, GL_SRC1_RGB, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR); glTexEnvi(GL_TEXTURE_ENV, GL_SRC2_RGB, GL_CONSTANT); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB, GL_SRC_ALPHA); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_INTERPOLATE); glTexEnvi(GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_PREVIOUS); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA); glTexEnvi(GL_TEXTURE_ENV, GL_SRC1_ALPHA, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_SRC_ALPHA); glTexEnvi(GL_TEXTURE_ENV, GL_SRC2_ALPHA, GL_CONSTANT); glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA, GL_SRC_ALPHA); const float factor[] = { 0, 0, 0, blendFactor }; glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, factor); This has the effect of the shader: gl_FragColor = mix(gl_Color * tex0, tex1, blendFactor); but I don't see how to module texture 1 by the color. Is there any way to have the color provided by a texture unit automatically modulated by the incoming primary color? Or any other way to do what I want that I'm missing? Multiple passes are definitely allowed, but they have to have the proper blend effect; I have glBlend(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); enabled, so it can be tricky to get right with multiple passes.

    Read the article

  • Flash CS5 projects panel totally gone?

    - by Jesse
    So, I popped open up Flash CS5 just now, and I couldn't find my projects panel. I was working on a dual screen set up previously, so my windows were everywhere anyways (sans external). I switched over to a smaller screen workspace, and popped opened the projects panel. Oddly enough, the code snippets panel came up instead. So, I switched off the code snippets, and tried again. I've been trying different ways of opening this panel for about 15 minutes, and I'm totally stumped. Some thorough googling didn't present any relevant results, so, StackOverflow, I turn to you. Is this a known issue? is there a secret backdoor way to open this panel? Am I totally missing something?

    Read the article

  • How do I copy input from one textbox to another via checkbox using jQuery?

    - by Jesse
    I'm cleaning up a simple form that has a Start Date textbox and an End Date textbox. I want to add a checkbox in between these fields that the user can check if the End Date is the same as the Start Date, so when they check it, the Start Date input value (e.g., 04/01/09) will automagically appear in the End Date textbox, so they don't have to type in the same date twice. Does that make sense? BTW, I'm using the sexy jquery datepicker UI, and it's sweet, but I just can't figure out the above problem. I know there's a simple solution (event handler?) but I'm stumped.

    Read the article

  • Unable to HTTP PUT with libcurl to django-piston

    - by Jesse Beder
    I'm trying to PUT data using libcurl to mimic the command curl -u test:test -X PUT --data-binary @data.yaml "http://127.0.0.1:8000/foo/" which works correctly. My options look like: curl_easy_setopt(handle, CURLOPT_USERPWD, "test:test"); curl_easy_setopt(handle, CURLOPT_URL, "http://127.0.0.1:8000/foo/"); curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_data); curl_easy_setopt(handle, CURLOPT_READDATA, &yaml); curl_easy_setopt(handle, CURLOPT_INFILESIZE, yaml.size()); curl_easy_perform(handle); I believe the read_data function works correctly, but if you ask, I'll post that code. I'm using Django with django-piston, and my update function is never called! (It is called when I use the command line version above.) libcurl's output is: * About to connect() to 127.0.0.1 port 8000 (#0) * Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'test' > PUT /foo/ HTTP/1.1 Authorization: Basic dGVzdDp0ZXN0 Host: 127.0.0.1:8000 Accept: */* Content-Length: 244 Expect: 100-continue * Done waiting for 100-continue ** this is where my read_data handler confirms: read 244 bytes ** * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Thu, 13 May 2010 08:22:52 GMT < Server: WSGIServer/0.1 Python/2.5.1 < Vary: Authorization < Content-Type: text/plain < Bad Request* Closing connection #0

    Read the article

  • Strings exported from a module have extra line breaks

    - by Jesse Millikan
    In a DrScheme project, I'm using a MrEd editor-canvas% with text% and inserting a string from a literal in a Scheme file. This results in an extra blank line in the editor for each line of text I'm trying to insert. I've tracked this down to the apparent fact that string literals from outside modules are getting extra line breaks. Here's a full example. The editor is irrelevant at this point, but it displays the result. ; test-literals.ss (module test-literals scheme (provide (all-defined-out)) (define exported-string "From another module with some more line breaks. ")) ; editor-test.ss (module editor-test scheme (require mred "test-literals.ss") (define w (instantiate frame% ("Editor Test" #f) )) (define c (instantiate editor-canvas% (w) (line-count 12) (min-width 400))) (define editor (instantiate text% ())) (send c set-editor editor) (send w show #t) (send editor erase) (send editor insert "Some text with some line breaks. ") (send editor insert exported-string)) And the result in the editor is Some text with some line breaks. From another module with some more line breaks.

    Read the article

  • Unable to HTTP PUT with libcurl

    - by Jesse Beder
    I'm trying to PUT data using libcurl to mimic the command curl -u test:test -X PUT --data-binary @data.yaml "http://127.0.0.1:8000/foo/" which works correctly. My options look like: curl_easy_setopt(handle, CURLOPT_USERPWD, "test:test"); curl_easy_setopt(handle, CURLOPT_URL, "http://127.0.0.1:8000/foo/"); curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); curl_easy_setopt(handle, CURLOPT_UPLOAD, 1); curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_data); curl_easy_setopt(handle, CURLOPT_READDATA, &yaml); curl_easy_setopt(handle, CURLOPT_INFILESIZE, yaml.size()); curl_easy_perform(handle); I believe the read_data function works correctly, but if you ask, I'll post that code. I'm using Django with django-piston, and my update function is never called! (It is called when I use the command line version above.) libcurl's output is: * About to connect() to 127.0.0.1 port 8000 (#0) * Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0) * Server auth using Basic with user 'test' > PUT /foo/ HTTP/1.1 Authorization: Basic dGVzdDp0ZXN0 Host: 127.0.0.1:8000 Accept: */* Content-Length: 244 Expect: 100-continue * Done waiting for 100-continue ** this is where my read_data handler confirms: read 244 bytes ** * HTTP 1.0, assume close after body < HTTP/1.0 400 BAD REQUEST < Date: Thu, 13 May 2010 08:22:52 GMT < Server: WSGIServer/0.1 Python/2.5.1 < Vary: Authorization < Content-Type: text/plain < Bad Request* Closing connection #0

    Read the article

  • How to use > in an xargs command?

    - by jesse
    I want to find a bash command that will let me grep every file in a directory and write the output of that grep to a separate file. My guess would have been to do something like this ls -1 | xargs -I{} "grep ABC '{}' > '{}'.out" but, as far as I know, xargs doesn't like the double-quotes. If I remove the double-quotes, however, then the command redirects the output of the entire command to a single file called '{}'.out instead of to a series of individual files. Does anyone know of a way to do this using xargs? I just used this grep scenario as an example to illustrate my problem with xargs so any solutions that don't use xargs aren't as applicable for me.

    Read the article

  • Workflow for App Engine

    - by Jesse Aldridge
    I'm about to start an App Engine project for the first time. Most likely with Python. I was wondering if anybody could give me a leg up by detailing their workflow when developing for it. What tools do you use to go from start to deployed? Did you do any app engine specific configurations to those tools?

    Read the article

  • NSFetchedResultsController deallocated instance

    - by Jesse Armand
    Anyone ever encountered this ? -[NSFetchedResultsController _restoreCachedSectionInfo]: message sent to deallocated instance While performing fetch with performFetch: using NSFetchedResultsController instance. I'm sure the NSFetchedResultsController is retained before performing the fetch.

    Read the article

  • iPhone interface design considerations: checkbox and drop-down menu ?

    - by Jesse Armand
    This may not be a programming question, but I don't know where to ask for this and it's still related. We all know that the checkbox and drop-down menu is a UI paradigm brought in from HTML or web interface. I'm not asking for code implementations here. A google search had produced many results. Although if anyone is willing to share that's great. So the question is: Is this a good design approach if we just want to provide a checkbox or drop-down functionality? (e.g. for quizzes, or forms)

    Read the article

  • In SharePoint, how can the "Issue ID" column of an issues list be included in the detail form (DispF

    - by Jesse C. Slicer
    We've created a pretty standard issue tracking system based off of SharePoint's template with just a few extra columns. On the list view (AllItems.aspx), the first column is called "Issue ID" and has a number. Our developers and QC use that number in discussions. However, that number doesn't seem to want to show up on the detail form (DispForm.aspx) nor in the alert email. Can this field be included in at least one of these communication methods? If so, how? Thank you.

    Read the article

  • Apache mod_rewrite - prefer files over directories with pretty URLs

    - by Jesse
    I want to have pretty urls so http://www.domain.com/foo will return http://www.domain.com/foo.php The issue is that there is a directory that has the same name. I have another page at http://www.domain.com/foo/bar/baz and right now my server just returns the directory listing of foo when I request http://www.domain.com/foo Pseudocode: If the request plus ".php" is a file rewrite out the file instead of the directory Actual Code: RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME}\.php -f RewriteRule (.*) $1.php [NC,L]

    Read the article

  • System_Daemon and shell_exec

    - by Jesse
    Hey Everyone, I've set up a daemon (daemon.php) using PEAR's System_Daemon which waits for something to appear in the database. Once something is there, the daemon gets enough information and sends it out to another script (execute.php) using the shell_exec command this way I'm not worried about waiting for a response and holding up the daemon. Both of the scripts work fine alone and I'm even able to call shell_exec before calling System_Daemon::start(); . However, if I trying calling it AFTER System_Daemon::start();, then I get an Access Denied only when outputting to a file. I'm still new to Daemons in general, so any ideas or thoughts would be great! Thanks Guys!

    Read the article

  • Window bounds set on window using AppleScript in OS X are being ignored

    - by Jesse
    I am trying to create a small AppleScript to create and move some Terminal windows around my screen. The problem I am running into is that in some cases, it seems that OS X is ignoring the bounds I am setting. Using the AppleScript Editor: tell application "Terminal" to set the bounds of the first window to {0, 50, 600, 700} tell application "Terminal" to get the bounds of the first window Shows the following in the Event Log: tell application "Terminal" activate set bounds of window 1 to {0, 50, 600, 700} get bounds of window 1 --> {0, 22, 600, 672} end tell Result: {0, 22, 600, 672} Visually inspecting the window that is created when the script runs shows that Result bounds are the ones being used by the window. Any ideas?

    Read the article

  • Ruby Alias and module_function

    - by Jesse J
    I'm trying to debug someone else's code and having trouble figuring out what's wrong. When I run rake, one of the errors I get is: 2) Error: test_math(TestRubyUnits): NoMethodError: undefined method `unit_sin' for CMath:Module /home/user/ruby-units/lib/ruby_units/math.rb:21:in `sin' This is the function that calls the method: assert_equal Math.sin(pi), Math.sin("180 deg".unit) And this is what the class looks like: module Math alias unit_sin sin def sin(n) Unit === n ? unit_sin(n.to('radian').scalar) : unit_sin(n) end alias unit_cos cos def cos(n) Unit === n ? unit_cos(n.to('radian').scalar) : unit_cos(n) end ... module_function :unit_sin module_function :sin module_function :unit_cos module_function :cos ... end (The ellipsis means "more of the same"). As far as I can see, this is valid Ruby code. Is there something I'm missing here that's causing the error, or could the error be coming from something else? Update: I'm wondering if the problem has to do with namespaces. This code is attempting to extend CMath, so perhaps the alias and/or module_function isn't actually getting into CMath, or something like that....

    Read the article

  • CInternetSession::OpenURL exception if headers are defined. Works fine if not. Why?

    - by Jesse
    Trying to log the application version details in our weblogs using the headers: Should be a one liner..but for some reason whenever I specify anything but NULL for the headers it causes an exception (InternetOpenUrl() call returns NULL) - anyone able to explain why? CInternetSession internet; CHttpFile * pHttpFile; CString headers;// = APPLICATION_SUITE_NAME; DWORD dwHeadersLength = -1; headers.Format("%s %s %s\n",APPLICATION_SUITE_NAME,SHORT_APPLICATION_VERSION,BUILDNO_STR); pHttpFile =(CHttpFile *) internet.OpenURL(lpszURL, 1, INTERNET_FLAG_TRANSFER_ASCII|INTERNET_FLAG_DONT_CACHE, headers, dwHeadersLength); Without the headers, dwHeadersLength parameter (eg. pass in NULL,-1) then it goes through fine and I see the request come through to our website. But why does it fail if I pass in custom headers?

    Read the article

  • Nokogiri Not Parsing File

    - by Jesse J
    I'm using Nokogiri to parse pepXML files from different peptide search engines. I have two pepXML files, both of which appear, inasmuch as I can tell, to be of correct format, and puts Nokogiri::XML(IO.read(file)) will output the whole XML file for both files. The problem is, doc.xpath("any valid xpath") will parse the tag from one of the files, but not the other. No errors are given, so I have no idea why it won't parse. Anyone know of any reasons why Nokogiri wouldn't parse something out?

    Read the article

  • Haskell lazy I/O and closing files

    - by Jesse
    I've written a small Haskell program to print the MD5 checksums of all files in the current directory (searched recursively). Basically a Haskell version of md5deep. All is fine and dandy except if the current directory has a very large number of files, in which case I get an error like: <program>: <currentFile>: openBinaryFile: resource exhausted (Too many open files) It seems Haskell's laziness is causing it not to close files, even after its corresponding line of output has been completed. The relevant code is below. The function of interest is getList. import qualified Data.ByteString.Lazy as BS main :: IO () main = putStr . unlines =<< getList "." getList :: FilePath -> IO [String] getList p = let getFileLine path = liftM (\c -> (hex $ hash $ BS.unpack c) ++ " " ++ path) (BS.readFile path) in mapM getFileLine =<< getRecursiveContents p hex :: [Word8] -> String hex = concatMap (\x -> printf "%0.2x" (toInteger x)) getRecursiveContents :: FilePath -> IO [FilePath] -- ^ Just gets the paths to all the files in the given directory. Are there any ideas on how I could solve this problem? The entire program is available here: http://haskell.pastebin.com/PAZm0Dcb

    Read the article

  • Ajax request gets to server but page doesn't update - Rails, jQuery

    - by Jesse
    So I have a scenario where my jQuery ajax request is hitting the server, but the page won't update. I'm stumped... Here's the ajax request: $.ajax({ type: 'GET', url: '/jsrender', data: "id=" + $.fragment().nav.replace("_link", "") }); Watching the rails logs, I get the following: Processing ProductsController#jsrender (for 127.0.0.1 at 2010-03-17 23:07:35) [GET] Parameters: {"action"=>"jsrender", "id"=>"products", "controller"=>"products"} ... Rendering products/jsrender.rjs Completed in 651ms (View: 608, DB: 17) | 200 OK [http://localhost/jsrender?id=products] So, it seems apparent to me that the ajax request is getting to the server. The code in the jsrender method is being executed, but the code in the jsrender.rjs doesn't fire. Here's the method, jsrender: def jsrender @currentview = "shared/#{params[:id]}" respond_to do |format| format.js {render :template => 'products/jsrender.rjs'} end end For the sake of argument, the code in jsrender.rjs is: page<<"alert('this works!');" Why is this? I see in the params that there is no authenticity_token, but I have tried passing an authenticity_token as well with the same result. Thanks in advance.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >