Daily Archives

Articles indexed Friday June 18 2010

Page 12/76 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • testing helpers with 'haml_tag'

    - by crankharder
    module FooHelper def foo haml_tag(:div) do haml_content("bar") end end end When I test this I get: NoMethodError: undefined method `haml_tag' This code is perfectly valid and works in a development/production environment. It's something to do with having the haml helpers properly loaded in the test environment. Thanks!

    Read the article

  • Lollipop notation in Rational Software Architect

    - by mfrank
    Hi, I am using IBM Rational® Software Architect™ for WebSphere® Software Version: 7.5.2. In a component diagram I would really like to use the lollipop notation and not the stereotyped interface notation for a provided interface part. Any tips if this is possible in RSA? BR /M

    Read the article

  • NPR GLSL Tutorials

    - by anon
    Anyone have a good list of tutorials on doing Non photo realistic rendering with GLSL ? I have seen books on GLSL, and books on NPR, but very few books/tutorials on doing NPR with GLSL. (I want to do it with GLSL as I want real time). Thanks!

    Read the article

  • Haskell Input Return Tuple

    - by peterwkc
    Hello to all, i wonder can a IO() function return tuple because i would like to get these out of this function as input for another function. investinput :: IO()->([Char], Int) investinput = do putStrLn "Enter Username : " username <- getLine putStrLn "Enter Invest Amount : " tempamount <- getLIne let amount = show tempamount return (username, amount) Please help. Thanks.

    Read the article

  • python: sending information between two scripts

    - by Peter
    I have two Python scripts in two different locations and cannot be moved. What is the best way to send information between the two scripts? say for example in script1.py i had a string e.g. x = 'teststring' then i need variable 'x' passed to script2.py, which saves the variable 'x' to a text file? Any ideas?

    Read the article

  • How to map old paths to Drupal paths

    - by kidrobot
    I'm converting a Wordpress blog to Drupal and need to map the WP paths to the new Drupal ones. What's the best practice for doing this? There are only around a hundred pages to map. I've been experimenting with the URL Alter module, which provides an alternative to messing with custom_url_rewrite functions settings.php but keep getting 404. Waiting to hear back from the module maintainer if this is what the module is intended for. In the meantime I am wondering how others do this? Should I be using .htaccess?

    Read the article

  • How to file split at a line number

    - by superspace
    I want to split a 400k line long log file from a particular line number. For this question, lets make this an arbitrary number 300k. Is there a linux function that allows me to do this? I know split lets me split the file in equal parts either by size or line numbers but that's not what I want. I want to the first 300k in one file and the last 100k in the second file. Any help would be appreciated. Thanks!

    Read the article

  • Visual Studio 2010 and WinCE 5.0

    - by koloko
    Is it possible to use a platform builder 5.0 SDK in visual studio 2010 for a C++ project. I want to compile code for a specific ARM WinCE 5.0 environment and I have VS2010 at the moment. The Microsoft website recommends visual studio 2005. I'm currently downloading the VS2005 evaluation but I'm also a bit worried about installing this on a machine that already has vs2010 installed. Any advise would be greatly received.

    Read the article

  • Function that creates a timestamp in c#

    - by Konstantinos
    Hi there, I was wondering, is there a way to create a timestamp in c# from a datetime? I need a millisecond precision value that also works in Compact Framework(saying that since DateTime.ToBinary() does not exist in CF). My problem is that i want to store this value in a database agnostic way so i can sortby it later and find out which value is greater from another etc.

    Read the article

  • What Language is This?

    - by bobber205
    Going through some example code sent to me and honestly, I have no idea what language this is def uniqify(arr): b = {} for i in arr: b[i] = 1 return b.keys() Is it Python? I am also curious what keys() does. It's obvious it returns an array but what does it do the array that calls the function? :P

    Read the article

  • Replace beginning words(SQL SERVER 2005, SET BASED)

    - by Newbie
    I have the below tables. tblInput Id WordPosition Words -- ----------- ----- 1 1 Hi 1 2 How 1 3 are 1 4 you 2 1 Ok 2 2 This 2 3 is 2 4 me tblReplacement Id ReplacementWords --- ---------------- 1 Hi 2 are 3 Ok 4 This The tblInput holds the list of words while the tblReplacement hold the words that we need to search in the tblInput and if a match is found then we need to replace those. But the problem is that, we need to replace those words if any match is found at the beginning. i.e. in the tblInput, in case of ID 1, the words that will be replaced is only 'Hi' and not 'are' since before 'are', 'How' is there and it is not in the tblReplacement list. in case of Id 2, the words that will be replaced are 'Ok' & 'This'. Since these both words are present in the tblReplacement table and after the first word i.e. 'Ok' is replaced, the second word which is 'This' here comes first in the list of ID category 2 . Since it is available in the tblReplacement, and is the first word now, so this will also be replaced. So the desired output will be Id NewWordsAfterReplacement --- ------------------------ 1 How 1 are 1 you 2 is 2 me My approach so far: ;With Cte1 As( Select t1.Id ,t1.Words ,t2.ReplacementWords From tblInput t1 Cross Join tblReplacement t2) ,Cte2 As( Select Id, NewWordsAfterReplacement = REPLACE(Words,ReplacementWords,'') From Cte1) Select * from Cte2 where NewWordsAfterReplacement <> '' But I am not getting the desired output. It is replacing all the matching words. Urgent help needed*.( SET BASED )* I am using SQL SERVER 2005. Thanks

    Read the article

  • How do I use a dependency on a Perl module installed in a non-standard location?

    - by Kinopiko
    I need to install two Perl modules on a web host. Let's call them A::B and X::Y. X::Y depends on A::B (needs A::B to run). Both of them use Module::Install. I have successfully installed A::B into a non-system location using perl Makefile.PL PREFIX=/non/system/location make; make test; make install Now I want to install X::Y, so I try the same thing perl Makefile.PL PREFIX=/non/system/location The output is $ perl Makefile.PL PREFIX=/non/system/location/ Cannot determine perl version info from lib/X/Y.pm *** Module::AutoInstall version 1.03 *** Checking for Perl dependencies... [Core Features] - Test::More ...loaded. (0.94) - ExtUtils::MakeMaker ...loaded. (6.54 >= 6.11) - File::ShareDir ...loaded. (1.00) - A::B ...missing. ==> Auto-install the 1 mandatory module(s) from CPAN? [y] It can't seem to find A::B in the system, although it is installed, and when it tries to auto-install the module from CPAN, it tries to write it into the system directory (ignoring PREFIX). I have tried using variables like PERL_LIB and LIB on the command line, after PREFIX=..., but nothing I have done seems to work. I can do make and make install successfully, but I can't do make test because of this problem. Any suggestions? I found some advice at http://servers.digitaldaze.com/extensions/perl/modules.html to use an environment variable PERL5LIB, but this also doesn't seem to work: export PERL5LIB=/non/system/location/lib/perl5/ didn't solve the problem.

    Read the article

  • org.hibernate.HibernateException: Error while accessing enum.values(): class com.mksoft.fbautomate.d

    - by Misha Koshelev
    This error is driving me nuts!!! Caused by: java.lang.NoSuchMethodException: com.mksoft.fbautomate.domain.Account$Type.values() The same exact class works fine in a separate Groovy file. Any ideas/help much appreciated. Most confusing... http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html has no values() method! Here is my class: @Entity class Account { @Id @GeneratedValue(strategy=GenerationType.AUTO) public Long id enum Type {MYVALUE} @Enumerated(EnumType.STRING) public Type type public String email // @org.hibernate.annotations.Type(type="encryptedString") public String pass public String fullName String toString() { "type:\""+type+"\",email:\""+email+"\""+",fullName=\""+fullName+"\"" } } Thank you! Misha

    Read the article

  • HTTP status code for "success with errors"?

    - by Richard Levasseur
    I've poked around a bit, but I don't see an HTTP status code for when a request's succeeds, but there is an error after the "point of no return". e.g., Say you process a request, its committed to the database, but while returning the result you run of memory, or encounter a NPE, or what have you. It would have been a 200 response, but now, internally, you aren't able to return the proper, well-formed response. 202 Accepted doesn't seem to fit since we've already processed the request. What status code means "Success, but errors"? Does one even exist?

    Read the article

  • Matching strings

    - by Joy
    Write the function subStringMatchExact. This function takes two arguments: a target string, and a key string. It should return a tuple of the starting points of matches of the key string in the target string, when indexing starts at 0. Complete the definition for def subStringMatchExact(target,key): For example, subStringMatchExact("atgacatgcacaagtatgcat","atgc") would return the tuple (5, 15).

    Read the article

  • New to Android: Dynamically changing views

    - by Josiah Kiehl
    I'm trying to learn how to build apps for Android. The first simple app, which will become a component of a bigger app I hope to build, is to have a button on the screen where, when tapped, it adds something new to the view. For instance: Imagine a layout that only has a button: [Create!] When that button, the view gets a new row added to it: [Create!] A Something! Upon subsequent presses, more rows are added [Create!] A Something! A Something! And so on. I've made a LinearLayout and placed the button in it, and have attached a click listener to it. That all works great. What I can't figure out is how to get a handle on the LinearLayout in the onClick function with which I'll addView() the new TextView that says "A Something!" Am I on the right track? What basic thing am I missing? Thanks!

    Read the article

  • Enabling Code Coverage in Visual Studio 2010

    - by Anthony Trudeau
    You'll quickly find out that enabling code coverage in Visual Studio 2010 has changed.  With the new version you enable this functionality through the test settings.  The following steps will enable code coverage: Open the local.testsettings which you can access from Test -> Edit Test Settings -> Local (local.testsettings) Select Data and Diagnostics from the list Select the Enabled checkbox on the Code Coverage row Double-click the Code Coverage row Select the assemblies you want to instrument Specify a re-signing key file if your assemblies are strong-named Click OK Click Apply Click Close

    Read the article

  • Projet Doneness and Einstein's Razor

    - by Malcolm Anderson
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} I’ve started working on a series of articles about the value of having testers involved in requirements gathering.  Today I was reminded of a useful tool that has provided value to me for at least 20 years.  To those of you who already use this tool, I’m interested in your stories where it has made a difference for you, and to those of you who have never heard of it, I hope sharing it will make a difference in your careers.   I was reminded of it because I just finished a 3 month set of personal projects and was reviewing the success of those projects while putting together my next set of 3 month projects.  During this review, I noticed that a good number of my projects did not have the level of success that I wanted.  The results were good, but they could have been better.  Then it hit me, I didn’t have clear enough doneness criteria.  As a Scrum Practitioner, I wouldn’t think of running a sprint without reviewing the backlog with Einstein's Razor, so why wouldn’t I do the same for my own projects?    I can hear a few of you asking "What's Einstein's Razor?"   I'm glad you asked.  I was once told that Einstein told an audience, "If you can't explain what you do to a relatively bright six year old, you probably don't understand it yourself."    This quote had an impact on me, especially early in my career as a solo developer.  At the time, I was mostly doing end to end software development.  I found that I saved myself a lot of pain and trouble by turning that quote around to “If you can't explain your project's doneness criteria in such a way that a relatively bright six year old can't competently determine your projects success or failure, then you have not broken it down to a fine enough level.”  There are more negatives in that quote than I’m happy with, but it still gives me tons of value to this day.     In your opinion, in your current projects, could a 6 year old competently pass or fail your next sprint?  What risks are you running if your answer is “No” ?

    Read the article

  • Mac Terminal.app: Force '^C' to be printed when editing current prompt, then aborting it

    - by Stefan Lasiewski
    This is the opposite of Prevent “^C” from being printed when aborting editing current prompt. I'm using Bash. When I'm editing the commandline in Bash, and I hit Control-C to abort the commandline, the '^C' character does not display. I would like to see this character. I tried commands like stty -ctlecho and stty ctlecho (which I borrowed from the other question), but this didn't work for me. This behavior seems to be true with my environment on Ubuntu, CentOS and MacOSX. This only happens within Apple's Terminal.App. If I SSH to a remote Linux or FreeBSD box, then ^C is printed. So, this is clearly just a local setting. Update: Here is the output of stty -a, as requested by @quack quixote : $ stty -a speed 9600 baud; 41 rows; 88 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8 -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; After typing stty sane, stty -a will output the following. The only difference is the parameter of -iutf8. $ stty sane $ stty -a speed 9600 baud; 41 rows; 157 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -iutf8 -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >