Jump to content

funbinod

Members
  • Posts

    501
  • Joined

  • Last visited

1 Follower

About funbinod

  • Birthday 05/12/1983

Previous Fields

  • Languages
    HTML, PHP, JAVASCRIPT

Profile Information

  • Location
    Nepal

Contact Methods

  • Yahoo
    funbinod
  • Skype
    binod.anuj

Recent Profile Visitors

7,009 profile views

funbinod's Achievements

Invested Member

Invested Member (3/7)

3

Reputation

  1. i'm trying to set actionbar on my android studio project. while debugging, android studio doesn't show any error but when i run my app, it stops at this line. please suggest me the perfect way of working with toolbar on android studio. Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); thank you all in advance.
  2. Hello everyone! I'm very new to JAVA coding and trying to make a simple app using Android Studio V4.1.2. But when I try to debug my app, I encounter an unexpected error. I searched the web for the solution and tried almost everything (like changing gradle version, invalidating cache, etc) that was suggested for others, but my problem was not solved. So I'm here to ask for help. Here are the environments I'm using. build.gradle (app level) plugins { id 'com.android.application' } apply plugin: 'com.google.gms.google-services' // Google Services plugin android { compileSdkVersion 30 buildToolsVersion '23.0.1' defaultConfig { applicationId "app.samaya" minSdkVersion 21 targetSdkVersion 30 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation 'com.android.support:support-v4:30.0.0' implementation 'com.android.support:design:30.0.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'com.android.volley:volley:1.1.1' implementation 'com.google.android.gms:play-services-location:18.0.0' implementation 'com.github.bumptech.glide:glide:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' implementation platform('com.google.firebase:firebase-bom:26.6.0') implementation 'com.google.firebase:firebase-messaging' implementation 'com.google.firebase:firebase-analytics' } build.gradle (project level) buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.google.gms:google-services:4.3.5' // Google Services plugin } } allprojects { repositories { google() // and here jcenter() } } apply plugin: 'com.android.application' repositories { mavenCentral() maven { url 'https://maven.google.com' } jcenter() } android { compileSdkVersion 30 buildToolsVersion '30.0.3' defaultConfig { applicationId 'app.samaya' minSdkVersion 21 targetSdkVersion 30 versionCode 1 versionName "1.0" } lintOptions { abortOnError false } } dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.3.0' } Syncing project with gradle file completes successfully but when I try to debug this, I get some error relating to a file in cache folder. Here is the screenshot of the error. I tried almost everything suggested on other forums. But remained unsolved. Please help me to resolve this problem.
  3. hello! is here any discussion forum for android application development? or can i just share my problems on JAVA forum??
  4. thank you for the reply. i already tried to put the position of selected row using "index". but that also returned same problem. but now i solved the problem with a slight change on the above code. i just replaced ------------ .data("selected", 'Y') to .attr("data-selected", 'Y')
  5. hello all i am trying to use 'keydown' function to move through html rows. but i could not succeed. here is what i tried-- $("body").on("keyup", function(e) { if ($("#mid").find(".maintable tr[data-selected='Y']").length == 0) { $("#mid").find(".maintable tr").first().data("selected", 'Y').addClass("thisrow"); } else { if (e.which === 40) { $("#mid").find(".maintable tr[data-selected='Y']").next().data("selected", 'Y').addClass("thisrow"); $("#mid").find(".maintable tr[data-selected='Y']").first().data("selected", 'N').removeClass("thisrow"); } else if (e.which === 38) { $("#mid").find(".maintable tr[data-selected='Y']").prev().data("selected", 'Y').addClass("thisrow"); $("#mid").find(".maintable tr[data-selected='Y']").last().data("selected", 'N').removeClass("thisrow"); } } }) in the above code, '#mid' is a div that holds data retrieved from jQuery.ajax function. below is the backend code data from which is attached to the '#mid' div. $data = "<table class='maintable'>"; $sn = 0; while ($r = $q->fetch_object()) { $sn++; $name = $r->name; $aid = $r->aid; $ac_id = $r->ac_id; $ob = $r->ob; $data .= " <tr data-target='acregister.php?aid=$aid&m=e' data-selected='N'> <td>$name</td> <td style='width: 150px;'>$ac_id</td> <td style='width: 150px;'>$ob</td> </tr>"; } $data .= "</table>"; echo $data; here i want to use up and down arrows to move through the rows retrieved from ajax function. on the rows i've attached 'data-selected' value to know which row is selected. and on each keydown function i want change the 'data-selected' value of next row to 'Y' and change its value to 'N' for the previous one. the above code worked only once. it changed the value for new row but didnot change the value for the previous one and hence when i press down arrow, it selects first row but does not move to next row on another down arrow press. please guide me, what i missed?
  6. thank u for the replay. it worked. its great suggestion. thank u again.
  7. hello all! i'm trying something for binding parameters to a prepared statement like below. $tbl = 'stock'; $cols = 'icode=?, item=?, catid=?, description=?, unitid=?, pprice=?, sprice=?, oqty=?, oprice=?, oamt=?, bcode=?'; // $vals = "'101', 'ASUS H61M-E', 'abcde', '2', '1', '5300.00', '6500.00', '11', '5300', '55528', '101'"; $vals = "101, ASUS H61M-E, abcde, 2, 1, 5300.00, 6500.00, 11, 5300, 55528, 101"; $uq = $mysqli->prepare("UPDATE $tbl SET $cols WHERE $whcol='$whval'"); if (!$uq) { $msg = "Error1: $mysqli->error!"; } else { $uq->bind_param('sssssssssss', $vals); // this doesn't work. // $uq->bind_param('sssssssssss', 101, ASUS H61M-E, abcde, 2, 1, 5300.00, 6500.00, 11, 5300, 55528, 101); // but this works well. if (!$uq->execute()) { $msg = "Error3: $uq->error!"; ///// this says "No data supplied for parameters in prepared statement." } else { $msg = "UPDATED successfully!"; } } here i'm trying to put all the update values into a string and then bind it to the statement. but this says "No data supplied for parameters in prepared statement". but when i use individual values, it works fine. please suggest me something. thanks in advance.
  8. i found that what i learnt so far is also wrong. i corrected the aforementioned code like this $cuidstmt = $pgsql->prepare("SELECT cid, uid FROM user WHERE name=?"); if(!$cuidstmt) { echo "Error: " . $pgsql->errorInfo()[2]; } else { $cuidstmt->execute(array($u)); $cuidstmt->execute(); $cuidstmt->fetch(); } but i still couldn't understand how can i get the result(s). where can i get the data from 'cid' and 'uid' columns mentioned in the prepared statement. thank u all in advance.
  9. hello all! i'm learning postgresql. i was just trying to fetch some data using prepared statement. but found that it is quiet different than mysql. the all i learnt searching on the web is this. $cuidstmt = $pgsql->prepare("SELECT cid, uid FROM user WHERE name=?"); if(!$cuidstmt) { echo "Error: " . $pgsql->errorInfo()[2]; } else { $cuidstmt->bindParam('i', $u); $cuidstmt->execute(); $cuidstmt->fetch(); } but i could not understand how can i print the required data. where the data is stored. just like in mysqli we can bind result on a string, how can i do that in pgsql? can u please help me?
  10. hello all. i was just wondering between these two versions of PHP - 5 & 7. right now i'm practicing on if PHP 5. and now i'm thinking of upgrading to PHP 7. and i want to know if my current code works with the new version or not. if i upgraded my PHP to 7, should i need to change all or some parts of the codes? thank you in advance.
  11. funbinod

    mysql audit trial

    hello all! i was wandering through web to learn about audit trial. but could not find anything from where i can understand this clearly. can anyone please tell me in details about this??? for nowm i want to know two things: 1) is this automatically done by mysql as it's feature or this is my job to maintain the complete activity??? 2) if this is a mysql feature, is this available on all versions??? thank you in advance...
  12. this hint solved my problem. i cheated the code like below. .......... AND projtype IN (SELECT id FROM projcat WHERE under=1 UNION SELECT id FROM projcat WHERE id=1 UNION SELECT id FROM projcat WHERE under IN (SELECT id FROM projcat WHERE under=1)) thank u very very much...
  13. thank you for the reply. but it banged my head. this is beyond my practice and is very tough to understand. can't it be done with a simple modification to my code???? like........ .......... AND projtype IN (1, SELECT id FROM projcat WHERE under=1 UNION SELECT id FROM projcat WHERE under IN (SELECT id FROM projcat WHERE under=1)) thank u again.
  14. hello all! i am struggling with a problem in mysql. i want to select all rows from a table with an id and its child ids. i tried the following ............... AND projtype IN (SELECT id FROM projcat WHERE under=1 UNION SELECT id FROM projcat WHERE under IN (SELECT id FROM projcat WHERE under=1)) it works. But this selects rows that matched the child ids only. i want to select all the rows which use the parent id also (i.e. '1' on the given example). please help me with some hints. thanks in advance....
  15. hi all! after long time i'm back here with a problem. i want to select all data attributes from a div with its name and value using jquery each function use that elsewhere. here is the html for the div. <div class='EW' data-rowid='1' data-unit='' data-workdesc='description' data-vby='2' data-distanceTot='50' data-AVcutTot='500' data-VcutTot='25000'></div> and i tested the following to get my result. var datas = $(".EW").attributes; $.each(datas, function(i,item) { $("#msg").text(item.name + ":" + item.value); }) but i could not get any result. can u please guide me what is wrong? or suggest me any other best method to achieve this. thank you in advance.
×
×
  • Create New...