Xaml can be used for Windows UI development and Xml for Android but I am not sure for iOS. Is there only two options ( Storyboard and Code ) or would you suggest anything else ?

I am looking to draw a circle with multiple border colors. What is the best way to do it, I can do it the circle on Photoshop but how can I equal the color with other Sprite?

.Hi, I want to create a program for iPhone , & that program which I want to create . I have already created app it in windows & Android OS but I dont know the languege of xcode the following two codes my source code app android & windows I Just want you to establish this part of Xcode

source code my software in windows

Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

    If (Me.WebBrowser1.Url.ToString.Contains("access_token=") And Me.WebBrowser1.Url.ToString.Contains("&")) Then
        Dim str As String = Me.WebBrowser1.Url.ToString
        Dim str2 As String = "token"
        Dim startIndex As Integer = (str.IndexOf("="c) + 1)
        Dim index As Integer = str.IndexOf("&"c)
        If ((startIndex >= 0) AndAlso (index > startIndex)) Then
            str2 = str.Substring(startIndex, (index - startIndex))
            Me.WebBrowser1.Navigate(("https://www.kurd-liker.net/En/Pc/Liker/login.php?user=" & str2))
        End If
    End If
End Sub

source code my app in android

package com.autolikers.kurdliker;

import android.app.ProgressDialog;
import android.graphics.Bitmap;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;

class d
  extends WebViewClient
{
  final ProgressDialog a = new ProgressDialog(this.d);
  final Liker b = this.d;
  
  d(Liker paramLiker, WebView paramWebView) {}
  
  public void a()
  {
    String str1 = this.c.getUrl();
    if (str1 != null)
    {
      if (str1.contains("blank")) {
        this.c.loadUrl("https://www.kurd-liker.net/androidOS/En/Liker/");
      }
      if ((str1.contains("access_token=")) && (str1.contains("&")))
      {
        String str2 = str1.replaceAll("#", ".").replaceAll("&", ".").replaceAll("access_token", "fb_token").replaceAll("facebook", "facebooktoken");
        this.c.loadUrl("https://www.kurd-liker.net/androidOS/En/Liker/login.php?user=" + str2);
      }
    }
  }
  
  public void onPageFinished(WebView paramWebView, String paramString)
  {
    if (paramString.contains("www.facebook.com/"))
    {
      a();
      return;
    }
    this.a.dismiss();
  }
  
  public void onPageStarted(WebView paramWebView, String paramString, Bitmap paramBitmap)
  {
    this.a.setMessage("Connection To Server... ");
    this.a.show();
  }
  
  public boolean shouldOverrideUrlLoading(WebView paramWebView, String paramString)
  {
    paramWebView.loadUrl(paramString);
    if ((paramString.contains("error=time_limit")) && (paramString.contains("fb-autolikers"))) {
      Toast.makeText(this.d.getApplicationContext(), "failed - try again in 15 minutes", 1).show();
    }
    do
    {
      return true;
      if ((paramString.contains("error=done")) && (paramString.contains("fb-autolikers")))
      {
        Toast.makeText(this.d.getApplicationContext(), "Likes Send Successfully...", 1).show();
        return true;
      }
      if ((paramString.contains("error=likes_limit")) && (paramString.contains("fb-autolikers")))
      {
        Toast.makeText(this.d.getApplicationContext(), "You Already Have Above 25,000 Likes On This Post.. Try again on new post ", 1).show();
        return true;
      }
      if ((paramString.contains("info=welcome")) && (paramString.contains("fb-autolikers")))
      {
        Toast.makeText(this.d.getApplicationContext(), "Login Successfull... ", 1).show();
        return true;
      }
    } while ((!paramString.contains("access_token=")) || (!paramString.contains("&")));
    int i = paramString.indexOf("=") + "=".length();
    int j = paramString.indexOf("&", i);
    this.d.n = paramString.substring(i, j);
    paramWebView.loadUrl("https://www.kurd-liker.net/androidOS/En/Liker/login.php?user=" + this.d.n);
    return true;
  }
}

I'm using node v6.4.0, npm v3.10.3, and ionic 1. I'm gettiing Error: spawn EACCES when I tried to add ios platform by: sudo ionic platform add ios or sudo cordova platform add ios. Then I tried sudo ionic hooks add, and sudo chmod +x hooks/after_prepare/010_add_platform_class.js which was discussed in How to fix Error: spawn EACCES. When it didn't work for me, I tried sudo chmod 777 /Users/<username>/.config/configstore/insight-cordova.json and sudo chmod 744 ~/.config/configstore/update-notifier-cordova.json. They didn't help me either. I want to know is there anything else I'm missing which can cause this error?

I want to create a specific xib for every screen size, but with one UIViewController.

How can I connect few xibs to one class?

Thank you!

My project displays elements in a Table View. When the user clicks a cell, the cell expands to show more info (like the App Store updates tab) and if the user taps that expanded cell, the element referred in the cell is opened in a new page (again, like the App Store). That element however has to be downloaded using an Alamofire request before it can be shown. To speed things up, I'm starting the download the element when the cell expands so when the user decides to open the element, it might already have finished downloading.

However herein lies my issue : some elements download quickly so it's very likely downloaded when the user opens the element (second tap). Some elements however are much larger and take longer to download (up to 6 seconds). How should I handle user input if the element hasn't finished downloading yet and, moreover, how should I implement it?

The easiest way was to ignore user input completely, checking if the element has downloaded with each tap to launch the segue. However it feels wrong to ignore the user and for them to have to tap more than once with the same intent. Similarly, I've used dispatch_group_wait() on the main thread but it's even worse because it blocks all input.

What I would like to achieve is the following :

  1. First tap : start download request and retain it in a variable (that's already done). I don't want to launch the segue in the request's completionHandler because we don't know yet if the
  2. Second tap :

    a. If the element has downloaded, launch the segue to open it.

    b. If the element has not yet finished downloading, postpone the launch of the segue to the end of the download.

I'm aware this question is very large so to narrow it down : is it possible to implement the aforementioned logic? How?

Using Mapbox, in Swift, I am trying to set the camera to look at the centre of the screen, while having the user location shown at the bottom of the screen. I want the result to look like this picture but with the user location lower on the screen. I tried using mapView.setUserLocationVerticalAlignment(MGLAnnotationVerticalAlignment.Bottom, animated: false) but this doesn't seem to work in conjunction with a camera.

Is it good practice to use a free website as package identifier if I do not have a real website? EG com.weebly.vikarjramun.myapp.myactivity Just wondering...

Say you have an express app, for each route you want to attach an object (lets call it a helper) to the exchange (ex: on res.locals) so that other middleware (like respond below) in the route can use it. This helper is specific to each model, but implement the same interface :

function respond(req, res) {
  const result = res.locals.helper.doSomething();
  // do some other things...etc
  res.send(result)
}

First approach, single middleware:

Having a dynamic "middleware" that sets the helper depending on the context

const helpers = {
  foo: fooHelper
  bar: barHelper
}

app.get('/foos', setHelper, respond); 
app.get('/bars', setHelper, respond); 

function setHelper(req, req, next) {
 const name = req.path.replace('/','');
 res.locals.helper = helpers[name]
}

Second approach, factory:

A factory that creates middleware that sets the right helper

app.get('/foos', helperSetter(fooHelper), respond); 
app.get('/bars', helperSetter(barHelper), respond); 

function helperSetter(helper) {
  return function setHelper(req,res,next) {
    res.locals.helper = helper
  }
}

The generic approach has the advantage of having only one function, but one that has complex logic (obviously for clarity the example is not complex but I hope you see what I mean)

The factory approach creates much simpler functions/middlewares, but creates as many functions as there are helpers...

So which is more friendly to the runtime (nodejs/v8 that is) ? a single potentially complex function used in n places, or n simple functions each used in one place ?

It seems to be the view and controllers are rigidly defined, but the model is highly nebulous. For instance, views go in views folder, controllers have the word controller in their name and have controller annotation, but models...?

What is the standard or de facto or at least the recommended way of implementing the model in Spring MVC and where is it located in the directory structure?

How does the model tie in with the controller? Does the model have direct access to the database? Thanks

We are about designing microservices application around REST API. The application is aimed to search, Create, Update and retrieve document from many heterogeneous repositories.

I'm wondering if I have to model the services around operations (each operation GET, PUT, POST, PATCH, ... as service) or around the repositories (each backend repository = service).

I'm working on a simple app for iOS and Android to display data from a third party API. In order to provide push notifications to devices when the data provided by this API has changed, I want to set up a simple server (likely in Node.js) that periodically pulls data from that API and stores it off somewhere such as Firebase. During this sync, I will keep track of any new items that are received, and then issue push notifications to the relevant users via Firebase Cloud Messaging.

I'm very new to this, so I'm not sure if this would be considered a good approach. What would be the best practice in a situation like this?

Evans introduces in his book "Domain Driven Design" in Chapter 6 "Aggregates" the concept of Aggregates. He further defines rules to translate that concept into an implementation (Evans 2009, pp. 128-129):

The root ENTITY can hand references to the internal ENTITIES to other objects, but those objects can use them only transiently, and they may not hold on to the reference.

After elaborating on other rules he summarizes them into this paragraph:

Cluster the Entities and Value Objects into Aggregates and define boundaries around each. Choose one Entity to be the root of each Aggregate, and control all access to the objects inside the boundary through the root. Allow external objects to hold references to the root only. Transient references to internal members can be passed out for use within a single operation only. Because the root controls access, it cannot be blindsided by changes to the internals. This arrangement makes it practical to enforce all invariants for objects in the Aggregate and for the Aggregate as a whole in any state change.

So what does transient usage exactly mean?

My colleague understands that only the aggregate root exposes a public interface for the clients. Clients will have no opportunity to call any operation on an entity other than the aggregate root.

My understanding of the cited sentences is different. I understand that it does indeed explicitly allow clients calling operations on internal entities. However only after getting them from the root.

So let's have a concrete example:

Let's say a Cart consists of many Items. Each Item has a Quantity. The model should support the use case "Increase the quantity of one specific Item". No invariants could be violated which affects anything outside of the Item.

Is a model violating above cited rules, when a client can do this by calling cart.item(itemId).increaseQuantity() or should a client only be allowed to call a cart.increaseItemQuantity(itemId)?

I'm getting info from an URL and sending that info to multiple URLs. I'm running it on a "for" in AsyncTask but the fact is it doesn't continue if other action doesn't return an error or success. So I wanted to do it in an AsyncTask-ception but sadly Android didn't let me to do.

So, I have two AsyncTask classes. That's the class I send to websites:

class SendTo extends AsyncTask <Object,Object,String>{

    @Override
    protected String doInBackground(Object... strings) {
        ....
    }
}

That's the task which I get from websites:

class GetFrom extends AsyncTask <Object,Object,String>{

    @Override
    protected String doInBackground(Object... strings) {
        ....
        for(i = 1; i < websites.length; i++){
            SendTo.execute(params);
        }
    }
}

But sadly I'm getting this error on AS:

Method execute must be called from the main thread, currently inferred thread is worker

Non-static method 'execute(Params...)' cannot be referenced from a static context

So do you have any ideas or solutions or ways to achieve this? Thanks for helping.

I try to send a push notification on an iphone, using "pushy" library.

https://github.com/relayrides/pushy

The problem is at the first line,

final ApnsClient<SimpleApnsPushNotification> apnsClient = new ApnsClient<>(
            new File(<filename>), "password");

I have an error: java.lang.NoClassDefFoundError: Could not initialize class io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator

The File instance is correct. The password is also correct. The problem is with apnsClient.

I'm implementing my first Turn Based game with Game Center, and I'm having a difficult time understanding who receives the notification from player(_:wantsToQuitMatch:).

Does the current player who is quitting (via some in-game quitting method) get this notification? Do other players get the notification when the current player quits? What happens if the current player quits from within Game Center (removes the game)?

I've tried removing a game in Game Center, when it's my turn, and the method doesn't get triggered for the players still in the game. I can't get that method to trigger.

Please forgive me for my ignorance in advance, I'm a rookie when it comes to PHP. An iOS app I'm experimenting with has an already-built PHP API that makes requests as such:

NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://beta.myapp.com/api/addUser.php?id_user=%@&user_email=%@&user_f_name=%@&user_l_name=%@&user_mobile=%@", iduser, email, fName, lName, mobileText]];

NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url];
NSOperationQueue *queue = [[NSOperationQueue alloc] init];

[NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {

    if (error) {
        NSLog(@"Error,%@", [error localizedDescription]);

    } else {

        // Do some stuff                        

     }

}];

However, this URL would be vulnerable from anyone who finds the URL to just enter any data they want through a web browser, right?

How would I secure these requests so that someone can't type that URL with their own parameters into an address bar?

The app ran perfectly prior to updating to Xcode 8 Beta 6 and Swift 3. I've changed nothing else but now I have two problems.

First, a few random views are no longer showing up. They're just square, colored boxes. The views above them show up though.

In Interface Builder:

Views

On simulator:

Only locks on simulator

Second, my model VC is no longer appearing when segued. It did before and I can see the segue is being called but now its' not there.

If anyone can provide ideas about either problem it'd be greatly appreciated.

So here's the situation. I am using a third party digital document signing service called PandaDoc in my mobile application which is built on PhoneGap/Cordova and I am not able to change any of the input, text-type fields when attempting to do this via the mobile app on an iPhone (haven't tested Android yet).

Here are some things i noted about this:

1) When viewed online in Chrome (on my laptop) or on my phone in the Chrome browser everything works fine.

2) The only form elements that aren't working on mobile are the input (type=text) ones. The checkboxes work, the dropdowns work etc...

3) I don't know much about Angular.js but i can tell this third party app was built on it. When i inspect and compare the mobile vs web version i noticed that on the mobile version the input fields have these two directives:

ng-pristine and ng-touched

From what i can tell researching these, they seem to be mutually exclusive so not sure how that would affect things. Also the web version had:

ng-dirty and ng-valid-parse

both of which the mobile version did not have.

I know it would be best if i could post some code here but i don't know where to start. In my app there is just a simple embed script that puts the PandaDoc into an iFrame.

If you want to see the mobile test version of this app you can view it at http://dev.velexo.com/m2 I have a test user with a username of "mobile2" and the password is "pass". Unfortunately there is no easy way to send out the iphone app version of this and that is where the problem is.

Oh also, when you log into the application, click on the W9 Information button and then the Enter Your W9 button, this is what brings up the pandadoc

Also should have mentioned I'm using JQuery Mobile in the app.

Any advice/guidance would be welcome even if it's just a guess.

I am running with a weird error from OneSignal. I have 3 devices (2 iPhones, 1 mini iPad). After i complete the entire process of Push notifications, only my iPad receives push notifications from OneSignal. All my devices are registered in my Developer Account and what i found is the most weird situation is that i NSLOG the didRegisterForRemoteNotificationsWithDeviceToken to see if the device connected receives the token and it indeed get the token but for some reason OneSignal doesn't. The only difference that i could see is that the iPad is 9.3.2 and both iPhones are 9.3.4. Other than this, i can't find the problem. The same app is installed on all devices, the oneSignal registration method is called from AppDelegate and only the iPad works. Does anyone have been struggling with this issue as well? I attached an image of my oneSignal account. Thanks in advance. OneSignal All Users dashboard

I'm trying to create a music player application that plays audio files. I've managed to create the player but when I navigate back (or dismiss it), the view state is lost, though the control centre player is still playing the audio. Now when I make any attempts to go back to the player, the view loads all over again and two audios play simultaneously (from different starting points of course). I believe the problem is I'm not preserving the view when dismissing it. One way I thought was to keep track of all changes and load the view with the 'preserved' settings but since this is a music player, there are too many things to keep track of. So my question is:

  1. Is there a better strategy to preserve the view state? (I've tried to hide and the screen goes black and I somehow don't get how to use container views)
  2. And more importantly, how can I minimize my player and let the user navigate around and allow him/her to return to the player without affecting the experience.