Friday, 13 September 2013

Undefined index: myusername in C:\wamp\www\login\login\index.php on line 15 Call Stack

Undefined index: myusername in C:\wamp\www\login\login\index.php on line
15 Call Stack

in my login page it appears error in my log in page how to fix this thanks
Undefined index: myusername in C:\wamp\www\login\login\index.php on line
15 Call Stack

reformat existing array to group items together

reformat existing array to group items together

I have the following array:
Array
(
[0] => Array
(
[name] => bss2
[label] => front
[text] => just a testing item
)
[1] => Array
(
[name] => bss3
[label] => front top
[text] => front top testing item
)
[2] => Array
(
[name] => J334
[label] => back top
[text] => masking test back top
)
[3] => Array
(
[name] => J3366
[label] => back
[text] => back non mask test
)
)
What i would like to accomplish is to check to see if label = front then
group the ones with front together and same with back all in one big array
to have it looks like so:
[approval] => Array
(
[0] => Array
(
[name] = front
[prev] = Array
(
[0]=>Array
(
[name] => bss2
)
[1]=>Array
(
[name] => bss2
)
)
)
[1] => Array
(
[name] = back
[prev] = Array
(
[0]=>Array
(
[name] => J334
)
[1]=>Array
(
[name] => J3366
)
)
)
)
so far I dont have much and am stuck but this is my code
foreach($info as $data) {
if(strtolower(strpos($data['label'], "front") !==false)) {
} else {
}
}
Any help is greatly appreciated thank you.

How to list the contents of the variable VAR

How to list the contents of the variable VAR

How to list the contents of the variable VAR
(
VAR="foo";
) &
echo $VAR; # I need to get "foo" ?
thank you very much

Push Messaging with Amazon SNS, SQS and PHP

Push Messaging with Amazon SNS, SQS and PHP

I want to use Amazon SNS to send time-critical mobile PUSH notifications
to 20 million devices. Each topic can have up to 10,000 devices, and I can
create up to 3,000 topics. Using the Amazon PHP SDK would mean sending
2000 API calls at 1 second each - 33 minutes in total. This is no good for
time-critical messages.
I have created an SQS queue and subscribed that to the SNS topic. When I
send my PUSH message to the SQS queue, it doesn't get delivered - it
remains in the queue.
How can I use these services to send the messages more quickly?
Thank you!

Thursday, 12 September 2013

"Redirect url" error in facebook api

"Redirect url" error in facebook api

I am working on facebook api. I want to get all facebook post of a user. I
have set the app_id, secret and permission in my code.
This code is working on my localhost perfectly. but when I am putting it
on server then during authentication it is giving error :
This webpage has a redirect loop
My code is located at the url :
https://github.com/ucerturohti/facebookapitest.git
and the app is located at
https://statusupdates.herokuapp.com
update
When I am putting redirect url "https://statusupdates.herokuapp.com" then
its authenticating.
but when I put redirect url as
"https://statusupdates.herokuapp.com/getlike.php" then it is giving error.

Audio is not playing properly in ffmpeg player

Audio is not playing properly in ffmpeg player

I need to create a player which will decrypt the input on-fly and play the
content. I have choosen ffmpeg libs (libav*) to create player and to start
I have followed this link
but audio is not playing properly,video is playing fine. I am using ubuntu
12.04LTS 64bit OS with the following ffmpeg version,
admin@vz-X401A1:~$ ffmpeg ffmpeg version 2.0 Copyright (c) 2000-2013 the
FFmpeg developers built on Sep 11 2013 13:46:26 with gcc 4.6
(Ubuntu/Linaro 4.6.3-1ubuntu5) configuration:
--prefix=/home/admin/ffmpeg_build
--extra-cflags=-I/home/admin/ffmpeg_build/include
--extra-ldflags=-L/home/admin/ffmpeg_build/lib --bindir=/home/admin/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 52. 43.100 / 52. 43.100 libavcodec 55. 31.101 / 55. 31.101
libavformat 55. 16.102 / 55. 16.102 libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 84.100 / 3. 84.100 libswscale 2. 5.100 / 2. 5.100
libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile
options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg' admin@vz-X401A1:~$
and downloaded tutorial07.c from this link
still, with this also, sound is not playing properly.
I need help to solve the following issues,
1> How can I fix this audio issue(I have gone through similar question in
StackOverflow and installed old ver. of ffmpeg, but issue still remains).
2> And also suggest some steps or tutorial, how to implement on-fly
decryption process (in C) and integrate this with the player.
Thank You.

Admob Help Please It's a challenge

Admob Help Please It's a challenge

Okay guys I have done everything I can think of before bother you for
help. And usually I've very good at picking up on this stuff but I am
truly at a loss. I have tried different tuts, mixed and match with no
success. I'm just looking for a detailed (SIMPLE) method to get admod
showing at the top and the bottom (Not at the same time but easily edited
to move to either)
I'm using dreamweaver 5.5 to build and the updated JARS for everything. I
have all the admod stuff in place and the light is green. I had a bunch of
errors at first but I was finally able to get the app to load in the
emulator and it looks great but no ads ever showed after 4 days of fooling
around with it.
Not the working code I had it messed up :)
I'm not lazy just frustrated so an easy, complete cut and pasted would be
a life saver. I do think one of my earlier problems was I wasn't leaving
enough space.
Okay here are my codes: (And it is not loading in the emulator)
DEFAULT ACTIVITY JAVA:
package ___BUNDLE___;
import android.app.Activity;
import android.os.Bundle;
import com.phonegap.*;
public class DefaultActivity extends DroidGap
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty( "splashscreen", R.drawable.splash );
super.loadUrl("file:///android_asset/www/index.html", 1000);
}
}
MAIN:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

</LinearLayout>

MANIFEST:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- A full list of available permissions is available at
http://developer.android.com/reference/android/Manifest.permission.html
-->
<application android:icon="@drawable/icon"
android:label="@string/app_name" android:debuggable="true">
<activity android:name=".DefaultActivity"
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
</application>
<uses-sdk android:minSdkVersion="7" />
And if this is junk I'll take one that will work I just really need to get
this app up and running...
Thank you in advance I know you guys are great here and I will give the
knowledge back to others in need.
One side note for some reason all my packages say DefaultActivity instead
of the package name (I'm talking in my projects list) I can't figure out
how to make it show it's true name. Yeah I know, but hey I'm trying hard
to learn it....
Thanks (I used CTL K but it's not doing it well sorry)