hi brothers , i work on a ASP.NET MVC Project, please i try to get a cookie who created already using server side C# , and in a pure HTML page not .CSHTML i talk now about .HTML page , in this page i want to using javascript to read the value of the cookie that i created using C# . i wish if anyone can help me and thanks so much in advance.

Member Avatar
+0 forum 0

I'm a novice in PHP and I would like to know on how exactly could I define said row. Any helps/tips are appreciated. Thank you in advanced! function add_review() { if(isset($_POST['add_review'])){ (THE UNDEFINED ROW) **$product_id = $row['product_id'];** $review_name = escape_string($_POST['review_name']); $review_email = escape_string($_POST['review_email']); $review_content = escape_string($_POST['review_content']); $review_created = date("Y-m-d H:i:s"); $rating = escape_string($_POST['rating']); $review_query = query("INSERT INTO reviews(review_id, product_id, review_name, review_email, review_content, review_created, rating) VALUES('NULL', '$product_id', '$review_name', '$review_email' , '$review_content' , '$review_created' , '$rating')"); confirm_query($review_query); set_message("Thank you for the feedback!"); }}

Member Avatar
Member Avatar
+0 forum 1

I'm somewhat new to coding websites. I'm trying to have a code where it pulls multiple images from a single database and displays it in a grid, not a table. At the top of my page I have a normal connection to the database. (very sorry about not having a code snippet, I'm new to daniweb and keep having errors when trying to use code snippets.) <div id="grid" class="grid-container"> <?php while ($row = mysqli_fetch_array($query)) echo '<div class="grid-item"> <p>'.$row['images'].'</p> <p>'.$row['project'].'</p> <p>'.$row['summary'].'</p> </div>'; ?> </div>

Member Avatar
Member Avatar
+0 forum 1

# Lab Question# We must create a program that do the following: Allow the user to type in a student name the coorosponds with the student's exam score. The program will be able to accpet exam scores till the user types in the phrase "allDone". The code will determine which student has the highest score and give the name and the score to the user. Here is an example of what will be shown in the console.... *Sample Input* Bob 82 Mary 90 James 87 alldone *Sample Output* Mary has the highest score. Her score is: 90. ## Question ## …

Member Avatar
Member Avatar
+0 forum 6

I have a Dell Inspiron E1705. For some odd reason, my computer will freeze sometime while my wireless radio is on, while I'm at my apartment. I have already ruled out a power, memory, or overheating issue. I reformatted and reinstalled XP, yet it still did it. If I disable the radio, my computer doesn't freeze. Also, it doesn't automatically freeze up as soon as I turn on the radio or connect to my network. Sometimes, it may last for awhile, while other times it may only take a minute or two. Just FYI, I am on the wireless network …

Member Avatar
Member Avatar
+0 forum 32

Hi! My name is Jung and I'm new to VBNET I have already tried many ways to write codes for "btnSearch" but seems like nothing works.. I really need help for this as the deadline is around the corner :'( Below are my codes for Search button.. ![btnsearch.PNG](/attachments/large/4/76be068c625e23d9a57e969a97509bee.PNG "align-center")

Member Avatar
Member Avatar
+0 forum 2

hello sir how can I get my system short date format in a label in vb. net. I try this code : Label1.Text = System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern() but show wrong data. all time show "M/d/yyyy" format. I change it(to "dd/MM/yyyy") manually and by coding result is same("M/d/yyyy") please help me..... For Change the Format: Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", "dd/MM/yyyy")

Member Avatar
Member Avatar
+1 forum 3

Hi! I have encountered a small issue when attempting to create getters and setters in C#. I've been following along a course in unity and tried to replicate what the tutor had written in his C# scripts. As far as I can tell, everything is spot on and I can't seem to find what's causing the error -- Visual Studio suggests adding semi-colons after the 'get' and 'set' keywords, but I don't think that's correct course of action. Here is a snippet of the code that causes the error. Perhaps someone could explain to me what I'm doing wrong and …

Member Avatar
Member Avatar
+0 forum 3

This is my custom module: [CODE]class Player(object): def __init__(self, name, score = 0): self.name = name self.score = score def __str__(self): rep = self.name + ":\t" + str(self.score) return rep def ask_yes_no(self, question): response = None while response not in ("y", "n"): response = input(question).lower() return response def ask_number(self, question, low, high): response = None while response not in range (low, high): response = int(input(question)) return response[/CODE] The program: [CODE]import games, random print "Welcome to the world's simplest game!\n" again = None while again != "n": players = [] num = games.ask_number(question = "How many players? (2-5): ", low = …

Member Avatar
Member Avatar
+0 forum 10

So, i'm working on a layout that has to be in xhtml.. i changed the extension from html > xhtml and i got this prompt.. "This page contains the following errors: error on line 15 at column 8: Opening and ending tag mismatch: link line 0 and head Below is a rendering of the page up to the first error" <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="fonts.css"> <link rel="stylesheet" href="normalize.min.css"> <link rel="stylesheet" href="main.css"> </head> <body> <section> <header> <!-- TOP SECTION OF THE LETTER --> <div id="name-address-from"> …

Member Avatar
Member Avatar
+0 forum 2

Hello, this is my first post here. I'm playing around with Gtk+ and Xlib. I'm trying to get the X window ID of the active window, and then display that ID in a Gtk label. However, when I run it, it seg faults. I've narrowed it down to `XGetInputFocus`, but I'm stuck, because it seems like I'm supplying it with the parameter types it needs. All three parameters are `*Display`, `*Window` and `*int`, which is what I'm supplying it, according to https://tronche.com/gui/x/xlib/input/XGetInputFocus.html 1. What am I doing wrong? 2. Also, when I compile with `gcc -Wall `pkg-config --cflags gtk+-3.0` -o …

Member Avatar
Member Avatar
+0 forum 1

I made first board, but when I use function next_generation, it prints wrong result. For example, since first board is 01000 00100 11100 00000 00000, next one should be 00000 10100 01100 01000 00000 . But my program prints 00000 00100 01100 00000 00000. Here is my code. #include <stdio.h> #define WIDTH 10 #define HEIGHT 10 int lifegame[WIDTH][HEIGHT]; int x; int y; void initialize(){ for (x=1;x<WIDTH;x++) for (y=1;y<HEIGHT;y++){ lifegame[x][y]=0; } } void next_generation() { for(x=1;x<WIDTH;x++) { for(y=1;y<HEIGHT;y++) {int count=0; if(lifegame[x-1][y-1]==1){ count++;} if(lifegame[x-1][y]==1){ count++;} if(lifegame[x-1][y+1]==1 ){ count++;} if(lifegame[x][y-1]==1 ){ count++;} if(lifegame[x][y+1]==1){ count++;} if(lifegame[x+1][y-1]==1){ count++;} if(lifegame[x+1][y]==1){ count++;} if(lifegame[x+1][y+1]==1){ count++;} if(lifegame[x][y]==0 && count==3){ …

Member Avatar
Member Avatar
+0 forum 5

#include<iostream.h> void main() { int a,b,r; cout<<"a=";cin>>a; cout<<"b=";cin>>b; while (r!=0) { r=a%b; a=b; b=r;} cout<<"cmmdc="<<a;

Member Avatar
Member Avatar
-1 forum 2

Hello, I was testing a class in a GUI, and that error message showed up. Please help. Code: [CODE]from Tkinter import * class Application(Frame): def __init__(self, master): super(Application, self).__init__(master) self.grid self.create_widgets() def create_widgest(self): self.bttn1 = Button(self, text = "I do nothing!") self.bttn1.grid() self.bttn2 = Button(self, text = "Me too.") self.bttn2.grid() self.bttn3 = Button(self, text = "Same here..") self.bttn3.grid() root = Tk() root.title("Lazy buttons") root.geometry("200x100") app = Application(root) root.mainloop[/CODE]

Member Avatar
Member Avatar
+0 forum 11

hi there, I'm coding in windows, c++, but when I traslate my code to ubuntu, g++, I get this error: [B]lvalue required as left operand of assigment[/B] This is the line where I get the error: [COLOR="Red"][/COLOR][CODE]&*raiz=&*p;[/CODE] What could be the problem? *raiz and *p are pointers to an avl structure: [CODE] typedef struct nodo{ int dato; int fe; int color; struct nodo *izq; struct nodo *der; struct nodo *padre; }nodo; typedef struct nodo *avl; [/CODE] and this is the method where I have the problem: [CODE] void RSD(avl *raiz){ avl *p; p=new avl; *p=NULL; avl *q; q=new avl; *q=NULL; …

Member Avatar
Member Avatar
+0 forum 11

Hi, I am facing problem in adding a widget to header of Wordpress website. Here its [Header](http://ibb.co/kr9sCa) and I want to add this [Widget](http://ibb.co/erykXa) on the right of social links. Can you guide me how to add it. I already have HTML code, not sure where to put it.

Member Avatar
Member Avatar
+0 forum 2

Hi im ageeting the following error in my script can anyone find a fix or solution hus jan x Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/letsswin/public_html/template_pageTop.php on line 7 Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/letsswin/public_html/template_pageTop.php on line 8 //check for new pm's $pm_n = '<img src="images/pmStill.gif" width="17" height="12" alt="Pm" title="This pm is for logged in members">'; $sql = "SELECT id FROM pm WHERE (receiver='$log_username' AND parent='x' AND rdelete='0' AND rread='0') OR (sender='$log_username' AND sdelete='0' AND parent='x' AND hasreplied='1' AND sread='0') LIMIT 1"; $query = mysqli_query($db_conx, $sql); $numrows = mysqli_num_rows($query); …

Member Avatar
Member Avatar
+0 forum 2

<!DOCTYPE html> <head> <title>Traffic Light Sequence</title> </head> <body> <script> function Light(){ if (document.getElementById("Img").src ="Stop-Amber.png"){ then document.getElementById("Img").src = "Stop.png" } else if (document.getElementById("Img").src ="Go.png"){ then document.getElementById("Img").src = "Stop-Amber.png" } else if(document.getElementById("Img").src ="Amber.png"){ then document.getElementById("Img").src = "Go.png" } else if (document.getElementById("Img").src ="Stop.png") { then document.getElementById("Img").src = "Amber.png"}} </script> <button type="button" onclick="Light()"> Change Image!</button> <img src="stop.png" name="Img" width="224" height="395" id="Img" style= "width:304px;height:500px; <onclick="light()"> </body> </html>

Member Avatar
Member Avatar
+0 forum 5

Part 2 to Salesperson Java Application, still new to this. class SalesPerson { /** * Fixed Salary */ final double fixedSalary = 35000; /** * Current Commission Rate */ public double curCommissionRate = 0.15; /** * Accrued Commission */ public double curCommission = 0; /** * Total Compensation */ public double totalCompensation = 0; /** * Annual Sales */ public double annualSales = 0; /** * Parameterized Constructor * * @param annualSales The Salesperson's annual sales. */ public SalesPerson(double pAnnualSales) { annualSales = pAnnualSales; //set object member curCommission = (annualSales * curCommissionRate); //calculate current commission totalCompensation = fixedSalary + curCommission; …

Member Avatar
+0 forum 0

Hi Everyone - I keep getting the following error messages in my log file [19-Jan-2017 22:16:46 UTC] PHP Notice: Use of undefined constant CURLOPT_httpsHEADER - assumed 'CURLOPT_httpsHEADER' on line 22 [19-Jan-2017 22:16:46 UTC] PHP Warning: curl_setopt() expects parameter 2 to be long, string given on line 22 This is the top of my IPN listener file - // Check to see there are posted variables coming into the script if ($_SERVER['REQUEST_METHOD'] != "POST") die ("No Post Variables"); // Initialize the $req variable and add CMD key value pair $req = 'cmd=_notify-validate'; // Read the post from PayPal foreach ($_POST as …

Member Avatar
Member Avatar
+0 forum 6

i try to redirect one controller page to another controller page using cakePHP but it not working so please help me to solve this query....

Member Avatar
Member Avatar
+0 forum 1

$(document).ready(function () { var a, b, c d = new RegExp("/^[a-z0-9]*$/"), e = true, f = [ "g": false, "h": false, "i": false, "j": false, "k": false ], I changed names of variables for reasons. *Uncaught SyntaxError: Unexpected token :* Line 7. Which is `"g": false,`. Am I missing something?

Member Avatar
Member Avatar
+0 forum 4

Hi guys. So I'm building this code in java using NetBeans and literally this code has been working fine the entire time. I haven't changed anything about it and now it's giving me an error and I can't find out what's wrong. Can you please take a look for me? Thanks. Here's my code: int MM = this.jComboBoxMM.getSelectedIndex(); int DD = this.jComboBoxDD.getSelectedIndex(); int YYYY = this.jComboBoxYYYY.getSelectedIndex(); int HH = this.jComboBoxHH.getSelectedIndex(); int mm = this.jComboBoxmm.getSelectedIndex(); if(MM == 0 || DD == 0 || YYYY == 0 || HH == 0 || mm == 0) { jLabelInvalidDateTime.setVisible(true); try { Double.parseDouble(jTextFieldAmount.getText()); jLabelInvalidAmount.setVisible(false); } …

Member Avatar
Member Avatar
+0 forum 10

Hello DaniWeb Community, I'm a beginner Java programmer. The LoanTableTester contains the main method and the LoanTable is a class separate from the LoanTableTester class. May I please have help with a cannot find symbol - variable mortgage error? I wrote the methods for calculating the c, monthly payments, number of monthly payments and monthly interest rates in a separate class (LoanTable) that doesn't contain the main method. I researched how to do calculations within a while statement and I was confused on how to do it. Thank you to anyone who helps. It is greatly appreciated. Best Regards, -Nol …

Member Avatar
Member Avatar
+0 forum 5

hey everyone. I need you experties help to the correct this login form code. After the best effort I find this code. But it occur one error. Before the explain error I'll describe how this work. This login form check user name and password from the mysql database. After Normaliy user can login, but in my case user name and password match doesn't allow login. It check two more things. 1. User baned or active ? If baned message box show and say "Please pay your fees" If user active then check second. 2.User type. If admin then load admin …

Member Avatar
Member Avatar
+0 forum 3

I am using visual basic, javascript, and html. I am trying to use google hierarchy chart api. I works fine on localhost but when I try to move the same code to the server than I get the following error: Error: Object doesn't support this action <%@ Page Language="VB" AutoEventWireup="false" CodeFile="myFile.aspx.vb" Inherits="UI_myFile" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script> google.charts.load('current', { packages: ["orgchart"] }); google.charts.setOnLoadCallback(drawChart); function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); …

Member Avatar
Member Avatar
+0 forum 1

My Error info isnt being clear enough for me to understand the problemIs there anything worng here so i can continue on lookng for the probelm: $sql = "INSERT INTO boards ( title, genre, creator, tagline, intro, remessage, visability, recruitment, reqsheet, reqdice, reqgroup, ppweek) VALUES ( $title, $genre, $creator, ". $tagline . ", $scene, $message, $vis, $rcrt, $sheet, $dice, $group, $ppw)"; if ($conn->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "<br>Error: " . $sql . "<br>" . $conn->error; }

Member Avatar
Member Avatar
+0 forum 4

Hi: I wasn't able to find the exact solution to my problem on Daniweb, although there are several posts regarding the game of life. This situation came the closest: http://www.daniweb.com/software-development/cpp/threads/242338 My situation is a bit different because I HAVE to use a combination of functions and a class in the client program; it's 3 files total: client, specification(header), and the file that holds all the defitions for the secification file. So I'm not sure what I'm doing wrong to end up with blank cells. I think that the problem is with my tally function in the client file/program. I will …

Member Avatar
Member Avatar
+0 forum 21

Hello Everyone, I am new to c# and am trying to use Open XML to pull data from a SQL server into a spreadsheet. I followed some examples I found online but had to alter them to fit the test scenario I have set up and have run into an error I am not sure how to debug. I am receiving error code CS0120, "An object reference is required for the non-static field, method or property 'Program.CreateContentRow(int, int, string, string, string)'" I tried adding code along the lines of "Row contentRow = new Row()", because that is pretty much the …

Member Avatar
Member Avatar
+0 forum 1

Hi All , In below code i am getting error while assigning one object with other and result is clear as both objects are different types. it is expected that RHS object should belong to same class. How to resolve this issue. error: no match for operator= in obj1 = obj2; error: candidates are: const b& b::operator=(const b&) #include <iostream> using namespace std; class a { int a1 ,b; public: a(int x=0,int y=0):a1(x),b(y){} void fun1() {cout<<a1;cout<<b;} }; class b { private: a *p; public: b (int x=0, int y=0) { p= new a(x,y); } b ( const b &obj) { …

Member Avatar
Member Avatar
+0 forum 6

The End.