old_apache 15 Junior Poster in Training

can you specify your question?
what is your ajax responds?

old_apache 15 Junior Poster in Training

i think you missed VALUES in your query

Bet, Gain, Odd) VALUES SELECT Username, '".$ticketReceiver."', Date
old_apache 15 Junior Poster in Training

I'm trying to convert this xml to json or array.

first this is what i did:

$response = simplexml_load_string($xml_test);

and i got error: < not found,
anyone can help me?

HTTP/1.1 200 OK Date: Wed, 03 Jun 2015 10:19:38 GMT Server: Apache-Coyote/1.1 Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/xml;charset=UTF-8 Connection: close  <?xml version="1.0" encoding="UTF-8"?> <serv:message xmlns:serv="http://www.webex.com/schemas/2002/06/service" xmlns:com="http://www.webex.com/schemas/2002/06/common" xmlns:meet="http://www.webex.com/schemas/2002/06/service/meeting" xmlns:att="http://www.webex.com/schemas/2002/06/service/attendee"><serv:header>
<serv:response>
<serv:result>SUCCESS</serv:result>
<serv:gsbStatus>PRIMARY</serv:gsbStatus>
</serv:response>

</serv:header>
<serv:body>
<serv:bodyContent xsi:type="meet:createMeetingResponse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meet:meetingkey>624241744</meet:meetingkey>
<meet:iCalendarURL>
<serv:host>https://apidemoeu.webex.com/apidemoeu/j.php?MTID=m0d5a3c9f3c1b51ab487a3d8177fba783</serv:host>
<serv:attendee>https://apidemoeu.webex.com/apidemoeu/j.php?MTID=mc0cb823f5442d431ed5728351edf909e</serv:attendee>
</meet:iCalendarURL><meet:guestToken>0082aa91a2b0ec3ff8ef644e3ca0a1bc</meet:guestToken>
</serv:bodyContent>
</serv:body>
</serv:message>
old_apache 15 Junior Poster in Training

hi guys

i just found wierd thing, my cookies work in local(Windows) but, after i pushed to server (Ubuntu), the cookies null (empty).
this the code to set cookies:

set: function(name, value, duration, domain, path, secure) {
    name = this.prefix + name;
    if (duration == null) duration = this.duration;
    if (secure == null) secure = this.secure;
    if ((domain == null) && this.domain) domain = this.domain;
    if ((path == null) && this.path) path = this.path;
    secure = secure ? true : false;

    var date = new Date();
    date.setTime(date.getTime() + (duration * 86400000));
    var expires = date.toGMTString();

    var str = name + '=' + value + '; expires=' + expires;
    if (domain != null) str += '; domain=' + domain;
    if (path != null) str += '; path=' + path;
    if (secure) str += '; secure';

    return (document.cookie = str) ? true : false;
}

any idea why?
note: this is kcfinder

old_apache 15 Junior Poster in Training

thanks guys for your time
i just realized that this <input> tag not in my <form> tag.

<input id = "file_lead" type= "file" accept="image/*" name="file_ads_lead" style='visibility: hidden;' onchange="ChangeText(this, 'txt_lead');"/>
old_apache 15 Junior Poster in Training
<div class="form-group">
    <label for='image' class="col-sm-2 control-label">Leader Board</label>
    <div class="col-sm-10">
        <input id= "txt_lead" type = "text" name="image_lead" class="form-control input-sm" onclick ="javascript:document.getElementById('file_lead').click();">
        <input id = "file_lead" type= "file" accept="image/*" name="file_ads_lead" style='visibility: hidden;' onchange="ChangeText(this, 'txt_lead');"/>
        <?php echo form_error('image_lead', '<small class="pull-right req">', '</small>');?>
    </div>
</div>



<script>
    function ChangeText(oFileInput, sTargetID) {   
    document.getElementById(sTargetID).value = oFileInput.value.replace("C:\\fakepath\\", "");;
    }
</script>

I'm trying to identify image size by using $_FILES['file_ads_lead']['temp_name'], but i got nothing.
Any idea why?
ps: input file tag is hidden

old_apache 15 Junior Poster in Training

Hi
I once hosted a website, using wordpress framework
but after a month, my webstsite hacked and after digging on my website there is so much scripts added to the file (i did not remember exactly how the scripts, but it was so longgg script). I deleted all that scripts, but one month later my website hacked again

I read some articles on Internet, and it says that maybe i was using a free theme that was injected some backtrack scripts. So my question is, how i can know that the theme has been injected?

old_apache 15 Junior Poster in Training

I should have realized that 443 for ssl
I just changed port 443 to 442 on http-ssl.conf file
anyway, thank you

old_apache 15 Junior Poster in Training

I have Skype installed on my PC, as i knew using port 80 as default. Then, i changed httpd.config to 8080, but my apache not starting
After did a little googling, i have to uncheck 443 on Skype setting. My question: is the apache uses 2 ports? And why?

old_apache 15 Junior Poster in Training

Hi

i'm trying to raise an event when user ticks checkbox in gridview silverlight.
so far, i was trying event handler Click , it only handles checkbox in the gridview, while i also wanna raise an event when user ticks checkbox at header of the grid. Any idea how i can do that?

old_apache 15 Junior Poster in Training

How about quality options, is that mean a video has several file? as we can easyly change the quality.

old_apache 15 Junior Poster in Training

hi fellas

As I remember, I watched video on YouTube, I couldn't watch directly on the middle of the video without loading from the beginning (am i correct?), but nowadays we can and it's really great. How that thing works? Maybe i'm wrong, anyone can verify that?

old_apache 15 Junior Poster in Training

Make sure your username is correct, since the warning says "Access denied"

old_apache 15 Junior Poster in Training

i have 1000 clients(host) spreadly in my country and for some reasons i want to know their connection speed. how do i can get it?
All of my clients are using Windows.

old_apache 15 Junior Poster in Training

Do you use your own CMS? if yes, then you should make your own function that can handle that. Maybe you could follow the suggestions from @Dani. But if you use a CMS such as Joomla, feature like that is already available. In Joomla you can download Mini FrontPage extensions. It's free.

old_apache 15 Junior Poster in Training

you can read this one, it clarifies why h1 important in the on-page seo:

http://blog.woorank.com/2013/04/how-to-use-heading-tags-for-seo/

old_apache 15 Junior Poster in Training

i'm not sure, is it legal to refer SO or not,
however try this:

http://stackoverflow.com/questions/8486878/how-to-cut-off-decimal-in-java-without-rounding

old_apache 15 Junior Poster in Training

it is not printing, because you have condition here:

if (row >= 0 && row <= 4 && col >=0 && col <= 4)
    System.out.print(list[col][row]=value);

while you called table with parameters ('A', 5, 5) so the condition will never true, try:

t.table(3, 3, 'A');

also, you have to change this one, because it's not make sense

public static void table(char col, int row, int value)

become

public static void table(int col, int row, char value)

and the way you printing, should be like this

if (row >= 0 && row < 4 && col >=0 && col < 4)
    System.out.print(list[col][row]);

because in your variable list, you only asigned until index 3.

JamesCherrill commented: Good contribution, even if the OP is too conceited to recognise it +15
old_apache 15 Junior Poster in Training

try to replace this:

// TODO Auto-generated method stub
Table3 t = new Table3();
Table3.table('A', 5, 5);

with this one:

// TODO Auto-generated method stub
Table3 t = new Table3();
t.table('A', 5, 5);
old_apache 15 Junior Poster in Training

it's okay, if you also familiar with html

but i think you should use dreamweaver instead of notepad

old_apache 15 Junior Poster in Training

By using Notepad, you have to remember all tags of HTML also their attributes, because Notepad is general editor and there is no autocomplete or syntax checking . While Dream Weaver is is a web design and development application that provides a visual WYSIWYG(What You See is What You Get) editor.

cmiiw

old_apache 15 Junior Poster in Training

for example:

current url : localhost/website
becoming : localhost/website/product

without refreshing.

Thanks in advance

old_apache 15 Junior Poster in Training

Actually, i want to select one to reduce bandwith consuming, either ajax or normal way.
I thought the server only returned the partial view, as there are 2 options when creating view, partial and using master page. As you told, normal http get request it loads all, so partial view is just for modularity.

thanks

old_apache 15 Junior Poster in Training

Hi

I have a partial view, where my partial view will be called from Menu. When i call it, do server send only the partial view, or send all view (header, menus, footer)?

old_apache 15 Junior Poster in Training

i have database with tables like these:
t_09_students
t_10_students
t_11_students
where 09, 10, 11 show year and this table will increase over the year.

how do i select all the data from the tables (using union) with flexible table name?

ask me, if it is not clear yet

old_apache 15 Junior Poster in Training

now i get it, you explained it well

tyvm

old_apache 15 Junior Poster in Training

thanks,

but why this works well?

$sql = "select * from fk_00_m_buku where id_buku='". $id_book ."'";
old_apache 15 Junior Poster in Training

hello fellas

i'm stuck in this function:

function getDataForPagination() {

        $sql = "select * from t_book limit 1, 15;

        $result = mysql_query($sql);

        if (!$result)
            return false;

        $num_rows = mysql_num_rows($result);
        if ($num_rows == 0)
            return false;

        $result = dbResultToArray2($result);
        return $result;
}

i want to make the above function more flexible by making it a function with parameters. I made it like this:
`

function getDataForPagination($table, $start, $amount) {

        $sql = "select * '".$table."' limit '". $start ."' , '". $amount ."'";

        $result = mysql_query($sql);

        if (!$result)
            return false;

        $num_rows = mysql_num_rows($result);
        if ($num_rows == 0)
            return false;

        $result = dbResultToArray2($result);
        return $result;
    }

But, it does not work

any help would be appreciated

old_apache 15 Junior Poster in Training

thanks @veedeoo
it's works

<? must be <?php

for refactoring, i will clean it up

old_apache 15 Junior Poster in Training

complete:

Parse error: syntax error, unexpected $end in C:\xampp\htdocs\SMKFArjuna\index.php on line 126

i don't think so, I've had problem like this twice, including this, and in my previous project no "include"

i just don't understand, it's works in xampp 1.7.2

old_apache 15 Junior Poster in Training
<?php
    require_once(dirname(__FILE__) . "/config/conf.php");
    require_once(dirname(__FILE__) . "/functions/list_functions.php");
    $action = getParam("act");
    $show = getParam("show");
    $adm = getParam("adm");

    include("viewer/header.php");
    include("viewer/left_sidebar.php");

    if ($action == "showSW") {
        if (isAdminLogin() || isGuruLogin() || isSiswaLogin($username)) {
            include("viewer/show_siswa.php");
        } else {
            ?> <script>alert('Akses Ditolak!');</script>
            <?php goToUrl("index.php") ?>
            <?
        }
    } elseif ($action == "showGR") {
        include("viewer/show_guru.php");
    } elseif ($action == "showLB") {
        if (isGuruLogin()){
            if(isKoordinator()){
                include("viewer/show_laporanbelajar_guru.php");
            }
            else{
                include("viewer/show_laporanbelajar_nonkoo.php");
            }
        } 
        else if(isSiswaLogin()){
            include("viewer/show_laporanbelajar_siswa.php");
        }
        else if(isAdminLogin()){
            include("viewer/show_laporanbelajar_nonkoo.php");
        }
        else {
            ?> 
            <script>alert('Akses Ditolak!');</script>
            <?php goToUrl("index.php") ?>
            <?
        }
    } 

    elseif ($action == "ShowGalery") {
        if (isAdminLogin() || isGuruLogin() || isSiswaLogin()) {
            include("viewer/show_galery.php");
        } else {
            ?> 

            <script>alert('Akses Ditolak!');</script>
            <?php goToUrl("index.php") ?>
            <?
        }
    }
    elseif ($action == "showVM") {
        include("viewer/show_visimisi.php");
    } 
    elseif ($action == "adm") {
        if (isAdminLogin()) {
            goToUrl("admin.php");
        } else {
            ?><script>alert('Access Denied!');</script><?
            goToURL("index.php");
        }
    } 
    elseif ($action == "showPengumuman") {
        include("viewer/pengumuman.php");
    } 
    elseif ($action == "gantiPassword") {
        include("viewer/change_password.php");
    }

    elseif ($action == "showPeraturan") {
        include("viewer/show_peraturan.php");
    } 

    elseif ($action == "showDaftarBuku") {
        include("viewer/show_daftar_buku.php");
    } 

    elseif ($action == "showSejarah") {
        include("viewer/show_sejarah.php");
    }

    elseif ($action == "ShowContact") {
        include("viewer/show_contact.php");
    }

    elseif ($action == "showMateriPraktikum") {
        include("viewer/show_materi_praktikum.php");
    }

    elseif ($action == "showMateriPelajaran") {
        include("viewer/show_materi_pelajaran.php");
    }
    elseif($show == "showlist"){
        include("viewer/show_laporanbelajar_guru.php");
    }
    elseif($adm == "insertNilai"){
        include("viewer/show_laporanbelajar_guru.php");
    }
    elseif($adm =="insertNilaiUTSUASUpdate"){
        include("viewer/show_laporanbelajar_guru.php");
    }
    elseif($show =="ShowListforUpdate"){
        include("viewer/show_laporanbelajar_guru.php");
    }
    elseif($show =="updateNilaiKe"){
        include("viewer/show_laporanbelajar_guru.php");
    }
    elseif($adm=="updateNilaiTugas"){
        include("viewer/show_laporanbelajar_guru.php");
    }
    else {
        if(isAdminLogin()|| isGuruLogin() || isSiswaLogin()){
        include("viewer/center.php");
        include("viewer/right_sidebar.php");
        }
        else{
            include("viewer/show_visimisi.php");

        }
    }
    include("viewer/details.php");
    include("viewer/footer.php");
?>
old_apache 15 Junior Poster in Training

yes

old_apache 15 Junior Poster in Training

i developed a system in xampp 1.7.2, and now i run it in xampp 1.8.2 (lastest version)

i got this error

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\

hint: in xampp 1.7.2 no error

anybody can tell me why?

old_apache 15 Junior Poster in Training

A correct code/syntax is always the best practice.

i don't think so

Generally, if its part of the page or menu structure then put it in the CSS, using the background-image property.

If its part of the content, then in the markup. That way you can make sure the Alt tag is filled out properly and an individual that's using an AT (Assistive Technology) device can understand what the image is about.

thanks, i think this helps

old_apache 15 Junior Poster in Training

i want to do the best practice to add an image

old_apache 15 Junior Poster in Training

where should I put it, if I want to add an image, css or html?

old_apache 15 Junior Poster in Training

for instance:

<?php
    echo "<b>Hello world</b>";
?>

for your reference:
http://www.w3schools.com/php/

old_apache 15 Junior Poster in Training

there is no permanent variable,
you need persistent storage like file, database

old_apache 15 Junior Poster in Training

I assume you know how to get the pixel values of the image

  1. change the pixel values to binary
  2. change the data to be saved to a binary
  3. insert binary data into binary images in a sequence

examples of binary images:

01000110 00101010 11100011
10011011 10110011 01100001
00111000 10101101 01000000

examples of data that will be stored

a ==> binary: 01100001

replace the end of the binary image by a binary "a" in sequence

so the result will be like this:

01000110 00101010 11100010
10011011 10110010 01100001
00111001 10101100 01000000

old_apache 15 Junior Poster in Training

i hope this will help you

http://vbcity.com/forums/t/64573.aspx

old_apache 15 Junior Poster in Training

you can use Vmware Player

old_apache 15 Junior Poster in Training

actually, I want to do coverage testing

so I would define nodes in the code first

and then, from these nodes, I would define control flow graph

old_apache 15 Junior Poster in Training

this is my code:

switch(a){

        case 1:
        case 2:
        case 3:
        case 4:
            printf("4\n");
            break;
        default:
            break;
    }

i need the nodes to make control flow graph for testing purposes.

old_apache 15 Junior Poster in Training

it works
thanks Watael

I'd say «just do it!» ;)

yep :)

old_apache 15 Junior Poster in Training

i have 2 files,

one file created on Windows and another was made on Ubuntu,

i want to use this command:

comm -12 file1 file2

how do i do that?

old_apache 15 Junior Poster in Training

try this code:

#include <stdio.h>

int main(){
    int i=0;
    int j=0;
    int value=0;
    for (i=0; i<5; i++){
        for (j=0; j<i; j++){
            value = value + 3;
            printf("%d\t",value);
        }
        printf("\n");
    }
}
old_apache 15 Junior Poster in Training

it works,

I appreciate all your help

old_apache 15 Junior Poster in Training

it works,

and now, i want to make a calculation by using the decimal

for instance:

`expr $decimal + 1`

how do i do that?

old_apache 15 Junior Poster in Training

it works,

and now, i want to make a calculation by using the decimal

for instance:

`expr $decimal + 1`

how do i do that?

old_apache 15 Junior Poster in Training

i got a string

var=96.33% from 120

how do i get 96.33 from $var?