[Solved] Error in the exercise of oop [closed]

It is because there is no constructor in the Conta class. Because, in the child class ContaPoupanca, you called the constructor of the parent class which is Conta like this: parent::__construct($Agencia, $Codigo, $DataCriacao, $Titular, $Senha, $Saldo); Therefore, to make this work, the parent class Conta should have a constructor like this: public function __construct($Agencia, $Codigo, … Read more

[Solved] How to delay seconds in android?

Try Handler public void showToast(final String message, int timeInMilliSeconds, final Context context) { Runnable runnable = new Runnable() { @Override public void run() { Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); } }; Handler handler = new Handler(); handler.postDelayed(runnable, timeInMilliSeconds); } Usage: showToast(“1s, 1000, this); showToast(“5s, 5000, this); showToast(“10s, 10000, this); 0 solved How to delay seconds in android?

[Solved] php regex preg_replace html tags

It would better to use a library like DOMDocument to parse the HTML. But if you really have to do it with a regexp…. Don’t use | in the regexp, that matches either class or id, but not both. preg_replace(‘~<div\b.*?\bclass\s*=\s*”(.*?)”.*?\bid\s*=\s*”(.*?)”.*>~i’,'<div class=”$1″ id=”$2″>’, $content); Note that this will only work if the class is to the … Read more

[Solved] what is the signal *) means in linux shell

There is no *), the * is part of the pattern. The syntax of a shell case statement is: case WORD in PATTERN) COMMANDS;; esac in your case: WORD is “`uname`” : Name of the operating system, like “Linux” or “CYGWIN_NT-5.1”. PATTERN is CYGWIN*: CYGWIN followed by any number of any characters COMMANDS is cygwin=true: … Read more

[Solved] Trying to make box that i can move if i click on it [closed]

Your main problems are : Missing $ in : var cx=$(‘#box’).css(“left”); ^ // missing var cy=$(‘#box’).css(“top”); ^ Setting local var for ch in first click handler. This means the higher level ch is never defined and never changes $(‘#box’).on(“click”,function(){ clicked=clicked+1; ch=clicked%2; // remove `var` alert(‘ch’+ch); }); The box now moves although not smoothly and I … Read more

[Solved] How Can i pass multiple parameter dynamically get request to check whether fbtoken is valid or not

you get that error because you are not properly urlencoding the variables you insert into the url. use urlencode() or http_build_query(), eg $url=”https://graph.facebook.com/debug_token?” . http_build_query ( array ( ‘input_token’ => $fb_token, ‘access_token’ => $access_token ) ); or $url=”https://graph.facebook.com/debug_token?input_token=” . urlencode ( $fb_token ) . “&access_token=” . urlencode ( $access_token ); and it will be properly … Read more

[Solved] How to add sub string to each element in a string seperated by comma

I guess the quickest fix would be preg_replace? This should work: $str = preg_replace(“https://stackoverflow.com/”([0-9]{1})/”,”‘000\\1″,$str); It is replacing every instance of a single quote followed by 1 number with a single-quote, then 3 zeros and then the number we matched solved How to add sub string to each element in a string seperated by comma

[Solved] Re-casting c# variables with a different class

Couldn’t you refactor it so that you have a generic method that takes a WebResponse? public T Deserialize<T>(WebResponse response) where T: new() // ensure that any type of T used has a parameterless constructor { string r = “”; using (StreamReader sr = new StreamReader(res.GetResponseStream())) { r = sr.ReadToEnd(); } JavaScriptSerializer js = new JavaScriptSerializer(); … Read more

[Solved] SQL Query – Need some assistance with a query [closed]

One way of doing this is to filter your select by using a subselect in the where clause. I did this really fast just to demonstrate: select * from manufacturer m inner join manufacturer_has_product mhp on m.manufacturer_id = m.manufacturer_id inner join product p on mhp.product_id = p.product_id where m.manufacturer_id in ( select m.manufacturer_id from manufacturer … Read more

[Solved] Create three function to call Today, Yester and Future in PHP [closed]

You can use these function : // midnight second or equal today function isToday($time) { return (strtotime($time) === strtotime(‘today’)); } //Yesterday function isPast($time) { return (strtotime($time) < time()); } // Next day function isFuture($time) { return (strtotime($time) > time()); } 2 solved Create three function to call Today, Yester and Future in PHP [closed]

[Solved] Undefined method why?

Your problem lies here: public void main(String args[]) { System.out.println(“Set health”); h = sc.nextInt(); l(h); //Root of your problems } method l() is undefined under the scope of class f1. Meaning that f1 do not understand what is l(). To let class f1 know what is it, you can: public void main(String args[]) { System.out.println(“Set … Read more