[Solved] convert this code to swift [closed]

Your complete code in swift. func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: Dictionary) { self.videoURL = info[UIImagePickerControllerMediaURL] picker.dismissViewControllerAnimated(true, completion: nil) self.videoController = MPMoviePlayerController() self.videoController.contentURL = self.videoURL self.videoController.view.frame = CGRectMake(0,0,self.view.frame.size.width,460) self.view.addSubview(self.videoController.view) self.videoController.play() } 2 solved convert this code to swift [closed]

[Solved] HOW TO SUBSTRING in SQL QUERY

Just check this sample , you have to use charindex(to find the index of comma) and substring function to get substring value Declare @var varchar(50) = ‘21699,21712’ select charindex( ‘,’, @var), substring ( @var, charindex(‘,’, @var)+1, len(@var)) you can also use this too: declare @var varchar(50) = ‘21699,21712’ select charindex( ‘,’, @var), substring ( @var, … Read more

[Solved] remove part of url from google API [closed]

One approach would be to use the parse_str() and parse_url() functions. You can use this to separate the string information to find a certain parameter value. parse_str(parse_url($urlString, PHP_URL_QUERY), $array) All of the parameters would be stored in the $array variable. Credit: https://stackoverflow.com/a/3136450/2748747 solved remove part of url from google API [closed]

[Solved] My rounding impossible (Javascript and PHP)

Maybe this? <?php $num = ‘49.82’; $new_num = $num; $hundredth = substr($num, -1, 1); switch($hundredth) { case ‘0’: break; case ‘1’: $new_num = ($new_num – 0.01); break; case ‘2’: $new_num = ($new_num – 0.02); break; case ‘3’: $new_num = ($new_num – 0.03); break; case ‘4’: $new_num = ($new_num – 0.04); break; case ‘5’: break; case … Read more

[Solved] how can i do the following on my website? [closed]

try this but im not sure it works. JSFiddle – link EDIT: Html <body> <div id=”box”> <a href=”https://stackoverflow.com/questions/23628933/javascript:show();” >Link</a> </div> <div id=”box2″> <iframe src=”” id=”frame” width=100% height=100%></iframe> <div id=”close”><input type=”button” onclick=”closeIframe()” value=”X” /></div> </div> </body> Javascript function show() { box= document.getElementById(“box”); box.style.visibility=”hidden”; frame=document.getElementById(“box2″); frame.style.visibility=”visible”; } function closeIframe() { box2=document.getElementById(“box2″); box2.style.visibility=”hidden”; box= document.getElementById(“box”); box.style.visibility=”visible”; } CSS … Read more

[Solved] Meaning of “>>>” in Java [duplicate]

>>>= is similar to += but with a unsigned right shift (>>>) operation. int foo = Integer.parseInt(“1000”, 2); //shift 3 times to the right : “1000” becomes “0001” = “1” foo>>>=3; System.out.print(Integer.toBinaryString(foo)); output : 1 solved Meaning of “>>>” in Java [duplicate]

[Solved] How to handle wrong user input [closed]

If you are using scanner, you can use the nextInt() method with the condition hasNextInt() which would only read integer inputs. Have a look at this post for example: Taken from the above mentioned post. Scanner sc = new Scanner(System.in); System.out.print(“Enter number 1: “); while (!sc.hasNextInt()) sc.next(); int num1 = sc.nextInt(); int num2; System.out.print(“Enter number … Read more

[Solved] Int Value from MainViewController to UIImageView Class [closed]

The answer given by JoeFryer is one idea or else you can also use NSNotificationCenter. It works as below. Put this in ImageviewController Tap Action. [[NSNotificationCenter defaultCenter] postNotificationName:@”countUp” object:nil userInfo:nil]; Put this in MainViewController‘s ViewDidLoad method. [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(increaseCount) name:@”countUp” object:nil]; and also this method -(void)increaseCount{ //Here You can increase the count count++; } Hope … Read more

[Solved] Basic Java Initialize concept [closed]

If you didn’t initialize you wouldn’t be able to access the objects property (Because it would be undefined). var test = { definedProperty : “Hello” }; alert(test.definedProperty); alert(test.undefinedProperty); http://jsfiddle.net/3cWzw/ 1 solved Basic Java Initialize concept [closed]