Search Results

Search found 1489 results on 60 pages for 'brian harrison'.

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

  • Computer Language puns and jokes

    - by Mark Harrison
    I'm looking for some funny jokes and puns that occur in computer languages. I'll post an oldie to kick things off... What are some others? update: Especially looking for code-related jokes... the ones that only make sense to programmers reading code.

    Read the article

  • Escaping Strings in JavaScript

    - by Steve Harrison
    Hello, Does JavaScript have a built-in function like PHP's addslashes (or addcslashes) function to add backslashes to characters that need escaping in a string? For example, this: This is a demo string with 'single-quotes' and "double-quotes". ...would become: This is a demo string with \'single-quotes\' and \"double-quotes\". Thanks, Steve

    Read the article

  • lowest latency, least overhead app server?

    - by Mark Harrison
    I'm designing an application which will have a network interface for feeding out large numbers of very small metadata requests. The application code itself is very fast, basically looking up data cached in memory and sending it to the client. What's the absolute lowest latency I can get for a network application server running on a linux box? This will be an internal app running on gigE with no authentication. Any language/framework considered, with a preference for C, C++, or Python. Likewise for protocol, although HTTP would be nice.

    Read the article

  • Python: disabling $HOME/.python-eggs?

    - by Mark Harrison
    Is there an easy way to disable Python egg caching? We have the situation where a system account needs to run a python program which imports a module. Since this is a non-login robot account, it does not have a home directory, and dies trying to create the directory /.python-eggs. What's the best way to fix this? Can I convert my eggs in site-files to something which will not be cached in .python-eggs?

    Read the article

  • kick off a map reduce job from my java/mysql webapp

    - by Brian
    Hi guys, I need a bit of archecture advice. I have a java based webapp, with a JPA based ORM backed onto a mysql relational database. Now, as part of the application I have a batch job that compares thousands of database records with each other. This job has become too time consuming and needs to be parallelized. I'm looking at using mapreduce and hadoop in order to do this. However, I'm not too sure about how to integrate this into my current architecture. I think the easiest initial solution is to find a way to push data from mysql into hadoop jobs. I have done some initial research on this and found the following relevant information and possibilities: 1) https://issues.apache.org/jira/browse/HADOOP-2536 this gives an interesting overview of some inbuilt JDBC support 2) This article http://architects.dzone.com/articles/tools-moving-sql-database describes some third party tools to move data from mysql to hadoop. To be honest I'm just starting out with learning about hbase and hadoop but I really don't know how to integrate this into my webapp. Any advice is greatly appreciated. cheers, Brian

    Read the article

  • Get rid of wasted/unused space in a JMenu

    - by Trevor Harrison
    In my app, I've got a menu bar with a File menu. In the submenus, each JMenuItem is wasting a lot of white space to the left of the text for a checkbox (I think), even though I'm not including any JCheckBoxMenuItems. I'm seeing lots of other java/swing apps who's menus don't waste this space. How do I do it in my app?

    Read the article

  • jQuery capture all changes to named inpt on a form

    - by Brian M. Hunt
    I'm trying to determine when any of a set of named input/select/radio/checked/hidden fields in a form change. In particular, I'd like to capture when any changes are made to fields matching jQuery's selector $("form :input"), and where that input is has a name attribute. However, the form isn't static i.e. some of the fields are dynamically added later. My initial thought is to keep track of when new named elements matching :input are added, and then add an event handler, like this: function on_change() { alert("The form element with name " + $(this).attr("name") + " has changed"); } function reg_new_e_handler(input_element) { input_element.change(on_change); } However, I'm quite hopeful I can avoid this with some jQuery magic. In particular, is there a way to register an event handler in jQuery that would handle input elements that match the following: $("form :input").filter( function () { $(this).attr("name") } ).change(on_change); However, have this event set update whenever new input elements are added. I've thought that it may be possible to capture keyup event on the form node with $("form").keyup(on_change), but I'm not so sure how one could capture change events. I'd also like this to capture keyup events. Thank you for reading. Brian

    Read the article

  • How do I use text in one cell to trigger row to be copied on another sheet in Excel?

    - by Brian Eby
    I provide all of the cut lists for our cabinet manufacturing in Excel. I tally all parts for the entire job on the first worksheet in an Excel file, and then filter the rows based on the "Material" column, and manually copy/paste each row in to its own material-specific worksheet (example: I filter "Materials" column for "Maple Ply", and then copy all "Maple Ply" rows to the "Maple Ply" worksheet). Then the material specific worksheets are sent to the shop floor for cutting. This is time consuming, and if I need to change any data in the first page, I have to go and manually update the copied row in its material-specific page. Is there any way to make each material page "look" for its material, and automatically populate itself with any row that has the appropriate material in the material column (example: any time I enter "Maple Ply" in the material column of sheet one, that row is automatically copied to the "Maple Ply" worksheet)? If so, could this link be dynamic, rather than just a copy, so that if I change a cell in a particular row on sheet one, that data is also updated on the material-specific worksheet copy? Thank you, Brian

    Read the article

  • Good way to capture/replay sessions from Apache Log?

    - by Mark Harrison
    For performance testing, I would like to capture some traffic from a production server and use that as a basis to replay the request to a test server in order to simulate a realistic load in our development environment. These are all stateless queries, so no issues regarding cookies, sessions, etc. The Apache log timestamps everything down to a 1 second resolution, but that's not fine enough granularity for our peak times. What's the best way to capture more fine-grained timestamps for replay? And is there some ab-like load generating program that can use this data to replicate load?

    Read the article

  • Reading a large file into Perl array of arrays and manipulating the output for different purposes

    - by Brian D.
    Hello, I am relatively new to Perl and have only used it for converting small files into different formats and feeding data between programs. Now, I need to step it up a little. I have a file of DNA data that is 5,905 lines long, with 32 fields per line. The fields are not delimited by anything and vary in length within the line, but each field is the same size on all 5905 lines. I need each line fed into a separate array from the file, and each field within the line stored as its own variable. I am having no problems storing one line, but I am having difficulties storing each line successively through the entire file. This is how I separate the first line of the full array into individual variables: my $SampleID = substr("@HorseArray", 0, 7); my $PopulationID = substr("@HorseArray", 9, 4); my $Allele1A = substr("@HorseArray", 14, 3); my $Allele1B = substr("@HorseArray", 17, 3); my $Allele2A = substr("@HorseArray", 21, 3); my $Allele2B = substr("@HorseArray", 24, 3); ...etc. My issues are: 1) I need to store each of the 5905 lines as a separate array. 2) I need to be able to reference each line based on the sample ID, or a group of lines based on population ID and sort them. I can sort and manipulate the data fine once it is defined in variables, I am just having trouble constructing a multidimensional array with each of these fields so I can reference each line at will. Any help or direction is much appreciated. I've poured over the Q&A sections on here, but have not found the answer to my questions yet. Thanks!! -Brian

    Read the article

  • Add multiple entities to Javascript namespace from different files

    - by Brian M. Hunt
    Given a namespaces ns used in two different files: abc.js ns = ns || (function () { foo = function() { ... }; return { abc : foo }; }()); def.js // is this correct? ns = ns || {} ns.def = ns.def || (function () { defoo = function () { ... }; return { deFoo: defoo }; }()); Is this the proper way to add def to the ns to a namespace? In other words, how does one merge two contributions to a namespace in javascript? If abc.js comes before def.js I'd expect this to work. If def.js comes before abc.js I'd expect ns.abc to not exist because ns is defined at the time. It seems there ought to be a design pattern to eliminate any uncertainty of doing inclusions with the javascript namespace pattern. I'd appreciate thoughts and input on how best to go about this sort of 'inclusion'. Thanks for reading. Brian

    Read the article

  • Add centered text to the middle of a <hr/>-like line

    - by Brian M. Hunt
    I'm wondering what options one has in xhtml 1.0 strict to create a line on both sides of text like-so: Section one ----------------------- Next section ----------------------- Section two I've thought of doing some fancy things like this: <div style="float:left; width: 44%;"><hr/></div> <div style="float:right; width: 44%;"><hr/></div> Next section Or alternatively, because the above has problems with alignment (both vertical and horizontal): <table><tr> <td style="width:47%"><hr/></td> <td style="vertical-align:middle; text-align: center">Next section</td> <td style="width:47%"><hr/></td> </tr></table> However both options feel 'fudgy', and I'd be much obliged if you happened to have seen this before and know of an elegant solution. Thank you for reading. Brian

    Read the article

  • Python: Best way to check for Python version in program that uses new language features?

    - by Mark Harrison
    If I have a python script that requires at least a particular version of python, what is the correct way to fail gracefully when an earlier version of python is used to launch the script? How do I get control early enough to issue an error message and exit? For example, I have a program that uses the ternery operator (new in 2.5) and "with" blocks (new in 2.6). I wrote a simple little interpreter-version checker routine which is the first thing the script would call ... except it doesn't get that far. Instead, the script fails during python compilation, before my routines are even called. Thus the user of the script sees some very obscure synax error tracebacks - which pretty much require an expert to deduce that it is simply the case of running the wrong version of python. update I know how to check the version of python. The issue is that some syntax is illegal in older versions of python. Consider this program: import sys if sys.version_info < (2, 4): raise "must use python 2.5 or greater" else: # syntax error in 2.4, ok in 2.5 x = 1 if True else 2 print x When run under 2.4, I want this result $ ~/bin/python2.4 tern.py must use python2.5 or greater and not this result: $ ~/bin/python2.4 tern.py File "tern.py", line 5 x = 1 if True else 2 ^ SyntaxError: invalid syntax (channeling for a coworker)

    Read the article

  • Writing csv files with python with exact formatting parameters

    - by Ben Harrison
    I'm having trouble with processing some csv data files for a project. The project's programmer has moved onto greener pastures, and now I'm trying to finish the data analysis up (I did/do the statistical analysis.) The programmer suggested using python/csv reader to help break down the files, which I've had some success with, but not in a way I can use. This code is a little different from what I was trying before. I am essentially attempting to create an array. In the raw data format, the first 7 rows contain no data, and then each column contains 50 experiments, each with 4000 rows, for 200000 some rows total. What I want to do is take each column, and make it an individual csv file, with each experiment in its own column. So it would be an array of 50 columns and 4000 rows for each data type. The code here does break down the correct values, I think the logic is okay, but it is breaking down the opposite of how I want it. I want the separators without quotes (the commas and spaces) and I want the element values in quotes. Right now it is doing just the opposite for both, element values with no quotes, and the separators in quotes. I've spent several hours trying to figure out how to do this to no avail, import csv ifile = open('00_follow_maverick.csv') epistemicfile = open('00_follower_maverick_EP.csv', 'w') reader = csv.reader(ifile) colnum = 0 rownum = 0 y = 0 z = 8 for column in reader: rownum = 4000 * y + z for element in column: writer = csv.writer(epistemicfile) if y <= 50: y = y + 1 writer.writerow([element]) writer.writerow(',') rownum = x * y + z if y > 50: y = 0 z = z + 1 writer.writerow(' ') rownum = x * y + z if z >= 4008: break What is going on: I am taking each row in the raw data file in iterations of 4000, so that I can separate them with commas for the 50 experiments. When y, the experiment indicator here, reaches 50, it resets back to experiment 0, and adds 1 to z, which tells it which row to look at, by the formula of 4000 * y + z. When it completes the rows for all 50 experiments, it is finished. The problem here is that I don't know how to get python to write the actual values in quotes, and my separators outside of quotes. Any help will be most appreciated. Apologies if this seems a stupid question, I have no programming experience, this is my first attempt ever. Thank you.

    Read the article

  • Using ARIMA to model and forecast stock prices using user-friendly stats program

    - by Brian
    Hi people, Can anyone please offer some insight into this for me? I'm coming from a functional magnetic resonance imaging research background where I analyzed a lot of time series data, and I'd like to analyze the time series of stock prices (or returns) by: 1) modeling a successful stock in a particular market sector and then cross-correlating the time series of this historically successful stock with that of other newer stocks to look for significant relationships; 2) model a stock's price time series and use forecasting (e.g., exponential smoothing) to predict future values of it. I'd like to use non-linear modeling methods (ARIMA and ARCH) to do this. Several questions: How often do ARIMA and ARCH modeling methods (given that the individual who implements them does so accurately) actually fit the stock time series data they target, and what is the optimal fit I can expect? Is the extent to which this model fits the data commensurate with the extent to which it predicts this stock time series' future values? Rather than randomly selecting stocks to compare or model, if profit is my goal, what is an efficient approach, if any, to selecting the stocks I'm going to analyze? Which stats program is the most user-friendly for this? Any thoughts on this would be great and would go a long way for me. Thanks, Brian

    Read the article

  • Berkeley DB: btree prefix comparison for directory-like keys?

    - by Mark Harrison
    I'm going to index a BDB with keys that look a lot like directory paths ('/foo/bar', '/foo/baz', etc, with levels of slashes generally < 10). Does anybody have any experience with using a Btree prefix comparison routine[1] for this? Are the savings worthwhile? Any references to experience papers on this subject? [1] http://www.stanford.edu/class/cs276a/projects/docs/berkeleydb/ref/am_conf/bt_prefix.html

    Read the article

  • Our GUI Situation

    - by shawn-harrison
    These days, any decent Windows desktop application must perform well and look good under the following conditions: 1) XP and Vista and Windows 7. 2) 32 bit and 64 bit. 3) With and without Themes. 4) With and without Aero. 5) At 96 and 120 and perhaps custom DPIs. 6) One or more monitors (screens). 7) Each OS has it's own preferred Font. Oh My! What is a lowly little Windows desktop application developer to do :(. I'm hoping to get a thread started with suggestions on how to deal with this Gui dilemma. First off, I'm on Delphi 7. a) Does Delphi 2010 bring anything new to the table to help with this situation? b) Should we pick an aftermarket component suite and rely on them to solve all these problems? c) Should we go with an aftermarket skinning engine? d) Perhaps a more html type gui is the way to go. Can we make a relatively complex gui app with html that doesn't require using a browser? (prefer to keep it form based) e) Should we just knuckle down and code through each one of these scenarios and quit bitching about it? f) And finally, how in the world are we supposed to test all these conditions? thanks, shawnH

    Read the article

  • SQL Design: representing a default value with overrides?

    - by Mark Harrison
    I need a sparse table which contains a set of "override" values for another table. I also need to specify the default value for the items overridden. For example, if the default value is 17, then foo,bar,baz will have the values 17,21,17: table "things" table "xvalue" name stuff name xval ---- ----- ---- ---- foo ... bar 21 bar ... baz ... If I don't care about a FK from xvalue.name - things.name, I could simply put a "DEFAULT" name: table "xvalue" name xval ---- ---- DEFAULT 17 bar 21 But I like having a FK. I could have a separate default table, but it seems odd to have 2x the number of tables. table "xvalue_default" xval ---- 17 table "xvalue" name xval ---- ---- bar 21 I could have a "defaults table" tablename attributename defaultvalue xvalue xval 17 but then I run into type issues on defaultvalue. My operations guys prefer as compact a representation as possible, so they can most easily see the "diff" or deviations from the default. What's the best way to represent this, including the default value? This will be for Oracle 10.2 if that makes a difference.

    Read the article

  • REST/JSON: Should I include a newline after the JSON string?

    - by Mark Harrison
    If I'm returning ["foo"] from a RESTful web query, Which of these is more proper? Will pedantic REST parsing die on the newline? ["foo"]\n (with newline, Content-Length=8) ["foo"] (no newline, Content-Length=7) For easy regression testing I like the form with the newline, but I want to make sure I won't be breaking any application frameworks that might have a more strict view of the REST format.

    Read the article

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