עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

++C מסך צבעוני

Featured Replies

פורסם

מהן הפקודות שהאותיות יהיו צבעוניות על הרקע השחור?

פורסם

תראו מה מצאתי בתיקייה שכוחת אל אחת שיש לי על המחשב :)

#ifndef _Console_H_
#define _Console_H_

//////////////////////////////////////////////////////////////////
//
// A simple win32 Console wrapper class that facilitates
// clearing the screen, going to a specific screen position
// and seting screen colors.
// Future updates:
// - create/destroy a new console window
// - clear a specific rectangle with a character/attribute
// (good for making text windows)
// - whatever else I think of
//
// Author: _Dimi
// Oct 20 2000 - Created

class Console
{
public:

// Wrap a given console (hCout be the output handle) or
// get the handle to the current
Console(HANDLE hCout = NULL)
{
if (hCout == NULL)
{
hCout = GetStdHandle(STD_OUTPUT_HANDLE);
}
m_hCout = hCout;
}

// Goto a screen position defined by (row, col)
void GoTo(UINT row, UINT col)
{
if (m_hCout != NULL)
{
COORD c;
c.X = col;
c.Y = row;
SetConsoleCursorPosition(m_hCout, c);
}
}

// Set the text color. Range is 0(black) .. 14(bright white)
void SetTextColor(UINT c)
{
if (m_hCout != NULL)
{
WORD attr = 0;
switch(c)
{
case 1: attr = FOREGROUND_RED; break;
case 2: attr = FOREGROUND_GREEN; break;
case 3: attr = FOREGROUND_BLUE; break;
case 4: attr = FOREGROUND_RED | FOREGROUND_GREEN; break;
case 5: attr = FOREGROUND_RED | FOREGROUND_BLUE; break;
case 6: attr = FOREGROUND_GREEN | FOREGROUND_BLUE; break;
case 7: attr = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; break;

case 8: attr = FOREGROUND_RED | FOREGROUND_INTENSITY; break;
case 9: attr = FOREGROUND_GREEN | FOREGROUND_INTENSITY; break;
case 10: attr = FOREGROUND_BLUE | FOREGROUND_INTENSITY; break;
case 11: attr = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY; break;
case 12: attr = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break;
case 13: attr = FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break;
case 14: attr = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break;
}
m_ForeGround = attr;
SetConsoleTextAttribute(m_hCout, m_ForeGround | m_BackGround);
}
}

// Set the background color. Range is 0(black) .. 14(bright white)
void SetBkColor(UINT c)
{
if (m_hCout != NULL)
{
WORD attr = 0;
switch(c)
{
case 1: attr = BACKGROUND_RED; break;
case 2: attr = BACKGROUND_GREEN; break;
case 3: attr = BACKGROUND_BLUE; break;
case 4: attr = BACKGROUND_RED | BACKGROUND_GREEN; break;
case 5: attr = BACKGROUND_RED | BACKGROUND_BLUE; break;
case 6: attr = BACKGROUND_GREEN | BACKGROUND_BLUE; break;
case 7: attr = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE; break;

case 8: attr = BACKGROUND_RED | BACKGROUND_INTENSITY; break;
case 9: attr = BACKGROUND_GREEN | BACKGROUND_INTENSITY; break;
case 10: attr = BACKGROUND_BLUE | BACKGROUND_INTENSITY; break;
case 11: attr = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY; break;
case 12: attr = BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY; break;
case 13: attr = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY; break;
case 14: attr = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY; break;
}
m_BackGround = attr;
SetConsoleTextAttribute(m_hCout, m_ForeGround | m_BackGround);
}
}

// Clear the screen using the currently set attributes and
// the given fill character (default = space).
void Clear(TCHAR ch = ' ')
{
if (m_hCout != NULL)
{
COORD c = {0,0};
DWORD len;
FillConsoleOutputAttribute(m_hCout, m_ForeGround | m_BackGround, 100000, c, &len);
FillConsoleOutputCharacter(m_hCout, ch, len, c, &len);
}
}

private:
HANDLE m_hCout; // the console handle
WORD m_ForeGround; // the current foreground attribute
WORD m_BackGround; // the current background attribute
};

#endif

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.