Search Results

Search found 1393 results on 56 pages for 'brian'.

Page 43/56 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • How to pass a action string into a JSF 2 composite component?

    - by Brian Leathem
    I'm creating a simple menuing composite component in JSF 2. However, I am unable to pass a String attribute into the composite component to use in the action attribute of the <h:commandLink>. My component looks like: <composite:interface> <composite:attribute name="title" required="true" type="java.lang.String"/> <composite:attribute name="view" required="true" /> </composite:interface> <!--implementation--> <composite:implementation> <li><h:commandLink action="#{cc.attrs.view}" value="#{cc.attrs.title}" /></li> </composite:implementation> How can I get an action String into the action attribute of the <h:commandLink>?

    Read the article

  • Testing ActionMailer's receive method (Rails)

    - by Brian Armstrong
    There is good documentation out there on testing ActionMailer send methods which deliver mail. But I'm unable to figure out how to test a receive method that is used to parse incoming mail. I want to do something like this: require 'test_helper' class ReceiverTest < ActionMailer::TestCase test "parse incoming mail" do email = TMail::Mail.parse(File.open("test/fixtures/emails/example1.txt",'r').read) assert_difference "ProcessedMail.count" do Receiver.receive email end end end But I get the following error on the line which calls Receiver.receive NoMethodError: undefined method `index' for #<TMail::Mail:0x102c4a6f0> /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/stringio.rb:128:in `gets' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/mail.rb:392:in `parse_header' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/mail.rb:139:in `initialize' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/stringio.rb:43:in `open' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/port.rb:340:in `ropen' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/mail.rb:138:in `initialize' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/mail.rb:123:in `new' /Library/Ruby/Gems/1.8/gems/tmail-1.2.7.1/lib/tmail/mail.rb:123:in `parse' /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:417:in `receive' Tmail is parsing the test file I have correctly. So that's not it. Thanks!

    Read the article

  • Is it possible to smooth a scaled TBitmap in Delphi?

    - by Brian Frost
    I am using Stretched=True on a TBitmap with a 256x256 image. This gets scaled down by 1,2,4 or 8. As expected, text on the bitmap gets more horrible the more I depart from '1'. I notice though that Windows 7 explorer renders a scaled down version of the bitmap 'softer' and more pleasing. Is it possible to 'blur' a TBitmap in this way?

    Read the article

  • Is Azure an Operating System or a Framework?

    - by Brian Genisio
    MS is calling Azure an Operating System. To me, it feels much more like a framework. I am having a bit of trouble defining the two separately. I have a general intuition, but I am not articulate enough to really say if Azure is really an OS or just a framework sitting on top of Operating Systems.

    Read the article

  • Regex for Eclipse/Flash Builder File Search for comments?

    - by Brian Bishop
    In Eclipse (and Flash/Flex Builder) you get the option with Ctrl+Shift+F to do a file search and look for a regular expression. Would be a real handy thing to know. I want to find the word negate if it appears in a Flex/java comment like the following: // It was negated because or /* The negate option was.... */ or /** * We have to negate the value */ Any ideas? Will test them out at http://www.regexplanet.com/simple/index.html

    Read the article

  • is unicode( codecs.BOM_UTF8, "utf8" ) necessary in Python 2.7/3?

    - by Brian M. Hunt
    In a code review I came across the following code that contains the following: # Python bug that renders the unicode identifier (0xEF 0xBB 0xBF) # as a character. # If untreated, it can prevent the page from validating or rendering # properly. bom = unicode( codecs.BOM_UTF8, "utf8" ) r = r.replace(bom, '') This is in a function that passes a string to Response object (Django or Flask). Is this still a bug that needs this fix in Python 2.7 or 3? Something tells me it isn't, but I thought I'd ask because I don't know this problem very well. Thanks for reading.

    Read the article

  • Checking JRE version inside browser

    - by Brian Lewis
    Basically, I'm wanting to figure out the best way to check the user's JRE version on a web page. I have a link to a JNLP file that I only want to display if the user's JRE version is 1.6 or greater. I've been playing around with the deployJava JavaScript code (http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html) and have gotten it to work in every browser but Safari (by using deployJava.versionCheck). For whatever reason, Safari doesn't give the most updated JRE version number - I found this out by displaying the value of the getJREs() function. I have 1.6.0_20 installed, which is displayed in every other browser, but Safari keeps saying that only 1.5.0 is currently installed. I've also tried using the createWebStartLaunchButtonEx() function and specifying '1.6.0' as the minimum version, but when I click the button nothing happens (in any browser). Any suggestions?

    Read the article

  • MySQL upload CSV file as new table

    - by Brian
    I frequently upload CSV files to a MySQL db. It is very convenient to use LOAD DATA LOCAL INFILE to upload the data, but I can't use this to create the table itself. As of now, the best method I have is to use PHP to get the field titles from the first row of the file and then put together a CREATE table query. Is there a more convenient way to do this?

    Read the article

  • Basic framework for presentations using HTML5 + javascript

    - by Brian C
    Do you know a framework for making presentations using only HTML5 and javascript technologies? I'm not talking about "export" features of various presentation software (powerpoint or OOo presentation). Some requirements for the presentations made with this "framework": take advantage of the latest HTML5 features (audio, video, canvas?) same with CSS3 (font support, gradient, shadows, transitions and transformations) If there's no such thing, example of good presentations or pointers on the subject would be appreciated.

    Read the article

  • CREATE Excel File with hyperlinks in PHP

    - by Brian
    I have the following method to create an Excel file from in PHP starting with a two-dimensional array: header("Content-Disposition: attachment; filename=ExcelFile.xls"); header("Content-Type: application/vnd.ms-excel"); $Data[] = array('field1', 'field2', 'field3'); $Data[] = array('field1', 'field2', 'field3'); $Data[] = array('field1', 'field2', 'field3'); foreach($Data as $key => $val) { echo implode("\t", array_values($val)) . "\n"; } Would it be possible to include a hyperlink to a webpage in this file?

    Read the article

  • jpa join query on a subclass

    - by Brian
    I have the following relationships in JPA (hibernate). Object X has two subclasses, Y and Z. Object A has a manyToOne relationship to object X. (Note, this is a one-sided relationship so object X cannot see object A). Now, I want to get the max value of a column in object A, but only where the relationship is of a specific subtype, ie...Y. So, that equates to...get the max value of column1 in object A, across all instances of A where they have a relationship with Y. Is this possible? I'm a bit lost as how to query it. I was thinking of something like: String query = "SELECT MAX(a.columnName) FROM A a join a.x; Query query = super.entityManager.createQuery(query); query.execute(); However that doesn't take account of the subclass of X...so I'm a bit lost. Any help would be much appreciated.

    Read the article

  • Relatively simple task: How do I pass back the selected item from one activity to another?

    - by Brian D
    I have two activities: one displays an image and a button, the other displays a photo gallery. I want to be able to select any of the images in the gallery and then display them on the first activity in place of the default image. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); Gallery g = (Gallery) findViewById(R.id.gallery); g.setAdapter(new ImageAdapter(this)); g.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { Toast.makeText(PhotoGallery.this, "Position: " + id, Toast.LENGTH_SHORT).show(); Intent intent=new Intent(); intent.putExtra("PictureID", position); setResult(RESULT_OK, intent); finish(); } }); } Am I even close here? I'm not quite sure what to do with any string or int I would attach to the Intent -- can I attach the object itself? I'd much rather pass back at minimum the string name of the resource (image), but the only thing I can seem to figure out right now is how to pass back the position of the picture ... not a great solution. I can clarify more if necessary -- thanks.

    Read the article

  • Rounded image corners in IE and Firefox

    - by Brian
    I cannot make the image a background image to a div and round the div's corners because the image is resized, and as far as I know, you cannot resize a background image. What are my options, if any? Open to all suggestions including wrapper divs and corner images. Also, if it cannot be done in IE but there's a solution for Firefox, that's just fine with me.

    Read the article

  • SQL Server 2005 I get "The database is not accessible"

    - by Brian Roisentul
    I have a computer working as a server with many SQL Server 2005 databases in it since two years ago. Today, I don't know why, when I try to connect locally to any of the databases it gives me that error. It fails even if I'm logged in using Windows Authentication or as 'sa' user. It just wouldn't let me access the databases' info. Could anybody explain me what's going on?

    Read the article

  • C++ file input/output search

    - by Brian J
    Hi I took the following code from a program I'm writing to check a user generated string against a dictionary as well as other validation. My problem is that although my dictionary file is referenced correctly,the program gives the default "no dictionary found".I can't see clearly what I'm doing in error here,if anyone has any tips or pointers it would be appreciated, Thanks. //variables for checkWordInFile #define gC_FOUND 99 #define gC_NOT_FOUND -99 // static bool certifyThat(bool condition, const char* error) { if(!condition) printf("%s", error); return !condition; } //method to validate a user generated password following password guidelines. void validatePass() { FILE *fptr; char password[MAX+1]; int iChar,iUpper,iLower,iSymbol,iNumber,iTotal,iResult,iCount; //shows user password guidelines printf("\n\n\t\tPassword rules: "); printf("\n\n\t\t 1. Passwords must be at least 9 characters long and less than 15 characters. "); printf("\n\n\t\t 2. Passwords must have at least 2 numbers in them."); printf("\n\n\t\t 3. Passwords must have at least 2 uppercase letters and 2 lowercase letters in them."); printf("\n\n\t\t 4. Passwords must have at least 1 symbol in them (eg ?, $, £, %)."); printf("\n\n\t\t 5. Passwords may not have small, common words in them eg hat, pow or ate."); //gets user password input get_user_password: printf("\n\n\t\tEnter your password following password rules: "); scanf("%s", &password); iChar = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iUpper = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iLower =countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iSymbol =countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iNumber = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iTotal = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); if(certifyThat(iUpper >= 2, "Not enough uppercase letters!!!\n") || certifyThat(iLower >= 2, "Not enough lowercase letters!!!\n") || certifyThat(iSymbol >= 1, "Not enough symbols!!!\n") || certifyThat(iNumber >= 2, "Not enough numbers!!!\n") || certifyThat(iTotal >= 9, "Not enough characters!!!\n") || certifyThat(iTotal <= 15, "Too many characters!!!\n")) goto get_user_password; iResult = checkWordInFile("dictionary.txt", password); if(certifyThat(iResult != gC_FOUND, "Password contains small common 3 letter word/s.")) goto get_user_password; iResult = checkWordInFile("passHistory.txt",password); if(certifyThat(iResult != gC_FOUND, "Password contains previously used password.")) goto get_user_password; printf("\n\n\n Your new password is verified "); printf(password); //writing password to passHistroy file. fptr = fopen("passHistory.txt", "w"); // create or open the file for( iCount = 0; iCount < 8; iCount++) { fprintf(fptr, "%s\n", password[iCount]); } fclose(fptr); printf("\n\n\n"); system("pause"); }//end validatePass method int checkWordInFile(char * fileName,char * theWord){ FILE * fptr; char fileString[MAX + 1]; int iFound = -99; //open the file fptr = fopen(fileName, "r"); if (fptr == NULL) { printf("\nNo dictionary file\n"); printf("\n\n\n"); system("pause"); return (0); // just exit the program } /* read the contents of the file */ while( fgets(fileString, MAX, fptr) ) { if( 0 == strcmp(theWord, fileString) ) { iFound = -99; } } fclose(fptr); return(0); }//end of checkwORDiNFile

    Read the article

  • Dealing with Expression Blend's lack of support for C++/CLI projects

    - by Brian Ensink
    I have a WPF C# project that references a C++/CLI mixed mode project. I'm having trouble using the WPF project in Expression Blend 3. I'm new to Blend so perhaps this is obvious, but it won't display the xaml designer properly until it builds the project. In my case it complains that my custom commands are not "recognized or accessible" and the solution is to build the project in Blend. But I can't build the project because it references a C++/CLI mixed mode project which Blend won't load. The WPF project is pure C# it just happens to reference a C++/CLI mixed mode project but I'm not asking Blend to do anything with the mixed-mode assembly. How can I work around this problem? Edit: I was able to get it to build by removing the reference to the C++/CLI mixed mode project and replacing it with a reference to the actual assembly. However this is not ideal because in my past experience Visual Studio will not always be able to resolve the reference when switching between release and debug configurations.

    Read the article

  • Checking for nulls in ASP.NET MVC Controllers

    - by Brian McCord
    Another opinion question: What is the proper (in your opinion) to check for nulls in an MVC controller. For instance, if you have an edit controller that fetches a record from the db based on an id, what do you do if that record is not found? I found this article, but I'm not sure I like that method. Do you just check for it with an if statement and redirect to a 404 page? What solution do you use?

    Read the article

  • Glassfish complaining about JSF component IDs

    - by Brian
    Hello All I am very new to JSF (v2.0) and I am attempting to learn it at places like netbeans.org and coreservlets.com. I am working on a very simple "add/subtract/multiply/divide" Java webapp and I have run into a problem. When I first started out, the application was enter two numbers and hit a '+' key and they would be automatically added together. Now that I have added more complexity I am having trouble getting the operation to the managed bean. This is what I had when it was just "add": <h:inputText styleClass="display" id="number01" size="4" maxlength="3" value="#{Calculator.number01}" /> <h:inputText styleClass="display" id="number02" size="4" maxlength="3" value="#{Calculator.number02}" /> <h:commandButton id="add" action="answer" value="+" /> For the "answer" page, I display the answer like this: <h:outputText value="#{Calculator.answer}" /> I had the proper getters and setters in the Calculator.java managed bean and the operation worked perfectly. Now I have added the other three operations and I am having trouble visualizing how to get the operation parameter to the bean so that I can switch around it. I tried this: <h:commandButton id="operation" action="answer" value="+" /> <h:commandButton id="operation" action="answer" value="-" /> <h:commandButton id="operation" action="answer" value="*" /> <h:commandButton id="operation" action="answer" value="/" /> However, Glassfish complained that I have already used "operation" once and I am trying to use it four times here. Any adivce/tips on how to get multiple operations to the managed bean so that it can preform the desired operation? Thank you for taking the time to read.

    Read the article

  • Static libraries in version-cross-compiled program

    - by Brian Postow
    I have a unix command line app (with big nasty makefile) that I'm trying to run on a mac. I am compiling it on a 10.6 system, with all of the appropriate libraries of course. The deployment environment is a 10.5 system, with no extra libraries. I compiled without -dynamic, and it appears to have static libraries, correctly. When I run it on the 10.6 system, it works. However, when I run it on the 10.5 system, I get: dyld: unknown required load command 0x80000022 I got this same error when I compiled things for the 10.6 system using the 10.5 xcode, so it looks like a version mis-match type problem. However, I used gcc-4.0, and $CFLAGS = -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 so it SHOULD be set up for 10.5... any ideas? thanks Editing an ancient question: I have the exact same problem on a different computer. This time I am at 10.5.8, fully update, the same executable works on 10.6 still. Has anyone had any luck with this in the months since I asked this?

    Read the article

  • SQL Server 2008 - Query takes forever to finish even though work is actually done

    - by Brian
    Running the following simple query in SSMS: UPDATE tblEntityAddress SET strPostCode= REPLACE(strPostCode,' ','') The update to the data (at least in memory) is complete in under a minute. I verified this by performing another query with transaction isolation level read uncommitted. The update query, however, continues to run for another 30 minutes. What is the issue here? Is this caused by a delay to write to disk? TIA

    Read the article

  • Why is passing a string literal into a char* argument only sometimes a compiler error?

    - by Brian Postow
    I'm working in a C, and C++ program. We used to be compiling without the make-strings-writable option. But that was getting a bunch of warnings, so I turned it off. Then I got a whole bunch of errors of the form "Cannot convert const char* to char* in argmuent 3 of function foo". So, I went through and made a whole lot of changes to fix those. However, today, the program CRASHED because the literal "" was getting passed into a function that was expecting a char*, and was setting the 0th character to 0. It wasn't doing anything bad, just trying to edit a constant, and crashing. My question is, why wasn't that a compiler error? In case it matters, this was on a mac compiled with gcc-4.0. EDIT: added code: char * host = FindArgDefault("EMailLinkHost", ""); stripCRLF(linkHost, '\n'); where: char *FindArgDefault(char *argName, char *defVal) {// simplified char * val = defVal; return(val); } and void stripCRLF(char *str, char delim) { char *p, *q; for (p = q = str; *p; ++p) { if (*p == 0xd || *p == 0xa) { if (p[1] == (*p ^ 7)) ++p; if (delim == -1) *p = delim; } *q++ = *p; } *q = 0; // DIES HERE } This compiled and ran until it tried to set *q to 0...

    Read the article

  • Tortoisesvn using svn:mergeinfo, is there a way to turn it off?

    - by Brian R. Bondy
    When I'm doing a tortoise svn merge, it includes a bunch of directories, and some files into the modified files, even know there are no actual changes. It changes the property svn:mergeinfo Is there any reason why these properties set on the directory/files are needed? Is there any way to get around not doing these changes to svn:mergeinfo? I usually just revert the items then commit, but this wastes extra time

    Read the article

  • Send data to webserver from C#, what's the most efficient way?

    - by Brian
    I am sending gps coordinates from a windows mobile phone to a webserver using a basic program I wrote in C#. The problem is the data plan on the phone only allows 4 MB per month. I was planning on updating the location every 10 seconds. Currently I am just creating a webrequest every 10 seconds to a php page on the server and the coordinates are passed over in the url, the php page saves them to the database. This generates about 1K of data per request, at this rate I will hit my data limit in less than a day. Is there a more efficient way to do this?

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >