[Solved] How to replace vowel letters with a character? [duplicate]

[ad_1] You may use switch case and for loop for simplicity. using namespace std; #include<iostream> int main() { string a; cin>>a; for(int i=0;a[i]!=’\0′;i++) { switch (a[i]) { case ‘a’:a[i]=’.’; break; case ‘e’:a[i]=’.’; break; case ‘i’:a[i]=’.’; break; case ‘o’:a[i]=’.’; break; case ‘u’:a[i]=’.’; break; } } cout<<a; } 6 [ad_2] solved How to replace vowel letters with … Read more

[Solved] Java Regular expression for money

[ad_1] Currency amount US & EU (cents optional) Can use US-style 123,456.78 notation and European-style 123.456,78 notation. Optional thousands separators; optional two-digit fraction Match; JGsoft: ^[+-]?[0-9]{1,3}(?:[0-9]*(?:[.,][0-9]{2})?|(?:,[0-9]{3})*(?:\.[0-9]{2})?|(?:\.[0-9]{3})*(?:,[0-9]{2})?)$ Reference: here 2 [ad_2] solved Java Regular expression for money

[Solved] How to make login page in asp.net? [closed]

[ad_1] Well, before I begin let’s talk about the assumptions I’m going to have to make because you provided almost no information in your question. Bear in mind I have to make these assumptions so I can provide some kind of answer. Database Schema I’m going to assume the database schema looks something like this: … Read more

[Solved] Smallest positive number in a vector recursively

[ad_1] def SPN(nums, s): if s == 0: # Empty array return +∞ if nums[s-1] > 0: # num[s] is admissible, recurse and keep the smallest return min(nums[s-1], SPN(nums, s-1)) else: # Just recurse return SPN(nums, s-1) print SPN(nums, len(nums) The c++ version: #include <vector> using namespace std; int rec_min_pos(const vector<int> & nums, int size) … Read more

[Solved] % (examples in loop) [closed]

[ad_1] One particular use is to check even / odd: for($i=0; $i<10; $i++) { if($i%2==0) echo “even” else echo “odd” } This idea could be used to color rows (tr) of a table differently for better presentation. Another use is to close TR dynamically in a complex code (lets say, change tr after every 4 … Read more

[Solved] Python String Between [closed]

[ad_1] If you look at what is being downloaded, you can see that the data is encoded in UTF-8. Just add the decode(‘UTF-8’) method to convert the download to something Python 3 can work with: import urllib.request url=”http://www.bloomberg.com/quote/PLUG:US” sock = urllib.request.urlopen(url).read().decode(‘UTF-8’) print(sock.count(“data_values”), sock.count(“show_1D”)) # 1 1 string2=sock.replace(“data_values”,”show_1D”) print (string2.count(“data_values”), string2.count(“show_1D”)) # 0 2 While that … Read more