[Solved] Trying to display Json data from a web url into a table

This is how i solved it <?php try{ $url=”the json url goes here”; // path to your JSON file $data = file_get_contents($url); // put the contents of the file into a variable $characters = json_decode($data); echo ‘<div class=”panel-heading”> <h3 align=”center”>Market Prices for ‘; echo $characters[0]->Crop; echo ‘</h3> </div>’; echo ‘<div class=”panel-body”> <table class=”table table-striped table-hover … Read more

[Solved] Search and replace vulgar words in a text by using a text file containing all the bad words

i found the solution , i maked the content of the txt file in a list with split method , def check_offline(text): list_pro = open(‘full-list-bad.txt’,’r’) content = list_pro.read() list_content = content.split(‘\n’) for word in list_content : if word in text : remplacement = “*” * len(word) text = text.replace(word ,remplacement) print word print remplacement return … Read more

[Solved] Data type conversion [closed]

What do You mean? You have to cast f to long and b to char and also initialize them. l = (long) f; ch = (char) b; //—- float f = 3.14f; long l ; char ch; byte b = 38; l= (long) f; ch= (char) b; Check examples: int first = 3: int second … Read more

[Solved] Get the word, from a sentence that the user is talking about [closed]

Credit: ThuverX let word if(content.indexOf(“what”) !== -1 && content[content.indexOf(“what”)+1] !== “is”) word = content[content.indexOf(“what”)+1] else if(content.indexOf(“meaning”) !== -1) word = content[content.indexOf(“meaning”)+2] else if(content.indexOf(“means”) !== -1) word = content[content.indexOf(“means”)-1] 0 solved Get the word, from a sentence that the user is talking about [closed]

[Solved] Differences in Console class methods

String interpolation ($”this is {name1} and this is {name2}”) was introduced with C# 6. It makes it easier than doing the composite formatting (“this is {0} and that is {1}”) approach and is easier to read. The composite formatting approach leaves room for errors by having the variables in the wrong order or missing them. … Read more