The following code has a video being played. But the video starts immediately when the view controller is launch. When the view controller is launch I would like the user to hit the play button for the video to play. Now the video plays as soon as the view controller is launched.

 let path = NSBundle.mainBundle().pathForResource("x", ofType:"mp4")
    let url = NSURL.fileURLWithPath(path!)
    self.moviePlayer = MPMoviePlayerController(contentURL: url)
    if let player = self.moviePlayer {
        player.view.frame = CGRect(x: 55, y: 75, width: self.view.frame.size.width/2, height: self.view.frame.size.height / 5)
        player.view.sizeToFit()
        player.scalingMode = MPMovieScalingMode.AspectFit
        player.fullscreen = false
        player.controlStyle = MPMovieControlStyle.Default
        player.movieSourceType = MPMovieSourceType.File
        player.repeatMode = MPMovieRepeatMode.One
        player.play()
        self.view.addSubview(player.view)

I have a strange problem that never happened to me before. When I try submit my Xcode8 (Swift3) project to AppStore, after I choose and confirm organisation, Xcode crash with strange Issue report that says:

2016-09-17 12:32:29.604 xcodebuild[4347:14903] [MT] IDEDistribution: - [IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at   path '/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/Degoo-iOS_2016-09- 17_12-32-29.600.xcdistributionlogs'.
2016-09-17 12:32:31.335 xcodebuild[4347:14903] [MT] DVTAssertions:   ASSERTION FAILURE in  /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks- 11246/IDEFoundation/Distribution/IDEDistributionSummaryStep.m:213
Details:  A method claimed to have succeeded but provided an error!
Object:   <IDEDistributionSummaryStep>
Method:   +_distributionItemsWithoutBitcodeForPlatforms:flattenedDistributionItems:ar chive:withError:
Thread:   <NSThread: 0x7ff94ac07fe0>{number = 1, name = main}
Hints: None
Backtrace:
0   -[DVTAssertionHandler   handleFailureInMethod:object:fileName:lineNumber:assertionSignature:message Format:arguments:] (in DVTFoundation) 
1   _DVTAssertionHandler (in DVTFoundation)
2   _DVTAssertionFailureHandler (in DVTFoundation)
3   +[IDEDistributionSummaryStep _distributionItemsWithoutBitcodeForPlatforms:flattenedDistributionItems:archive:withError:] (in IDEFoundation)
4   -[IDEDistributionSummaryStep distributionItemsWithoutBitcodeForPlatforms:withError:] (in IDEFoundation)
5   -[IDEDistributionSummaryStep loadFromPropertyList:error:] (in IDEFoundation)
6   -[IDEDistributionDriver runWithDestinationPath:error:] (in IDEFoundation)
7   -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
8   -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
9  0x00000001047bb202 (in xcodebuild)
10   start (in libdyld.dylib)

I've also tried to upload app using bitrise, but I also failed but at least I know a little more. Below a xcodebuild backtrace just before a above crash log:

** ARCHIVE SUCCEEDED **


Generating exportOptionsPlist...
Using plist 3.1.0
Using bundler 1.13.1
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

Configs:
  * export_options_path: /Users/vagrant/deploy/export_options.plist
  * archive_path:  /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise- xcarchive.akKFUHmn/MyApp-iOS.xcarchive
  * export_method: app-store
  * upload_bitcode: yes
  * compile_bitcode: yes
  * team_id: 
  * plist_content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>method</key>
  <string>app-store</string>
  <key>uploadBitcode</key>
  <true/>
</dict>
</plist>

Exporting IPA from generated Archive...
$ xcodebuild -exportArchive -archivePath  "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise-  xcarchive.akKFUHmn/MyApp-iOS.xcarchive" -exportPath "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise-xcarchive.Jj61X7yX" -exportOptionsPlist "/Users/vagrant/deploy/export_options.plist"

Hi I'm using this extension how to set cornerRadius for only top-left and top-right corner of a UIView? to apply rounder corners to my UIViews, however after the update to swift 3.0 the extension stopped working for UIViews that appear on top of other views.

I want to listen for server side events and update accordingly using AFNetworking 3.0. I found info here nshipster.com/afnetworking-2

This is for AFNetworking 2.0.

This is what the code looks like for the 2.0 version,

NSURL *URL = [NSURL URLWithString:@"http://example.com"];
AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:URL];
[manager GET:@"/resources" parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
    [resources addObjectsFromArray:responseObject[@"resources"]];

    [manager SUBSCRIBE:@"/resources" usingBlock:^(NSArray *operations, NSError *error) {
        for (AFJSONPatchOperation *operation in operations) {
            switch (operation.type) {
                case AFJSONAddOperationType:
                    [resources addObject:operation.value];
                    break;
                default:
                    break;
            }
        }
    } error:nil];
} failure:nil];

The code above seems to be what I am looking for but with using AFN 3.0.

Anyone have any ideas?

I would like to know how I can import these google frameworks (GoogleMaps, GooglePlacePicker, GooglePlaces).

I have tried setting "Allow Non Modular Includes = YES", "Allow Modules Objective C = YES", and "Embedded Content Contains Swift Code = YES".... but am still receiving the same error.

When I @import CoreLocation or any other framework, I do not receive this error. It only shows up for the Google frameworks.

Thank you for any help.

SCREENSHOT OF ERROR

I have an active developer account. In Xcode 8, I'm getting a signing error when trying to run my app on a device.

From what I can tell, I'm supposed to handle signing in the Target > General > Signing. When I go there, it says:

No Accounts Found

Add a developer account to sign your app

I click add and see my active developer account listed. But there isn't anything else to do at this point.

The documentation from Apple just spins you around in circles and doesn't provide a solution. Does anyone know what I need to do at this point?

I was still learning the ins and outs of Xcode when the new version came out and I just upgraded to Xcode 8, which gave me a bunch of errors in the projects I started in Xcode 7.3. I can't get rid of two particular errors:

"Signing for AppName requires a development team. Select a development team in project editor."

"Code signing is required for product type "Application" in iOS SDK 10.0""

I'm pretty sure I could've figured how to fix this in Xcode 7.3, but the project settings page has completely changed and looks kinda confusing right now. Where do I add development teams, and is it possible to add a default development team for all my Xcode projects? I also found the code signing section in the project settings, but filling all the settings doesn't make the error go away, so I'm even more confused about that. I never had to worry about this in previous versions of Xcode, since I never got to the point of actual app distribution. Any help will be appreciated. Thanks!

In iOS, using objective C, is it possible to bend a uiview/rectangle into a curve? Sample image attached..

Here's an example: http://art.tenfab.com/wp-content/uploads/2014/10/DimensionalCurvedTaperedRectangleWall_T.png

Thanks for your help.

I'm trying to play a file. No errors are getting returned. However, for some reason I can't hear anything when playing it on my iPhone.

My Code:

  import AVFoundation

  override func viewDidLoad() {
    super.viewDidLoad()

    //AVAudioSession.sharedInstance()


    let path = Bundle.main.path(forResource: "sound", ofType: "mp3")
    let url = NSURL(fileURLWithPath: path!)

   do {

        let audioPlayer = try AVAudioPlayer(contentsOf: url as URL)

        print("URL is \(soundURL)")

        audioPlayer.play()

    } catch {
        print("Player not available")
    }

  }

We have developed a code in .net that would send a contact file in VCF format to iphone. This was working fine till ios9, but from ios 10 contacts app in iphone is not recognizing the VCF file. Instead it is displaying in ics format as shown below.

enter image description here

Below is the code that we are sending in VCF format. Can somebody please help me on how to save the contact to ios 10.

BEGIN:VCARD VERSION:3.0 N:Jakubowski;Erica;;; FN:Erica Jakubowski ORG:ALL-STATE LEGAL TITLE:Technical Support Specialist item1.TEL;TYPE=WORK,VOICE:800.222.0510 item1.X-ABLabel:Work Voice item2.TEL;TYPE=WORK,FAX:111.111.1111 item2.X-ABLabel:Work Fax item3.TEL;TYPE=CELL:222.222.2222 item3.X-ABLabel:Work Mobile item4.EMAIL;type=INTERNET,WORK,PREF:ejakubowsk@aslegal.com item4.X-ABLabel:Work item5.ADR;TYPE=WORK,PREF:;;1 Commerce Drive;Cranford;NJ;07016; item5.X-ABLabel:Work item6.URL;TYPE=WORK:www.aslegal.com item6.X-ABLabel:Website NOTE;ENCODING=QUOTED-PRINTABLE:My=20Mobile=20Business=20Card:=20=0D=0A=0D=0AI=20learned=20more=20about=20Erica=20Jakubowski=20Near=2018=20Sikh=20Rd,=20Jupiter=20Colony,=20Radha=20Swamy=20Colony,=20Bowenpally,=20SC=20on=209/17/2016.=0D=0A=0D=0AFind=20me=20here:=20=0D=0AMy=20LinkedIn=20Profile:=20http://www.linkedin.com/pub/erica-jakubowski/33/392/a02=0D=0AComplimentary=20vizCards:=20www.vizibility.com=0D=0AWhat's=20a=20vizCard?:=20https://www.youtube.com/watch?v=3DgTp4RMe8unw=0D=0AGoogle=20Me:=20https://www.google.com/webhp?sourceid=3Dchrome-instant&ion=3D1&espv=3D2&ie=3DUTF-8#q=3Dallintext:%22erica+jakubowski%22+%22all-state+legal%22+OR+asl++=0D=0AALL-STATE=20LEGAL:=20http://www.aslegal.com=0D=0Atest:=20www.aslegal.com=0D=0A PHOTO;ENCODING=BASE64:;TYPE=PNG:iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAAAXNSR0IArs4 END:VCARD

I'm looking for a way to achieve some kind of code execution validation, so for example if I have a server and a client, I want the client to execute some code (assembly) and send the server validation of this code was actually executioned fully. (and make sure no one tempered with the code running)

Is this thing actually possible? Because in any scenario I can think about there is always a way to bypass this validation, for example if i send from the server asm code so the machine will run it and return the value the code has generated, if someone on the computer he can basically dissasmble the code and without running it to get the generated value.

I know about the new Intel SGX, but I was wondering if there is any method to do so without the need in such hardware specification?

Thanks for the help!

I'm using an attribute-value (or key-value) schema for nested tags and user votes in Django. Based on what I've read about Hstore, it sounds like it simply saves the object as a string formatted in json (which defeats the purpose of a database, since it's no longer possible to reference a tag everywhere the tag is used (which saves space and makes changes instantaneous)) and provides some api for querying (doesn't seem to have any advantage in functionality over normal queries).

Assuming that my assumptions above are correct, I can only assume that there must be some performance benefit to storing tags as big repetitive strings rather than a couple of integers referring to other tables, i.e. the data is retrieved with no additional seeks, whereas using normal tables it would be at least another two seeks in storage for each tag, or one additional seek for each vote (caching can somewhat compensate for that, since the table containing the tags' strings will be relatively tiny/constant, and there will be 20x more reads than writes on this website). Is this the only reason, or am I missing some other benefits to Hstore?


Here's some minimal sample code so that this doesn't read as such an abstract question (sorry I'm SQL-illiterate so I don't know how to express this directly in Postgres):

class TagUsage(models.Model):
    place = models.ForeignKey('Place', models.CASCADE, 'tags')
    tag = models.ForeignKey('Tag', models.CASCADE, 'places')

    class Meta:
        unique_together = ('tag', 'place')


class Tag(models.Model):
    type = models.ForeignKey('TagType', models.CASCADE, 'tags')
    tag = models.CharField(max_length=254)

    class Meta:
        unique_together = ('tag', 'type')


class TagType(models.Model):
    type = models.CharField(max_length=254, unique=True)

Por favor n

s(n)=la suma maxima

A[n]=la lista de numeros a sumar

0 si n = 0

A[0] si n = 1

max (A[n−1] +S(n−2),S(n−1)) si n > 1

esto es lo que llevo

from sys import *

def sol(A,n):

matriz=[0 for j in range(n+1)]

indi=[]

for i in range(n):
    if n==0:
        return 0
    elif n==1:
        return A[0]

    else:
        if max(A[i]+matriz[i-2],matriz[i-1])==A[i]+matriz[i-2]:
            matriz[i]=max(A[i]+matriz[i-2],matriz[i-1])
            print(matriz[i],i,"Busqueda")
        else:
            matriz[i]=max(A[i]+matriz[i-2],matriz[i-1])
            print(matriz[i],i,"Se mantienes")
            print(indi)
            indi.append(i-1)


print(" ".join(map(str,indi)))           
return matriz[i]

def solu():

for line in stdin:

    val=[int(x) for x in line.strip().split()]

    print(sol(val,len(val)))

solu()

I have seen questions similar to mine, but there are some unusual specifics to mine not covered. I have a SQL SERVER driven ASP.NET web app (website). I am using the older webforms model, not MVC. I understand that MVC is usually a better overall model from what I know of it so far, but I'm not sure in my situation so I would like some opinions from people that know both MVC and webforms.

The site only has two database driven pages that logged in users can view for the entire site. Call them "viewer pages". The two pages are not even linked on purpose, so there is no navigation on this site.

The rest of the pages are what I would call "worker pages", and they are aspx pages with cs code behind. Each one is designed to handle a specific task it will get from ajax calls from one of the two viewer pages. They are the pages that get the database information to complete the ajax request with the needed data. They "could" be xml or json files or at least output those formats, but I chose the AHAH method because I know the exact html that the requesting page needs. So ajax requests come back as html snippets (divs) with no wrapping body or html tags, not xml or json. Therefore client side parsing is not required except some occasional jquery. I have about 30 of these.

I know MVC has some really big advantages for any normal site, but in my case, should I even bother? I don't see where it would give me an advantage except for the url structure feature that has no file extension, which I love about it. But if one looks at the site as a two page website, with no navigation or even links, and 30 pages that spit out xml, I can't see what MVC would do for me.

Thank for your opinions and advice. I would be happy to edit the question if I wasn't clear enough.

I am having a scenario wherein we have a Product Entity or a Front End Module which can be Added, Edited and Deleted.

Now Product ( when added or edited) can contain a Dropdown called as Manufacturer. User can select one value out of it.

I have written a Spring Controller->Service->Dao->Model type of Code to serve the JSON Output of a Tuple from Database Table 'product'.

product : {name:"abc",meta-title:"",manufacturer:"Dell",Model:"some model",price:"2000",SKU:""}

When this JSON arrives in View it is rendered to Template by ProductService.js->ProductController.js->product.jsp ( Using Angularjs )

My Question specifically is :-

  1. How are Sub Entities ( like manufacturer ) be handled ? Like, all the Values of Manufacturer to be sent to View as part of product JSON with an additional selected:Dell flag ?

or

  1. A Manufacturer Controller needs to be written which will serve the list of Manufacturers and then ProductController.js (Angular Client Side) will invoke the ManufacturerService (Angular Client side) which will get the list of Manufacturers and provide it to the Product View.

Even in the second case the Product JSON needs to sent the selected value of the Manufacturer saved in the Database Table product. so how should the JSON be ?

My current career is coming to an end and I'm stepping into the professional world of program development (on multiple fronts) and I'm trying to come up with a good development structure to help keep my focus during the process. Are there common questions that developers ask themselves to keep them on the right mental track?

i.e. How does this affect the end product? How user friendly will this feature really be? Is there a different way to implement this feature?

In the past I've always just cranked out a skeleton of what I'm going for then went back and questioned everything, which just made it all take longer.

I just curious regarding the license name for closed source project for personal or company.

There are many open source license name, such as MIT, Apache, GUN... but I haven't heard of any private copyright license name. Does anyone knows any license name for private project?

At an operating system level, mobile operating systems support the notion of push notifications or a socket level 'persistent' communication with an app, whenever it is online.

Why have the major computer operating systems (OSX, Linux, Windows) embraced this idea at an OS level as a higher level abstraction. This can still be done in an app for sure.

Is there a difference in how we perceive something thats 'pushed' on to our mobile devices (with or without our knowledge) vs something that maybe 'pushed' onto our laptop or home pc?

Is it more to do with how the 'privacy' and permissions structure for an app is defined in a mobile OS as compared to how for a desktop app, its not that well-defined and its not that granular?

Okay so I've already looked at some questions before and all the answers seem to work for them but not for me.

My Nokia has the most recent update and I still don't see the block option for phone calls when I hold down on them. I also can not find the call+SMS option in settings.

Help

I am testing an Android app which is connected to my local router. On the same WiFi network are also running some Java web services using Restlets. I verified that the Android app can hit the service filter and even receive a response from the service filter. However, it cannot seem to hit the Restlet service in question.

The full URL to the service is:

http://192.168.0.148:8080/MyApp/service/login

where 192.168.0.148 is the local IP address of the computer running the Restlet web services.

I have the service mapped in my Restlet Application class as follows:

router.attach("/login", LoginResource.class);

My web.xml file has the appropriate mappings to route anything with the pattern /service/ to the Restlet servlet.

I can successfully hit this service when testing from SOAP UI using precisely the same URL I gave above. In fact, all web services have been tested end-to-end using SOAP UI and are completely functional.

For some reason, the Android app can hit the service filter, when but when it reaches:

chain.doFilter(request, response);

the request ends up lost in space, and nothing gets returned.

I suspect that this is largely a Reslets configuration problem, though I don't know exactly what is happening here.

When trying to build the sample project of BonMot,

let theCFMutableString = NSMutableString(string: myString) as CFMutableString
CFStringTransform(theCFMutableString, UnsafeMutablePointer<CFRange>(nil), kCFStringTransformToUnicodeName, false)

I get this error on the CFStringTransform line

Ambiguous use of 'init' 

The Xcode 8 project uses Swift 3