hi everyone, i am very new in java. can anyone help me to solve the following problem: A school conducts a 100 mark exam for its student and grades them as follows: Grade: Grade A: Marks>75 Grade B: 75>Marks>60 Grade C: 60>Marks>50 Grade D: 50>Marks>40 Write ajava program to calculate the grades for a student, using if..else statement. use some given value to test the code. thank you, regards, shantuli

Member Avatar
Member Avatar
-7 forum 38

Hi guys, I am new to vb.net i want to know how to pass a datagridview row values onto another form once the row is been double clicked.

Member Avatar
Member Avatar
+0 forum 4

Hi Any one know how I can get the following function to return a value - thanks. [CODE]import threading import time def stringFunction(value): str = "This is string no. " + value return str thread1 = threading.Thread(stringFunction("one")) thread1.join() thread1.start() while threading.activeCount()>1: time.sleep(1) print thread1 [/CODE] Currently returns "<Thread(Thread, stopped)>" Not "This is string no. one" Many thanks

Member Avatar
Member Avatar
+1 forum 9

Hi guys, I have a listview that displays "product Description" in the first column and "Product Price" in another column, after the "add" button is clicked on frmSales form. After that, txtAmountDue is automatically updated with the value of the items added to the listview. The Remove Button, when clicked, removes the selected item from the listview. What I want is the code to deduct the value of the item removed from the listview from the Amount in txtAmountDue, when the remove button is clicked. I have tried to the code below Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e …

Member Avatar
Member Avatar
+0 forum 7

Hi I am trying to populate textbox value based on releated textbox value like that of (Country and State) using dynamic row formate. I can able to populate a value for only first row, if i tried ti for second row its again overwrite the first row and also i am trying the hide some textbox based on the value. Can anyone please help to solve this issue. Note: I have attached screenshot for your reference. **Html** <button type="button" class="btn btn-info" id="delete">- Delete</button> <button type="button" class="btn btn-info" id="addmore">+ Add More</button> <div class="clear"></div><br> <table> <tr align="center"> <td><input class='check_all' type='checkbox' onclick="select_all()"/></td> <td>Line …

Member Avatar
Member Avatar
+0 forum 3

Hello i had a datagridview with data in it and i wanted to display the selected row in textboxes here's the code i tried by i think its totaly wrong [code=vb.net] Private Sub DataGridView_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick Dim i As Integer i = DataGridView.CurrentRow.Index txtWatchId.Text = DataGridView.Item(0, i).Value txtWatchBrand.Text = DataGridView.Item(1, i).Value txtWatchModel.Text = DataGridView.Item(2, i).Value txtManufacturer.Text = DataGridView.Item(3, i).Value End Sub[/code] Please help

Member Avatar
Member Avatar
+0 forum 22

Hello, I created four scripts written in php. Scripts are used to import/export data between two databases (one database is on local machine and second one is on server as web shop). Scripts are not basic import/export, because I had a lot of details on what to do with the data - here is just one example of complication: one database was on one language and second database was on second language. I didn't give any price and I don't know what price should be for this four scripts -- what is their value? I gave this script to my …

Member Avatar
Member Avatar
+0 forum 9

<?xml version="1.0"?> <License version="1"> <ActivationInfo> <ActivationDate></ActivationDate> <IssueDate>22-Dec-2015</IssueDate> </ActivationInfo> <MachineInfo> <MachineName></MachineName> <SoftwareIds></SoftwareIds> </MachineInfo> <LicenseKeys> <LicenseKey> <LicenseVersion>1</LicenseVersion> <FeatureName>PLI_FEATURE1</FeatureName> <LicenseType>PERMANENT</LicenseType> <CustomProperties> <CustomProperty> <key>LICENSETYPE</key> <value>EVAL</value> </CustomProperty> <CustomProperty> <key>CAPACITY</key> <value>10</value> </CustomProperty> <CustomProperty> <key>CAPACITY_UNIT</key> <value>TB</value> </CustomProperty> </CustomProperties> </LicenseKey> <LicenseKey> <FeatureName>PLI_FEATURE2</FeatureName> <LicenseType expirationDate="01-Jan-2017">EVALUATION</LicenseType> <CustomProperties> <CustomProperty> <key>LICENSETYPE</key> <value>EVAL</value> </CustomProperty> <CustomProperty> <key>CAPACITY</key> <value>10</value> </CustomProperty> <CustomProperty> <key>CAPACITY_UNIT</key> <value>TB</value> </CustomProperty> </CustomProperties> </LicenseKey> <LicenseKey> <FeatureName>PLI_FEATURE3</FeatureName> <LicenseType>SUBSCRIPTION</LicenseType> <CustomProperties> <CustomProperty> <key>LICENSETYPE</key> <value>EVAL</value> </CustomProperty> <CustomProperty> <key>CAPACITY</key> <value>10</value> </CustomProperty> <CustomProperty> <key>CAPACITY_UNIT</key> <value>TB</value> </CustomProperty> <CustomProperty> <key>START_DATE</key> <value>10-Jun-2015</value> </CustomProperty> <CustomProperty> <key>END_DATE</key> <value>09-Jun-2016</value> </CustomProperty> <CustomProperty> <key>GRACE_PERIOD</key> <value>23-Jun-2016</value> </CustomProperty> </CustomProperties> </LicenseKey> </LicenseKeys> </License> HI, i need to print <LicenseKey> complete nodes till </LicenseKey> for a given particular <FeatureName> ( this …

Member Avatar
Member Avatar
+0 forum 3

hey, Previously I post my question. But it wasn't helped. So I tried own and make sum query. It's not generate 0 value records. can anyone hep me ? select loan.loan_id as 'Loan ID' ,loan.customer_name as 'Customer Name' ,loan.total_amount as 'Total Amount' ,ifnull(sum(settlement.amount),0) as 'Total Received' ,((loan.total_amount)-ifnull(sum(settlement.amount), 0))as 'Total Due' from loan inner join settlement on loan.loan_id = settlement.loan_id where loan.collector_name='kapoor' group by loan.loan_id By this code 2 records shows. But there is another loan collect by kapoor. And that loan still not collected ant payment. So I wanted to show Total Received = 0 Can help ?

Member Avatar
Member Avatar
+0 forum 3

This question is very similira to this [one](https://www.daniweb.com/programming/web-development/threads/472324/inserting-a-multidimensional-array-into-db) but with a little twist to it. I have an array that looks like this: Array ( [0] => Array ( [post_id] => 5410 [Issue] => 2010 [_Issue] => field_573d7fa8454e9 [_volume] => field_573d7f79ef9ab [volume] => 530 [_journals] => field_56d3de5ddc04d [pages] => 105-9 [authors] => Onger, M., Jaluth, K. [_publication_date] => field_5729cc7e5b832 [publication_date] => Jan 17 [_banner_text] => field_56cfed156f70a [_link_to_pubmed] => field_573d7fe145230 [_authors] => field_56d3de4edc04c [journals] => Nature Medicine [url] => [_url] => field_56dd48d6ee6bb [_assign_multiple] => field_570f3b71e3c3f [banner_text] => [assign_multiple] => 0 [_pages] => field_573d7fbe06a50 [link_to_pubmed] => http://www.ncbi.nlm.nih.gov/pubmed/1 ) [1] => Array ( …

Member Avatar
Member Avatar
+0 forum 1

Hi Everyone, I created a script where rows gets cloned, then I created a script to check if a specific code exists in the database. This all works fine. My problem is my status message when a code exist, it shows on the first row but not the rest. I made the id of #status unique but I can't understand why it's not showing in the dynamically created row. Can someone please tell me what I'm doing wrong, or just lead me in the right direction? I added my code to [Jsfiddle](http://jsfiddle.net/2zW7B/2/)

Member Avatar
Member Avatar
+0 forum 2

How do i get the most repeated value that is inserted just today from 23:59 till 00:00 i have this sql but i dont know how to filter it by date any help will be apreciated. $sql = "SELECT `MatchTitle`, COUNT(`MatchTitle`) AS `mostPlayed` FROM `matches` GROUP BY `MatchTitle` ORDER BY `mostPlayed` DESC LIMIT 1";

Member Avatar
Member Avatar
+0 forum 1

Can anyone explain me what are the main difference between a null value and blank value in database. It important please help me out. thank you.

Member Avatar
Member Avatar
+0 forum 15

Hi Sir I have a problem in passing value from Popop to main page I am using Master page and aspx page From main page, i can open popup windows and populate data in gridview. I am selecting date and capture the valeu in TextBox. When I click the button nothing happened. It shows popup windows only.. Pls advise me Thank you. Maideen It is my Code - Popup <body> <form id="form1" runat="server"> <asp:Label ID="Label1" runat="server" Text="Select Item Name"></asp:Label> <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search" /> <asp:TextBox ID="txtItemName" runat="server"></asp:TextBox> <asp:Button ID="btnSelectItem" runat="server" Text="select Item" OnClientClick="SetName();" /> <div> <script type="text/javascript"> …

Member Avatar
+0 forum 0

Hello everyone. First of all i'm new here, and i registered particulary for this problem of mine i can't figure. In the code shown below, in the function `void printExpensiveThanT(..)` i'm supposed to print out the destination, distance and the price for the offers which are more expensive than the offer T in the function, sorted in ascending order by the `distance` value. I'm not sure what should i use to sort them, i experimented something with vectors but it didn't work out so i deleted it. Any help would be appreciated. #include <iostream> #include <cstring> #include <algorithm> using namespace …

Member Avatar
Member Avatar
+0 forum 1

import time def add(numbers): a = 0 for num in numbers: a += num return a add_numbers = [] def subtract(numbers): b = 0 for num in numbers: b -= num return b sub_numbers = [] def multiply(numbers): c = 0 for num in numbers: c *= num return c mul_numbers = [] def divide(numbers): d = 0 for num in numbers: d /= num return d div_numbers = [] print("What do you want do?") print("1.Add") print("2.Subtract") print("3.Multiply") print("4.Divide") time.sleep(1) print("...") print("An addition expression is something like 3+5+7 (no spaces)") print("...") time.sleep(1) print("A subtraction expression is something like 3-5-7 (no …

Member Avatar
Member Avatar
+0 forum 1

I got tired working on that part of code for 3 days and searching on the internet please I need help to know HOW TO use auto complete textbox1 and use its value to set the value of textbox2 and textbox3 below code public class PopulateProduct { public string ProductDesc { get; set; } public decimal UnitPrice { get; set; } } Dictionary<string, PopulateProduct> dict = new Dictionary<string, PopulateProduct>(); public void load() { string connstr = "user id=rawpic;password=admin"; string cmdtxt = @"select PRODUCT_ID,DESCRIPTION,UNIT_PRICE from products"; AutoCompleteStringCollection autocom = new AutoCompleteStringCollection(); TB_PRODUCT_ID.AutoCompleteMode = AutoCompleteMode.Suggest; TB_PRODUCT_ID.AutoCompleteSource = AutoCompleteSource.CustomSource; TB_PRODUCT_ID.AutoCompleteCustomSource = autocom; using …

Member Avatar
Member Avatar
+0 forum 1

#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }*head; void append(int num) { struct node *temp,*right; temp= (struct node *)malloc(sizeof(struct node)); temp->data=num; right=(struct node *)head; while(right->next != NULL) right=right->next; right->next =temp; right=temp; right->next=NULL; } void add( int num ) { struct node *temp; temp=(struct node *)malloc(sizeof(struct node)); temp->data=num; if (head== NULL) { head=temp; head->next=NULL; } else { temp->next=head; head=temp; } } void addafter(int num, int loc) { int i; struct node *temp,*left,*right; right=head; for(i=1;i<loc;i++) { left=right; right=right->next; } temp=(struct node *)malloc(sizeof(struct node)); temp->data=num; left->next=temp; left=temp; left->next=right; return; } void insert(int num) { int c=0; struct node *temp; temp=head; …

Member Avatar
Member Avatar
+0 forum 3

value of life certificate is not updating through this code. myconn.Open() cmd.Connection = myconn cmd.CommandText = " UPDATE Pension_Master SET l_cer='" & l_cer & "',validfrom=convert(datetime,'" & validfrom.Date & "',101)," & _ "validto=convert(datetime,'" & validto.Date & "',101) WHERE ppo_no = ' " & TextBox1.Text & "'" If (payment_register.Visible = True) Then payment_register.TextBox4.Text = Me.RadioButton6.Text End If cmd.ExecuteNonQuery() myconn.Close()

Member Avatar
Member Avatar
+0 forum 1

hi experts, [code=html]<a href="http://www.example.com"> goods </a>[/code] this is the hyperlink i have to used for example. i want to get the term 'goods' in the above hyperlink through jsp if i will click 'goods'. can i get the term in jsp like the below snippet?? [code]<% String goods=request.getParameter("goods"); %>[/code] or else what can i do to get the term 'goods' through jsp?? i am waiting for your reply....

Member Avatar
Member Avatar
+0 forum 8

I checked my spellings and everything for so many times already Here's the code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not cnn.State = ConnectionState.Open Then 'open connection if it is not yet open cnn.Open() End If cmd.Connection = cnn 'check whether add new or update 'add new 'add data to table cmd.CommandText = " INSERT INTO JandKstock( Product_Name, Stock, Sold_Item, Stock_Remaining, Unit_Price, Quantity_Price, Total_Sales)" & _ " VALUES(" & Me.Product_NameTextBox.Text & ",'" & Me.StockTextBox.Text & "','" & Me.Sold_ItemTextBox.Text & "','" & Me.Stock_RemainingTextBox.Text & "','" & Me.Unit_PriceTextBox.Text & "','" & Me.Quantity_PriceTextBox.Text & "','" & …

Member Avatar
Member Avatar
+0 forum 1

Hello Everybody, I searched the the internet and this forum, but cannot find the solution for my problem. Started with python and have this code (part of): import requests `def Send_invitation(): data = {"bsn": e3.get(), "initialen": e2.get(), "achternaam": e1.get(), "geslacht": e4.get(), "geboortedatum": e5.get(), "postcode": e6.get(), "emailadres": e7.get(), "screening_type": e8.get()} response = requests.post("http://dev.name.nl/api/orgo/3/something", headers=headers, json=data) j = response.json() print (j) This is the output: {'initiator': {'rol_label': 'Hoofdbehandelaar', 'id': 6, 'naam': 'Rem_SYS'}, 'behandelaar': {'rol_label': 'Hoofdbehandelaar', 'id': 6, 'naam': 'Rem_SYS'}, 'metadata': None, 'belangrijk': None, 'persoon': {'geslacht': 'M', 'email': 'justmymail@gmail.com', 'naam': 't try', 'initialen': 't', 'postcode': '1111', 'achternaam': 'try', 'tussenvoegsel': None, 'geboortedatum': '1976-11-11', 'bsn': …

Member Avatar
Member Avatar
+0 forum 2

Hi guys! i have a dropdown list that is filled with data that is pulled from my database. Im stuck with populating the textbox based on the value thats selected from the dropdown box. My model currently looks like this: <?php require_once('../Config/config.php'); class AppCalc { public $dbconn; public function __construct() { $database = new Database(); $db = $database->dbConnection(); $this->dbconn = $db; } public function fillDropdown() { $stmt = $this->dbconn->prepare("SELECT AppID, Appliance FROM appliances"); $stmt->execute(); return $stmt->fetchAll(PDO::FETCH_ASSOC); } } ?> My Controller: <?php require_once('../Model/applianceModel.php'); require_once('../Tool/DrawTool.php'); $newCalc = new AppCalc(); // instantiate drawing tool $draw = new DrawTool(); // parse (render) appliance …

Member Avatar
Member Avatar
+0 forum 1

Hi Dw. I'm tryign to change a registrykey on my system but I get this error: `ArgumentException was unhandled, The specified RegistryKeyPermissionCheck Value is invalid. Parameter name: mode` here is the line that throws this error: regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(Root & Last, True, (Security.AccessControl.RegistryRights.FullControl)) and the rest of the function code is: Private Function GetRoot(ByVal Adapter As String) As String Dim regKey As Microsoft.Win32.RegistryKey Dim i As Integer = 0 Do Dim Root As String = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\" Dim Last As String = DoPadding(i) regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(Root & Last, True, (Security.AccessControl.RegistryRights.FullControl)) Try Dim cAdapter As String = regKey.GetValue("DriverDesc").ToString() If cAdapter = Adapter …

Member Avatar
Member Avatar
+0 forum 2

How do I change string values in a variable? example: string = 'Hello' print(string) change string to 'Bye' <-- How do I do that? print(string)

Member Avatar
Member Avatar
+0 forum 4

Hi, I am having issues with the following code: var seachHttp = function () { var cssSheets = document.styleSheets, // Loaded CSS Sheets i =0, il = cssSheets.length, // Counter and limit for sheets j, jl, rules, rule, // Counter and vars for Rules inside a Sheet stylesToSearch = [ // Properties to Seach HTTP ON 'background', 'background-image', ], k, kl=stylesToSearch.length, // Counter for properties srule, // Current Property vrule; // Current Value for(;i<il;i++) { // Loop Sheets rules = cssSheets[i].rules || cssSheets[i].cssRules; for(j=0,jl=rules.length;j<jl;j++) { // Loop Rules rule = rules[j]; for(k=0;k<kl;k++){ // Loop Styles srule = stylesToSearch[k]; //alert(srule); vrule …

Member Avatar
Member Avatar
+0 forum 1

Hello. My question is very basic but I can not find/understand the answer anywhere. How check if the name-value "name": value in an object. I know that with Object.keys() method we can checking the names of the properties. I know too that with Object.name or Object["name"] we can see the value of the "named-name" property. But if I have a singleton {"name": value} and want to check many large object for it, is it a direct method? For example object 1 is {'a': 'lphabet', 'b': "cycle'} and I search 'a': 'bsurd'. Tthank you in advance

Member Avatar
Member Avatar
+0 forum 10

i am beginner in java, i am trying to display user name with image jsp page when loging with email id... plllsssss help me out... package User_pack; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.sql.*; import DB.DBCon; import javax.servlet.http.HttpSession; import javax.servlet.RequestDispatcher; public class Validate extends HttpServlet { Connection con=null; Statement st=null; ResultSet rs=null; String sql=null,email,pass,user,img; boolean flag; protected void login(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out=response.getWriter(); try { HttpSession sess=request.getSession(); email=request.getParameter("useremail"); pass=request.getParameter("password"); //out.print(username+","+pass); con=DBCon.getCon(); out.print("h"); st=con.createStatement(); sql="select email,password,image from reg where Email='"+ email+"'"; out.print("h"); rs=st.executeQuery(sql); out.print("h"); while(rs.next()) { out.print("h"); flag=false; …

Member Avatar
Member Avatar
+0 forum 1

Dear all, I have created project database in msaccessdatabase. It contail ![Msaccess.jpg](/attachments/large/4/a91d2278c08f244b439891bcf7c3b36e.jpg "align-center") form layout as shown in image & i have attached code for reference Imports System Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'Project_DatabaseDataSet.Project_Data' table. You can move, or remove it, as needed. Me.Project_DataTableAdapter.Fill(Me.Project_DatabaseDataSet.Project_Data) Dim dt As New Project_DatabaseDataSet.Project_DataDataTable For Each col As DataColumn In dt.Columns col.AllowDBNull = True Next Me.Project_DataTableAdapter.FillByMountingType(dt) cbo_MountingType.DisplayMember = "Mounting Type" cbo_MountingType.DataSource = dt End Sub Public Sub BindCombox() BindComboBox1.DataSource = Project_DatabaseDataSet.Tables("Mounting Type") BindComboBox1.DisplayMember = "product Name" End Sub …

Member Avatar
Member Avatar
+0 forum 1

Good day! I want to know how to pass a value to reportviewer textbox. I want to pass the value of a datetimepicker to reportviewer textbox. How can I do this? Both reportviewer and datetimepicker are in the same form. any help is much appreciated. Thank you.

Member Avatar
Member Avatar
+1 forum 3

The End.