Search Results

Search found 393 results on 16 pages for 'jesse gavin'.

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

  • Default Values Specflow Step Definitions

    - by Gavin Osborn
    I'm starting out in the world of SpecFlow and I have come across my first problem. In terms of keeping my code DRY I'd like to do the following: Have two scenarios: Given I am on a product page And myfield equals todays date Then... Given I am on a product page And myfield equals todays date plus 4 days Then... I was hoping to use the following Step Definition to cover both variants of my And clause: [Given(@"myfield equals todays date(?: (plus|minus) (\d+) days)?")] public void MyfieldEqualsTodaysDate(string direction, int? days) { //do stuff } However I keep getting exceptions when SpecFlow tries to parse the int? param. I've checked the regular expression and it definitely parses the scenario as expected. I'm aware that I could so something as crude as method overloading etc, I was just wondering if SpecFlow supported the idea of default parameter values, or indeed another way to achieve the same effect. Many Thanks

    Read the article

  • Why does my Google maps api v3 and side panel not fill my page upon resizing?

    - by Gavin
    I'm developing a web page and I have a side panel on the left with a search bar and a Google maps api v3 filling the rest of the page to the right. When I make the browser very small vertically, there is a white space between the side panel and the map, and the bottom of the browser. However, the text continues to the bottom of the browser. It looks like: Here's my css code: <style type="text/css"> body {margin:0;} #panel {height:100%; width:300px; position:absolute; padding:0;background-color:#8C95A0;} #header {padding:2px; text-align:center} #address_instruction {position:relative; top:7%; padding:2px; text-align:center} #geocoder {position:relative; top:8%; padding:2px; text-align:center} #toggle_instruction {position:relative; top:22%; padding:2px; text-align:center} #layers {position:relative; top:25%; padding:2px; text-align:center} #layer0 {padding:2px; text-align:center} #layer1 {padding:2px; text-align:center} #layer2 {padding:2px; text-align:center} #link {top:50%; position:relative; padding:2px; text-align:center} #map_canvas {height:100%; left:300px; right:0px; position:absolute; padding:0;} </style> The IDs within #panel refer to the items on the left hand side in the panel. Why don't the side panel background color and map extend to the bottom of the browser?

    Read the article

  • Using C# to parse a SOAP Response

    - by Gavin
    I am trying to get the values for faultcode, faultstring, and OrderNumber from the SOAP below <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <faultcode>1234</faultcode> <faultstring>SaveOrder:SetrsOrderMain:Cannot change OrderDate if GLPeriod is closed, new OrderDate is 3/2/2010:Ln:1053</faultstring> <detail> <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body UserGUID="test"> <m:SaveOrder xmlns:m="http://www.test.com/software/schema/" UserGUID="test"> <Order OrderNumber="1234-1234-123" Caller="" OrderStatus="A" xmlns="http://www.test.com/software/schema/"> Here is my code in C# XDocument doc = XDocument.Load(HttpContext.Current.Server.MapPath("XMLexample.xml")); var errorDetail = new EcourierErrorDetail { FaultCode = from fc in doc.Descendants("faultcode") select fc.Value, FaultString = from fs in c.Descendants("faultstring") select fs.Value, OrderNumber = from o in doc.Descendants("detail").Elements("Order").Attributes("OrderNumber") select o.Value }; return errorDetail; I am able to get the values for both faultcode and faultstring but not the OrderNumber. I am getting "Enumeration yielded no results." Can anyone help? Thanks.

    Read the article

  • Vim, how to scroll to bottom of a named buffer

    - by Gavin Black
    I have a vim-script which splits output to a new window, using the following command: below split +view foo I've been trying to find a way from an arbitrary buffer to scroll to the bottom of foo, or a setting to keep it defaulted to showing the bottom lines of the buffer. I'm doing most of this inside of a python block of vim script. So I have something like: python << endpython import vim import time import thread import sys def myfunction(string,sleeptime,*args): outpWindow = vim.current.window while 1: outpWindow.buffer.append("BAR") #vim.command("SCROLL TO BOTTOM OF foo") time.sleep(sleeptime) #sleep for a specified amount of time. vim.command('below split +view foo') thread.start_new_thread(myfunction,("Thread No:1",2)) endpython And need to find something to put in for vim.command("SCROLL TO BOTTOM of foo") line

    Read the article

  • Flex custom toggleswitch not working in actionscript

    - by Gavin Jones
    I have a custom Flex Toggleswitch component that changes the text values of the switch. package skins { import spark.skins.mobile.ToggleSwitchSkin; public class MyToggleSwitchSkin extends ToggleSwitchSkin { public function MyToggleSwitchSkin() { super(); selectedLabel="Serviceable"; unselectedLabel="Fault"; } } } If I add the control using the MXML tag, it works fine. However, when I add the component using action script, it does not. import skins.MyToggleSwitchSkin; public function addToggle():void { var myCustomToggle:MyToggleSwitchSkin = new MyToggleSwitchSkin(); hgroup.addElement(myCustomToggle); } The control dsiplays but will not activate. Any ideas what I have missed?

    Read the article

  • Windows Service Start-Up Error 1069

    - by Gavin
    Hello, I am installing a new windows service coded in C# on a server. I installed the service fine on the server, but once i manually start up the service on a server, with the same login credentials that our other services use, i get the fatal error message notification: "Could not start the %service name% on Local Computer. Error 1069: The Service did not start due to a logon failure." I looked in the event log and i got a 7038 and 7000 event id error in that order. 7038 event id message: "The %service name% service was unable to log on as %login% with the currently configured password due to the following error: Logon failure: unknown user name or bad password. To ensure that the service is configured properly, use the Services snap-in in Microsoft Management Console (MMC)." 7000 event id message: "The %service name% service failed to start due to the following error: The service did not start due to a logon failure. " I have other services that are using the same exact login account and they work fine. Is there something simple I could be missing? Thanks

    Read the article

  • SQL Server Querying An XML Field

    - by Gavin Draper
    I have a table that contains some meta data in an XML field. For example <Meta> <From>[email protected]</From> <To> <Address>[email protected]</Address> <Address>[email protected]</Address> </To> <Subject>ESubject Goes Here</Subject> </Meta> I want to then be able to query this field to return the following results From To Subject [email protected] [email protected] Subject Goes Here [email protected] [email protected] Subject Goes Here I've written the following query SELECT MetaData.query('data(/Meta/From)') AS [From], MetaData.query('data(/Meta/To/Address)') AS [To], MetaData.query('data(/Meta/Subject)') AS [Subject] FROM Documents However this only returns one record for that XML field. It combines both the 2 addresses into one result. Is it possible for split these on to separate records? The result I'm getting is From To Subject [email protected] [email protected] [email protected] Subject Goes Here Thanks Gav

    Read the article

  • MS Access Import from Text File problems

    - by Gavin O'Brien
    I'm trying to import a text file into an access database. It's not one I've written myself but the spec for the delimited text file is set up properly and the file imports properly using the wizard. When I try to use the import functions of the app itself, the ImportError table tells "Field Truncation" for one of the fields. Any help would be appreciated.

    Read the article

  • Question About NerdDinner Controller Constructors

    - by Gavin Draper
    I've been looking at the Nerd Dinner app, more specifically how it handles its unit tests. The following constructors for the RSVPController are confusing my slightly public RSVPController() : this(new DinnerRepository()) { } public RSVPController(IDinnerRepository repository) { dinnerRepository = repository; } From what I can tell the second one is used by the unit tests so it can use Fake repositories. What I cant work out is what the first constructor does. It doesn't seem to ever set the dinnerRepository variable, it seems to imply its inheriting from something but I really don't get it. Can anyone explain? Thanks

    Read the article

  • Why does SQLite say it can't read SQL from a file?

    - by Gavin
    Hi all. I have a bunch of SQL in a file, which creates the tables and so forth. The problem is that the .read command simply returns "can't open xxx" when I try to execute it. I've set the permissions to everybody read/write, but that didn't help. I can cat the file from the command line and see it fine. This is under Mac OS 10.6.3. Anybody have any idea here? Thanks!

    Read the article

  • How can I make my Google Maps api v3 address search bar work by hitting the enter button on the keyboard?

    - by Gavin
    I'm developing a webpage and I would just like to make something more user friendly. I have a functional Google Maps api v3 and an address search bar. Currently, I have to use the mouse to select search to initialize the geocoding function. How can I make the map return a placemark by hitting the enter button on my keyboard? I just want to make it as user-friendly as possible. Here is the javascript and div, respectively, I created for the address bar: var geocoder; function initialize() { geocoder = new google.maps.Geocoder (); function codeAddress () { var address = document.getElementById ("address").value; geocoder.geocode ( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results [0].geometry.location); marker.setPosition(results [0].geometry.location); map.setZoom(14); } else { alert("Geocode was not successful for the following reason: " + status); } }); } <div id="geocoder"> <input id="address" type="textbox" value=""> <input type="button" value="Search" onclick="codeAddress()"> </div> Thank you in advance for your help

    Read the article

  • Why is the operation address incremented by two?

    - by Gavin Jones
    I am looking at a Javascript emulator of a NES to try and understand how it works. On this line: addr = this.load(opaddr+2); The opcode is incremented by two. However, the documentation (see appendix E) I'm reading says: Zero page addressing uses a single operand which serves as a pointer to an address in zero page ($0000-$00FF) where the data to be operated on can be found. By using zero page addressing, only one byte is needed for the operand, so the instruction is shorter and, therefore, faster to execute than with addressing modes which take two operands. An example of a zero page instruction is AND $12. So if the operand's argument is only one byte, shouldn't it appear directly after it, and be + 1 instead of + 2? Why +2? This is how I think it works, which may be incorrect. Suppose our memory looks like: ------------------------- | 0 | 1 | 2 | 3 | 4 | 5 | <- index ------------------------- | a | b | c | d | e | f | <- memory ------------------------- ^ \ PC and our PC is 0, pointing to a. For this cycle, we say that the opcode: var pc= 0; //for example's sake var opcode= memory[pc]; //a So shouldn't the first operand be the next slot, i.e. b? var first_operand = memory[pc + 1]; //b

    Read the article

  • jQuery validation per multiple fieldsets, how to use different event to trigger validation per secti

    - by Jesse
    Hi All! I have a really, really long form (about 300 fields) that I broke down into different sections using this slick jQuery plugin Form Wizard. If you group your form into different fieldsets, the FormWizard will automagically display one section at a time, with a Next hyperlink to take you to the next section: <a id="step0Next" class="next" href="#">Next ></a> My question is this: Using the jQuery Validation plugin, how can I validate each fieldset when a user clicks Next, and so forth, instead of using the Submit button. Put differently, how can I change the trigger event from Submit to six different hyperlinks for six separate sections? Thanks for helping this newb out.

    Read the article

  • LWJGL not working

    - by Jesse Welch
    I'm working on a homework assignment to modify code given by my professor using LightWeight Java Game Library. The problem is that I can't fully load the test code to begin testing modifications. I've linked against the jar file as it says to in the modifications, but I still have one lingering error. The import statement import org.lwjgl.util.glu.*; Cannot be resolved, so I have errors on the following lines, spread throughout the code: textures[0] = GLApp.makeTexture("green.bmp"); GLU.gluPerspective(45.0f, (float)Display.getDisplayMode().getWidth() / (float)Display.getDisplayMode().getHeight(), 0.1f, 100.0f); GLU.gluLookAt(cameraX, cameraY, cameraZ, lookX, lookY, lookZ, 0.0f, 1.0f, 0.0f);` Any ideas on what is going wrong?

    Read the article

  • Session bug using facebook-connect-with-authlogic in Rails

    - by Jesse
    I'm trying to follow this article: http://ryanbigg.com/2010/03/testing-facebook, but I'm stuck. I think the problem is with my session, in that the current_usermethod comes up with nil for session[:facebook_session]. According to the original authlogic, it says to use the active_record_store for sessions: # config/environment.rb config.action_controller.session_store = :active_record_store # db/schema includes create_table "sessions", :force => true do |t| t.string "session_id", :null => false t.text "data" t.datetime "created_at" t.datetime "updated_at" end The article calls for the use of cookies. I'm confused; can I use cookies and the active record sessions? I'm also confused by the use of cattr_accessor :current_user from within the User model -- current_user still goes in the application controller, right? Please help.

    Read the article

  • ExpressionEngine Segment Variables Lost on Site Index Page

    - by Jesse Bunch
    Hey Everyone, I've been messing with this for days now and can't seem to figure it out. I am trying to pass a 2nd segment variable to my client's index page. The URL I'm trying is: http://www.compupay.com/site/CSCPA/. The problem is, rather than showing the site's index page with the segment variable of "CSCPA" still in the URL, it shows the index page with no segment variables. Initially, I thought it was a .htaccess problem but I couldn't find anything in it that seemed out of whack. Any ideas? I am posting the .htaccess file so another pair of eyes can see it. Thanks for the help! # -- LG .htaccess Generator Start -- # .htaccess generated by LG .htaccess Generator v1.0.0 # http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/ # secure .htaccess file <Files .htaccess> order allow,deny deny from all </Files> # Dont list files in index pages IndexIgnore * #URL Segment Support AcceptPathInfo On Options +FollowSymLinks #Redirect old incoming links Redirect 301 /contactus.cfm http://www.compupay.com/about_compupay/contact_us/ Redirect 301 /Internet_Payroll.cfm http://www.compupay.com/payroll_solutions/c/online_payroll/ Redirect 301 /Internet_Payroll_XpressPayroll.cfm http://www.compupay.com/payroll_solutions/xpresspayroll/ Redirect 301 /about_compupay.cfm http://www.compupay.com/about_compupay/news/ Redirect 301 /after_payroll.cfm http://www.compupay.com/after_payroll_solutions/ Redirect 301 /news101507.cfm http://www.compupay.com/about_compupay/news/ Redirect 301 /quote.cfm http://www.compupay.com/payroll_solutions/get_a_free_quote/ Redirect 301 /solution_finder_sm.cfm http://www.compupay.com/ Redirect 301 /state_payroll/mississippi_payroll.cfm http://www.compupay.com/resource_center/state_resources/ Redirect 301 /state_payroll/washington_payroll.cfm http://www.compupay.com/resource_center/state_resources/ #Redirect for old top linked to pages Redirect 301 /Payroll_Services.cfm http://www.compupay.com/payroll_solutions/ Redirect 301 /About_CompuPay.cfm http://www.compupay.com/about_compupay/ Redirect 301 /Partnerships.cfm http://www.compupay.com/business_partner_solutions/ Redirect 301 /about_compupay.cfm?subpage=393 http://www.compupay.com/about_compupay/ Redirect 301 /quote.cfm http://www.compupay.com/payroll_solutions/get_a_free_quote/ Redirect 301 /After_Payroll.cfm http://www.compupay.com/after_payroll_solutions/ Redirect 301 /Accountant_Services.cfm http://www.compupay.com/accountant_solutions/ Redirect 301 /careers/careers_payroll.cfm http://www.compupay.com/about_compupay/careers/ Redirect 301 /Industry_Resources.cfm http://www.compupay.com/resource_center/ Redirect 301 /Client_Resources.cfm http://www.compupay.com/resource_center/client_login/ Redirect 301 /client_resources.cfm?subpage=375 http://www.compupay.com/resource_center/client_login/ Redirect 301 /solution_finder_sm.cfm http://www.compupay.com/payroll_solutions/ Redirect 301 /Internet_Payroll_PowerPayroll.cfm http://www.compupay.com/payroll_solutions/powerpayroll/ Redirect 301 /Payroll_Outsourcing.cfm http://www.compupay.com/payroll_solutions/why_outsource/ Redirect 301 /Phone_Payroll_Fax_Payroll.cfm http://www.compupay.com/payroll_solutions/phone_fax_payroll/ Redirect 301 /contactus.cfm http://www.compupay.com/about_compupay/contact_us/ Redirect 301 /state_payroll/iowa_payroll.cfm http://www.compupay.com/resource_center/state_resources/ Redirect 301 /Construction_Payroll.cfm http://www.compupay.com/payroll_solutions/specialty_payroll/ Redirect 301 /PC_Payroll.cfm http://www.compupay.com/payroll_solutions/c/pc_payroll/ Redirect 301 /state_payroll/washington_payroll.cfm http://www.compupay.com/resource_center/state_resources/ Redirect 301 /Internet_Payroll_XpressPayroll.cfm http://www.compupay.com/payroll_solutions/xpresspayroll/ Redirect 301 /accountant_services.cfm?subpage=404 http://www.compupay.com/accountant_solutions/ Redirect 301 /after_payroll.cfm http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=361 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=362 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=363 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=364 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=365 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=366 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=367 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=368 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=369 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /after_payroll.cfm?subpage=416 http://www.compupay.com/after_payroll_solutions/ Redirect 301 /payload_payroll.cfm http://www.compupay.com/payroll_solutions/payload/ Redirect 301 /payroll_services.cfm?subpage=358 http://www.compupay.com/payroll_solutions/ Redirect 301 /payroll_services.cfm?subpage=399 http://www.compupay.com/payroll_solutions/ Redirect 301 /payroll_services.cfm?subpage=409 http://www.compupay.com/payroll_solutions/ Redirect 301 /payroll_services.cfm?subpage=413 http://www.compupay.com/payroll_solutions/ Redirect 301 /payroll_services.cfm?subpage=418 http://www.compupay.com/payroll_solutions/ Redirect 301 /state_payroll/mississippi_payroll.cfm http://www.compupay.com/resource_center/state_resources/ <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Remove the www # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] # RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Force www RewriteCond %{HTTP_HOST} !^www.compupay.com$ [NC] RewriteRule ^(.*)$ http://www.compupay.com/$1 [R=301,L] # Add a trailing slash to paths without an extension RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule ^(.*)$ $1/ [L,R=301] #Legacy Partner Link Redirect RewriteCond %{QUERY_STRING} partnerCode=(.*) [NC] RewriteRule compupay_payroll.cfm site/%1? [R=301,L] # Catch any remaining requests for .cfm files RewriteCond %{REQUEST_URI} \.cfm RewriteRule ^.*$ http://www.compupay.com/ [R=301,L] #Expression Engine RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L] AcceptPathInfo On </IfModule> # Remove IE image toolbar <FilesMatch "\.(html|htm|php)$"> Header set imagetoolbar "no" </FilesMatch> # enable gzip compression <FilesMatch "\.(js|css|php)$"> SetOutputFilter DEFLATE </FilesMatch> #Deal with ETag <IfModule mod_headers.c> <FilesMatch "\.(ico|flv|jpg|jpeg|png|gif)$"> Header unset Last-Modified </FilesMatch> <FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header unset ETag FileETag None Header set Cache-Control "public" </FilesMatch> </IfModule> <IfModule mod_expires.c> <FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|css|js)$"> ExpiresActive on ExpiresDefault "access plus 1 year" </FilesMatch> </IfModule> #Force Download PDFs <FilesMatch "\.(?i:pdf)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch> #Increase Upload Size php_value upload_max_filesize 5M php_value post_max_size 5M # -- LG .htaccess Generator End --

    Read the article

  • MySQL Unique hash insertion

    - by Jesse
    So, imagine a mysql table with a few simple columns, an auto increment, and a hash (varchar, UNIQUE). Is it possible to give mysql a query that will add a column, and generate a unique hash without multiple queries? Currently, the only way I can think of to achieve this is with a while, which I worry would become more and more processor intensive the more entries were in the db. Here's some pseudo-php, obviously untested, but gets the general idea across: while(!query("INSERT INTO table (hash) VALUES (".generate_hash().");")){ //found conflict, try again. } In the above example, the hash column would be UNIQUE, and so the query would fail. The problem is, say there's 500,000 entries in the db and I'm working off of a base36 hash generator, with 4 characters. The likelyhood of a conflict would be almost 1 in 3, and I definitely can't be running 160,000 queries. In fact, any more than 5 I would consider unacceptable. So, can I do this with pure SQL? I would need to generate a base62, 6 char string (like: "j8Du7X", chars a-z, A-Z, and 0-9), and either update the last_insert_id with it, or even better, generate it during the insert. I can handle basic CRUD with MySQL, but even JOINs are a little outside of my MySQL comfort zone, so excuse my ignorance if this is cake. Any ideas? I'd prefer to use either pure MySQL or PHP & MySQL, but hell, if another language can get this done cleanly, I'd build a script and AJAX it too. Thanks!

    Read the article

  • Need help with android WebView

    - by Jesse
    Hello, I am new to Android and java development. I create a WebView object in the OnCreate function. Now I need to be able to pass this same object to other functions in the code, such as the onOptionsItemSelected function. I currently have it where I just create a new WebView object in each function where I need it, but this slows down the code since it has to recreate it and such.

    Read the article

  • Getting a binary file from resource in C#

    - by Jesse Knott
    Hello, I am having a bit of a problem, I am trying to get a PDF as a resource in my application. At this point I have a fillable PDF that I have been able to store as a file next to the binary, but now I am trying to embed the PDF as a resource in the binary. byte[] buffer; try { s = typeof(BattleTracker).Assembly.GetManifestResourceStream("libReports.Resources.DAForm1594.pdf"); buffer = new byte[s.Length]; int read = 0; do { read = s.Read(buffer, read, 32768); } while (read > 0); } catch (Exception e) { throw new Exception("Error: could not import report:", e); } // read existing PDF document PdfReader r = new PdfReader( // optimize memory usage buffer, null ); Every time I run the code I get an error saying "Rebuild trailer not found. Original Error: PDF startxref not found" When I was just opening the file via a path to the static file in my directory it worked fine. I have tried using different encodings UTF-8, UTF-32, UTF-7, ASCII, etc etc.... As a side note I had the same problem with getting a Powerpoint file as a resource, I was finally able to fix that problem by converting the Powerpoint to xml and using that. I have considered doing the same for the PDF but I am referencing elements by field name which does not seem to work with XML PDFs. Can anyone help me out with this? Thanks in advance!

    Read the article

  • Tortoise SVN tree conflict with myself

    - by Jesse Pepper
    Has anyone had the experience of moving a file in tortoise and committing successfully, only to later commit a different change and be told of a tree conflict where: the file in its original location has been deleted, but in tortoise is marked as missing the file in its new location is there, but marked as already added. (I use tortoise SVN, and we have client and server 1.60) Nobody else changed either the directory or the file (according to svn log). Why is this happening? Is there a way to avoid it happening? If it does happen, is there a more elegant way of fixing the problem than by deleting the whole folder and updating again?

    Read the article

  • What's going on here? Repeating rows in random list of lists.

    - by Jesse Aldridge
    I expected to get a grid of unique random numbers. Instead each row is the same sequence of numbers. What's going on here? from pprint import pprint from random import random nrows, ncols = 5, 5 grid = [[0] * ncols] * nrows for r in range(nrows): for c in range(ncols): grid[r][c] = int(random() * 100) pprint(grid) Example output: [[64, 82, 90, 69, 36], [64, 82, 90, 69, 36], [64, 82, 90, 69, 36], [64, 82, 90, 69, 36], [64, 82, 90, 69, 36]]

    Read the article

  • Can Nokogiri Parse a Nokogiri Object?

    - by Jesse J
    I'm trying to parse a part of the result of a parse, like this: queries = @doc.xpath("//spectrum_query") queries.each do |query| hits = query.xpath("//search_hit") end But instead of Nokogiri only searching for search_hits inside the query, it searches for search_hits in the whole document. I'm sure there's a different way to accomplish what I want, but doing it like this would be the simplest. Anyone know if it's possible to search just the query object?

    Read the article

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