Search Results

Search found 39 results on 2 pages for 'shunting yard'.

Page 1/2 | 1 2  | Next Page >

  • Link’s Yard Sale; Artifacts Up For Sale [Video]

    - by Jason Fitzpatrick
    Link, of the Legend of Zelda fame, has adventured far and wide–so far and wide, in fact, that it’s time to dump out the inventory screen and make room for new things. Masks, boots, a rudder off a trusty ship, it’s all up for grabs at Link’s yard sale. We’d put in an offer on the Double Hookshot–what bit of Legend of Zelda gear would you snatch up at the sale? Dorkly Bits: Link’s Yard Sale How to See What Web Sites Your Computer is Secretly Connecting To HTG Explains: When Do You Need to Update Your Drivers? How to Make the Kindle Fire Silk Browser *Actually* Fast!

    Read the article

  • How can I modify my Shunting-Yard Algorithm so it accepts unary operators?

    - by KingNestor
    I've been working on implementing the Shunting-Yard Algorithm in JavaScript for class. Here is my work so far: var userInput = prompt("Enter in a mathematical expression:"); var postFix = InfixToPostfix(userInput); var result = EvaluateExpression(postFix); document.write("Infix: " + userInput + "<br/>"); document.write("Postfix (RPN): " + postFix + "<br/>"); document.write("Result: " + result + "<br/>"); function EvaluateExpression(expression) { var tokens = expression.split(/([0-9]+|[*+-\/()])/); var evalStack = []; while (tokens.length != 0) { var currentToken = tokens.shift(); if (isNumber(currentToken)) { evalStack.push(currentToken); } else if (isOperator(currentToken)) { var operand1 = evalStack.pop(); var operand2 = evalStack.pop(); var result = PerformOperation(parseInt(operand1), parseInt(operand2), currentToken); evalStack.push(result); } } return evalStack.pop(); } function PerformOperation(operand1, operand2, operator) { switch(operator) { case '+': return operand1 + operand2; case '-': return operand1 - operand2; case '*': return operand1 * operand2; case '/': return operand1 / operand2; default: return; } } function InfixToPostfix(expression) { var tokens = expression.split(/([0-9]+|[*+-\/()])/); var outputQueue = []; var operatorStack = []; while (tokens.length != 0) { var currentToken = tokens.shift(); if (isNumber(currentToken)) { outputQueue.push(currentToken); } else if (isOperator(currentToken)) { while ((getAssociativity(currentToken) == 'left' && getPrecedence(currentToken) <= getPrecedence(operatorStack[operatorStack.length-1])) || (getAssociativity(currentToken) == 'right' && getPrecedence(currentToken) < getPrecedence(operatorStack[operatorStack.length-1]))) { outputQueue.push(operatorStack.pop()) } operatorStack.push(currentToken); } else if (currentToken == '(') { operatorStack.push(currentToken); } else if (currentToken == ')') { while (operatorStack[operatorStack.length-1] != '(') { if (operatorStack.length == 0) throw("Parenthesis balancing error! Shame on you!"); outputQueue.push(operatorStack.pop()); } operatorStack.pop(); } } while (operatorStack.length != 0) { if (!operatorStack[operatorStack.length-1].match(/([()])/)) outputQueue.push(operatorStack.pop()); else throw("Parenthesis balancing error! Shame on you!"); } return outputQueue.join(" "); } function isOperator(token) { if (!token.match(/([*+-\/])/)) return false; else return true; } function isNumber(token) { if (!token.match(/([0-9]+)/)) return false; else return true; } function getPrecedence(token) { switch (token) { case '^': return 9; case '*': case '/': case '%': return 8; case '+': case '-': return 6; default: return -1; } } function getAssociativity(token) { switch(token) { case '+': case '-': case '*': case '/': return 'left'; case '^': return 'right'; } } It works fine so far. If I give it: ((5+3) * 8) It will output: Infix: ((5+3) * 8) Postfix (RPN): 5 3 + 8 * Result: 64 However, I'm struggling with implementing the unary operators so I could do something like: ((-5+3) * 8) What would be the best way to implement unary operators (negation, etc)? Also, does anyone have any suggestions for handling floating point numbers as well? One last thing, if anyone sees me doing anything weird in JavaScript let me know. This is my first JavaScript program and I'm not used to it yet.

    Read the article

  • How to scroll programmetically to selected cover in coverflow view ?

    - by hib
    Hi all , I am using a coverflow component for my application . It is working nicely till now . But now I want to scroll to selected cover in coverflow . I am currently doing this : TKCoverView *cover = [self.coverflow coverAtIndex:currentIndex]; CGRect frame = cover.frame ; frame.origin.x = frame.origin.x * 1.2; // **main setting** [self.coverflow bringCoverAtIndexToFront:currentIndex animated:YES]; [self.coverflow scrollRectToVisible:frame animated:YES]; and the cover At index method - (TKCoverView*) coverflowView:(TKCoverflowView*)coverflowView coverAtIndex:(int)index{ TKCoverView *cover = [coverflowView dequeueReusableCoverView]; NSLog(@"Index value :%i",index); if(cover == nil){ cover = [[[TKCoverView alloc] initWithFrame:CGRectMake(0, 0, 224, 300)] autorelease]; // 224 cover.baseline = 224; cover.image = [UIImage imageNamed:@"Placeholder_2.png"]; cover.tag = index; }else { cover.image = ((object *)[array objectAtIndex:index]).appIconNormal; } return cover; and - (TKCoverView*) dequeueReusableCoverView{ if(yard == nil || [yard count] < 1) return nil; TKCoverView *v = [[[yard lastObject] retain] autorelease]; v.layer.transform = CATransform3DIdentity; [yard removeLastObject]; return v; } So can any one tell me what is the perfect and standard way of setting the frame for the scrollRectToVisibleRegion method .

    Read the article

  • Array help needed for unit conversion application

    - by Manolis
    I have a project to do in Visual Basic. My problem is that the outcome is always wrong (ex. instead of 2011 it gives 2000). And i cannot set as Desired unit the Inch(1) or feet(3), it gives the Infinity error. And if i put as Original and Desired unit the inch(1), the outcome is "Not a Number". Here's the code i made so far. The project is about arrays. Any help appreciated. Public Class Form1 Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConvert.Click Dim original(9) As Long Dim desired(9) As Long Dim a As Integer Dim o As Integer Dim d As Integer Dim inch As Long, fathom As Long, furlong As Long, kilometer As Long Dim meter As Long, miles As Long, rod As Long, yard As Long, feet As Long a = Val(Input3.Text) o = Val(Input1.Text) d = Val(Input2.Text) inch& = 0.0833 rod& = 16.5 yard& = 3 furlong& = 660 meter& = 3.28155 kilometer& = 3281.5 fathom& = 6 miles& = 5280 original(1) = inch original(2) = fathom original(3) = feet original(4) = furlong original(5) = kilometer original(6) = meter original(7) = miles original(8) = rod original(9) = yard desired(1) = inch desired(2) = fathom desired(3) = feet desired(4) = furlong desired(5) = kilometer desired(6) = meter desired(7) = miles desired(8) = rod desired(9) = yard If o < 1 Or o > 9 Or d < 1 Or d > 9 Then MessageBox.Show("Units must range from 1-9.", "Error", _ MessageBoxButtons.OK, _ MessageBoxIcon.Information) Return End If Output.Text = (a * original(o)) / desired(d) End Sub End Class

    Read the article

  • Upgrading Redmine, activerecord-mysql2-adapter not recognized

    - by David Kaczynski
    For upgrading Redmine from 1.0.1 to 2.1.2, I need to execute the command: rake db:migrate RAILS_ENV=production However, doing so produces the following error: rake aborted! Please install the mysql2 adapter: gem install activerecord-mysql2-adapter (mysql2 is not part of the bundle. Add it to Gemfile.) I have ran gem install activerecord-mysql2-adapter, but I still get the same error when I try to run the rake ... command. How do I get my RoR app to recognize that I have the mysql2 adapter installed already? or Is there something wrong with my activerecord-mysql2-adapter installation? Results of sudo bundle install: Using rake (10.0.0) Using i18n (0.6.1) Using multi_json (1.3.7) Using activesupport (3.2.8) Using builder (3.0.0) Using activemodel (3.2.8) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.3) Using actionpack (3.2.8) Using mime-types (1.19) Using polyglot (0.3.3) Using treetop (1.4.12) Using mail (2.4.4) Using actionmailer (3.2.8) Using arel (3.0.2) Using tzinfo (0.3.35) Using activerecord (3.2.8) Using activeresource (3.2.8) Using coderay (1.0.8) Using fastercsv (1.5.5) Using rack-ssl (1.3.2) Using json (1.7.5) Using rdoc (3.12) Using thor (0.16.0) Using railties (3.2.8) Using jquery-rails (2.0.3) Using metaclass (0.0.1) Using mocha (0.12.3) Using mysql (2.8.1) Using net-ldap (0.3.1) Using pg (0.14.1) Using ruby-openid (2.1.8) Using rack-openid (1.3.1) Using bundler (1.2.1) Using rails (3.2.8) Using rmagick (2.13.1) Using shoulda (2.11.3) Using sqlite3 (1.3.6) Using yard (0.8.3) [32mYour bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.[0m Results of sudo find / -name "*mysql2*": /var/lib/gems/1.8/doc/mysql2-0.3.11 /var/lib/gems/1.8/doc/activerecord-3.2.9/ri/ActiveRecord/Base/mysql2_connection-c.ri /var/lib/gems/1.8/doc/activerecord-mysql2-adapter-0.0.3 /var/lib/gems/1.8/doc/activerecord-mysql2-adapter-0.0.3/ri/ActiveRecord/Base/em_mysql2_connection-c.ri /var/lib/gems/1.8/doc/activerecord-mysql2-adapter-0.0.3/ri/ActiveRecord/Base/mysql2_connection-c.ri /var/lib/gems/1.8/gems/mysql2-0.3.11 /var/lib/gems/1.8/gems/mysql2-0.3.11/spec/mysql2 /var/lib/gems/1.8/gems/mysql2-0.3.11/mysql2.gemspec /var/lib/gems/1.8/gems/mysql2-0.3.11/lib/mysql2.rb /var/lib/gems/1.8/gems/mysql2-0.3.11/lib/mysql2 /var/lib/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so /var/lib/gems/1.8/gems/mysql2-0.3.11/ext/mysql2 /var/lib/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/mysql2.so /var/lib/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/mysql2_ext.c /var/lib/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/mysql2_ext.h /var/lib/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/mysql2_ext.o /var/lib/gems/1.8/gems/activerecord-3.2.9/lib/active_record/connection_adapters/mysql2_adapter.rb /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3 /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/activerecord-mysql2-adapter.gemspec /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/arel/engines/sql/compilers/mysql2_compiler.rb /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/activerecord-mysql2-adapter.rb /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/activerecord-mysql2-adapter /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/em_mysql2_adapter.rb /var/lib/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb /var/lib/gems/1.8/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb /var/lib/gems/1.8/cache/mysql2-0.3.11.gem /var/lib/gems/1.8/cache/activerecord-mysql2-adapter-0.0.3.gem /var/lib/gems/1.8/specifications/activerecord-mysql2-adapter-0.0.3.gemspec /var/lib/gems/1.8/specifications/mysql2-0.3.11.gemspec Contents of /usr/share/redmine/Gemfile: source 'http://rubygems.org' gem 'rails', '3.2.8' gem "jquery-rails", "~> 2.0.2" gem "i18n", "~> 0.6.0" gem "coderay", "~> 1.0.6" gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] gem "builder", "3.0.0" # Optional gem for LDAP authentication group :ldap do gem "net-ldap", "~> 0.3.1" end # Optional gem for OpenID authentication group :openid do gem "ruby-openid", "~> 2.1.4", :require => "openid" gem "rack-openid" end # Optional gem for exporting the gantt to a PNG file, not supported with jruby platforms :mri, :mingw do group :rmagick do # RMagick 2 supports ruby 1.9 # RMagick 1 would be fine for ruby 1.8 but Bundler does not support # different requirements for the same gem on different platforms gem "rmagick", ">= 2.0.0" end end # Database gems platforms :mri, :mingw do group :postgresql do gem "pg", ">= 0.11.0" end group :sqlite do gem "sqlite3" end end platforms :mri_18, :mingw_18 do group :mysql do gem "mysql" end end platforms :mri_19, :mingw_19 do group :mysql do gem "mysql2", "~> 0.3.11" end end platforms :jruby do gem "jruby-openssl" group :mysql do gem "activerecord-jdbcmysql-adapter" end group :postgresql do gem "activerecord-jdbcpostgresql-adapter" end group :sqlite do gem "activerecord-jdbcsqlite3-adapter" end end group :development do gem "rdoc", ">= 2.4.2" gem "yard" end group :test do gem "shoulda", "~> 2.11" # Shoulda does not work nice on Ruby 1.9.3 and seems to need test-unit explicitely. gem "test-unit", :platforms => [:mri_19] gem "mocha", "0.12.3" end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") if File.exists?(local_gemfile) puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v` instance_eval File.read(local_gemfile) end # Load plugins' Gemfiles Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file| puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` instance_eval File.read(file) end Contents of /usr/share/redmine/Gemfile.lock: GEM remote: http://rubygems.org/ specs: actionmailer (3.2.8) actionpack (= 3.2.8) mail (~> 2.4.4) actionpack (3.2.8) activemodel (= 3.2.8) activesupport (= 3.2.8) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) rack (~> 1.4.0) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.1.3) activemodel (3.2.8) activesupport (= 3.2.8) builder (~> 3.0.0) activerecord (3.2.8) activemodel (= 3.2.8) activesupport (= 3.2.8) arel (~> 3.0.2) tzinfo (~> 0.3.29) activeresource (3.2.8) activemodel (= 3.2.8) activesupport (= 3.2.8) activesupport (3.2.8) i18n (~> 0.6) multi_json (~> 1.0) arel (3.0.2) builder (3.0.0) coderay (1.0.8) erubis (2.7.0) fastercsv (1.5.5) hike (1.2.1) i18n (0.6.1) journey (1.0.4) jquery-rails (2.0.3) railties (>= 3.1.0, < 5.0) thor (~> 0.14) json (1.7.5) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) metaclass (0.0.1) mime-types (1.19) mocha (0.12.3) metaclass (~> 0.0.1) multi_json (1.3.7) mysql (2.8.1) mysql2 (0.3.11) net-ldap (0.3.1) pg (0.14.1) polyglot (0.3.3) rack (1.4.1) rack-cache (1.2) rack (>= 0.4) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-ssl (1.3.2) rack rack-test (0.6.2) rack (>= 1.0) rails (3.2.8) actionmailer (= 3.2.8) actionpack (= 3.2.8) activerecord (= 3.2.8) activeresource (= 3.2.8) activesupport (= 3.2.8) bundler (~> 1.0) railties (= 3.2.8) railties (3.2.8) actionpack (= 3.2.8) activesupport (= 3.2.8) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) rake (10.0.0) rdoc (3.12) json (~> 1.4) rmagick (2.13.1) ruby-openid (2.1.8) shoulda (2.11.3) sprockets (2.1.3) hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.6) test-unit (2.5.2) thor (0.16.0) tilt (1.3.3) treetop (1.4.12) polyglot polyglot (>= 0.3.1) tzinfo (0.3.35) yard (0.8.3) PLATFORMS ruby DEPENDENCIES activerecord-jdbcmysql-adapter activerecord-jdbcpostgresql-adapter activerecord-jdbcsqlite3-adapter builder (= 3.0.0) coderay (~> 1.0.6) fastercsv (~> 1.5.0) i18n (~> 0.6.0) jquery-rails (~> 2.0.2) jruby-openssl mocha (= 0.12.3) mysql mysql2 (~> 0.3.11) net-ldap (~> 0.3.1) pg (>= 0.11.0) rack-openid rails (= 3.2.8) rdoc (>= 2.4.2) rmagick (>= 2.0.0) ruby-openid (~> 2.1.4) shoulda (~> 2.11) sqlite3 test-unit yard Results of gem list: actionmailer (3.2.9, 3.2.8) actionpack (3.2.9, 3.2.8) activemodel (3.2.9, 3.2.8) activerecord (3.2.9, 3.2.8) activerecord-mysql2-adapter (0.0.3) activeresource (3.2.9, 3.2.8) activesupport (3.2.9, 3.2.8) arel (3.0.2) builder (3.0.0) bundler (1.2.1) coderay (1.0.8) erubis (2.7.0) fastercsv (1.5.5) hike (1.2.1) i18n (0.6.1) journey (1.0.4) jquery-rails (2.0.3) json (1.7.5) mail (2.4.4) metaclass (0.0.1) mime-types (1.19) mocha (0.12.3) multi_json (1.3.7) mysql (2.8.1) mysql2 (0.3.11) net-ldap (0.3.1) pg (0.14.1) polyglot (0.3.3) rack (1.4.1) rack-cache (1.2) rack-openid (1.3.1) rack-ssl (1.3.2) rack-test (0.6.2) rails (3.2.9, 3.2.8) railties (3.2.9, 3.2.8) rake (10.0.0) rdoc (3.12) rmagick (2.13.1) ruby-openid (2.1.8) shoulda (2.11.3) sprockets (2.2.1, 2.1.3) sqlite3 (1.3.6) thor (0.16.0) tilt (1.3.3) treetop (1.4.12) tzinfo (0.3.35) yard (0.8.3) Results of 'bundle show`: Gems included by the bundle: * actionmailer (3.2.8) * actionpack (3.2.8) * activemodel (3.2.8) * activerecord (3.2.8) * activeresource (3.2.8) * activesupport (3.2.8) * arel (3.0.2) * builder (3.0.0) * bundler (1.2.1) * coderay (1.0.8) * erubis (2.7.0) * fastercsv (1.5.5) * hike (1.2.1) * i18n (0.6.1) * journey (1.0.4) * jquery-rails (2.0.3) * json (1.7.5) * mail (2.4.4) * metaclass (0.0.1) * mime-types (1.19) * mocha (0.12.3) * multi_json (1.3.7) * mysql (2.8.1) * net-ldap (0.3.1) * pg (0.14.1) * polyglot (0.3.3) * rack (1.4.1) * rack-cache (1.2) * rack-openid (1.3.1) * rack-ssl (1.3.2) * rack-test (0.6.2) * rails (3.2.8) * railties (3.2.8) * rake (10.0.0) * rdoc (3.12) * rmagick (2.13.1) * ruby-openid (2.1.8) * shoulda (2.11.3) * sprockets (2.1.3) * sqlite3 (1.3.6) * thor (0.16.0) * tilt (1.3.3) * treetop (1.4.12) * tzinfo (0.3.35) * yard (0.8.3)

    Read the article

  • What are known approaches to graphing algebraic expressions?

    - by jeremynealbrown
    I am planning to build an expression parser that will be used to graph algebraic functions ( think TI-83 ) with JavaScript. Functions will take the form of f(x)= Aside from typical operators such as: + - * / ^ I'd also like to add support for inline functions such as: sin(), cos(), log() and random(). I have looked at implementing the Shunting Yard algorithm for parsing expressions, but it does not look like an efficient approach to evaluating a function with a hundreds or thousands of inputs. What other known algorithms exist for this task?

    Read the article

  • Is there a way to launch a command within a proper zsh shell ?

    - by Wam
    I'm not really clear with my question here, let me rephrase it : I've setup a launch_workspace.sh to launch directly tmux with 5 different commands loaded. Here is my current content : #!/bin/sh tmux new-session -d -s scube -n 'vim' "vim" tmux new-window -t scube:2 -n 'server' "$SHELL -c 'script/rails server'" tmux new-window -t scube:3 -n 'yard' "$SHELL -c 'bundle exec yard server --gems'" tmux new-window -t scube:4 -n 'spork' "$SHELL -c 'bundle exec guard'" tmux new-window -t scube:5 -n 'autotest' "$SHELL -c 'bundle exec autotest'" tmux new-window -t scube:5 -n 'shell' "$SHELL" tmux select-window -t scube:1 tmux -2 attach-session -t scube Problem is : my zsh ($SHELL beeing zsh) launches said commands, but when I Ctrl+C any of these, it closes the full zsh (hence my tmux window) and not just return to a proper zsh prompt. Is there a way to have said behavior, to launch zsh with a command and return to a zsh prompt when the command fails ? Cheers

    Read the article

  • What's wrong in this C program..? [closed]

    - by AGeek
    struct bucket { int nStrings; //No. of Strings in a Bucket. char strings[MAXSTRINGS][MAXWORDLENGTH]; // A bucket row can contain maximum 9 strings of max string length 10. };//buck[TOTBUCKETS]; void lexSorting(char array[][10], int lenArray, int symb) //symb - symbol, sorting based on character symbols. { int i, j; int bucketNo; int tBuckNStrings; bucket buck[TOTBUCKETS]; for(i=0; i<lenArray; i++) { bucketNo = array[i][symb] - 'a'; // Find Bucket No. in which the string is to be placed. tBuckNStrings = buck[bucketNo].nStrings; // temp variable for storing nStrings var in bucket structure. strcpy(buck[bucketNo].strings[tBuckNStrings],array[i]); // Store the string in its bucket. buck[bucketNo].nStrings = ++tBuckNStrings; //Increment the nStrings value of the bucket. } // lexSorting(array, lenArray, ++symb); printf("****** %d ******\n", symb); for(i=0; i<TOTBUCKETS; i++) { printf("%c = ", i+'a'); for(j=0; j<buck[i].nStrings; j++) printf("%s ",buck[i].strings[j]); printf("\n"); } } int main() { char array[][10] = {"able","aback","a","abet","acid","yawn","yard","yarn","year","yoke"}; int lenArray = 10; int i; printf("Strings: "); for(i=0; i<lenArray; i++) printf("%s ",array[i]); printf("\n"); lexSorting(array, lenArray, 0); } Well here is the complete code, that I am trying. since its been a long time since i have touched upon C programming, so somewhere i am making mistake in structure declaration. The problem goes here:- 1) I have declared a structure above and its object as array(buck[]). 2) Now when I declare this object array along with the structure, it works fine.. I have commented this thing right now. 3) But when I declare this object array inside the function.. because ultimately i have to declare inside function( as i need to build a recursive program, where objects will be created in very recursive call) then the program is throwing segmentation fault. Expected Output > [others@centos htdocs]$ ./a.out > Strings: able aback a abet acid yawn > yard yarn year yoke > ****** 0 ****** > a = able aback a abet acid > b = > c > . > . > y = yawn yard yarnyear yoke > z = Actual Output [others@centos htdocs]$ ./a.out Strings: able aback a abet acid yawn yard yarn year yoke Segmentation fault I have no idea, what difference I made in this. Kindly help. Thanks.

    Read the article

  • Can it be a good idea to lease a house rather than a standard office-space for a software development shop? [closed]

    - by hamlin11
    Our lease is up on our US-based office-space in July, so it's back on my radar to evaluate our office-space situation. Two of our partners rather like the idea of leasing a house rather than standard office-space. We have 4 partners and one employee. I'm against the idea at this moment in time. Pros, as I see them Easier to get a good location (minimize commutes) All partners/employees have dogs. Easier to work longer hours without dog-duties pulling people back home More comfortable bathroom situation Residential Internet Rate Control of the thermostat Clients don't come to our office, so this would not change our image The additional comfort-level should facilitate a significantly higher-percentage of time "in the zone" for programmers and artists. Cons, as I see them Additional bills to pay (house-cleaning, yard, util, gas, electric) Additional time-overhead in dealing with bills (house-cleaning, yard, util, gas, electric) Additional overhead required to deal with issues that maintenance would have dealt with in a standard office-space Residential neighbors to contend with The equation starts to look a little nasty when factoring in potential time-overhead, especially on issues that a maintenance crew would deal with at a standard office complex. Can this be a good thing for a software development shop?

    Read the article

  • Dijkstra’s algorithms - a complete list

    - by baris_a
    Hi guys, I have recently asked a question about one of the Dijkstra’s algorithms. But, almost everyone thought it was shortest path. Therefore, I opened this post to gather all the algorithms that were invented by Dijkstra. Please add any if you know. Thanks in advance. 1 ) Shunting-yard algorithm

    Read the article

  • What scalability problems have you solved using a NoSQL data store?

    - by knorv
    NoSQL refers to non-relational data stores that break with the history of relational databases and ACID guarantees. Popular open source NoSQL data stores include: Cassandra (tabular, written in Java, used by Facebook, Twitter, Digg, Rackspace, Mahalo and Reddit) CouchDB (document, written in Erlang, used by Engine Yard and BBC) Dynomite (key-value, written in C++, used by Powerset) HBase (key-value, written in Java, used by Bing) Hypertable (tabular, written in C++, used by Baidu) Kai (key-value, written in Erlang) MemcacheDB (key-value, written in C, used by Reddit) MongoDB (document, written in C++, used by Sourceforge, Github, Electronic Arts and NY Times) Neo4j (graph, written in Java, used by Swedish Universities) Project Voldemort (key-value, written in Java, used by LinkedIn) Redis (key-value, written in C, used by Engine Yard, Github and Craigslist) Riak (key-value, written in Erlang, used by Comcast and Mochi Media) Ringo (key-value, written in Erlang, used by Nokia) Scalaris (key-value, written in Erlang, used by OnScale) ThruDB (document, written in C++, used by JunkDepot.com) Tokyo Cabinet/Tokyo Tyrant (key-value, written in C, used by Mixi.jp (Japanese social networking site)) I'd like to know about specific problems you - the SO reader - have solved using data stores and what NoSQL data store you used. Questions: What scalability problems have you used NoSQL data stores to solve? What NoSQL data store did you use? What database did you use before switching to a NoSQL data store? I'm looking for first-hand experiences, so please do not answer unless you have that.

    Read the article

  • How to set 2 conditions / criterias for VLOOKUP / LOOKUP / etc in OpenOffice Calc (or Excel)

    - by MestreLion
    I have this spreadsheet that started as a silly aid for a game (Mafia Wars 2), but grew into a tricky spreadsheet question. In the game your character have 9 "slots" for weapons and armors, 1 for each "type": Light Weapon, Heavy Weapon, Body Armor, Head Armor, etc. So I made a list of all weapons and armors available in the game, 1 item per row. Example: SHOP ITEM TYPE ITEM NAME ATK DEF PRICE EQUIPPED? Marketplace Weapon Light Konrad Knife 16 5 5.500 Marketplace Weapon Light Ice Queen 19 6 8.200 Marketplace Armor Body Up Layered Polym 0 31 8.600 Marketplace Armor Body Up Full Shield 7 42 17.650 Marketplace Weapon Heavy Konrad Bullpup 53 25 24.500 Marketplace Weapon Heavy Full Moon Blow 73 12 24.500 x Marketplace Armor Body Low Knee Pads 17 26 14.200 x Marketplace Armor Body Low Army Boots 15 55 24.500 Bone Yard Weapon Light Bone Launcher 41 2 9.400 x Neon Strip Vehicle Ground Supercharged 41 34 24.500 Dead End Weapon Heavy Sharp Sickle 21 5 24.500 Dead End Armor Body Low Unholy Boots 5 36 15.000 Dead End Armor Head Hockey Mask 5 18 15.900 x Last columns is an indication of the items i have already bought and equipped (marked with "x"). What I need is a formula that, for each "slot" (item type), returns info related to the item of that kind that I am using. That would be: ITEM TYPE SHOP NAME ITEM NAME ATK DEF PRICE Weapon Light Bone Yard Bone Launcher 41 2 9.400 Weapon Heavy Marketplace Full Moon Blow 73 12 24.500 Weapon Special -- -- -- -- -- Armor Body Up -- -- -- -- -- Armor Body Low Marketplace Knee Pads 17 26 14.200 Armor Head Dead End Hockey Mask 5 18 15.900 Vehicle Ground -- -- -- -- -- Vehicle Water -- -- -- -- -- Vehicle Air -- -- -- -- -- The item types are fixed, so they can be hard coded. Each row for an item type. So, for 1st result line, it would return data from the row where both 2nd column is "Weapon Light" and last column is "x". Basically I need a LOOKUP (or VLOOKUP, or anything else) that uses 2 criteria to find a given row, the item type and the X marker. Question is: HOW? I am using OpenOffice Calc 3.2.1, but since it shares so many functions with MS Excel, answers for Excel are also fine (as long as it only uses regular formulas, no VBScript or Macros or VBA etc) Last but not least, suggestions / solutions for rearranging the data so it makes this problem easier to solve are also welcome. Thanks!

    Read the article

  • On-demand managed hosting

    - by obvio171
    I've seen offerings such as VPSs (Linode, Rackspace Cloud), which are very cheap but you're on your own, and managed hosting (Engine Yard, Rackspace), which are very expensive but they do all the system administration for you, in some cases even writing your deploy scripts. Is there any kind of middle-ground option where I don't have to pay the huge flat rate for the management, but can still request specific sysadmin tasks to be carried out and pay on an hourly basis?

    Read the article

  • Catering for client's web-hosting needs, minus the headaches ?

    - by julien
    I'll be trying to sell my Ruby on Rails development skills to small local businesses. It seems I'd be shooting myself in the foot if I couldn't manage to put their apps into production, in fact catering for this would be a selling point. However, I do not want to bill every client monthly for the cost of their hosting, they would have to be the contract holders with the hosting service, and I'd only consult if they needed technical help when scaling. I've looked on one hand at cloud platforms, like engine yard, which seem like they would be too costly for the smaller clients, and on the other hand at vps providers which seem they would not be client friendly enough. Has anyone faced the same issue and come up with a decent solution ?

    Read the article

  • Sortie de la version 1.5 de JRuby avec une amélioration du support sous Windows

    Bonjour, La semaine dernière est sortie la version 1.5 de JRuby, version à laquelle ont contribué pas moins de 30 développeurs Open Source. Parmi les 4 core developpers, 3 font partie de la société Engine Yard. Les avancées principales pour cette version sont :Meilleure intégration avec les librairies Java (gestion mémoire et CPU plus efficace) Amélioration de la compatibilité avec Ruby (Ruby 1.8.7) Amélioration du support pour Windows (les nombreux problèmes qui rendait son utilisation sous Windows compliquée ont été traités) Pour les développeurs Java, il est également à noter de meilleures intégration avec Ant et Maven. Qui utilise régulièrement JRuby, et dans quel cadre ?

    Read the article

  • Rubygems on netbeans driving me crazy!

    - by Knights22
    I cant understand why Gems fetching failed, it was always working fine, i can't figure out how to solve this, hopefully somebody can help. Its driving me Crazy. Error: See troubleshooting section in http://wiki.netbeans,org/RubyGems for hep. Follows output of the gem tool: Error: while executing gem.....(Gem::RemoteFetcher::FetchError) bad response Forbidden 403 (http://production.s3.rubygems.org/quick/Marshal.4.8/yard-defaultreturn-1.0.0.gemspec.rz)

    Read the article

  • Apple Airport Express, Extreme and Time Capsules, BT Home Hub, Wireless Extenders confusion

    - by Jamie Hartnoll
    I post quite frequently in Stack Overflow, but use Superuser less frequently. Mainly as I don't change hardware often and rarely have software issues! I live in a small stone cottage, and have an office in a separate building across a yard. I have a BT Homehub which is located in the cottage and a series of Ethernet cables running across the yard to the office. This is fine for my wired stuff. My main office computers are PCs running Windows 7 Ultimate, and one on Win7 Home, all working fine. I also have an old laptop on Win XP which works fine wirelessly in the house for those evenings in front of the TV catching up on a bit of work. I also have an iPhone and an iPad. Recently, I have been trying to get WiFi in the office so I can use Adobe Shadow (or whatever it now is!) to improve mobile web development efficiency using my iPhone and iPad, so I bought this: http://www.ebuyer.com/393462-zyxel-wre2205-500mbps-powerline-wireless-n300-range-extender-wre2205-gb0101f Thinking that would be lovely just plugged into the socket by the door in the office, extending the perimeter of the WiFi from my Homehub. I can't get it to work properly! If I plug a laptop into its ethernet port I can get it to connect to the Homehub and give me a kinda of wired, wireless extender. If, however, I plug the ethernet port into my home hub, it then seems to extend the network, but only my iOs devices work, and all my wired stuff stops working, and seems to create an infinite loop where windows connects to my homehob, and then rather to the internet, it then connects back to the extender thing. Anyway... in the meantime, I took a fatal trip to the Apple Store, where I purchased an Airport Express... solely for the purpose of hooking my iOs devices up as wireless music players in the house. I knew it had WiFi, but didn't want to use that part as an extender, I didn't think it would work on a Homehub anyway. It doesn't work on a Homehub! I now have a new wireless network in the house, which, when anything connects to it cannot connect to the Internet, so it works ONLY as a wireless music player. I then borrowed some Powerline Adaptors from someone and realised that this whole thing was getting totally out of control! It seems all the technology is out there but it's so complicated to get the right series of devices. To further add to the confusion, I wouldn't mind a network hard drive. I bought one that broke and lost everything, so now we're on to looking at the Apple Time Capsules. So my question is... IF... I buy an Apple Time Capsule, can I: Hook that up to my Homehub, leaving the homehub connected to the Internet so my Hub phones still work, then disable wireless on the homehub Link up my Airport Express to the Time Capsule PROPERLY so it will connect to the Internet Do the above with an Apple TV box should I buy one in future Use the Time Capsule as a network hard drive to store video and music that can be viewed/listened to via my iOS devices/Apple TV/Aiport Express anywhere even with my main PC off (this currently stores all this data) Hope that the IOS devices like the WiFi from the TimeCapsule better than the Homehub and work without extension, or buy another Airport Express to get WiFI in the office. Or... should I buy an Airport Extreme and use a USB hard drive for the network drive?

    Read the article

  • Can someone explain the fascination with twitter.com? [closed]

    - by raven
    I don't get it. WTF do people see in this? I'm trying to figure it out, but I can't. Have you seen what people post? Let's use Jeff Atwood as an example. What does he gain by posting (with disturbing frequency) all those, well... posts (I find the term "tweets" disgusting). What is a "follower" supposed to get from these posts? I know many of you are thinking, "Just don't use it!". Yes, I know I don't have to use it, but it's like asking me not to look at the space shuttle that just crashed in my front yard. The rest of the world thinks it's the greatest thing since sliced bread. I'm just trying to understand what people see in it.

    Read the article

  • Real Excel Templates 1.5

    - by Tim Dexter
    Not the next installment quite yet, just an update from what I knew yesterday. Right after I posted the Real Excel Templates I. Mike from the PM team got in touch to say he and Shirley had just had a meeting with a customer about the Excel Templates and all the fab features. He included BIPs extended functions, data pre-processing, sub templates and other functionality which was great new news. One caveat, much of the really new stuff, is not quite out in the wild yet. Will let you know as soon as I know more. Shirley and I shared a conversation around being able to re-group data in the templates. It's one of the most powerful features of the RTF template. Providing the ultimate flexibility in layouts. As I wrote yesterday, you need hierarchical data for Excel templates. I stand corrected, 'Of course you can do that in Excel, here's an example' said Shirley 'Very cunning Shirley, very cunning' says I. You can basically use the hidden sheet to re-group the data using native XSL. I'll cover the 'how' later. As you can see Excel templates are the new 'black' with lots of attention and more importantly development cycles to take them forward. Looks like we are going to have a great weekend weather wise here in Colorado. The yard work and pond are beckoning. Maybe the trout will be rising and I can give my rusty fly casting skills a run for their money. I need some stupid fish thou :0) See ya'll next week!

    Read the article

  • My Big Break - this is my story and I am sticking to it ;)

    - by dbasnett
    The value of undertaking new and difficult tasks can have many wonderful consequences, don't you agree? Here is the story of my big break. Remember yours? During the mid 70's I was in the Navy and worked as a computer operator at the CNO's Command and Control computer system (WWMCCS) in the Washington Navy Yard. I was a tape ape, but knew that I wanted to be a systems programmer. One day the Lieutenant in charge of the OS group was running a test that required the development system to be re-booted, and I was politely hinting that I wanted out of computer operations. As he watched the accounting tape rewind to BOT and then search for where it had just been (severalminutes) he told me if I would fix "that" he would have me transferred. I couldn't say "Deal" fast enough. Up until then my programming experience had been on Edsger Dijkstra's favorite computer (sic), an IBM 1620. It took almost 6 months of learning the assembler for the Honeywell 6000 and finding the code responsible for rewinding the tape and then forwarding it. After much trial and error at o’dark thirty I succeeded. The tape barely moved and my “patch” was later adopted by many other sites. Lieutenant Jack Cowan kept his promise and I have gone on to have a varied and enjoyable career. To Jack, and the rest of the crew (Ken, Stu, Neil, Tom, Silent W, Mr. Jacobs, Roy, Rocco, etc.) I’d like to thank you all.

    Read the article

  • How do I backup my customer's data?

    - by marcamillion
    If you run a SaaS app, or work on one, I would love to hear from you. Where the safety and security of your customer's data is paramount, how do you secure it and back it up? I would love to know your main host (e.g. Heroku, Engine Yard, Rackspace, MediaTemple, etc.) and who you use for your backup. Be as detailed as possible - e.g. a quick overview of your service and the data you store (images for instance), what happens with the images when the user uploads them (e.g. they go to your Linode VPS, and posted to the site for them to see - then they are automatically sent to AWS or wherever, then once a week they are backed up to tape by the managed hosting provider, and you also back them up to your house/office). If you could also give some idea as to what the unit cost (per GB/per user/per month) of storage is - on average, I would really appreciate that. Getting ready to launch my app, and I would love to get some more perspective on the nitty gritty details involved. Thanks!

    Read the article

1 2  | Next Page >