[Solved] Java language – show number 1-100

Your logic to print is fine, all you need to do is to wrap the code into a for loop and excute it from 1 to 100, e.g.: for(int zmienna = 0 ; zmienna <= 100 ; zmienna++){ if (zmienna % 5 == 0 && zmienna % 3 == 0) System.out.println(“FizzBizz”); else if (zmienna % … Read more

[Solved] Python: AttributeError: ‘str’ object has no attribute ‘readlines’

In order to give a good answer to jill1993’s question and take the MosesKoledoye’s answer : abproject = (“C:/abproject.build”) abproject is a string object. Furthermore, you write : with open(“C:/abproject.build”, “r+”) as script So if you want to solve your script error, you have to write : with open(“C:/abproject.build”, “r+”) as script, open (“C:/tempfile.build”,”w+”) as … Read more

[Solved] What is wrong with my jQuery code? Gives error that it’s not a function [closed]

Because $().value is undefined (not a function). The value property belongs to the HTMLInputElement DOM interface, jQuery objects don’t have any property or method by that name. jQuery objects provide the .val() method to set elements’ value property: $(‘.usp-title input’).eq(0).val(name); You may also get and set DOM element properties directly by retrieving a DOM element … Read more

[Solved] Find link URL in string not image

This will do it. Short explanations on how it works can be found in the codes comments: <?php # fixed syntax error string $string = “lorem ipsum http://google.com dolor sit amet <img src=\”http://img.com/img.png\” />”; function make_clickable($text) { # explode string on spaces to array $arr = explode(‘ ‘, $text); # test each array element if … Read more

[Solved] Text Edit Change Variable Names [closed]

You may catch a few false matches, but this is the jist of it. It backs up the original files by adding a .bak extension, but make sure you have your own backup before overwriting valuable code. I assume these are JavaScript files? perl -i.bak -pe’s/\bm_(\w)/m\u$1/g’ *.js solved Text Edit Change Variable Names [closed]

[Solved] Java Sentence Analysis Check

Your code is confuse, but for what I understood, you want to analyse a certain phrase. First, the constructor of the class that handles the analyse must receive the String to analyse, since it is it’s job. (Every class has a job, the result it’s obtained from the classes methods). Second, there is a convention … Read more

[Solved] simple PHP to MYsql filtering

As I understand you receive plain text emails with data. Then you want to parse it. If your ‘labels’ are automatically generated and consistent then you can parse it quite easily… say something like this: Say you load your email text into a variable $email_content. $lines = explode(“\n”,$email_content); $array_of_values = array(); foreach ($lines as $line) … Read more

[Solved] How to extract data from formatted string using python?

You should certainly read more on regex. A first hint is that when you want to capture a pattern you need to enclose it in parentheses. e.g. (\d+). For this example though, the code you need is: match = re.match(r’C(\d+)([F|G])(\d+)\.PNG’, s) first_id = match.group(1) fg_class = match.group(2) second_id = match.group(3) 1 solved How to extract … Read more