SimonIoa 63

Any idea what i should do? Reject tha app totally?

SimonIoa 63

Hello i ve tried to upload my first app on the App Store but i got this mesage from Apple. Any ideas how to proceed?

*Your app provides a limited user experience as it is not sufficiently different from a mobile browsing experience. As such, the experience it provides is similar to the general experience of using Safari. Including iOS features such as push notifications, Core Location, and sharing do not provide a robust enough experience to be appropriate for the App Store.

Next Steps

To resolve this issue, please revise your app to provide a more robust user experience by including additional native iOS functionality.*

SimonIoa 63

Hello i want to upload an audio file(.mp3). The file is uploaded on the folder, the value is inserted on the db (MySql) so far so good. But when i try to play the file on the uploads folder is says its corrupted or extension is wrong.the value is not base64 is the original name of the file

html

           <form [formGroup]="form" (ngSubmit)="onSubmit()"> <input type="file" name="avatar"     (change)="onFileSelect($event)" /> <button type="submit">Upload</button> </form>

ts

 onSubmit() {
const formData = new FormData();
formData.append('avatar', this.form.get('avatar').value);

this.group_id = 0;
this.media.tags = this.hashes;
this.media.audio = formData;
this.media.browser = true;
this.userData.uploadAudio(this.media, this.group_id ).subscribe(
  (res) => {
    this.uploadResponse = res;
      console.log(res);
  },
  (err) => {  
    console.log(err);
  }
);
 }

php

$mediaData = $request->post('media');
$name = $mediaData['audio'];
$uri =  substr($name,strpos($name,",")+1);
$encodedData = str_replace(' ','+',$uri);
try 
{
    $name = md5(time() . rand(1, 1000));
    if(!file_put_contents('uploads/' . $name.'.mp3', $decodedData)) 
    {
    }
}
catch(Exception $e)
{
}
$name = $name . '.mp3' ;

SimonIoa 63

Hello does anybody see any error in this?

[!] Unable to find the Xcode project /Users/macbookpro/Desktop/project/platforms/ios/C:\Users\Simos\project\platforms\ios\Project.xcodeproj for the target Pods-C:\Users\Simos\project\platforms\ios\Project.

I copied my project from my PC to my Mac in a usb drive. THERE IS NO C:\Users\Simos\ directory on mac. Why ai i getting this?

rick.darwin commented: Part of the problem no doubt is that you have mangled the MacOS and the PC filepaths together. +0

SimonIoa 63

I have a search script that a user may search persons etc. I want to display a message if what he or types doesn't exist in the array. By default, I display some results and it displays the desired person when one writes on searchbar. but I want to show a message if what the user writes on searchbar doesn't much the array. the ngfor works perfectly I just can't show the message.

I did a ngIf but doesn't show the #noThings when I type for example djlsklkssk.

Note that userSet always has length > 0 because I call the API anyway.

<ion-searchbar style="height: 30px" showCancelButton="focus" cancelButtonText="Custom Cancel" animated placeholder="Search Rovespier" [(ngModel)]="terms"></ion-searchbar>

<ion-card *ngFor="let item of userSet | search : terms">
    <div *ngIf="item; else noThings">
        {{item.name}}
    </div>
</ion-card>
<ng-template #noThings>
    <div>
        No Result
    </div>
</ng-template>

TS

I have a search script that a user may search persons etc. I want to display a message if what he or types doesn't exist in the array. By default, I display some results and it displays the desired person when one writes on searchbar. but I want to show a message if what the user writes on searchbar doesn't much the array. the ngfor works perfectly I just can't show the message.

I did a ngIf but doesn't show the #noThings when I type for example djlsklkssk.

Note that userSet always has length > 0 because I call the API anyway.

<ion-searchbar style="height: 30px" showCancelButton="focus" cancelButtonText="Custom Cancel" animated placeholder="Search Rovespier" [(ngModel)]="terms"></ion-searchbar>

<ion-card *ngFor="let ...

SimonIoa 63

Hello i want to show html5 video with content over it . Like background image. The whole div html5 video must be of 400px height

        <div style="height: 400px">
         <video controls poster="{{item.media_pic}}">
        <source src="{{item.image_path}}" type="video/webm" />
        <source src="{{item.image_path}}" type="video/mp4">
        <source src="{{item.image_path}}" type="video/ogg">
        Your browser does not support HTML5 video.
      </video>
      <ion-row>
        <ion-col col-4>
          some text
        </ion-col>
        <ion-col col-8>
        button         
        </ion-col>
      </ion-row>
    </div>

SimonIoa 63

but it crops the image it doesnt show the full image in height and width

SimonIoa 63

Hello i want to show the full image in a specified height div like this

        <div style="width:400px"> <img class="images" src="someimage.jpg"> </div>

i tried this

    .images
    {
    width: 100%;
      height:auto;
    }

SimonIoa 63

The sound plays in autoplay when the page loads and i need a on/off button. I haven't created a on/off function

rproffitt commented: Check out the link. I see a button in the control to mute/unmute. +15

SimonIoa 63

Hello i want to make a button that mutes and unmutes sound in html5 tag.
Here what i have so far. Sadly it doesnt work

.ts

soundOnOff()
{
    let audio = document.getElementById('muteSound') as HTMLMediaElement
    audio.muted = true;
}

html

               <button onclick="enableMute()" type="button">Mute sound</button>
<video id="muteSound" muted="true" playsinline autoplay loop preload="auto">
    <source src="assets/videos/louvre.mp4" type="video/mp4" >
</video>

SimonIoa 63

Hello i am using Ionic 3 and Angular 5. Does anyone has an example for displaying items in different ion-cols (col-6, col-8,col-12)? Pinterest wise?

SimonIoa 63

I have three tables(table, table2,table3). From table1 i want to return three rows: Title, Desc,time,'products' AS type

From table2 i want to return three rows: group_title, group_desc, created,'groups' AS type

From table3 i want to return three rows: name, occupation,birth,'users' AS type

  $sql = "SELECT DISTINCT * 
    FROM
        (SELECT table1.title, table1.desc, table1.time,'products' AS type
        FROM table1 ORDER BY rand() LIMIT 5) AS T
     UNION ALL
        (SELECT table2.group_name,table2.group_desc,table2.created,'groups' AS type
        FROM tabl2 
        JOIN table1 ON table2.id = table1.id 
         ORDER BY rand() LIMIT 5)
    UNION ALL
        (SELECT table3.name,table3.occupation,table3.birth,'users' AS type
        FROM table3
        JOIN  table1 ON table3.id = table1.id
        ORDER BY rand() LIMIT 5)";

am using Ionic to push those three parameters of an Array to the next page so if i use AS and put the same name. I set a parameter AS type that i need so i can work different types. it has to be 'products' AS type for table1, 'groups' AS type for table2, users as type for table3 i want to separate the objects from each table.

It cant use AS the for the rest of the columns because i want to push the original columns
e.g.

 (SELECT table1.title AS title, table1.desc AS desc, table1.time AS time
    FROM table1 ORDER BY rand() LIMIT 5) AS T
 UNION ALL
    (SELECT table2.group_name AS title,table2.group_desc AS desc,table2.created AS time.....

If i do that it displays the object parameters ok e.g. {{item.title}}

but i can not push or navctrl the parameter as title it has to be group_name. I hope i made ...

SimonIoa 63

Hello i want to create in html and css something like the picture i shared here. An image over two divs. Equally divided through the two divs like the picture here. Any sugestion?

sample.png

SimonIoa 63

Screenshot_2019-03-28.png

Hello i want to show font on an image. Now, the image could be whatever a user uploads- that means white of black background. The font is not looking good. I want to try out something that will look clear on both on dark or light background. I put text shadow on it but the font is not clear. It doesnt looks good. I shared a photo of the problem

SimonIoa 63

Altough it shows the results on inspector response it doen't print them Why? I want to show the results on GROUP__CONCAT

SimonIoa 63

i don't want it to result echo col1_id . col1_name (A john,A john, Ajohn) and col2 (bear,dog, cat)

SimonIoa 63

"As long as all unioned queries have the same type of column" You are right @CesarF, i havent expressed myself as i wanted. The problem is that i push the parameters of the array using Angular, to the next page and i need the original names of the columns (group_id,group_name... uid, username... msg_id, title...)

SimonIoa 63

Hello i have a problem with a Sql script

SELECT col1_id, col1_name, col2 FROM table GROUP BY ?????

col1_id col1_name col2
A john bear
A john dog
A john cat
A john bear
A john dog
A john cat
A john dog
A john cat
A john bear
A john dog
A john cat
A john bear
A john dog
A john cat
A john dog
A john cat

I want to return all results. It has to return like this: echo col1_id . col1_name (A john) and then col2 (bear,dog, cat)

SimonIoa 63

Hello i want to UNION three tables from the same database.

SELECT DISTINCT * 
        FROM
    (SELECT uid as id, name as name, username as username,bio as aboutme, '' as text, 'user' as type, profile_pic as profile_pic, '' as media_pic, '' as group_pic, 'U' as mediatype, '' as image_path FROM users ORDER BY rand() LIMIT 5) AS T

            UNION ALL
            (SELECT group_id as id, group_name as name,'' as username, group_desc as aboutme, '' as text, 'group' as type, '' as profile_pic, '' as media_pic, group_pic as group_pic, 'G' as mediatype, '' as image_path FROM groups ORDER BY rand() LIMIT 5)
        UNION ALL
            (SELECT M.msg_id as id, M.title as name, '' as username,M.description as aboutme, M.message as text, 'media' as type, '' as profile_pic,  M.media_pic as media_pic, '' as group_pic, M.type as mediatype, P.image_path as image_path FROM messages M, user_uploads P ORDER BY rand() LIMIT 5) 

It works but i want to return the original names of the rows for example not id but uid or msg_id or group_id separately. But i still need to UNION Thanks in advance

SimonIoa 63

Hello i want to make a video player with HTML5. I t has to have other angular tags and an object inside the tag.
The source code below explkains what i want to do. Is it possible? Any suggestions?

<video controls preload="metadata" style="width:100%; height:100%;z-index: 100">
    <source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm" />
    <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4" />
    <source src="//vjs.zencdn.net/v/oceans.ogg" type="video/ogg" />
            <ion-card-content>
                <ion-item (click)="goUser(media.uid_fk)">
                    <ion-avatar item-start >
                        <img src="{{media.profile_pic}}">
                    </ion-avatar>
                    <h2>{{media.username}}</h2>
                    <p>{{media.bio}}</p>
                </ion-item>
                <ion-item>
                    <h2 style="color:#fff" (click)="goMedia(media)">{{media.title}}</h2>      
                    <p>{{media.description}}</p>
                </ion-item>
            </ion-card-content>
        </video>

p.s. it shows the video but not the other inside of it, tags like h2, p ion-item

SimonIoa 63

It was not the same thing. Then, i wanted to know how to send data e.g. the id from one page to another to show arrays or objects based on that id. Now i want to check if the id is there and to return different things if not. I dont know how to check if the id is there or not. I can't express it better sorry

SimonIoa 63

I want to pass a value (0 or 1) to another page so i can make an ng if to return a different button. Any help? do i need to pass a parameter from .ts file?

first page.html

<button ion-tem (click)="goUsers()" *ngIf="editors.length == 0" value="0"> <ion-label>
            Add editors
          </ion-label> </button> <button ion-tem (click)="goUsers()" *ngIf="editors.length > 0" value="1"> <ion-label>
            Add more editors
          </ion-label> </button>

second page.html

<button ion-button item-end clear *ngIf="value === '0'"> (click)="addEditor(item)">
                Add as Editor
            </button> <button ion-button item-end clear *ngIf="value ==='1'"> (click)="deleteEditor(item)">
                Already an Editor
            </button>

SimonIoa 63

Hello i want to make a gradient header on ion-navbar on my ionic 3 project.

home.html
<ion-header><ion-navbar color="primary">

variables.scss

$colors: ( primary: linear-gradient(red, yellow),

This doesnt work. color="primary" works if i put a single color value (e.g. #333)

Any idea how to make it gradient?

SimonIoa 63

Hello i am getting an error on a CASE WHEN THEN syntax on my mySql

         SELECT  DISTINCT u.uid,c.c_id,u.name,u.profile_pic,u.username,u.email,c.time
                FROM conversation c, users u, conversation_reply r
                CASE
                WHEN c.user_one = '99'
                THEN c.user_two = u.uid
                WHEN c.user_two = '99'
                THEN c.user_one= u.uid
                END
                AND (
                c.user_one ='99'
                OR c.user_two ='99'
                ) AND u.status='1' AND c.c_id=r.c_id_fk AND u.uid<>'1'ORDER BY c.time DESC LIMIT 15

 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASE
            WHEN c.user_one = '99'
            THEN c.user_two = u.uid
            WHEN c.user_t' at line 3

SimonIoa 63

something like this is the solution.

            (SELECT DISTINCT M.msg_id as msg_id, U.username,S.uid_fk, S.ouid_fk as ouid_fk , M.group_id_fk,M.message, S.created, '0' as type, '' as group_name
FROM
messages M, users U,message_share S
WHERE
U.status='1' AND
M.uid_fk = S.ouid_fk AND
S.msg_id_fk = M.msg_id AND S.uid_fk<>'99' GROUP BY M.msg_id)

UNION
(SELECT
DISTINCT '0' as msg_id,U.username, X.uid_fk as uid_fk, '0' as ouid_fk , X.group_id_fk as group_id_fk, '0' as message, X.created, '4' as type, G.group_name as group_name
FROM users U, groups G, group_users X
WHERE G.uid_fk=U.uid AND G.group_id=X.group_id_fk AND U.uid='99' AND X.uid_fk<>'99' AND X.status='1' AND U.status='1')

UNION
   (SELECT
DISTINCT M.msg_id as msg_id, U.username,M.uid_fk as uid_fk, '0' as ouid_fk , M.group_id_fk as group_id_fk, M.message as message, M.created, '5' as type, '' as group_name
FROM users U, messages M,group_users G
WHERE G.uid_fk=U.uid AND G.group_id_fk=M.group_id_fk AND U.uid='99' AND M.uid_fk<>G.uid_fk AND G.status='1' AND U.status='1')

UNION
(SELECT DISTINCT M.msg_id  as msg_id, U.username,S.uid_fk, S.ouid_fk as ouid_fk, M.group_id_fk,M.message, S.created, '1' as type, '' as group_name
FROM
messages M, users U,message_points S
WHERE
U.status='1' AND
M.uid_fk = S.ouid_fk  AND
S.msg_id_fk = M.msg_id AND S.uid_fk<>S.ouid_fk AND S.uid_fk<>'99' GROUP BY M.msg_id)

UNION
(SELECT DISTINCT M.msg_id as msg_id,U.username, S.uid_fk, M.uid_fk as ouid_fk, M.group_id_fk,M.message, S.created, '2' as type, '' as group_name
FROM
messages M, users U,comments S
WHERE
U.status='1' AND
M.uid_fk ='99' AND
S.msg_id_fk = M.msg_id  AND S.uid_fk<>'99'  GROUP BY M.msg_id)
ORDER BY created DESC

SimonIoa 63

Hello i have a database which users make groups or send messages to other registered, in our project, users. So you have messages as M,users as U, groups as G. So you want to show all updates that happen in these tables WHERE (uid - thats the user id column on U table.). All tables have CREATED as datetime column. Users yable is uid on messages is uid_fk and to groups uid_fk. Can i do that with a single statement or do i need to do anything else?

SimonIoa 63

Yeah thats the solution. Thanks jkon!

SimonIoa 63

thanks for your reply the messages user_id is uid_fk. I am trying it on my db. Thats the solution i am sure but i am confused about user_id . its fri not friend

SELECT e.uid_fk,e.message,f.username FROM (SELECT d.uid_fk,d.message FROM (SELECT a.friend_one AS uid_fk FROM friends AS a WHERE a.friend_two = '99' AND a.role = 'fri' UNION b.friend_two AS uid_fk FROM friends AS b WHERE b.friend_one = '99' AND b.role = 'fri') AS c LEFT JOIN messages AS d ON d.uid_fk = c.uid_fk) AS e LEFT JOIN users AS f ON f.uid = e.uid_fk;

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'b.friend_two AS uid_fk FROM friends AS b WHERE b.friend_one = '99' AND b.role = ' at line 1

SimonIoa 63

Hello i have a mysql statement and i want to add more parameters to get different results.

SELECT DISTINCT M.message,F.friend_one,F.friend_two, F.role,U.uid,U.username
    FROM users U,friends F, messages M WHERE ( U.status='1' AND F.friend_one = '88') OR (F.friend_two='88' ) AND F.role='friend'

88 is the users id so i want to show M.message from friends of 88 but not 88 itself
hints:
when one is becoming friend with other friend_one is 88 -for example- and friend_two another user id or vice versa
M table has id of user as a column of course

SimonIoa 63

Basically what i am asking is how to call the 'users' on AuthService
constructor( public authService: AuthService,,

like this on Firestone

constructor(private afService: AngularFirestore) { **this.users = afService.collection('users')**; }