[Solved] Traveling sales man algorithm [closed]

From the source-code site you can read There is small change in the code. The line min = a[i][0] + a[c][i]; should be min = a[i][c] + a[c][i]; Here is the function you’ve to change: int least(int c) { int i,nc=999; int min=999,kmin; for(i=0;i < n;i++) { if((a[c][i]!=0)&&(visited[i]==0)) if(a[c][i] < min) { min=a[i][c]+a[c][i]; kmin=a[c][i]; nc=i; … Read more

[Solved] filter array of json in swift

Considering this is your JSON var myJSON = “”” [{ “status” : “true”, “score” : “3”, “correct” : “3”, “chapter” : “34”, “answer” : “342432”, “solutionText” : “abcd” }, { “status” : “true”, “score” : “0”, “correct” : “2”, “chapter” : “35”, “answer” : “35854”, “solutionText” : “abc” }] “”” Simply create a Decodable struct … Read more

[Solved] PLSQL procedure to add numbers by fetching records from table [closed]

Something like this? set serveroutput on declare l_what varchar2(10); –> fail or pass begin for cur_r in (select col1, col2, col3, –> to be compared with col1 + col2 result from your_table) loop l_what := case when cur_r.col1 + cur_r.col2 = cur_r.col3 then ‘pass’ else ‘fail’ end; dbms_output.put_line(cur_r.col1 ||’ + ‘|| cur_r.col2 ||’ = ‘ … Read more

[Solved] How to load YouTube live video streaming in unity? [closed]

asset store has plugins for youtube videos: https://www.assetstore.unity3d.com/en/?stay#!/search/page=1/sortby=relevance/query=youtube i’m pretty sure unity video player plays youtube videos also, if you pass it the actual mp4 youtube video url. (you need to extract it with those plugins, use some website api to extract it, or make your own) 2 solved How to load YouTube live video … Read more

[Solved] Buttons in HTML/Javascript [closed]

Use .innerHTML to replace elements within a DOM object. function ReplaceText(){ document.getElementById(“mytext”).innerHTML = “My new text”; } <html> <head> </head> <body> <div id=”mytext”> My text </div> <button id=”replace” onclick=”ReplaceText()”> Replace Text </button> </body> </html> solved Buttons in HTML/Javascript [closed]

[Solved] How to solve the error convert String date from xml file to an int format?

The problem is in your lines DateFormat dfq = new SimpleDateFormat(“EEE MMM dd HH:mm:ss z yyyy”, Locale.FRENCH); Date date1 = dfq.parse(dateq); You got a ParseException because in ” Tue Feb 08 12:30:27 +0000 2011 ” you have leading and trailing space, and the parts Tue and Feb are English but not French. Change these lines … Read more

[Solved] How to modify specific line in file [closed]

In general you don’t want to modify the contents of files directly (in-place) unless the data is formatted in fixed structures. The most common approach would be to rename the existing file, opening it to read, and opening a new file by the same name for write access. Then stream through the input data, performing … Read more

[Solved] automatically sms read not working in android

For Xiaomi Permission Dialog Use this Read all SMS private void displaySmsLog() { Uri allMessages = Uri.parse(“content://sms/”); //Cursor cursor = managedQuery(allMessages, null, null, null, null); Both are same Cursor cursor = getActivity().getContentResolver().query(allMessages, null, null, null, null); if (cursor!=null) { while (cursor.moveToNext()) { for (int i = 0; i < cursor.getColumnCount(); i++) { Log.d(cursor.getColumnName(i) + “”, … Read more