Hello guys, am trying to make a drop down menu such that the droped element is static, meaning when i click on <li> the menu shouldnt old but rather remain droped. Currrently with what i have anytime i click on the droped menu item, the droped menu disappears, even when i click on the page's background it disappear's. Will appreciate the help or pointers to related articles. Thanks

Member Avatar
Member Avatar
+0 forum 1

i want to know how i can get a json response from my node.js server and display the response on my web page ` var request = require("request"), username = req.body.username, password = req.body.password, url = "https://api.ecoachsolutions.com/main.php?ecoachsignin=1&server=remote&user="+username+"&pass="+password; console.log("url is "+url); request.get( { url : url }, function (error, response, body) { // Do more stuff with 'body' here if (!error && response.statusCode == 200) { var json_body = JSON.parse(body); console.log(json_body); var msg = json_body.profile.user;//this is the message i want to show on my web page(msg) console.log(msg); // get json response } } );`

Member Avatar
+0 forum 0

i am designing an android app and in me deisgns there is one with a tabView thats hosts another tabView in one of the tabs. i want to know if there is a way to implement this design please, if yes i would appreciate some suggestions and pointers. below is am image of what i want to acheive thanks.

Member Avatar
Member Avatar
+0 forum 3

i have a website which i sell my books on, now i want to redirect my users to the home page (index.html) when they click the download link and the file starts to download. Will really appreciate the help and support thanks. this is the php code i wrote <?php $fakeFileName= "e-book_mobi.mobi"; $realFileName = "e-book_mobi.mobi"; $file = "book/". $realFileName; $fp = fopen($file, 'rb'); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=$fakeFileName"); header("Content-Length: " . filesize($file)); fpassthru($fp); exit; ?> this is the download link <li><a href="mobi_download.php?id=<?php echo $_GET['id']; ?>" target="_blank"/><b>.mobi</b></a></li>

Member Avatar
Member Avatar
+0 forum 1

Hi guys, i wanted to find out if its possible to use just a single listView for different activities. For instance i have three activities (Pending Jobs, Incoming Jobs, Closed Jobs) which are supposed to use a ListView, as at now i have created ListViews for all three activities but i want to know if there is a way to use just one ListView for all the three activities. So let say when i click on the Pending Jobs Activity it calls the listView but pulls the data of pending jobs to the listView. Same applies to all the other …

Member Avatar
Member Avatar
+0 forum 1

i already have a main domain (pcgevangelism.org) and i created a sub-domain (evangelism-school.pcgevangelism.org). i have a menu named "evangelism school" now i want to know how to link my subdomain to my main domain (evangelism school menu). so when i click that menu it should take me to (evangelism-school.pcgevangelism.org Any help or direction will be very much appreciated.

Member Avatar
Member Avatar
+0 forum 1

Hello guys am new to android development. I wanted to know how create a scrollview in Potrait layout using XML in android. below is the code i wrote in XML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dip" android:src="@drawable/newuser" android:contentDescription="@string/todo"/> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15dip" android:text="@string/first_name" /> <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" > <requestFocus /> </EditText> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15dip" android:text="@string/last_name" /> <EditText android:id="@+id/editText2" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" /> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15dip" android:text="@string/user_name" /> <EditText android:id="@+id/editText3" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="text"/> <TextView android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15dip" android:text="@string/password" /> <EditText android:id="@+id/editText4" android:layout_width="match_parent" …

Member Avatar
Member Avatar
+0 forum 1

Hello guys i want create a table which willl consist of Regions and Location therefore when i take a region it should give me a list of locations under that region. i hope my question is clear enough THank you

Member Avatar
Member Avatar
-1 forum 6

Hello guys i want to show a data in my combobox when i click on an item ion my jtable i tried this but it doesn't work. i would apprecite it if any one can help thanx String add5 = rs.getString("Id_branch"); branch_combo.setSelectedItem(add5); String add6 = rs.getString("User_Role"); UserRole_combo.setSelectedItem(add6);

Member Avatar
Member Avatar
+0 forum 2

Hello guys i want to know if its possible to format a text as it is done ms-word on a jframe? i want to be able to edit the text i put on my jframe by specifying the heading, making some texts bold, adding font color to som texts and all that. Please let me know if its possible to do this. Am creating an about us form and i need to edit the text i place on the form. If it is possible i will appreciate the direction or help. Thank you.

Member Avatar
Member Avatar
+0 forum 1

how to store JTree data hierarchically in mysql database from netbeans. I am new to this topics so I need a program and tables you are using in database . for ex: Items |-shoes |-shirts |-half shirt |-sarees when i click on add button it should add nodes to parent node(items node)such that the child node should be visible on tree and should be saved in database also is that possible? am still new at java so will appreciate the help or direction

Member Avatar
Member Avatar
-1 forum 12

hello guys i am still new in java and i have been battling with this problem. i want to filter my data in my jtable. i have got the following data in my jtable which is from my database. | name | gender | courses | |------|--------|---------| | Ben | male | Science | | Joe |female | I.T | | Dan | Male | Science | now i have got combo-boxes name,gender and courses now i want to filter the table based on these assumptions "i want all who are studying science" so then the output becomes | name …

Member Avatar
Member Avatar
+0 forum 1

i want to populate my jtable with selected items in my jcombobox below is the code i wrote to perform the action but it does not. please am still new in java so i will appreciation the help. if(AssetCategories.getSelectedItem() == "LAND & BUILDINGS"){ try { String sql = "SELECT Description FROM items where Description_Code = 'LB' Order by id"; pst=conn.prepareStatement(sql); rs=pst.executeQuery(); dep_report.setModel(DbUtils.resultSetToTableModel(rs)); } catch (SQLException ex) { Logger.getLogger(DepreciationReport.class.getName()).log(Level.SEVERE, null, ex); } } thanks for the help

Member Avatar
Member Avatar
+0 forum 1

below's code is a code i wrote to get the value of 'monthly Depreciation' when i select the row on my jTable by either mouse-clicked or key-pressed. but it only selects the first value for 'monthly depreciation' when i click on the rows or key-press.the problem i know is coming from the where statement but can't seem to get around it. if(evt.getKeyCode()==KeyEvent.VK_DOWN || evt.getKeyCode()==KeyEvent.VK_UP) { try{ int row =dep_report.getSelectedRow(); String Table_click=(dep_report.getModel().getValueAt(row, 0).toString()); String sql ="select Date_Acquired 'Date Acquired',Serial_Number 'Serial Number'," + " Description 'Description',Cost_Of_Acquisition 'Cost Of Acquisition'," + "Monthly_Depreciation 'Monthly Depreciation',Accumulated_Depreciation 'Accumulated Depreciation',Net_Book_Value 'Net Book Value'" + ",asset_update.Branch_Area 'Branch Area',Depts_name …

Member Avatar
Member Avatar
+0 forum 1

i want to convert the value of my date into an integer value, i am using a jDateChooser in netbeans(swings) currently in my code below the value for inputDate is fixed or assingned but i want it to be based on the date a user picks using the jDateChooser. public void OnDateClick(){ int inputDate = 20121220 ;//variable name for my jDateChooser is "OnDateClick" which i want assign to inputDate DateFormat df = new SimpleDateFormat("yyyyMMdd"); String date = df.format(Integer.valueOf(inputDate)); String s = date.format(date); int output = Integer.valueOf(s); System.out.println(s); } I will appreciate the help thank you.

Member Avatar
Member Avatar
+0 forum 5

double compute() { double monthly, acumulation; for(int y = 1; y<5; y++) { monthly = (Cost * numYears) / residual; acumulation = (monthly * y); return acumulation; } } this is function i wrote to compute monthyly depreiation and accumulation. but the error i get is missing return statemen and i dont really get where that is coming from

Member Avatar
Member Avatar
+0 forum 1

Honestly am writing an application and am stuck at this point. problem is am writing an asset derpreciation application and i am calculating for Monthly Depreciation,End-of-year value ,Accumulated depreciatio.I want get the results of the values in this form in my jTable when the calculation is done. for example when i enter the number of months, it should display the results over that number,so if it is 7 it should display as below. Monthly End-of-year Accumulated Months Depreciation value depreciation ---- ------------ ----------- ------------ 1 4000 24000 4000 2 4000 20000 8000 3 4000 16000 12000 4 4000 12000 16000 …

Member Avatar
Member Avatar
+0 forum 2

I want to create a jTree which when i right click on a node, should give me the options of "rename","add Region(parent)","add City(child)". the name of my jTree is branches As i am new to swing,Could any one help with code. Thanks in Advance. Regards, Sarkwa

Member Avatar
Member Avatar
+0 forum 1

drop trigger if exists update_asset; drop trigger if exists insert_asset; drop trigger if exists process_asset; delimiter | create procedure process_asset_calc ( in name varchar(50), in cost decimal(20,2), in life int(11), in whenacquired date, inout Months_Depreciated int(11), inout Accumulated_Value double(2,0), in residual_value double(2,0), inout Monthly_Depreciation double(2,0), ) BEGIN set Months_Depreciated = (YEAR(NOW() * 12 + Month (NOW())) - YEAR(whenacquired)*12; set Monthly_Depreciation = (cost/life)*residual_value; set Accumulated_Value = Months_Depreciated * Monthly_Depreciation; END| CREATE TRIGGER `update_asset` before update ON `asset` for each row BEGIN call process_asset_calc(new.name,new.cost,new.life,new.residual_value,new.whenacquired,new.Accumulated_Value,new.Monthly_Depreciation, new.Months_Depreciated); END| CREATE TRIGGER `insert_asset` before insert ON `asset` for each row BEGIN call process_asset_calc(new.name,new.cost,new.life,new.residual_value,new.whenacquired,new.Accumulated_Value,new.Monthly_Depreciation, new.Months_Depreciated); END| delimiter …

Member Avatar
Member Avatar
+0 forum 3

i want to write a function which calculates the Monthly depreciation and accumulation of an asset but i am having difficulties writing it to calculate and insert it into my datebase.I will appreciate the help private double getAccumulation(){ double Accumulation = 0; double Monthly_Depreciation; int Estimated_Useful_Life = Integer.parseInt(eul.getText()); double Cost_Of_Acquisition = Integer.parseInt(txt_coa.getText()); double Estimated_Residual_Value = Integer.parseInt(txt_erv.getText()); try{ Monthly_Depreciation = (Cost_Of_Acquisition - Estimated_Residual_Value)/Estimated_Useful_Life; Accumulation = Monthly_Depreciation; Accumulation++; }catch(Exception e){ JOptionPane.showMessageDialog(null, e); } return Accumulation; }

Member Avatar
Member Avatar
+0 forum 1

i want to get the value for Accumulation but it returns no value. Any help with resolving it will be appreiated private double getAccumulation(){ double Accumulation = 0; double Monthly_Depreciation; int Estimated_Useful_Life = 5; double Cost_Of_Acquisition = 2000; double Estimated_Residual_Value = 500; try{ Monthly_Depreciation = (Cost_Of_Acquisition - Estimated_Residual_Value)/Estimated_Useful_Life; Accumulation += Monthly_Depreciation; Accumulation++; System.out.print(Accumulation); }catch(Exception e){ JOptionPane.showMessageDialog(null, e); } return Accumulation; }

Member Avatar
Member Avatar
+0 forum 2

I am writing an asset monthly depreciation system and i have written a code which works but i want to set the values such that the user enters the value manually into the system. Currently the values have been declared with a variable. this is my code // declare an integer (array) array with 6 rows (6 assets) // & 5 columns (5 attributes for each asset) int assetInfo[][] = new int [6][5]; // populate the first row with asset#100 information assetInfo[0][0] = 100; //asset number(how do i set this to a jtextfield?) assetInfo[0][1] = 3000; //acquisitionCost(how do i set …

Member Avatar
Member Avatar
+0 forum 5

This a question please schools grades ------- -------- havard 90% with this table, i want to select the information in each column concatenate them and ouput the results in a textfeild. sample output = havard/90% so can you declare a column in mysql as a variable in java? if yes then please attach some examples thank you.

Member Avatar
Member Avatar
+0 forum 10

hello guys, i have created a jform which contains these field; ComboBox_decCode(description code) ComboBox_itemCode(item code) combo_Area(Branch_Area) ComboBox_dept(Branch_Code) txt_sn(Serial Number) i want to generate a serial key based on these information in my database. Description Description_Code --------------- ---------------- Lands & Building LB(001) Branch_Area Branch_Code ------------ ------------- Labone LB(001) now the idea is when i select all the data for each combox on my jform it should automatically generate a serial key in the txt_sn. i want to generate my serial number based on a default "FC"+/ +Branch_Code+/+Description_Code example is FC/LB/100/LB/001 so the FC constant Any directions or help will be appreciated …

Member Avatar
Member Avatar
+0 forum 4

<?php $connect = mysql_connect("localhost","root","bank1991"); $select_it = mysql_select_db("shalom presbyterian church",$connect); ?> <html> <head> </head> <body> <?php $full_name = mysql_real_escape_string($_POST['fullname']); $Phone_number = mysql_real_escape_string($_POST['pnumber']); $Email_address = mysql_real_escape_string($_POST['emailAddress']); $Comment_Questions = mysql_real_escape_string($_POST['feedback']); $addquery = "INSERT INTO contact_feedback(full_name,Phone_number,Email_address,Comment_Questions) VALUES('{$full_name}','{$Phone_number}','{$Email_address}','{$Comment_Questions}"; if($addStaff = mysql_query($addquery,$connect)){ echo "Feedback have been successfully sent <br>"; echo "<a href = \"contact.html\">Back to admin home.</a>"; } else{ echo "Sorry, Failed to send. Please try again by adding the correct details <br>"; echo "<a href = \"http://localhost/Shalom Presbyterian Church/contact.html \">Please Try Again.</a>"; } ?> </body> </html> <?php mysql_close($connect); ?> i am having problem inserting into my database(mysql) it does not insert into the database there …

Member Avatar
Member Avatar
+0 forum 3

Is it possible to populate my Jcombobox with my database column names? the name of my jcombobox is 'jComboBox_AReport' and the db_Table is 'asset_report'. please am still learning so i will appeciate the help THANK YOU!

Member Avatar
Member Avatar
+0 forum 1

i have a ComboBox named 'ComboBox_status' which have default values 'In Operation' and 'Disposed' i want the background color to change to red when 'Disposed' is selected and green when 'In Operation' is selected. this is the code i tried but it changes the background to red for both of them when they are selected String age="Disposed"; if("Disposed".equals(age)){ ComboBox_status.setBackground(Color.red); ComboBox_status.setForeground(Color.BLACK); } else{ ComboBox_status.setBackground(Color.GREEN); ComboBox_status.setForeground(Color.darkGray); } i will appreciate it if anyone could help me resolve this THANK YOU.

Member Avatar
Member Avatar
+0 forum 4

i want to calculate the depreciation of an asset and i want my accumulated value to automatically add the previous monthly depreciation value with the current one any time the user calculates for the monthly depreciation, the accumulated value should pick the results from monthly depreciation and add it to the one it has and output the results. example:monthly depreciation is 40 and accumulated value is 0 the result for accumulated value should be 40 when the value for monthly depreciation is 60 the accumulated value should add 40+60=100. this is my code in MySql(i got stuck at the accumulated …

Member Avatar
Member Avatar
+0 forum 14

I want to populate my jtable with columns from different table in mysql database but it only displays the column names and not the data or information under those columns. i hope this code helps u undertand what i mean. thanks private void Update_table(){ try{ String sql = "select Date_Acquired 'Date Acquired',Serial_Number 'Serial Number',Description 'Description',Cost_Of_Acquisition 'Cost Of Acquisition',Monthly_Depreciation 'Monthly Depreciation',Accumulated_Depreciation 'Accumulated Depreciation',Net_Book_Value 'Net Book Value',Branch_Area 'Branch Area',Depts_name 'Department Name',User 'User',Status 'Status' from items,branches,department_tbl,net_book_value,asset_update"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); dep_report.setModel(DbUtils.resultSetToTableModel(rs)); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); }finally{ try{ rs.close(); pst.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } } }

Member Avatar
Member Avatar
+0 forum 1

any idea of how to create a slide image with flash?

Member Avatar
Member Avatar
+0 forum 2

The End.