[Solved] Program Design Idea c#

[ad_1] Mabe you are looking for something like this: class ProductionStep { public string name; public decimal calculatCosts() { return 100; } } List<ProductionStep> listOfAllProductionstep; private void button5_Click(object sender, EventArgs e) { List<ProductionStep> psList = new List<ProductionStep>(); psList.Add(listOfAllProductionstep.Find(o => o.name == “Abc”)); psList.Add(listOfAllProductionstep.Find(o => o.name == “Def”)); decimal totalCosts = 0; foreach (ProductionStep ps in … Read more

[Solved] stuck on a PHP program. Need some idea

[ad_1] Use javascript function onchange select element and fetch records according to selected first select element value. <form name=”product” method=”post” > <select id=”category” name=”category” onChange=”relodme()”> <option value=””></option> <?php $qry = “select * from category order by name”; $res = mysql_query($qry) or die (“MYSQL ERROR:”.mysql_error()); while ($arr = mysql_fetch_array($res)) { ?> <option value=”<?=$arr[‘category_id’]?>” <? if($_POST[‘category’] == … Read more

[Solved] Can someone tell me the Complexity of the Addition & Subtraction for the Divide & Conquer Matrix Multiplication algorithm?

[ad_1] Can someone tell me the Complexity of the Addition & Subtraction for the Divide & Conquer Matrix Multiplication algorithm? [ad_2] solved Can someone tell me the Complexity of the Addition & Subtraction for the Divide & Conquer Matrix Multiplication algorithm?

[Solved] How do I change the font size of an echo? [closed]

[ad_1] in your php file: <?php srand (microtime()*10000); $f_contents = file (“secretnet.txt”); $line = $f_contents[array_rand ($f_contents)]; echo “<div class=”awesomeText”>$line</div>”; ?> In your file: style.css which need to be included as a linked resource on top of your page. .awesomeText { color: #000; font-size: 150%; } Here is a quick sample: http://jsfiddle.net/qro9r54t/ [ad_2] solved How do … Read more

[Solved] Creating Requests to an API in Java

[ad_1] Ok first open a gradle project and add these dependencies: implementation ‘com.google.code.gson:gson:2.8.5’ implementation ‘com.squareup.retrofit2:retrofit:2.4.0’ implementation ‘com.squareup.retrofit2:converter-gson:2.4.0’ Then make an interface for api calls: I have created a dummy for you: import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; import java.util.List; public interface Api { @GET(“/state”) Call<List<String>> groupList(@Query(“id”) int groupId); } Then add another class for retrofitclient: … Read more

[Solved] Insert text using php on webserver

[ad_1] First read in the old contents of the file, append your new messages to each line, and write that out. $log_file_name=”mylog.html”; // Change to the log file name $message1 = “‘” . $_POST[‘message1’].”‘<BR>”; // incoming message $message2 = “‘” . $_POST[‘message2’].”‘<BR>”; // incoming message $message3 = “‘” . $_POST[‘message3’].”‘<BR>”; // incoming message $old = … Read more

[Solved] Having clause trouble

[ad_1] This and all your other questions smell like you’re doing some test or course. Shouldn’t it be time that you at least attempt to solve one of these questions yourself? select d.dname, AVG(salary) from department d inner join employee e on e.Dno = d.dnumber group by d.dname having avg(salary) > 33000 First of all, … Read more

[Solved] How to get unigrams (words) from a list in python?

[ad_1] Aren’t those strings containing a single word, e.g. “evaporation” & “sunlight” unigrams? It seems to me that you want to retain the unigrams, not remove them. You can do that using a list comprehension: list1 = [‘water vapor’,’evaporation’,’carbon dioxide’,’sunlight’,’green plants’] unigrams = [word for word in list1 if ‘ ‘ not in word] >>> … Read more

[Solved] How to match the bundle id for android app?

[ad_1] You could try: r’\?id=([a-zA-Z\.]+)’ For your regex, like so: def get_id(toParse) regex = r’\?id=([a-zA-Z\.]+)’ x = re.findall(regex, toParse)[0] return x Regex – By adding r before the actual regex code, we specify that it is a raw string, so we don’t have to add multiple backslashes before every command, which is better explained here. … Read more

[Solved] Scrollview not working in android phone [closed]

[ad_1] A ListView will scroll itself inside its bounds if it needs to. If you haven’t anything else inside the ScrollView, it is unneeded. If you have more stuff not shown in your posted layout, the user will have to do a scroll gesture on something that is contained in the ScrollView that isn’t the … Read more

[Solved] Python Regular Expression from File

[ad_1] This will return the elements you want: import re s=””‘journey (a,b) from station south chennai to station punjab chandigarh journey (c,d) from station jammu katra to city punjab chandigarh journey (e) from station journey (c,d) from station ANYSTRING jammu katra to ANYSTRING city punjab chandigarh ”’ matches_single = re.findall(‘journey (\([^,]+,[^,]+\)) from (\S+ \S+\s{0,1}\S*) to … Read more

[Solved] php value display [closed]

[ad_1] try adding >= insead of just = if ( $valuecredits >= “10” ) { echo “<img src=”https://stackoverflow.com/questions/8290601/pbar/100.png” width=”700″ height=”61″ />”; } 1 [ad_2] solved php value display [closed]

[Solved] is it possible that when recyclerview load items just load one time and dont reload scrolling?

[ad_1] You can absolutely do that. Load all the data (through a web service call or by any other means). When data are retrieved, set them to the RecyclerView‘s adapter and call notifyDatasetChanged()). Use the RecyclerView normally (i.e. binding data objects to the views in onBindViewHolder(). This way you will get what you want (having … Read more

[Solved] This just bugs me [closed]

[ad_1] Because for-loop needs 3 parameters. If you just give 2 parameters with 3rd parameter not being given, compiler expects the loop variant parameter there. Usually – for(iteration variable; condition; increment/decrement ) for(;condition;increment/decrement ){} for(iteration variable;;increment/decrement) {} for(;;increment/decrement) {} … 1 [ad_2] solved This just bugs me [closed]