[Solved] Can’t use ‘contains’ in LINQ [closed]

You are facing problem on this line (result => result.SiteUrl.Contains(last.ToString()); Can you please check that SiteUrl is type of string otherwise it not going to work for you. because last is type of string and Contains is method supported by string type … or otherwise last need to be enumebrable collection and siteurl also enumerable … Read more

[Solved] Why does my sorting method for Bigdecimal numbers fails to sort?

Well, since you want to use String numbers, you will have to wrap them in quotations, but your sorting can be much more readable. I would suggest the following String[] numbers ={“-100”, “50”, “0”, “56.6”, “90”, “0.12”, “.12”, “02.34”, “000.000”}; List<BigDecimal> decimalList = new ArrayList<>(); for(String s: numbers){ decimalList.add(new BigDecimal(s)); } Collections.sort(decimalList); Collections.reverse(decimalList); // edit … Read more

[Solved] How to instantiate objects dynamically in C# [closed]

Keep references to your objects with a list: var myobjects = new List<System.Security.Cryptography.MD5>(); for (var i = 0; i < 100; i++) { myobjects.Add(System.Security.Cryptography.MD5.Create()); } and iterate through the list: for (var i = 0; i < 100; i++) { myobjects[i].ComputeHash(new byte[] { (byte)i }); Console.WriteLine(BitConverter.ToString( myobjects[i].Hash)); } Otherwise Reusing the same variable will make … Read more

[Solved] How to call a specific PHP script for a set of paths? [duplicate]

Typically this is done via rewrite rules (i.e. mod_rewrite on Apache). So for Apache that might involve modifying the conf file for the host, or applying the following in an .htaccess file in the web root (assuming the host config allows for such override) RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^someapp/(.*)$ /someapp/index.php?q=$1 … Read more

[Solved] How to make launch of application

you must do some changes your manifest. Do changes in launcher or default activity like below: <activity android:name=”.MainActivity” android:configChanges=”keyboardHidden|orientation|keyboard|screenSize” android:windowSoftInputMode=”stateHidden”> <intent-filter> <action android:name=”android.intent.action.VIEW” /> <category android:name=”android.intent.category.BROWSABLE” /> <category android:name=”android.intent.category.DEFAULT” /> <data android:host=”yoursitedomain.com” android:scheme=”http” /> <data android:host=”www.yoursitedomain.com” android:scheme=”http” /> </intent-filter> </activity> BROWSABLE and data tags help you. 2 solved How to make launch of application

[Solved] How to Count The most common multiple event is SQL

You can use group by: select favorite from t group by favorite order by count(*) desc fetch first 1 row only; This is ANSI-standard sequence. Different databases have different ways of expressing the fetch first clause. In MS Access, this would be: select top (1) favorite from t group by favorite order by count(*) desc, … Read more

[Solved] How to call third party Restful API [closed]

The problem is that you are mixing up options of the library with HTTP headers. Try with this instead: public static void Main (string[] args) { string url = “https://dashboard.reviewpush.com/api/company/locations”; using (var client = new WebClient()) { client.Headers[HttpRequestHeader.ContentType] = “application/json”; client.Headers[“X-Api-Key”] = “key”; client.Headers[“X-Api-Secret”] = “secret”; string s = client.DownloadString(url); Console.WriteLine(s); } } You might … Read more

[Solved] Semicolon/String constant error

cout <<“Done!” <<fac1 ” multiplied by ” <<fac2 ” equals ” <<prod <<endl; Should be cout <<“Done!” <<fac1 << ” multiplied by ” <<fac2 <<” equals ” <<prod <<endl; And cout <<“Done!” <<divid ” divided by ” <<divis ” equals ” <<quot ” with a remainder of ” <<rem <<endl; Should be cout <<“Done!” <<divid … Read more

[Solved] Hard Time figuring out how to use user input in a for loop in Java [duplicate]

Instead of using read(), you should initialize a scanner and use that. This is what it would look like: package grading.on.a.loop.java; import java.util.Scanner; public class GradingOnALoopJava { public static void main(String[] args) { Scanner in = new Scanner(System.in); String[] grades = new String[5]; for(int counter = 0; counter < 5; counter++) { System.out.println(counter * 5 … Read more

[Solved] What can I do to make my program work?

You are missing the closing curly brace (}) at the end of this loop. foreach (string s in tokens) { if (double.TryParse(s, out oneNum)) { nums.Add(oneNum); } else { Console.WriteLine(“You have inputed invalid number, please try again!”); break; } Without that closing brace, all the following calculations are considered to be inside that loop! Since … Read more

[Solved] How to establish a Server PC to host my website?

I went back over your question and this thread and this is what I recommend. You are looking to create a hosting environment for others from what I am understanding. Regardless the platform you select (linux or windows) having a beefy machine is going to be key to this. I would recommend at a minimum … Read more

[Solved] it is not saving without an image

If your image column allows for null values, change to if(pb1 != null) { MemoryStream stream = new MemoryStream(); pb1.Image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] pic = stream.ToArray(); command.Parameters.AddWithValue(“@image”, pic); } else { command.Parameters.AddWithValue(“@image”, System.Data.SqlTypes.SqlBinary.Null); // edit: replaced incorreect DBNull.Value due to comment by Heinzi } System.Data.SqlTypes.SqlBinary.Null Currently you are not providing enough parameters to your Sql if … Read more