Search Results

Search found 37183 results on 1488 pages for 'string conversion'.

Page 25/1488 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Will removing unused query string parameters negatively affect SEO?

    - by trm
    Will changing links to remove query string parameters that are no longer used have any negative impact on search engine rankings? Say I have a page about.php on my site, and all of my links to this page are of the form http://www.example.com/about.php?foo=bar and I've made some changes to the script such that the parameter foo is no longer used. I would like to remove the unused parameter from the links so the URL will look cleaner, but I am concerned that this could cause problems with SEO. Is it safe to remove ?foo=bar from my links?

    Read the article

  • public String shorthand(String in)

    - by luvthug
    Hi All, I am stuck on this code. The code should use the class StringBuilder to build an output string by appending non-vowel characters from its argument in to the result it returns. It needs to identify vowels to be removed using the helper metod i created which is public boolean isVowel(char c). public String shorthand(String in) this is the method I need help with. I have created the stringbuilder but the if condition does not accept isVowel method. import java.io.*; import java.util.*; public class Shorthand { public boolean isVowel(char c) { if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A'|| c == 'E'||c == 'I'|| c == 'O'|| c == 'U') { return true; } else { return false; } } //TODO Complete the shorthand method public String shorthand(String in) //this is the code I need help with { StringBuilder vowel = new StringBuilder(); if (isVowel() == false)strong text { vowel.append(in); } return vowel.toString(); } //TODO Complete the run method public void run() throws IOException { String yourLine; Scanner sc = new Scanner(System.in); yourLine = sc.nextLine(); while(!yourLine.equals("*")); { System.out.println("Enter your line of text"); } yourLine = sc.nextLine(); } }

    Read the article

  • Interface (contract), Generics (universality), and extension methods (ease of use). Is it a right design?

    - by Saeed Neamati
    I'm trying to design a simple conversion framework based on these requirements: All developers should follow a predefined set of rules to convert from the source entity to the target entity Some overall policies should be able to be applied in a central place, without interference with developers' code Both the creation of converters and usage of converter classes should be easy To solve these problems in C# language, A thought came to my mind. I'm writing it here, though it doesn't compile at all. But let's assume that C# compiles this code: I'll create a generic interface called IConverter public interface IConverter<TSource, TTarget> where TSource : class, new() where TTarget : class, new() { TTarget Convert(TSource source); List<TTarget> Convert(List<TSource> sourceItems); } Developers would implement this interface to create converters. For example: public class PhoneToCommunicationChannelConverter : IConverter<Phone, CommunicationChannle> { public CommunicationChannel Convert(Phone phone) { // conversion logic } public List<CommunicationChannel> Convert(List<Phone> phones) { // conversion logic } } And to make the usage of this conversion class easier, imagine that we add static and this keywords to methods to turn them into Extension Methods, and use them this way: List<Phone> phones = GetPhones(); List<CommunicationChannel> channels = phones.Convert(); However, this doesn't even compile. With those requirements, I can think of some other designs, but they each lack an aspect. Either the implementation would become more difficult or chaotic and out of control, or the usage would become truly hard. Is this design right at all? What alternatives I might have to achieve those requirements?

    Read the article

  • How can I partial compare two strings in C?

    - by Nazgulled
    Hi, Let's say I have the following content: Lorem Ipsum is simply dummy text of the printing and typesetting industry. How do I search for dummy or dummy text in that string using C? Is there any easy way to do it or only with strong string manipulation? All I need is to search for it and return a boolean with the result.

    Read the article

  • How can we extract substring of the string by position and sepretor.

    - by Harikrishna
    How can we divide the substring from the string Like I have string String mainString="///Trade Time///Trade Number///Amount Rs.///"; Now I have other string String subString="Amount" Then I want to extract the substring Amount Rs. with the help of second string named subString not by any other method But it should be extracted through two parameters like first is I have index no of Amount string and second is until the next string ///.

    Read the article

  • How can we extract substring of the string by position and separator.

    - by Harikrishna
    How can we divide the substring from the string Like I have string String mainString="///Trade Time///Trade Number///Amount Rs.///"; Now I have other string String subString="Amount" Then I want to extract the substring Amount Rs. with the help of second string named subString not by any other method But it should be extracted through two parameters like first is I have index no of Amount string and second is until the next string ///.

    Read the article

  • Conversion of DVC-PRO HD 1080, any free tool?

    - by Andrea Ambu
    Is there any free (as in beer, and if it's possible as in bird) tool to convert a dvd in the format DVC-PRO HD 1080 to a normal/standard dvd format so that I can play it on a normal DVD player? EDIT: I changed the wording a bit. We've a video in DVC-PRO HD 1080 but as far as I know it is a proprietary format. We'd like to create a standard dvd out of it. I'm not really in video encoding and dvd conversion. I thought I need to be more precise. VLC currently doesn't support DVC-PRO HD 1080.

    Read the article

  • Conversion of DVC-PRO HD 1080, any free tool?

    - by Andrea Ambu
    Is there any free (as in beer, and if it's possible as in bird) tool to convert a dvd in the format DVC-PRO HD 1080 to a normal/standard dvd format so that I can play it on a normal DVD player? EDIT: I changed the wording a bit. We've a video in DVC-PRO HD 1080 but as far as I know it is a proprietary format. We'd like to create a standard dvd out of it. I'm not really in video encoding and dvd conversion. I thought I need to be more precise. VLC currently doesn't support DVC-PRO HD 1080.

    Read the article

  • Validating String Characters as Numeric w/ Pascal (FastReport 4)

    - by user2525015
    I'm new to Pascal and FastReport. This question can probably be answered without knowledge of FastReport. Pascal is Delphi. FastReport4. I have a text box accepting an 8 character string as input. Each character should be numeric. I'm attempting to validate each character as numeric. I've tried using the val function... Procedure Val(S : String; var R: Real; Code : Integer); begin end; procedure thisinputOnChange(Sender: TfrxComponent); var S : String; error : Integer; R : Real; begin S := thisinput.lines.text; Val (S, R, error); If error > 0 then Button2.enabled := False; end; I got this code online. The explanation says that the function will return an error with a code greater than zero if the character cannot be converted to an integer. Is that explanation correct? Am I misinterpreting? Right now I am trying to set a button's enabled property to false if the validation fails. I might change that to a message. For now, I would like to get it to work by setting the button property. I'm not sure if I should be using the onChange event or another event. I'm also not sure if I need to send the input to the val function in a loop. Like I said, I'm just learning how to use this function. I am able to validate the length. This code works... procedure thisinputOnChange(Sender: TfrxComponent); begin if length(thisinput.lines.text) = 8 then Button2.enabled := True; end; Any suggestions? Should I use the val function or something else? Let me know if I need to provide more info. I might not be able to check back until later, though. Thanks for any help.

    Read the article

  • Best way to convert between [Char] and [Word8]?

    - by cmars232
    I'm new to Haskell and I'm trying to use a pure SHA1 implementation in my app (Data.Digest.Pure.SHA) with a JSON library (AttoJSON). AttoJSON uses Data.ByteString.Char8 bytestrings, SHA uses Data.ByteString.Lazy bytestrings, and some of my string literals in my app are [Char]. This article seems to indicate this is something still being worked out in the Haskell language/Prelude: http // hackage.haskell.org/trac/haskell-prime/wiki/CharAsUnicode And this one lists a few libraries but its a couple years old: http //blog.kfish.org/2007/10/survey-haskell-unicode-support.html [Links broken because SO doesn't trust me -- whatever...] What is the current best way to convert between these types, and what are some of the tradeoffs? I don't want to pick something that is obsolete... Thanks!

    Read the article

  • Using fgets to read strings from file in C

    - by Ivan
    I am trying to read strings from a file that has each string on a new line but I think it reads a newline character once instead of a string and I don't know why. If I'm going about reading strings the wrong way please correct me. i=0; F1 = fopen("alg.txt", "r"); F2 = fopen("tul.txt", "w"); if(!feof(F1)) { do{ //start scanning file fgets(inimene[i].Enimi, 20, F1); fgets(inimene[i].Pnimi, 20, F1); fgets(inimene[i].Kood, 12, F1); printf("i=%d\nEnimi=%s\nPnimi=%s\nKaad=%s",i,inimene[i].Enimi,inimene[i].Pnimi,inimene[i].Kood); i++;} while(!feof(F1));}; /*finish getting structs*/ The printf is there to let me see what was read into what and here is the result i=0 Enimi=peter Pnimi=pupkin Kood=223456iatb i=1 Enimi= Pnimi=masha Kaad=gubkina i=2 Enimi=234567iasb Pnimi=sasha Kood=dudkina As you can see after the first struct is read there is a blank(a newline?) onct and then everything is shifted. I suppose I could read a dummy string to absorb that extra blank and then nothing would be shifted, but that doesn't help me understand the problem and avoid in the future.

    Read the article

  • The Benefits of PSD to HTML Conversion

    In the world of web designing the current trend among the designers is to convert PSD to HTML. If one looks at the reasons for such popularity of the conversion process, he or she would come across not only but multiple reasons.

    Read the article

  • Importing Excel data into SSIS 2008 using Data Conversion Transformation

    Despite its benefits, SQL Server Integration Services Import Export Wizard has a number of limitations, resulting in part from a new set of rules that eliminate implicit data type conversion mechanisms present in Data Transformation Services. This article discusses a method that addresses such limitations, focusing in particular on importing the content of Excel spreadsheets into SQL Server.

    Read the article

  • Program for Format Conversion of An Image

    .NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Data Conversion with Silverlight 3

    In this conclusion to a five-part series on data binding with Silverlight 3 we will discuss data conversion. As with the other parts we ll explain when and why you need to convert data and go through a step-by-step process to show you how it s done.... Cloud Servers in Demand - GoGrid Start Small and Grow with Your Business. $0.10/hour

    Read the article

  • How to Increase Conversion Rate of Your Website

    Conversion Rate is the frequency or percentage of your website visitors who were successfully converted to purchase a sale of your products or services through the use of your Calls to Action or CTA. Call to action buttons are the buttons that you, as a web designer, want all your users to click on when they land on your page. Usually they'll be a link to a download, signup or sale.

    Read the article

  • Five Tips For Increasing Website Conversion Rate - SEO

    If you run a business online, you are probably aware of the many changes that take place on the World Wide Web on a daily basis. Failing to track your website conversion rate and not update your site can bring you out of the loop just as quickly as you were added. This does not, of course, mean the visibility of your site will go away, but it does mean you will not be as visible.

    Read the article

  • [C++] std::string manipulation: whitespace, "newline escapes '\'" and comments #

    - by rubenvb
    Kind of looking for affirmation here. I have some hand-written code, which I'm not shy to say I'm proud of, which reads a file, removes leading whitespace, processes newline escapes '\' and removes comments starting with #. It also removes all empty lines (also whitespace-only ones). Any thoughts/recommendations? I could probably replace some std::cout's with std::runtime_errors... but that's not a priority here :) const int RecipeReader::readRecipe() { ifstream is_recipe(s_buffer.c_str()); if (!is_recipe) cout << "unable to open file" << endl; while (getline(is_recipe, s_buffer)) { // whitespace+comment removeLeadingWhitespace(s_buffer); processComment(s_buffer); // newline escapes + append all subsequent lines with '\' processNewlineEscapes(s_buffer, is_recipe); // store the real text line if (!s_buffer.empty()) v_s_recipe.push_back(s_buffer); s_buffer.clear(); } is_recipe.close(); return 0; } void RecipeReader::processNewlineEscapes(string &s_string, ifstream &is_stream) { string s_temp; size_t sz_index = s_string.find_first_of("\\"); while (sz_index <= s_string.length()) { if (getline(is_stream,s_temp)) { removeLeadingWhitespace(s_temp); processComment(s_temp); s_string = s_string.substr(0,sz_index-1) + " " + s_temp; } else cout << "Error: newline escape '\' found at EOF" << endl; sz_index = s_string.find_first_of("\\"); } } void RecipeReader::processComment(string &s_string) { size_t sz_index = s_string.find_first_of("#"); s_string = s_string.substr(0,sz_index); } void RecipeReader::removeLeadingWhitespace(string &s_string) { const size_t sz_length = s_string.size(); size_t sz_index = s_string.find_first_not_of(" \t"); if (sz_index <= sz_length) s_string = s_string.substr(sz_index); else if ((sz_index > sz_length) && (sz_length != 0)) // "empty" lines with only whitespace s_string.clear(); } Some extra info: the first s_buffer passed to the ifstream contains the filename, std::string s_buffer is a class data member, so is std::vector v_s_recipe. Any comment is welcome :)

    Read the article

  • C Array of string

    - by Meko
    HI. This is maybe simple question but I want to create two dimensional array and add it string like in java string str = "text" ; string [][] array = new [][] string ; array[i][j] = str ; But in C there is no string .I tried like this but here strcpy() gives error.It returns to assembly code. I am trying to read line by line from text and split line by space and add them to structure.But first I think that I must add each line and row in array and then making iteration and adding to structures fields. static const char filename[] = "student.txt"; FILE *file = fopen ( filename, "r" ); char line [ 128 ]; /* or other suitable maximum line size */ char delims [ ]=" "; char *result =NULL; char list[15]; char arra[128][128]; int i=0; int j=0; struct { char gruppa[10]; char familiya[20]; int uchaste; struct { int firsth; int second; int third; int fourht; int fifth; } exam; }student; for(i=0; i<128; i++) for(j=0; j<128; j++) arra[i][j] = '\0'; for(i=0; i<15; i++) list[i] = '\0'; if ( file != NULL ) { while ( fgets ( line, sizeof line, file ) != NULL ) { result = strtok(line,delims); while (result !=NULL) { strcpy(list,("%s",result)); strcpy(arra[i][j],list); // Here it gives errror j++; result = strtok(NULL,delims); } j=0; i++; } fclose ( file ); } else { perror ( filename ); } getchar(); return 0; }

    Read the article

  • C++ exam question on string class implementation

    - by Carlucho
    I just took an exam where i was asked the following: Write the function body of each of the methods GenStrLen, InsertChar and StrReverse for the given code bellow. You must take into consideration the following; How strings are constructed in C++ The string must not overflow Insertion of character increases its length by 1 An empty string is indicated by StrLen = 0 class Strings { private: char str[80]; int StrLen; public: // Constructor Strings() { StrLen=0; }; // A function for returning the length of the string 'str' int GetStrLen(void) { }; // A function to inser a character 'ch' at the end of the string 'str' void InsertChar(char ch) { }; // A function to reverse the content of the string 'str' void StrReverse(void) { }; }; The answer I gave was something like this (see bellow). My one of problem is that used many extra variables and that makes me believe am not doing it the best possible way, and the other thing is that is not working.... class Strings { private: char str[80]; int StrLen; int index; // *** Had to add this *** public: Strings(){ StrLen=0; } int GetStrLen(void){ for (int i=0 ; str[i]!='\0' ; i++) index++; return index; // *** Here am getting a weird value, something like 1829584505306 *** } void InsertChar(char ch){ str[index] = ch; // *** Not sure if this is correct cuz I was not given int index *** } void StrRevrse(void){ GetStrLen(); char revStr[index+1]; for (int i=0 ; str[i]!='\0' ; i++){ for (int r=index ; r>0 ; r--) revStr[r] = str[i]; } } }; I would appreciate if anyone could explain me toughly what is the best way to have answered the question and why. Also how come my professor closes each class function like " }; " i thought that was only used for ending classes and constructors only. Thanks a lot for your help.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >