C :: Aligning Struct To A Page

Nov 22, 2014

I am a bit unsure about what this piece of code aligning a struct to a page is trying to achieve.

Code:
#define PAGESIZE 1 << 12

typedef struct __attribute__((aligned(PAGESIZE))) x86_pagetable {
x86_pageentry_t entry[PAGETABLE_NENTRIES];
} x86_pagetable; It is an piece of code from an educational operating system WeenyOS.

What is the essence of aligning a struct to a page?

View 10 Replies


ADVERTISEMENT

C Sharp :: Cannot Access Server Page Custom Controls In Website Page

Jan 24, 2015

I m making calendar in server control page by taking composite control.I am also adding textbox in each cell of calendar. Now i want to access the value of each textbox of selected month and respected date in default.aspx page on button click event. Here the button is not a custom control but defined in default.aspx page..

Can't access textbox text and date or controls of server page in website(default.aspx) page.

View 2 Replies View Related

C++ :: Aligning Output Using Setw

Mar 21, 2013

I'm trying to align my output but I can't get it to look perfect. This is how it looks like in my program:

Hitch 98% FRESH
Happy Gilmore 99% FRESH
Transformers 2 100% FRESH
SpongeBob 10% ROTTEN

And this is how I would like it to look:

Hitch 98% FRESH
Happy Gilmore 99% FRESH
Transformers 2 100% FRESH
SpongeBob 10% ROTTEN

Here is my code:

void PrintAll(ostream& out, const string titles[], const int ratings[], int count) {
WriteLine(out, '=', 50);
out << "PRINT ALL" << endl;
WriteLine(out, '-', 50);

[Code] .....

View 5 Replies View Related

C/C++ :: Sizeof (struct) Returns 6 More Bytes Than Actual Struct Size?

Sep 14, 2014

#include <stdio.h>
#define MAX_USERS 20
struct {
char ID[10];
char Name[40];
int Pos;

[Code] .....

I was attempting something weired with address to move data around when I discovered that the size of the array is not what I expected. I am passing this structure as &Users to a function that declares it as a void *, then I can deal with chunks of data (memmove) and not have to worry about index or things like that. However...sizeof is returning something I do not understand.

View 9 Replies View Related

C# :: Get Value Of Integer From Another Page

Nov 7, 2014

DisplayImages.aspx.cs file

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using mshtml;
using HtmlAgilityPack;

[Code]...

Now I'm getting the value of id i.e "DisplayImages.aspx?id=3" from DailyDarshan.aspx and want to display the images of each respective link according id.. when I click on "DisplayImages.aspx?id=4" link so it has to show the if(id == 4) images...but The problem is int id its not taking value itself.on DisplayImages.aspx.cs page I must have to define the id. for e.g. I wrote int id =3; on DisplayImages.aspx.cs file so it shows the images of id = 3 on each and every link.. Tell me what should I do to take value from another page or else how int id takes value by itself...

View 4 Replies View Related

C++ :: Passing Page Request Via Php?

Sep 13, 2014

i want to write a c++ program that could pass a web page request, using a php script in a dns server. And also passed by the quested page to the software. What i really want to do is a software that can redirect a page request.

View 1 Replies View Related

C# :: Save Web Page To Database

Apr 10, 2014

What is the best way to save a c# web page to database, either sql or oledb both fine. What I am looking to do is save all the data that has been entered into a database then upload this data to a grid view or form view.

The problem is there is a a lot of data on the page. Such as drop down lists, check boxes panels text boxes. I am able to display the text boxes in the database when i enter information into them. this is not working for the other objects. Also there is fixed data in the panels which doesn't require user input but I still want this info saved as it is vital.

In short I want to save the data from a page ive created called DOCare.aspx into a database. then take the data and display it in Forms.aspx a different page, where it will list all the completed forms for the user to modify if needed.

How to do this or links to websites that have information on this?? Dont know if i am wording it wrong but just cant find a way to do this. Everyone ive seen is working with small amounts of data and only text boxes.

View 1 Replies View Related

C# :: Button Taking To Another Page

Nov 12, 2014

I decided to code my own GUI menu. getting to another page from a button click. I have added the event handler I think (click="Button_click") then in the event handler I have added this:

private void Button_Click(object sender, System.EventArgs e);
}
Response.Redirect("Login.xaml");
}

After researching it says either to use
Response.Redirect("Login.xaml");
OR
Server.Transfer("Login.xaml");
Neither of these work, underlining "Response" and "Server" as an error saying "A namespace cannot directly contain members such as fields or methods."

NOTE: MY MAIN GUI PAGE IS CALLED "mainpage.xaml" THE CODE ABOVE IS STORED IN THE "mainpage.xaml.cs" THIS MIGHT BE RIGHT OR WRONG BUT I'M NOT SURE SO I AM LEAVING SOME EXTRA INFO!

View 1 Replies View Related

C# :: How To Find Selected Tap Page

Aug 31, 2014

I have a secnario where I have few tab controls one ineide the other, where my real tab pages containing the data are 4 level deep. This entire structure is dynamically built from a data base.

Now I have a tick event, on whice I want to update the data in the currently selected tabpage.

How can I find it, recall that I have many tab controls, each has a tabpage with another tab control an so forth...

Two ideas I had in mind, I though I caould generate a list of all my data TabPages and itterate it, but I failed to find an indicator of the selected tab.

Another idea was to track the currently selected tabpage via an event, but I feared that I might miss somehow the track and my update the wrong tab page.

Last idea was really unelegant - Look at the main control, get the selected tab page, find the tab control on that page via searching its controls, than find this control selected page, and do the same until I reach the 4th level.

View 4 Replies View Related

C Sharp :: How To Set Printer For A Web Page

Sep 20, 2012

I have a test web page and a windows form which call a printer and sends a print job to a printer that is on the network. I have been able to successfully do this from the windows form, however, I can figure out how to do it from an aspx page to the server's default printer. Sample codes are below.

Windows Form:
  public partial class Form1 : Form   {
    private const string TEMPLATE_DIRECTORY = @"C:Program FilesBrother bPAC3 SDKTemplates";    // Template file path
    private const string TEMPLATE_SIMPLE = "NamePlate1.LBX";    // Template file name
    private const string TEMPLATE_FRAME = "NamePlate2.LBX";        // Template file name
    public Form1() {
      InitializeComponent();

[Code] ....

View 1 Replies View Related

C++ :: Reading Text In HTML Page

May 11, 2014

I am trying to make a simple c++ program that will read some text in the html page. Here is the source of the html i want to read.

<html>
<body>
This is a test message.
</body>
</html>

My expected result in c++ in an string array like this:

This
is
a
test
message

I tried to look around and I came across a function called InternetReadFile but I can't find any example similar to what I want.

View 7 Replies View Related

C# :: Printing Picture Not Come On Center Of Page?

Jun 11, 2014

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Bitmap myBitmap1 = new Bitmap(pictureBox1.Width,pictureBox1.Height);
pictureBox1.DrawToBitmap(myBitmap1, new Rectangle(0 , 0, pictureBox1.Width, pictureBox1.Height));
e.Graphics.DrawImage(myBitmap1, 0, 0);

[Code]...

when i print picture exist in picture box image come on top right why i need image come on center of page

View 2 Replies View Related

C++ :: Calling Library From HTML Page

Jun 12, 2014

I would like to be able to call c++ library from HTML page. So on HTML page I have area for some possible input (url, name, email, etc) and that info is passed to c++ and calculated info and may email someone; or pull info from text file and display on html page. Realizing PHP or something similar would be easier, I really want to make these calls from HTML pages. ???

View 2 Replies View Related

C# :: Force A Post Back To Different Page

May 21, 2014

i have a page (which i did not create) which opens as a modeless box with a save button. The save works great in saving comments. However the client wants to have the comments update on the page where the link is for the editable modeless box. is there a way to post pack to the original page to force the page to refresh the information?

info:

All information is gathered on the page load event.

there is a section that shows all the comments for a certain item

a link to edit the comments that opens up a modeless box

save button in the modeless box

I have tried the

Page.ResolveUrl(

And response redirect but they give me errors of unknown url) i am guessing it has something to do with the dynamic data crap.

View 2 Replies View Related

C Sharp :: How To Call A Page Using MenuStrip

Jul 29, 2012

Recently started working with C #, and do not know how to call a page using MenuStrip, for example, when you click any of the menus, I need to call another page ...

View 1 Replies View Related

C++ :: Creating A Struct Within Struct Node?

Feb 28, 2015

Im having trouble creating a struct within a struct node. the program suppose to hold students firstname, lastname, and gpa in a node therefore creating my linked list. Line 26 keeps saying that cannot convert parameter 2 from 'studentType to std::string

#include <iostream>
#include <string>
using namespace std;
struct studentType{
string firstname;
string lastname;
double gpa;

[code].....

View 2 Replies View Related

C++ :: Read HTML Page Text File

May 26, 2013

How can I read text from a webpage asynchronously,from within C++. After you first connect to the internet using usual means, you enter the string

e.g. "[URL] ...." and the C++ program reads the information: "<title>BBC Website</title><body>This is the BBC website...." from the internet.

Here I want to connect to website every 60 minutes and fetch only first 100 lines of the run.txt file as mentioned above. How can I do this using C++ and asynchronous winsock ???

Code:
#define WIN_OS
#define _DEBUG_PRINT(X) /* X */

//For commn
#include <iostream>
#include <string>
#include <stdlib.h>
#include <assert.h>

[Code] .....

View 10 Replies View Related

C# :: Way To Get URL When User Opens A Web Page With Common Web Browser?

May 11, 2012

Is there a way to get the URL when the user opens a web page with a common web browser?

View 3 Replies View Related

C# :: Javascript Data Tables Not Showing On Page?

Nov 10, 2014

The problem is that the data table doesn't show at all. Here is the code:

<%@ Page Title="" Language="C#" MasterPageFile="~/LB/MasterPage.master" AutoEventWireup="true" CodeFile="InsertedInfo.aspx.cs" Inherits="LB_InsertedInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

[Code]....

View 5 Replies View Related

C# :: WPF / How To Check If Page Content Is Completely Rendered

Jan 13, 2014

In my program I have to load a page in a second window based on user's decision. This is how I do it:

case 1:
Page1 p1 = new Page1();
secondwindow.frame.Source = new Uri("p1.xaml", UriKind.Relative);
secondwindow.Show();
break;
case 2:
Page2 p2 = new Page2();
secondwindow.frame.Source = new Uri("p2.xaml", UriKind.Relative);
secondwindow.Show();
break;

The user should not be able to navigate between these two pages, and between choosing one or the other page, the user will have some interaction with the main window. For the user interaction with the main window, the second window gets hidden:

if (secondWindow != null)
{
secondwindow.Hide();
}

Now if the user selects the first page and and then the second page, when I show the second window, I can see the first page for a fraction of a second, and then second page gets rendered. I wanted to know if there is a way to make sure the rendering is complete before using:

secondwindow.Show();

View 5 Replies View Related

C Sharp :: Stop Page (or All Its Controls) To Be Autoposted?

Nov 20, 2012

i am tring to update a sql database table, first i select the values from database after it i display them into text boxes and drop dwon lists.and then i make required changes to values but when i click on update button the page is post backed and all values are set as they were already in database.

View 1 Replies View Related

Visual C++ :: Getting Notification Message From ASPX Page?

Jun 7, 2013

Is there a way an ASPX page can send a notification message to my IE Plugin which is developed in VC++?

View 3 Replies View Related

Visual C++ :: PrintDlg With Special Page Range

Mar 24, 2014

In my app the user can select the pages to print by typing in a start and an end page. I think this is the standard dialog.

How can I give the user the possibility to select e.g. page "1,2,6-9" like in Word?

View 4 Replies View Related

C# :: HttpWebRequest Redirects Back To Login Redirect Page?

Apr 22, 2014

What I am trying to do is to scrape data from a secure site. Don't worry, it is not for nefarious purposes. It's for a game I play, I am part of a team and within the site we have team data that we would like to share amongst each other( and store for future reference) without having to manually copy and paste. My goal is to create a web page that one would use to input their game credentials that would then connect to and retrieve game data from the game web site.

Here are the three main types of pages that I am dealing with and how they operate:

-There is a main login page. Although I am not accessing it via code. I may need to in the future.

-There is a Login redirect page. When I attempt to access a secure page, if I am not currently logged into the site, this page is displayed and allows me to type in the username and password.

-Lastly, there are Data pages - once you are logged into the site, you have access to a series of pages that contain game related data (these are the pages I want to scrape)

Something to note:

I have used LiveHTTPHeaders to capture the string that is added to the URL, which shows up like this:

"textLogin=username&textPassword=password&token=xxxxxx&Logon=Login&LogonFake=Login";

I am unsure if I have to mimic this or if by using the cookie within the HttpWebRequest, it will do this for me. The token is a fairly long string of characters that I unsure where it comes from. It doesn't match anything in the cookie. If I build the URL manually with the webpage location combined with the string from above and put it in the address bar of a browser - it goes directly to the desired page (logging me into the site behind the scenes)

Here is what I coded so far without any success:

public void TestConnection() {
//Build the connection string
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "textLogin=" + txtUsername.Text + "&textPassword=" + txtPassword.Text;
byte[] data = encoding.GetBytes(postData);

[code]....

When it gets to the end of the procedure shown above, the string HTML is of the LoginRedirect page and not the desired Data page. I am uncertain why it isn't logging into the correct page.

View 5 Replies View Related

C/C++ :: How To Save Entire Web Page As Image (JPEG Format)

Apr 17, 2014

I was trying to capture entire web screen and save as .jpeg format.

So far I have done this using C# Windows Application.

Same thing I am willing to do in 'VC++ 2010 Win32. In my C++ project I have created a Toolbar with a button on IE 9 browser. And on Toolbar button click I can print current window.

But I don't know how to take a snapshot and save to specified directory in .jpeg format using VC++ 2010. I have Windows 7.

View 4 Replies View Related

C Sharp :: To Get Child Window Of MDI Page In Focus On Pressing ALT TAB

Dec 7, 2012

I have MDI form which contains mutliple tabs and each tab has its own child form . When user presses ALT TAB from the from to other application its fine but when users presses ALT TAB back to my application it should keep focus on child form last time it was selected.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved