Search Results

Search found 1588 results on 64 pages for 'letter'.

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

  • PHP/SQL/Wordpress: Group a user list by alphabet

    - by rayne
    I want to create a (fairly big) Wordpress user index with the users categorized alphabetically, like this: A Amy Adam B Bernard Bianca and so on. I've created a custom Wordpress query which works fine for this, except for one problem: It also displays "empty" letters, letters where there aren't any users whose name begins with that letter. I'd be glad if you could help me fix this code so that it only displays the letter if there's actually a user with a name of that letter :) I've tried my luck by checking how many results there are for that letter, but somehow that's not working. (FYI, I use the user photo plugin and only want to show users in the list who have an approved picture, hence the stuff in the SQL query). <?php $alphabet = range('A', 'Z'); foreach ($alphabet as $letter) { $user_count = $wpdb->get_results("SELECT COUNT(*) FROM wp_users WHERE display_name LIKE '".$letter."%' ORDER BY display_name ASC"); if ($user_count > 0) { $user_row = $wpdb->get_results("SELECT wp_users.user_login, wp_users.display_name FROM wp_users, wp_usermeta WHERE wp_users.display_name LIKE '".$letter."%' AND wp_usermeta.meta_key = 'userphoto_approvalstatus' AND wp_usermeta.meta_value = '2' AND wp_usermeta.user_id = wp_users.ID ORDER BY wp_users.display_name ASC"); echo '<li class="letter">'.$letter.''; echo '<ul>'; foreach ($user_row as $user) { echo '<li><a href="/author/'.$user->user_login.'">'.$user->display_name.'</a></li>'; } echo '</ul></li>'; } } ?> Thanks in advance!

    Read the article

  • Hierarchy / Flyweight / Instancing Problem in Python

    - by Dan
    Here is the problem I am trying to solve, (I have simplified the actual problem, but this should give you all the relevant information). I have a hierarchy like so: 1.A 1.B 1.C 2.A 3.D 4.B 5.F (This is hard to illustrate - each number is the parent, each letter is the child). Creating an instance of the 'letter' objects is expensive (IO, database costs, etc), so should only be done once. The hierarchy needs to be easy to navigate. Children in the hierarchy need to have just one parent. Modifying the contents of the letter objects should be possible directly from the objects in the hierarchy. There needs to be a central store containing all of the 'letter' objects (and only those in the hierarchy). 'letter' and 'number' objects need to be possible to create from a constructor (such as Letter(**kwargs) ). It is perfectably acceptable to expect that when a letter changes from the hierarchy, all other letters will respect the same change. Hope this isn't too abstract to illustrate the problem. What would be the best way of solving this? (Then I'll post my solution) Here's an example script: one = Number('one') a = Letter('a') one.addChild(a) two = Number('two') a = Letter('a') two.addChild(a) for child in one: child.method1() for child in two: print '%s' % child.method2()

    Read the article

  • For Programmers familiar with ACM API? Drawing Initials [closed]

    - by user71992
    Possible Duplicate: For Programmers familiar with ACM API? Drawing Initials I came across an exercise (in the book "The Art and Science of Java" by Eric Roberts) that requires using only GArc and GLine classes to create a lettering library which draws your initials on the canvas. This should be made independent of the GLabel class. I'd like to know the correct approach to use in solving this problem. I'm not sure what I have so far is good enough (I'm thinking it's too long). The questions requires that I use a good Top-Down approach. Here's my code so far: //Passes letters to GLetter objects and draws them on the canvas package artScienceJavaExercises.chapter8; import acm.program.*; //import acm.graphics.*; public class DrawInitials extends GraphicsProgram{ public void init(){ resize(400,400); } public void run(){ //String let = readLine("Letter?: "); letter = new GLetter("l"); add(letter, (getWidth()-letter.getWidth()*2)/2, (getHeight()-letter.getHeight())/2); add(new GLetter("o"), (letter.getX()+letter.getWidth()), letter.getY()); } private GLetter letter; } //GLetter Class package artScienceJavaExercises.chapter8; import acm.graphics.*; import java.awt.*; public class GLetter extends GCompound{ private static final int ONE_THIRD = 30; private static final int ROW_2_HEIGHT = 40; private GArc[] arc = new GArc[4]; private GLine[] line = new GLine[24]; public GLetter(String s){ line[0] = new GLine(0,0, ONE_THIRD, 0); line[1] = new GLine(ONE_THIRD,0, ONE_THIRD*2, 0); line[2] = new GLine(ONE_THIRD*2,0, ONE_THIRD*3, 0); line[3] = new GLine(0,0, 0,ONE_THIRD); line[4] = new GLine(ONE_THIRD,0, ONE_THIRD, ONE_THIRD); line[5] = new GLine(ONE_THIRD*2,0, ONE_THIRD*2, ONE_THIRD); line[6] = new GLine(ONE_THIRD*3,0, ONE_THIRD*3, ONE_THIRD); line[7] = new GLine(0,ONE_THIRD, ONE_THIRD*2, ONE_THIRD); line[8] = new GLine(ONE_THIRD,ONE_THIRD, ONE_THIRD*2, ONE_THIRD); line[9] = new GLine(ONE_THIRD*2,ONE_THIRD, ONE_THIRD*3, ONE_THIRD); line[10] = new GLine(0,ONE_THIRD, 0, ONE_THIRD+ROW_2_HEIGHT); line[11] = new GLine(ONE_THIRD, ONE_THIRD, ONE_THIRD, ONE_THIRD+ROW_2_HEIGHT); line[12] = new GLine(ONE_THIRD*2,ONE_THIRD, ONE_THIRD*2, ONE_THIRD+ROW_2_HEIGHT); line[13] = new GLine(ONE_THIRD*3,ONE_THIRD, ONE_THIRD*3, ONE_THIRD+ROW_2_HEIGHT); line[14] = new GLine(0, ONE_THIRD+ROW_2_HEIGHT, ONE_THIRD, ONE_THIRD+ROW_2_HEIGHT); line[15] = new GLine(ONE_THIRD, ONE_THIRD+ROW_2_HEIGHT, ONE_THIRD*2, ONE_THIRD+ROW_2_HEIGHT); line[16] = new GLine(ONE_THIRD*2, ONE_THIRD+ROW_2_HEIGHT, ONE_THIRD*3, ONE_THIRD+ROW_2_HEIGHT); line[17] = new GLine(0, ONE_THIRD+ROW_2_HEIGHT, 0, ONE_THIRD*2+ROW_2_HEIGHT); line[18] = new GLine(ONE_THIRD, ONE_THIRD+ROW_2_HEIGHT, ONE_THIRD, ONE_THIRD*2+ROW_2_HEIGHT); line[19] = new GLine(ONE_THIRD*2, ONE_THIRD+ROW_2_HEIGHT, ONE_THIRD*2, ONE_THIRD*2+ROW_2_HEIGHT); line[20] = new GLine(ONE_THIRD*3, ONE_THIRD+ROW_2_HEIGHT, ONE_THIRD*3, ONE_THIRD*2+ROW_2_HEIGHT); line[21] = new GLine(0,ONE_THIRD*2+ROW_2_HEIGHT, ONE_THIRD, ONE_THIRD*2+ROW_2_HEIGHT); line[22] = new GLine(ONE_THIRD, ONE_THIRD*2+ROW_2_HEIGHT, ONE_THIRD*2, ONE_THIRD*2+ROW_2_HEIGHT); line[23] = new GLine(ONE_THIRD*2,ONE_THIRD*2+ROW_2_HEIGHT, ONE_THIRD*3, ONE_THIRD*2+ROW_2_HEIGHT); for(int i = 0; i<line.length; i++){ add(line[i]); line[i].setColor(Color.BLACK); line[i].setVisible(false); } arc[0] = new GArc(getWidth(), getHeight(), 106.699, 49.341); arc[1] = new GArc(getWidth(), getHeight(), 23.96, 49.341); arc[2] = new GArc(getWidth(), getHeight(), -23.96, -49.341); arc[3] = new GArc(0,0,getWidth(), getHeight(), -106.699, -49.341); for(int i = 0; i<arc.length; i++){ add(arc[i],0,0); arc[i].setColor(Color.BLACK); arc[i].setVisible(false); } paintLetter(s); } private void paintLetter(String s){ if (s.equalsIgnoreCase("l")){ turnOn(line[3]); turnOn(line[10]); turnOn(line[17]); turnOn(line[21]); turnOn(line[22]); turnOn(line[23]); } else if(s.equalsIgnoreCase("o")){ for(int i = 0; i<4; ++i){ turnOn(arc[i]); } turnOn(line[1]); turnOn(line[10]); turnOn(line[13]); turnOn(line[22]); } } private void turnOn(GObject g){ g.setVisible(true); } } I created a class (GLetter.java) with arrays for GArc and GLine objects. They are positioned in certain ways thereby turning certain Glines and/or GArcs on or off (changing visiblity) would create a pattern for a letter. This Gletter uses the if/else statements to determine which pattern to create - this makes me feel my code is too long. There is another class (DrawInitials.java) that simulates a GraphicsProgram and allows the user to pass certain letters as arguments to the GLetter object. I've used 'L' and 'O' as examples. However, I posted this because I'm not sure I'm using the right approach. That's why I need your help. I feel MY CODE IS TOO LONG! The code above is not the complete project...it only draws letters 'L' and 'O' for now.

    Read the article

  • Is it legal to stub the #class method of a Mock object when using RSpec in a Ruby on Rails applicati

    - by MiniQuark
    I would like to stub the #class method of a mock object: describe Letter do before(:each) do @john = mock("John") @john.stub!(:id).and_return(5) @john.stub!(:class).and_return(Person) # is this ok? @john.stub!(:name).and_return("John F.") Person.stub!(:find).and_return(@john) end it.should "have a valid #to field" do letter = Letter.create!(:to=>@john, :content => "Hello John") letter.to_type.should == @john.class.name letter.to_id.should == @john.id end [...] end On line 5 of this program, I stub the #class method, in order to allow things like @john.class.name. Is this the right way to go? Will there be any bad side effect? Edit: The Letter class looks like this: class Letter < ActiveRecord::Base belongs_to :to, :polymorphic => true [...] end I wonder whether ActiveRecord gets the :to field's class name with to.class.name or by some other means. Maybe this is what the class_name method is ActiveRecord::Base is for?

    Read the article

  • Using only alphanumeric characters(a-z) inside toCharArray

    - by Aaron
    Below you will find me using toCharArray in order to send a string to array. I then MOVE the value of the letter using a for statement... for(i = 0; i < letter.length; i++){ letter[i] += (shiftCode); System.out.print(letter[i]); } However, when I use shiftCode to move the value such as... a shifted by -1; I get a symbol @. Is there a way to send the string to shiftCode or tell shiftCode to ONLY use letters? I need it to see my text, like "aaron", and when I use the for statement iterate through a-z only and ignore all symbols and numbers. I THINK it is as simple as... letter=codeWord.toCharArray(a,z); But trying different forms of that and googling it didn't give me any results. Perhaps it has to do with regex or something? Below you will find a complete copy of my program; it works exactly how I want it to do; but it iterates through letters and symbols. I also tried finding instructions online for toCharArray but if there exists any arguments I can't locate them. My program... import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* * Aaron L. Jones * CS219 * AaronJonesProg3 * * This program is designed to - * Work as a Ceasar Cipher */ /** * * Aaron Jones */ public class AaronJonesProg3 { static String codeWord; static int shiftCode; static int i; static char[] letter; /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // Instantiating that Buffer Class // We are going to use this to read data from the user; in buffer // For performance related reasons BufferedReader reader; // Building the reader variable here // Just a basic input buffer (Holds things for us) reader = new BufferedReader(new InputStreamReader(System.in)); // Java speaks to us here / We get it to query our user System.out.print("Please enter text to encrypt: "); // Try to get their input here try { // Get their codeword using the reader codeWord = reader.readLine(); // Make that input upper case codeWord = codeWord.toUpperCase(); // Cut the white space out codeWord = codeWord.replaceAll("\\s",""); // Make it all a character array letter = codeWord.toCharArray(); } // If they messed up the input we let them know here and end the prog. catch(Throwable t) { System.out.println(t.toString()); System.out.println("You broke it. But you impressed me because" + "I don't know how you did it!"); } // Java Speaks / Lets get their desired shift value System.out.print("Please enter the shift value: "); // Try for their input try { // We get their number here shiftCode = Integer.parseInt(reader.readLine()); } // Again; if the user broke it. We let them know. catch(java.lang.NumberFormatException ioe) { System.out.println(ioe.toString()); System.out.println("How did you break this? Use a number next time!"); } for(i = 0; i < letter.length; i++){ letter[i] += (shiftCode); System.out.print(letter[i]); } System.out.println(); /**************************************************************** **************************************************************** ***************************************************************/ // Java speaks to us here / We get it to query our user System.out.print("Please enter text to decrypt: "); // Try to get their input here try { // Get their codeword using the reader codeWord = reader.readLine(); // Make that input upper case codeWord = codeWord.toUpperCase(); // Cut the white space out codeWord = codeWord.replaceAll("\\s",""); // Make it all a character array letter = codeWord.toCharArray(); } // If they messed up the input we let them know here and end the prog. catch(Throwable t) { System.out.println(t.toString()); System.out.println("You broke it. But you impressed me because" + "I don't know how you did it!"); } // Java Speaks / Lets get their desired shift value System.out.print("Please enter the shift value: "); // Try for their input try { // We get their number here shiftCode = Integer.parseInt(reader.readLine()); } // Again; if the user broke it. We let them know. catch(java.lang.NumberFormatException ioe) { System.out.println(ioe.toString()); System.out.println("How did you break this? Use a number next time!"); } for(i = 0; i < letter.length; i++){ letter[i] += (shiftCode); System.out.print(letter[i]); } System.out.println(); } }

    Read the article

  • How do I pass objects through a _url based on a routing in rails?

    - by Angela
    I want to pass the attributes associated with two objects into a path created from a route. In this case, the _url is skip_contact_letter_url. contact_letter and letter are passed through a render partial. The clip below resides in the partial. <%= link_to_remote "Skip Letter Remote #{contact_letter}", :url => skip_contact_letter_url(contact_letter, letter), :update => "update-area-#{contact_letter.id}-#{letter.id}" %> <span id='update-area-<%="#{contact_letter.id}-#{letter.id}"%>'> </span> The route I created looks like this: map.resources :contact_letters, :member => {:skip => :post} And the controller looks like this: def skip @contact_letter = ContactLetter.new(params[:all]) @contact_letter.status = "skipped" @contact_letter.date_sent = Date.today #@contact_letter.date_created = Date.today if @contact_letter.save render :text => 'This letter was skipped!' end end When I look at the console, none of the parameters from contact_letter or letter get passed through.

    Read the article

  • How to delete sentences starting with a lower case letter?

    - by Ron
    Hello: In the example below the following regex (".*?") was used to remove all dialogue first. The next step is to remove all remaining sentences starting with a lower case letter. Only sentences starting with an upper case letter should remain. Example: exclaimed Wade. Indeed, below them were villages, of crude huts made of timber and stone and mud. Rubble work walls, for they needed little shelter here, and the people were but savages. asked Arcot, his voice a bit unsteady with suppressed excitement. replied Morey without turning from his station at the window. Below them now, less than half a mile down on the patchwork of the Nile valley, men were standing, staring up, collecting in little groups, gesticulating toward the strange thing that had materialized in the air above them. In the example above the following should be deleted only: exclaimed Wade. asked Arcot, his voice a bit unsteady with suppressed excitement. replied Morey without turning from his station at the window. A useful regex or simple Perl or python code is appreciated. I'm using version 7 of Textpipe. Thanks.

    Read the article

  • Flex/PHP/XML data issue

    - by reado
    I have built a simple application in Flex. When the application loads, a GET request is made to the xmlService.php file with parameters "fetchData=letters". This tells the PHP to return the XML code. In Flex Debug I can see the XML data being sent by the PHP to the flex client. What I need it to do is populate the first drop down box (id="letter") with this data, however nothing is being received by Flex. I added an Alert.show() to check what was being returned but when the application runs, the alert is blank. Can anyone help? Thanks in advance. Image: http://static.readescdn.com/misc/flex.gif // Flex <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="300" height="300" creationComplete="windowedapplication1_creationCompleteHandler(event)"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import spark.events.IndexChangeEvent; protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void { var params:Object = {'fetchData':'letters'}; xmlService.send(params); } protected function xmlService_resultHandler(event:ResultEvent):void { var id:String = xmlService.lastResult.data.id.value; //Alert.show(xmlService.lastResult.data.id.value); if(id == 'letter') { letter.dataProvider = xmlService.lastResult.data.letter; letter.enabled = true; } else if(id == 'number') { number.dataProvider = xmlService.lastResult.data.number; number.enabled = true; submit.enabled = true; } else { submit.label = 'No Data!'; } } protected function xmlService_faultHandler(event:FaultEvent):void { Alert.show(event.fault.message); } protected function letter_changeHandler(event:IndexChangeEvent):void { var params:Object = {'fetchData':'numbers'}; xmlService.send(params); } ]]> </fx:Script> <fx:Declarations> <s:HTTPService id="xmlService" url="URL_GOES_HERE" method="POST" useProxy="false" resultFormat="e4x" result="xmlService_resultHandler(event)" fault="xmlService_faultHandler(event)"/> </fx:Declarations> <s:DropDownList x="94" y="10" id="letter" enabled="false" change="letter_changeHandler(event)" labelField="value"></s:DropDownList> <s:DropDownList x="94" y="39" id="number" enabled="false" labelField="value"></s:DropDownList> <s:Button x="115" y="68" label="Submit" id="submit" enabled="false"/> </s:WindowedApplication> // PHP <? if(isset($_POST['fetchData'])) { if($_POST['fetchData'] == 'letters') { $xml = '<data> <id value="letters"/> <letter label="Letter A" value="a"/> <letter label="Letter B" value="b"/> <letter label="Letter C" value="c"/> </data>'; } else if($_POST['fetchData'] == 'numbers') { $xml = '<data> <id value="letters"/> <number label="Number 1" value="1"/> <number label="Number 2" value="2"/> <number label="Number 3" value="3"/> </data>'; } else { $xml = '<data> <result value="'.$_POST['fetchData'].'"/> </data>'; } echo $xml; } else { echo '<data> <result value="NULL"/> </data>'; } ?>

    Read the article

  • Remove a tag type from the view (involves alphabetical pagination)

    - by user284194
    I have an index view that lists all of the tags for my Entry and Message models. I would like to only show the tags for Entries in this view. I'm using acts-as-taggable-on. Tags Controller: def index @letter = params[:letter].blank? ? 'a' : params[:letter] @tagged_entries = Tagging.find_all_by_taggable_type('Entry').map(&:taggable) @title = "Tags" if params[:letter] == '#' @data = Tag.find(@tagged_entries, :conditions => ["name REGEXP ?", "^[^a-z]"], :order => 'name', :select => "id, name") else @data = Tag.find(@tagged_entries, :conditions => ["name LIKE ?", "#{params[:letter]}%"], :order => 'name', :select => "id, name") end respond_to do |format| flash[:notice] = 'We are currently in Beta. You may experience errors.' format.html end end tags#index: <% @data.each do |t| %> <div class="tag"><%= link_to t.name.titleize, tag_path(t) %></div> <% end %> I want to show only the taggable type 'Entry' in the view. Any ideas? Thank you for reading my question. SECOND EDIT: Tags Controller: def index @title = "Tags" @letter = params[:letter].blank? ? 'a' : params[:letter] @taggings = Tagging.find_all_by_taggable_type('Entry', :include => [:tag, :taggable]) @tags = @taggings.map(&:tag).sort_by(&:name).uniq @tagged_entries = @taggings.map(&:taggable)#.sort_by(&:id)#or whatever if params[:letter] == '#' @data = Tag.find(@tags, :conditions => ["name REGEXP ?", "^[^a-z]"], :order => 'name', :select => "id, name") else @data = Tag.find(@tags, :conditions => ["name LIKE ?", "#{params[:letter]}%"], :order => 'name', :select => "id, name") end respond_to do |format| format.html end end tags#index: <% @data.each do |t| %> <div class="tag"><%= link_to t.name.titleize, tag_path(t) %></div> <% end %> Max Williams' code works except when I click on my alphabetical pagination links. The error I'm getting [after I clicked on the G link of the alphabetical pagination] reads: Couldn't find all Tags with IDs (77,130,115,...) AND (name LIKE 'G%') (found 9 results, but was looking for 129) Can anyone point me in the right direction?

    Read the article

  • Java: How to check the random letters from a-z, out of 10 letters minimum 2 letter should be a vowel

    - by kalandar
    I am writing a program to validate the following scenarios: Scenario 1: I am using the Random class from java.util. The random class will generate 10 letters from a-z and within 10 letter, minimum 2 letters must be a vowels. Scenario 2: When the player 1 and player 2 form a word from A-Z, he will score some points. There will be a score for each letter. I have already assigned the values for A-Z. At the end of the game, the system should display a scores for player 1 and player 2. How do i do it? Please help. I will post my code here. Thanks a lot. =========================================== import java.util.Random; import java.util.Scanner; public class FindYourWords { public static void main(String[] args) { Random rand = new Random(); Scanner userInput = new Scanner(System.in); //==================Player object=============================================== Player playerOne = new Player(); playerOne.wordScore = 0; playerOne.choice = "blah"; playerOne.turn = true; Player playerTwo = new Player(); playerTwo.wordScore = 0; playerTwo.choice = "blah"; playerTwo.turn = false; //================== Alphabet ================================================== String[] newChars = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; //values of the 26 alphabets to be used int [] letterScore = {1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10}; // to assign score to the player1 and player 2 String[] vowel = { "a", "e", "i", "o", "u" }; // values for vowels int vow=0; System.out.println("FINDYOURWORDS\n"); int[] arrayRandom = new int[10]; //int array for word limiter String[] randomLetter = new String[10]; //storing the letters in newChars into this array //=============================================================================== boolean cont = true; while (cont) { if (playerOne.turn) { System.out.print("Letters of Player 1: "); } else if (!playerOne.turn) { System.out.print("Letters of Player 2: "); } for (int i = 0; i < arrayRandom.length; i++) { //running through the array limiter int r = rand.nextInt(newChars.length); //assigning random nums to the array of letters randomLetter[i] = newChars[r]; System.out.print(randomLetter[i]+ " "); } //input section for player System.out.println(""); System.out.println("Enter your word (or '@' to pass or '!' to quit): "); if (playerOne.turn) { playerOne.choice = userInput.next(); System.out.println(playerOne.turn); playerOne.turn = false; } else if (!playerOne.turn){ playerTwo.choice = userInput.next(); System.out.println(playerOne.turn); playerOne.turn = true; } //System.out.println(choice); String[] wordList = FileUtil.readDictFromFile("words.txt"); //Still dunno what this is for if (playerOne.choice.equals("@")) { playerOne.turn = false; } else if (playerTwo.choice.equals("@")) { playerOne.turn = true; } else if (playerOne.choice.equals("!")) { cont = false; } for (int i = 0; i < wordList.length; i++) { //System.out.println(wordList[i]); if (playerOne.choice.equalsIgnoreCase(wordList[i]) || playerTwo.choice.equalsIgnoreCase(wordList[i])){ } } } }}

    Read the article

  • Visual Studio 2008 maintenance mode - I can't remember my installation source drive letter!!!

    - by Dave
    I've searched high and low for this and can't find the answer anywhere. I installed VS2008, but my drive letters are all mapped differently now, and of course I need to add a component to my current installation (VC++). But since I don't know which drive letter it was installed from, and since I don't want to try to figure it out the brute force way, I was hoping that someone here knew how to figure that out. I poked through HKCU and HKLM in the registry, hoping to find the info there, but couldn't. Does anyone know how to get this to work? Right now, I get the error "A selected drive is no longer valid. Please review your installation path settings before continuing with setup".

    Read the article

  • How can I loop through every letter in MS Word using VBA?

    - by Behrooz Karjooravary
    I have about 100 ms word documents which include transliteration of foreign names. The author of these docs used a special font called e2 which has about a dozen special transliteration characters (all of which are available in ms sans serif font). I would like to loop through every letter of the document and whenever the font = e2 i would like to loop through the dozen letters (it's easy to guess what they are) and replace them with a Microsoft Sans Serif equivalent. But I can't figure out how you can loop though letters. Is that doable like looping through cells in an excel spread sheet?

    Read the article

  • My program is getting a false positive from a certain 3 letter Anti Virus Company.

    - by JimDel
    My program is getting a false positive from a certain 3 letter Anti Virus Company. Its just our companies branded version of Ultra VNC. Its only this one company that's identifying it as a virus and we've been using the same copy of that program for almost a year. I know its possible to tell this Anti Virus program the VNC client is safe, but I can't do that for all of our clients. I've tried to find a way to contact this company to see if they can do something to prevent this from happening, but I'm not getting anywhere. Has anyone who's experiened this issue with thier software, found a solution? Thanks

    Read the article

  • What's the best way to replace the first letter of a string in Java?

    - by froadie
    I'm trying to convert the first letter of a string to lowercase. I know there's a capitalize method, but I want to accomplish the opposite. This is the code I used: value.substring(0,1).toLowerCase() + value.substring(1) Effective, but feels a bit manual. Are there any other ways to do it? Any better ways? Any Java string functions that do it for you? I was thinking of using something like a replace function, but Java's replace doesn't accept an index as a parameter. You have to pass the actual character/substring. Another way I can think of doing it is something like: value.replaceFirst(value.charAt(0), value.charAt(0).toLowerCase()) Except that replaceFirst expects 2 strings, so the value.charAt(0)s would probably need to be replaced with value.substring(0,1)s. Is this any better? Does it matter? Is there any standard way to do this?

    Read the article

  • Using regex to extract variables from a plain-text form letter?

    - by Yaaqov
    Hi - I'm looking for a good example of using Regular Expressions in PHP to "reverse engineer" a form letter (with a known format, of course) that has been pasted into a multiline textbox and sent to a script for processing. So, for example, let's assume this is the original plain-text input (taken from a USDA press release): WASHINGTON, April 5, 2010 - North American Bison Co-Op, a New Rockford, N.D., establishment is recalling approximately 25,000 pounds of whole beef heads containing tongues that may not have had the tonsils completely removed, which is not compliant with regulations that require the removal of tonsils from cattle of all ages, the U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) announced today. For clarity, the fields that are variables are highlighted below: [pr_city=]WASHINGTON, [pr_date=]April 5, 2010 - [corp_name=]North American Bison Co-Op, a [corp_city=]New Rockford, [corp_state=]N.D., establishment is recalling approximately [amount=]25,000 pounds of [product=]whole beef heads containing tongues that may not have had the tonsils completely removed, which is not compliant with regulations that require [reason=]the removal of tonsils from cattle of all ages, the U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) announced today. How could I efficiently extract the contents of the pr_city pr_date corp_name corp_city corp_state amount product reason fields from my example? Any help would be appreciated, thanks.

    Read the article

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