[Solved] Find and replace dynamic values via for loop

I think this is what you want, List<string> keys = new List<string>() { “name”, “age”, “param3” }; string url = “http://www.test.com/test.aspx?testinfo=&|&;”; Regex reg = new Regex(“&”); int count = url.Count(p => p == ‘&’); for (int i = 0; i < count; i++) { if (i >= keys.Count) break; url = reg.Replace(url, keys[i], 1); } … Read more

[Solved] How can I make the my listview interactive? [duplicate]

Try this: listView = (ListView) findViewById(R.id.my_list_view); listView.setAdapter(someAdapter); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch(position) { case 0: Intent intent = new Intent(); intent.setClassName(“com.test”, “com.test.SubMenuActivity”); startActivity(intent); break; case 1: // Do something else … break; // … } }); solved How can I make the my listview interactive? … Read more

[Solved] Turing Machine Simulator [closed]

Try something like this: #include <iostream> #include <string.h> #include <vector> #include <fstream> #include <cstdlib> #include <stdio.h> #include “tm.h” using namespace std; tm::tm(char *fn) { current = “”; readFile(fn); } void tm::readFile(char *fn) { char temp; string word = “”; ifstream indata; bool blank = false; indata.open(fn); //opens the file if(!indata) //error message if the file … Read more

[Solved] PYTHON codes with a lesson from a book [closed]

Briefly: cities is instantiated as a dictionary, and some key/value are inserted here. Both key and values are string for CA -> San Francisco, MI -> Detroit, etc. etc. a function named find_city is defined, it takes two input parameters (themap and state); to the cities dictionary is added another key/value, where key is the … Read more

[Solved] Free Web Servers PHP [closed]

I’ve found izfree to be pretty good when I’ve needed quick hosting in a pinch. I wouldn’t recommend it for anything in production though as its uptime isn’t as good as it could be. EDIT: Although looking at it, it may not even be maintained anymore. I last used it in 2009… 1 solved Free … Read more

[Solved] How to put the required parameters in link that accesses php?

First, you have to fix your query string, the ? starts the string and each additional argument is prefixed with &: www.example.com/[email protected]&Password=something50 Now all of the variables will be available in the $_GET array $_GET[‘Email’]; // is equal to “[email protected]” $_GET[‘Password’]; // is equal to “something50” You should never concatenate variables in a SQL statement, … Read more

[Solved] How can I use the function toupper() in this code? [closed]

You need to toupper every single character, e.g. while( (leido = read(0,&buffer,sizeof buffer)) > 0){ for (int i=0; i<leido; i++) { buffer[i] = toupper((unsigned char)buffer[i]); } retorno = write(1,&buffer,leido); } 2 solved How can I use the function toupper() in this code? [closed]

[Solved] Combine each column from 2 different table into one table

Select t2.account_number,t2.proposedaddress, t1.currentaddress From table2 t2 left outer join table1 t1 on (t1.account_number=t2.account_number and Upper(Trim(t1.currentaddress)) like Upper(Trim(t2.proposedaddress))) 5 solved Combine each column from 2 different table into one table

[Solved] How to format a title attribute with css (setting more width)?

It is currently not possible to format a tooltip. An alternative solution is to use one of the many open source projects that allow for custom HTML based tooltips and then modify their content. These are some common solutions. jTip jQuery Tooltip solved How to format a title attribute with css (setting more width)?

[Solved] MS SQL Query for Opening Stock calculation

Thanks to all, i have worked out with my same query, although seed was slow. query is mentioned below:- select Item, Location,[Transaction Date],Price,Qty, Price_change , (select isnull(sum(qty),0) from #temp c where c.item=p.item and c.Location=p.Location and c.[Transaction Date] < p.[Transaction Date]) [Opening Stock] from #temp p solved MS SQL Query for Opening Stock calculation