EzDevInfo.com

feedback.js

Feedback form with screenshot feedback.js

feedback.js server api

feedback.js is a great jquery plugin that allows you to create feedback forms which include a screenshot, created on the clients browser, along with the form.

how can I send captured image and user's review to server side api?


Source: (StackOverflow)

Cordova how to remove "Push notification" on iOS

I submitted my application using cordova to Apple Store and i got an warning from apple that "Missing Push Notification Entitlement".

But it seems that i've never used "Push Notification" in my application. How can i remove it from my application? Is it default in cordova?

Thanks


Source: (StackOverflow)

Advertisements

PHP how to unpack Apple APNS feedback data

I've successfully managed to connect to Apple's feedback APNS server but I'm not sure how to unpack the binary data you get from fread(). Does anyone know how to do this? The documentation says the first 4 bytes are the timestamp, the next 2 are the token length and the rest are the device token.

How does this info get unpacked into readable characters after the call to fread?


Source: (StackOverflow)

Efficiently using a rate-limited API (Echo Nest) with distributed clients

Background

Echo Nest have a rate limited API. A given application (identified in requests using an API key) can make up to 120 REST calls a minute. The service response includes an estimate of the total number of calls made in the last minute; repeated abuse of the API (exceeding the limit) may cause the API key to be revoked.

When used from a single machine (a web server providing a service to clients) it is easy to control access - the server has full knowledge of the history of requests and can regulate itself correctly.

But I am working on a program where distributed, independent clients make requests in parallel.

In such a case it is much less clear what an optimal solution would be. And in general the problem appears to be undecidable - if over 120 clients, all with no previous history, make an initial request at the same time, then the rate will be exceeded.

But since this is a personal project, and client use is expected to be sporadic (bursty), and my projects have never been hugely successful, that is not expected to be a huge problem. A more likely problem is that there are times when a smaller number of clients want to make many requests as quickly as possible (for example, a client may need, exceptionally, to make several thousand requests when starting for the first time - it is possible two clients would start at around the same time, so they must cooperate to share the available bandwidth).

Given all the above, what are suitable algorithms for the clients so that they rate-limit appropriately? Note that limited cooperation is possible because the API returns the total number of requests in the last minute for all clients.

Current Solution

My current solution (when the question was written - a better approach is given as an answer) is quite simple. Each client has a record of the time the last call was made and the number of calls made in the last minute, as reported by the API, on that call.

If the number of calls is less than 60 (half the limit) the client does not throttle. This allows for fast bursts of small numbers of requests.

Otherwise (ie when there are more previous requests) the client calculates the limiting rate it would need to work at (ie period = 60 / (120 - number of previous requests)) and then waits until the gap between the previous call and the current time exceeds that period (in seconds; 60 seconds in a minute; 120 max requests per minute). This effectively throttles the rate so that, if it were acting alone, it would not exceed the limit.

But the above has problems. If you think it through carefully you'll see that for large numbers of requests a single client oscillates and does not reach maximum throughput (this is partly because of the "initial burst" which will suddenly "fall outside the window" and partly because the algorithm does not make full use of its history). And multiple clients will cooperate to an extent, but I doubt that it is optimal.

Better Solutions

I can imagine a better solution that uses the full local history of the client and models other clients with, say, a Hidden Markov Model. So each client would use the API report to model the other (unknown) clients and adjust its rate accordingly.

I can also imagine an algorithm for a single client that progressively transitions from unlimited behaviour for small bursts to optimal, limited behaviour for many requests without introducing oscillations.

Do such approaches exist? Can anyone provide an implementation or reference? Can anyone think of better heuristics?

I imagine this is a known problem somewhere. In what field? Queuing theory?

I also guess (see comments earlier) that there is no optimal solution and that there may be some lore / tradition / accepted heuristic that works well in practice. I would love to know what... At the moment I am struggling to identify a similar problem in known network protocols (I imagine Perlman would have some beautiful solution if so).

I am also interested (to a lesser degree, for future reference if the program becomes popular) in a solution that requires a central server to aid collaboration.

Disclaimer

This question is not intended to be criticism of Echo Nest at all; their service and conditions of use are great. But the more I think about how best to use this, the more complex/interesting it becomes...

Also, each client has a local cache used to avoid repeating calls.

Updates

Possibly relevant paper.


Source: (StackOverflow)

Launch FeedbackActivity in my application like in Android Hangouts

I would like to launch com.google.android.feedback.FeedbackActivity for my application. Like it happens in Hangouts application.

Does anyone knows which extras I need to pass to do so?

Send feedback for Hangouts


Source: (StackOverflow)

Customer Feedback Alternative to UserVoice? [closed]

We are currently hosting an ASP.NET MVC application and we wish to incorporate a turn-key customer feedback system. UserVoice will absolutely meet our needs, but we'd like to consider alternatives before moving forward. GetSatification appears to provide a similiar model. Are there any other service which we should consider as well?


Source: (StackOverflow)

How to react when the client's response is negative on delivery? [closed]

I am a junior programmer. Since my supervisor told me to sit in with the client, I joined. I saw the unsatisfied face of the client despite the successful (from my programmer's perspective) delivery of the project!

Client: You could have included this!
Us: Was not in the specification!
Client: Common Sense!

As a programmer, how do you respond in this situation?


Source: (StackOverflow)

C#: Is this benchmarking class accurate?

I created a simple class to benchmark some methods of mine. But is it accurate? I am kind of new to benchmarking, timing, et cetera, so thought I could ask for some feedback here. Also, if it is good, maybe somebody else can make use of it as well :)

public static class Benchmark
{
    public static IEnumerable<long> This(Action subject)
    {
        var watch = new Stopwatch();
        while (true)
        {
            watch.Reset();
            watch.Start();
            subject();
            watch.Stop();
            yield return watch.ElapsedTicks;
        }
    }
}

You can use it like this:

var avg = Benchmark.This(() => SomeMethod()).Take(500).Average();

Any feedback? Does it look to be pretty stable and accurate, or have I missed something?


Source: (StackOverflow)

Using yield without return type

I have a big long looping procedure like this:

public void Process()
{
    bool done = false;
    do {
        //do stuff
    }while (!done);
}

that I'd like to chop into bits and have the calling routine display my progress in some sort of UI. It's a class library, so the caller may be anything (Console App, WinForms, WebApp, ...).

It would be easiest if I could do:

public void Process()
{
    bool done = false;
    do {
        //do stuff
        yield return;
    }while (!done);
}

So the caller could keep calling the method until it's done.

This smells more like a job for BackgroundWorker, but that seems "wrong" for a Console App... I won't always NEED multithreading. Or does it? I mean, yeah, I could just have the console's main thread just wait for it to finish.

My question is: Can I use the "piecemeal" deferred execution functionality of "yield return" without actually returning something?


Source: (StackOverflow)

Testing Apple Push Notifications Feedback - no items received

How to test feedback.sandbox.push.apple.com? Everything goes right, but I receive empty list.

How to make it consider the device token as inactive?

I installed the application to iPhone using Xcode, received some push notifications, then removed it from iPhone and send some more notifications. But even on the next day feedback.sandbox.push.apple.com returns just empty set.


Source: (StackOverflow)

Full setup of Transform Feedback(openGL)

GLSL 1.50, openGL 3.3.

I've been lately trying to get my tranform feedback working but without success. I still receive error after glBeginTranformFeedback() and as I haven't found any full working code I have stacked up my knowledge with some code that I found and documentation, it should be working well by now but I am missing something. So if anybody got full code (initializing of buffers, setting up, updating, rendering, reading back) it would definitelly help and if you don't but know what's going on you could take look at my code. I excluded some benchmarking, handling of windows and it's creation:

int main()
{
    bool fullsize = false, paused = false; 
    std::string caption = "Tester";

    GLuint dataVAO,speedUpdateVBO,dataVBO;
    std::vector<vector3f> dataW;

    // Create the main rendering window

    init(); //just some camera commands

    UniShader shader; //my shader class keeps everything together
    shader.init();
    shader.addShader("test.vert");
    shader.addShader("test.frag");
    shader.newAttributeVariable("speed");
    shader.newFeedbackVarying("sp");
    shader.linkShader();
    shader.use();

    //init some data
    dataW.push_back(vector3f(0,1,0));

    //creating VAO
    glGenVertexArrays(1,&dataVAO);
    glBindVertexArray(dataVAO);
    //creating VBO
    glGenBuffers(1,&dataVBO);
    glBindBuffer(GL_ARRAY_BUFFER,dataVBO);
    glBufferData(GL_ARRAY_BUFFER, sizeof(vector3f), 0, GL_DYNAMIC_DRAW);
    glVertexAttribPointer(shader.getAttributeIndex("speed"), 3, GL_FLOAT, GL_FALSE, 0, 0);

    glGenBuffers(1, &speedUpdateVBO);
    glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, speedUpdateVBO);
    glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(vector3f), NULL, GL_DYNAMIC_COPY);
    glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, speedUpdateVBO); 
    glBindVertexArray(0);


    while (App.IsOpened())
    {
            App.SetActive();
        benchP = Clock.GetElapsedTime();

        //update calls
        if(!paused)
            //update
        benchU = Clock.GetElapsedTime();

        //render calls
        glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glColor3f(0.6f,0.7f,0.7f);

    GLuint query;
    GLuint count = 0;

    glGenQueries(1, &query);

    glEnableVertexAttribArray(shader.getAttributeIndex("speed"));

    glBindVertexArray(dataVAO);

    glBindBuffer(GL_ARRAY_BUFFER,dataVBO);
    glBufferData(GL_ARRAY_BUFFER, sizeof(vector3f)*dataW.size(), &dataW[0], GL_DYNAMIC_DRAW);
    glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, speedUpdateVBO);
    glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(vector3f)*dataW.size(), NULL, GL_DYNAMIC_COPY);

    glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, speedUpdateVBO); 
    glEnable(GL_RASTERIZER_DISCARD);
    glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, query);
    printOglError(); //Until this everything OK, I think
    glBeginTransformFeedback(GL_POINTS); 
    printOglError(); //This one prints out Invalid Value

    glDrawArrays(GL_POINTS,0,dataW.size());

    glEndTransformFeedback();
    glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN); 
    glDisable(GL_RASTERIZER_DISCARD);

    //retrieve updated data
    glGetQueryObjectuiv(query, GL_QUERY_RESULT, &count); //count is 0 -> nothing happend

    glBindVertexArray(0);
    glDisableVertexAttribArray(shader.getAttributeIndex("speed"));

    glDeleteQueries(1, &query);

    App.Display();
    //some other benchmark stuff
}

shaders: vert

#version 150 core
in vec3 speed;

varying vec3 sp;

const float gravity_constant = 9.81f;

void main(){
    sp = speed;
    sp += vec3(0,-gravity_constant,0);
}

frag

#version 150 core
varying vec3 sp;

void main (void)
{
    vec3 c = sp;
    gl_FragColor = vec4(c,1.0);
}

Fragment shader is there just for GLSL optimalization. If sp wouldn't be used GLSL would clear it up. There may be some minor bugs as I extracted this from much larger code with multiple varyings that fails aswell.


Source: (StackOverflow)

HOWTO remove device tokens received by Apple APNS feedback

I am successfully fetching Apple APNS feedback data via PHP. The structure that I am getting (after some processing) looks something like this:

timestamp

device token

My question is how to know which of the device tokens should I remove from my database and stop sending notifications to them.

Regardz,

Mladjo


Source: (StackOverflow)

Is there an Android GCM equivalent to the iOS Push Notification Feedback Service?

Our webapp sends push notification requests to iOS and Android devices.

For iOS, the Apple Push Notification Service has a feedback service so you can detect which devices have uninstalled your app and then remove it from your database.

Is there a similar feedback service for Android GCM? If not, how to detect which Android users no longer have the app installed?


Source: (StackOverflow)

Way to get User Feedback for iPhone app?

I'm looking for some services where users are pushed to try my iPhone app and give back feedback or reviews?

I would pay also. Do you know such kind of services or websites?

Thanks PS: I know Apperang and AppRebates already


Source: (StackOverflow)

How to collect customer feedback? [closed]

What's the best way to close the loop and have a desktop app "call home" with customer feedback? Right now our code will login to our SMTP server and send me some email.


Source: (StackOverflow)