[Solved] While decoding json from webservice, it shows an error: Could not cast value of type ‘__NSArrayM’ (0x10b84bdb0) to ‘NSDictionary’ (0x10b84c288)

Try this var desriptionArray = [String]() for dataValues in responseObject[“result”] as! [[String: AnyObject]] { let name = dataValues [“description”] as! String desriptionArray .append(name) } OR for (index , element) in (responseObject[“result”] as! [Any]).enumerated() { let nameDict = element as! [String : AnyObject] let strDecription = nameDict[“description”] as! String desriptionArray .insert(strDecription, at: index) } solved While … Read more

[Solved] Remove underscore from php echo output [closed]

what madness is this? if($validation->fails()) { echo ‘<div class=”error_message”>’ . str_replace(“_”,” “,($validation->errors()->first(‘first_name’))) . ‘</div>’; } 0 solved Remove underscore from php echo output [closed]

[Solved] Declaring objects name using some loop [closed]

Objects don’t have names – variables have names. When you declare a variable and initialize it (Java): Person alice = new Person(“Alice”, 25); then alice is the name of a variable, not the name of an object. If you need to create objects in a loop and keep track of them, then use an array … Read more

[Solved] Scrollview content center alignment in iOS app [closed]

I will give u a HINT: Take the scrollView’s bounds, get midX, say X1. Take all the visible button’s frames, and then their frame’s midX, say X2’s. Calculate absolute differences, between X1 and X2’s, whichever button has the smallest one, scroll the scrollview to that button’s frame. Have Fun. Cheers 1 solved Scrollview content center … Read more

[Solved] Stuck on an Implementation for string class [closed]

In order for this to work correctly you need to change s to the member variable pointing to the array of characters. You didn’t provide the class definition of String so it’s hard to say what the name of that member variable is. You should also change char String::element(int i) const to either char String::element(size_t … Read more

[Solved] Changing Beginning of img [closed]

I’m not entirely sure what you’re asking, but it sounds like you might want to do CSS sprites. http://css-tricks.com/css-sprites/ If you want to change the image on click, you’ll need some code. I won’t spend too much time on that, given your question is hard to decipher, but if it were me, I would create … Read more

[Solved] Matching Regex to string [closed]

This is the simple expression I could come up from your question (\d+):(\d+):(\d+) BattlEye Server: \(\w+\) \w+: !rpt \w+ \w+ \w+ Try regexpal.com for validating your regex 1 solved Matching Regex to string [closed]

[Solved] Why isn’t my JS working? [closed]

I suspect that you’ve simply forgotten to load jQuery. Also, I made 1 slight change to your script to make the menu only open its child subnav. This: $(“ul.pnav li”).click(function() { Became: $(“ul.pnav li a”).click(function() { As it seemed to fit better with the line below it. Live example: http://jsfiddle.net/DnGRm/ 1 solved Why isn’t my … Read more