বানানের শব্দের জন্য সর্বোত্তম চিঠি কার্ড


15

ধরা যাক আপনার কাছে শব্দের একটি তালিকা রয়েছে এবং আপনি প্রতিটি শব্দের বানান করতে লেটার কার্ড ব্যবহার করতে সক্ষম হতে চান। উদাহরণস্বরূপ, বিড়াল বানান করতে, আপনি সি, এ, টি লেবেলযুক্ত তিনটি কার্ড ব্যবহার করবেন

প্রতিটি কার্ড দ্বি-পার্শ্বযুক্ত , ধরে নিয়ে ন্যূনতম সংখ্যার কার্ড সংজ্ঞায়িত করতে একটি প্রোগ্রাম জমা দিন যা শব্দের পুরো তালিকার বানান করতে ব্যবহৃত হতে পারে।

ইনপুট শব্দের তালিকা, এটি ফাইল-ভিত্তিক, হার্ড-কোডেড, কমান্ড লাইন, যা কিছু হতে পারে। আউটপুট হ'ল কার্ডগুলির তালিকা, বিন্যাসিত ও অর্ডার করা হিসাবে আপনি উপযুক্ত দেখতে পাচ্ছেন, তবে কার্ডগুলি কীভাবে লেবেল করা হয়েছে তা পরিষ্কার হয়ে যায়।

কেসটি গুরুত্বপূর্ণ নয়: গল্ফ, গল্ফ এবং জিওএলএফ সমতুল্য।

কিছু ইঙ্গিত:

  • কার্ডের সংখ্যা দীর্ঘতম শব্দের দৈর্ঘ্যের চেয়ে কম হতে পারে না
  • কোনও কার্ডের পক্ষে উভয় পক্ষের একই অক্ষর থাকা কোনও অর্থই রাখে না
  • কেসটি তাৎপর্যপূর্ণ না হলেও, কিছু নির্দিষ্ট প্রতিসাম্যগুলির সুবিধা নেওয়ার জন্য লোয়ার কেসটি সুপারিশ করুন

উদাহরণস্বরূপ, এগুলি নির্দিষ্ট প্রতিসাম্যগুলির সুবিধা গ্রহণ করে :

ইনপুট: বেন, বগ, বাগ, ডেন, ডো, কুকুর, ডু, ডাগ, এড, শেষ, গব, Godশ্বর, নেড, ওড, কলম, পো, পগ

আউটপুট: খ / ডি, ই / জি, ও / এন

ইনপুট: একটি, এবং, এপ, হ'ল, বিছানা, কুঁড়ি, বুড়, ড্যান, দেব, ডাব, কান, এড, যুগ, ন্যাপ, প্যান, মটর, পাব, রায়ে, দৌড়া, ঘষা

আউটপুট: এ / বি, ডি / আর, ই / এন

এটিকে জনপ্রিয়তার প্রতিযোগিতায় পরিণত করা, সুতরাং কোডের কমনীয়তা, রান-টাইম পারফরম্যান্স এবং চতুরতার সাথে (নিয়ম-নমন এবং লুফোল সহ) গুরুত্বপূর্ণ!

সংযোজন : কেউ কেউ "অনুমোদিত" প্রতিসাম্য সম্পর্কে জিজ্ঞাসা করেছেন, বিশেষ ফন্ট ব্যবহার করা যায় কিনা, এবং কার্ডগুলি ভাঁজ করা যায় কিনা।

অনুমোদিত প্রতিসাম্যগুলি এমন কোনও অক্ষর যা 0, 90, 180 বা 270 ডিগ্রি ঘোরার পরে একে অপরের সাথে সাদৃশ্যপূর্ণ। এর মধ্যে খ / কিউ, ডি / পি এবং এন / ইউ অন্তর্ভুক্ত রয়েছে। আমি এম / ডাব্লু, জেড / এন এবং অবশ্যই আই / এল (মূলধন আই, ছোট হাতের এল) বলব। আমি সম্ভবত পৃষ্ঠটি স্ক্র্যাচ করছি, সুতরাং এমন কোনও অন্য কেউ যদি আপনার সম্পর্কে অনিশ্চিত থাকেন তবে কেবল জিজ্ঞাসা করুন।

এটি সহজ রাখতে, দয়া করে একটি স্ট্যান্ডার্ড সানস-সেরিফ ফন্টের মধ্যে সীমাবদ্ধ করুন, বলুন যে এটি এসইতে ব্যবহৃত হয়েছিল।

ভাঁজ যতদূর আপনি কিছু আশ্চর্যর বিকল্পগুলি করতে পারেন, যেমন বি হতে পারে ডি, ই, এফ, আই, পি, বা আর এবং সি বা এল যদি আপনি সত্যিই সৃজনশীলভাবে ভাঁজ করেন তবে আমি মনে করি এটি বাঁকানো, আক্ষরিক, খুব বেশি !

বাচ্চাদের সাথে কিছু অনুরূপ কার্ড খেলে আমি এই সমস্যাটি নিয়ে এসেছি। আমি লক্ষ করেছি যে একতরফা কার্ড সহ ভার্চুয়েস আসা কত সহজ ছিল ভার্জড। ডাবল-পার্শ্বযুক্ত কার্ডগুলি নিয়ে আসা কতটা কঠিন।

সংযোজন : সর্বাধিক জনপ্রিয় উত্তরে পুরষ্কার প্রদানের জন্য একটি অনুদানের ব্যবস্থা করেছেন। যদি টাই থাকে তবে যিনি প্রথমে জমা দিয়েছেন তাকে পুরষ্কার দেবেন।

আরেকটি ইঙ্গিত:

  • একতরফা সমস্যা সমাধান করা আপনাকে প্রয়োজনীয় ন্যূনতম সংখ্যার কার্ডের ধারণা দেবে (উদাহরণস্বরূপ 20 টি একতরফা কার্ডগুলি কমপক্ষে 10 ডাবল পার্শ্ব-কার্ডের প্রয়োজনে অনুবাদ করে)

সংযোজন : ওহ বিরক্ত, আমি ব্যস্ত ছিলাম এবং অনুগ্রহের মেয়াদ শেষ হওয়ার কথা ভুলে গিয়েছিলাম। এটি কারও কাছেই যায় না কারণ অনুগ্রহ শুরু হওয়ার আগে একমাত্র উত্তর জমা দেওয়া হয়েছিল! এর জন্যে দুঃখিত.


3
শুধু স্পষ্ট করে বলতে গেলে, কী অনুমতি দেওয়া হচ্ছে? শুধুমাত্র প্রতিসাম্য জোড়া হয় n/u, d/p? কি b/qএবং m/w? এবং আমি যদি Pদুটি কার্ড ভাঁজ করি তবে উপরের অর্ধেকটি হয়ে যায় D?
Sp3000

3
১. তাদের অনুমোদিত "প্রতিসামগ্রন্থগুলির" একটি তালিকা, আমি মনে করব এটি হরফের উপর ভিত্তি করে আলাদা হতে পারে, যা একটি সম্ভাব্য লুপ গর্ত (একটি ফন্ট ব্যবহার করুন যেখানে অক্ষরগুলি সবগুলি সমান, অর্থাত্ কার্ডগুলি সর্বদা / এর সমান হবে ) বা এর মতো কিছু) ২ "কেসটি উল্লেখযোগ্য নয়" সুতরাং "এন" "ইউ" দ্বারা প্রতিনিধিত্ব করা যায়?
ডেভিড রজার্স

আমি মনে করি আপনি নিজের প্রশ্নটিকে জনপ্রিয়তার প্রতিযোগিতা বানিয়ে অন্যায় করছেন। আপনি মানুষকে সৃজনশীল হতে বলার মাধ্যমে আপনি সৃজনশীলতা পান না, তাদেরকে একটি কঠিন চ্যালেঞ্জ দিয়ে এবং তারা যা কিছু করতে পারে তা নিচে ফেলে দিয়ে আপনি এটি অর্জন করেন।
xnor

@ sp3000 - বি / কিউ অবশ্যই। আপনার অন্যান্য প্রশ্ন সম্পর্কে, আমি বিধিগুলি পরিষ্কার করব।

1
এটি একটি জনপ্রিয়তা প্রতিযোগিতা হিসাবে (অনুগ্রহের খুব উল্লেখ না করা) হিসাবে রাখা ঠিক ঠিক নয়। উত্তরগুলি সর্বোত্তম যে কোন গ্যারান্টি আছে? যদি একটি উত্তর সাবঅস্টিমাল রেজাল্ট দেয় তবে কিছু কারণে সর্বাধিক ভোট রয়েছে ..
অপ্টিমাইজার

উত্তর:


5

সি # - কার্ডচুসার

সারসংক্ষেপ

প্রতিটি তালিকা সমাধানের চেষ্টা করার জন্য এই অ্যাপ্লিকেশনটি একটি নিষ্ঠুর শক্তি পদ্ধতি ব্যবহার করে। প্রথমে আমি বেছে নিতে সম্ভাব্য কার্ডগুলির একটি তালিকা তৈরি করি, তারপরে আমি নির্ধারণ করি যে কোনটি সবচেয়ে উপযুক্ত ((সর্বাধিক বর্ণগুলি সরিয়ে দেয় + দীর্ঘ শব্দগুলি সর্বাধিক সংক্ষিপ্ত করে), ফলাফলের তালিকায় এটি যুক্ত করুন এবং যতক্ষণ না আমি পর্যাপ্ত সম্ভাব্য কার্ডগুলি না নির্বাচন করি ততক্ষণ এই প্রক্রিয়াটি চালিয়ে যাচ্ছি তালিকার প্রতিটি শব্দ মুছে ফেলতে, তারপরে আমি সেই কার্ডগুলিকে প্রতিটি শব্দের সাথে পুনরায় মেলে এবং আউটপুট মুদ্রণ করি।

আপনি যদি সরবরাহকৃত উইন্ডোজ ফর্ম অ্যাপ্লিকেশনটি ডাউনলোড না করে এবং তৈরি না করেই এই কোডটির আরও সীমাবদ্ধ সংস্করণ দেখতে চান তবে আপনি আমার প্রোগ্রামটি ছোট ছোট সেটগুলিতে চালনার জন্য সরবরাহিত লিঙ্কটি ব্যবহার করতে পারেন, দয়া করে নোট করুন যে এটি কনসোল অ্যাপ্লিকেশন সংস্করণ তাই ফলাফল কার্ডগুলি ঘোরানো হয় না: http://ideone.com/fork/VD1gJF

পরিবর্ধন ও পরিবর্তন তালিকা

কারেন্ট - @Zgarb দ্বারা প্রস্তাবিত আরও ভাল ফলাফলের অপ্টিমাইজেশন যুক্ত করা হয়েছে

আপডেট 3 - আরও কোড সাফ, আরও বাগ ঠিক করা, আরও ভাল ফলাফল

আপডেট 2 - উইন্ডোজ ফর্ম, আরও ভার্বোস আউটপুট

আপডেট 1 - চরিত্রের প্রতিসমগুলির জন্য নতুন / আরও ভাল সমর্থন support

আসল - কনসোল অ্যাপ্লিকেশন

উদাহরণ

এসিআর, আফট, আইন, এসএল, জিত, বলুন, দ্রুত, মহাকাব্য আউটপুট 0

হিঙ্কা, করবে, করবে না, করবে, করবে না, তবুও, তুমি, তোমাকে করবে আউটপুট 1

এএএএ, বিবিবিবি, সিসিসি
আউটপুট 2

কোড

কনসোল অ্যাপ্লিকেশন এবং উইন্ডোজ ফর্মস কোডগুলির সাথে একই শ্রেণি এবং পদ্ধতি ভাগ করে নেওয়ার পরেও আমি এটি আরও একটি বৃহত প্রকল্পে একত্রিত করতে হবে, তারপরে রানবটন_ক্লিক পদ্ধতিতে বিভিন্ন অঞ্চল বিভক্ত করুন যাতে আমি যখনই এর বাইরে ইউনিট লিখতে পারি, যাইহোক যখনই আমি এটি করার সময় পাই আমি করব, আপাতত আমার যা আছে তা এই:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CardChooserForms
{
    public partial class CardChooser : Form
    {
        private class Solution : IEquatable<Solution>
        {
            public List<string> Cards { get; set; }
            public List<string> Remaining { get; set; }

            public int RemainingScore
            {
                get
                {
                    return this.Remaining.Sum(b => b.ToCharArray().Count());
                }
            }

            public bool Equals(Solution other)
            {
                return new string(Cards.OrderBy(a => a).SelectMany(a => a).ToArray()) == new string(other.Cards.OrderBy(a => a).SelectMany(a => a).ToArray());
            }

            public override int GetHashCode()
            {
                return (new string(Cards.OrderBy(a => a).SelectMany(a => a).ToArray())).GetHashCode();
            }
        }
        private class Symmetry
        {
            public char Value { get; set; }
            public Int16 RotationDifference { get; set; }
        }

        /// <summary>
        /// This is where Symmetries are stored, right now it only has support for pairs(two values per array)
        /// </summary>
        private static Symmetry[][] _rotatableCharacters = new Symmetry[][] {                 
                new Symmetry[] { new Symmetry {Value = 'Z'}, new Symmetry {Value = 'N', RotationDifference = 90}}, 
                new Symmetry[] { new Symmetry {Value = 'd'}, new Symmetry {Value = 'p', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'u'}, new Symmetry {Value = 'n', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'm'}, new Symmetry {Value = 'w', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'b'}, new Symmetry {Value = 'q', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'l'}, new Symmetry {Value = 'I', RotationDifference = 0}},                 
            };

        //These all control the output settings
        private readonly static int _defualtSpacing = 25;
        private readonly static int _defualtFontSize = 8;
        private readonly static Font _defualtFont = new Font("Microsoft Sans Serif", _defualtFontSize);
        private readonly static Brush _defualtBackgroundColor = Brushes.Beige;
        private readonly static Brush _defualtForegroundColor = Brushes.Black;


        public CardChooser()
        {
            InitializeComponent();
        }

        private void RunButton_Click(object sender, EventArgs e)
        {            
            #region Input Parsing
            //Get input                         
            string input = InputRichTextBox.Text;

            if (!input.Contains(","))
                throw new ArgumentException("Input must contain more than one value and must be seprated by commas.");

            //Parse input
            var inputLowercasedTrimedTransformed = input.Split(',').Select(a => a.ToLowerInvariant().Trim()).ToArray();
            var inputSplitTrimIndex = input.Split(',').Select(a => a.Trim()).ToArray().Select((a, index) => new { value = a, index }).ToArray();
            #endregion Input Parsing

            #region Card Formation
            var inputCharParsed = inputLowercasedTrimedTransformed.Select(a => a.ToCharArray()).ToArray();
            var possibleCards = GetAllCasesTwoLengthArrayElements(
                UniqueBiDirection(
                //Get unique characters
                    inputCharParsed
                    .SelectMany(a => a)
                    .Distinct()
                    .Select(a => new
                    {
                        Character = a,
                        PossibleCharacters = inputCharParsed.SelectMany(b => b).Where(b => b != a).ToList()
                    })
                //Now get distinct cards(ie NB == BN, NB != NE)
                    .SelectMany(a => a.PossibleCharacters.Select(b => new string(new char[] { a.Character, b })).ToArray()).ToArray()
                    ).ToArray()
                ).ToArray();

            //Now get every possible character each card can eliminate
            var possibleCharsFromCards = GetAllPossibleCharsFromACards(possibleCards).ToArray();

            //Now set up some possibilities that contain only one card
            var possibleCardCombinations = possibleCards.Select((a, index) => new Solution
            {
                Cards = new List<string> { a },
                //Use the index of each card to reference the possible characters it can remove, then remove them per card to form a initial list of cards
                Remaining = inputLowercasedTrimedTransformed.Select(b => b.RemoveFirstInCharArr(possibleCharsFromCards[index].ToLowerInvariant().ToCharArray())).ToList()
            })
            //Take the best scoring card, discard the rest
            .OrderBy(a => a.RemainingScore)
            .ThenBy(a => a.Remaining.Max(b => b.Length))
            .Take(1).ToList();
            #endregion Card Formation

            #region Card Selection
            //Find best combination by iteratively trying every combination + 1 more card, and choose the lowest scoring one 
            while (!possibleCardCombinations.Any(a => a.Remaining.Sum(b => b.ToCharArray().Count()) == 0) && possibleCardCombinations.First().Cards.Count() < possibleCards.Count())
            {
                //Clear the list each iteration(as you can assume the last generations didn't work
                var newPossibilites = new List<Solution>();
                var currentRoundCardCombinations = possibleCardCombinations.ToArray();
                possibleCardCombinations.Clear();

                foreach (var trySolution in currentRoundCardCombinations)
                    foreach (var card in possibleCards.Select((a, index) => new { value = a, index }).Where(a => !trySolution.Cards.Contains(a.value)).ToArray())
                    {
                        var newSolution = new Solution();
                        newSolution.Cards = trySolution.Cards.ToList();
                        newSolution.Cards.Add(card.value);
                        newSolution.Remaining = trySolution.Remaining.ToList().Select(a => a.RemoveFirstInCharArr(possibleCharsFromCards[card.index].ToLowerInvariant().ToCharArray())).ToList();
                        newPossibilites.Add(newSolution);
                    }

                //Choose the highest scoring card
                possibleCardCombinations = newPossibilites
                    .OrderBy(a => a.RemainingScore)
                    .ThenBy(a => a.Remaining.Max(b => b.Length))
                    .Distinct().Take(1).ToList();
            }
            var finalCardSet = possibleCardCombinations.First().Cards.ToArray();
            #endregion Card Selection

            #region Output
            using (var image = new Bitmap(500, inputSplitTrimIndex.Count() * _defualtSpacing + finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing))
            using (Graphics graphic = Graphics.FromImage(image))
            {
                //Background
                graphic.FillRectangle(_defualtBackgroundColor, 0, 0, image.Width, image.Height);

                //Header                
                graphic.DrawString("Total Number of Cards Required: " + finalCardSet.Count(), _defualtFont, _defualtForegroundColor, new PointF(0, 0));
                graphic.DrawString(
                    "Cards: " + String.Join(", ", finalCardSet.Select(a => a[0] + "/" + a[1])),
                    _defualtFont,
                    _defualtForegroundColor,
                    new RectangleF(0, _defualtSpacing, image.Width - _defualtSpacing, finalCardSet.Count() * 5));

                //Results
                foreach (var element in inputSplitTrimIndex)
                {
                    //Paint the word
                    graphic.DrawString(element.value + " -> ", _defualtFont, _defualtForegroundColor, new PointF(0, element.index * _defualtSpacing + finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing));

                    //Now go through each character, determining the matching card, and wether that card has to be flipped
                    foreach (var card in GetOrderedCardsRequired(inputLowercasedTrimedTransformed[element.index].ToLowerInvariant(), finalCardSet.ToArray()).ToArray().Select((a, index) => new { value = a, index }))
                        using (var tempGraphic = Graphics.FromImage(image))
                        {
                            //For cards that need to flip
                            if (Char.ToUpperInvariant(element.value[card.index]) != Char.ToUpperInvariant(card.value[0]) &&
                                Char.ToUpperInvariant(element.value[card.index]) != Char.ToUpperInvariant(card.value[1]))
                            {
                                //TODO this is hacky and needs to be rethought
                                var rotateAmount = _rotatableCharacters
                                    .OrderByDescending(a => a.Any(b => b.Value == Char.ToLowerInvariant(element.value[card.index])))
                                    .First(a => a.Any(b => Char.ToUpperInvariant(b.Value) == Char.ToUpperInvariant(element.value[card.index])))
                                    [1].RotationDifference;

                                //Rotate
                                tempGraphic.TranslateTransform(
                                    _defualtSpacing * (_defualtFontSize / 2) + card.index * _defualtSpacing + (rotateAmount == 90 ? 0 : _defualtSpacing / 2) + (rotateAmount == 180 ? -(_defualtSpacing / 4) : 0),
                                    finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing + element.index * _defualtSpacing + (rotateAmount == 180 ? 0 : _defualtSpacing / 2));
                                tempGraphic.RotateTransform(rotateAmount);

                                //Print string
                                tempGraphic.DrawString(
                                String.Join("/", card.value.ToCharArray().Select(a => new string(new char[] { a })).ToArray()),
                                _defualtFont,
                                Brushes.Black,
                                new RectangleF(-(_defualtSpacing / 2), -(_defualtSpacing / 2), _defualtSpacing, _defualtSpacing));
                            }
                            else
                                tempGraphic.DrawString(
                                     String.Join("/", card.value.ToCharArray().Select(a => new string(new char[] { a })).ToArray()),
                                     _defualtFont,
                                     _defualtForegroundColor,
                                     new RectangleF(
                                         _defualtSpacing * (_defualtFontSize / 2) + card.index * _defualtSpacing,
                                         finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing + element.index * _defualtSpacing,
                                         _defualtSpacing, _defualtSpacing));
                        }
                }

                OutputPictureBox.Image = new Bitmap(image);
            }
            #endregion Output
        }

        private IEnumerable<string> GetAllPossibleCharsFromACards(string[] cards)
        {
            return cards.Select(a => 
                new string(a.ToCharArray().Concat(_rotatableCharacters
                                    .Where(b => b.Select(c => c.Value).Intersect(a.ToCharArray()).Count() > 0)
                                    .SelectMany(b => b.Select(c => c.Value))
                                    .Distinct().ToArray()).Distinct().ToArray()));
        }

        private IEnumerable<string> GetOrderedCardsRequired(string word, string[] cards)
        {
            var solution = new List<string>();
            var tempCards = GetAllPossibleCharsFromACards(cards).Select((a, index) => new { value = a, index }).ToList();

            foreach (var letter in word.ToCharArray())
            {
                //TODO this still could theoretically fail I think                
                var card = tempCards
                    //Order by the least number of characters match
                    .OrderBy(a => word.ToLowerInvariant().Intersect(a.value.ToLowerInvariant()).Count())
                    .ThenByDescending(a => tempCards.Sum(b => b.value.ToLowerInvariant().Intersect(a.value.ToLowerInvariant()).Count()))
                    //Then take the least useful card for the other parts of the word
                    .First(a => a.value.ToLowerInvariant().Contains(Char.ToLowerInvariant(letter)));
                solution.Add(cards[card.index]);
                tempCards.Remove(card);
            }
            return solution;
        }

        private static IEnumerable<string> UniqueBiDirection(string[] input)
        {
            var results = new List<string>();
            foreach (var element in input)
                if (!results.Any(a => a == new string(element.ToCharArray().Reverse().ToArray()) || a == element))
                    results.Add(element);
            return results;
        }

        private static IEnumerable<string> GetAllCasesTwoLengthArrayElements(string[] input)
        {
            if (input.Any(a => a.Length != 2))
                throw new ArgumentException("This method is only for arrays with two characters");

            List<string> output = input.ToList();
            foreach (var element in input)
            {
                output.Add(new string(new char[] { Char.ToUpperInvariant(element[0]), Char.ToUpperInvariant(element[1]) }));
                output.Add(new string(new char[] { element[0], Char.ToUpperInvariant(element[1]) }));
                output.Add(new string(new char[] { Char.ToUpperInvariant(element[0]), element[1] }));
            }
            return output;
        }

        private void SaveButton_Click(object sender, EventArgs e)
        {
            using (var image = new Bitmap(OutputPictureBox.Image))
                image.Save(Directory.GetCurrentDirectory() + "Output.png", ImageFormat.Png);
        }
    }

    public static class StringExtensions
    {
        public static string RemoveFirstInCharArr(this string source, char[] values)
        {
            var tempSource = source.ToUpperInvariant();
            foreach (var value in values)
            {
                int index = tempSource.IndexOf(Char.ToUpperInvariant(value));
                if (index >= 0) return source.Remove(index, 1);
            }
            return source;
        }        
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CardChooserForms
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new CardChooser());
        }
    }
}


namespace CardChooserForms
{
    partial class CardChooser
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.InputRichTextBox = new System.Windows.Forms.RichTextBox();
            this.EnterInputLabel = new System.Windows.Forms.Label();
            this.RunButton = new System.Windows.Forms.Button();
            this.OutputPictureBox = new System.Windows.Forms.PictureBox();
            this.OutputPanel = new System.Windows.Forms.Panel();
            this.SaveButton = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.OutputPictureBox)).BeginInit();
            this.OutputPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // InputRichTextBox
            // 
            this.InputRichTextBox.Location = new System.Drawing.Point(60, 40);
            this.InputRichTextBox.Name = "InputRichTextBox";
            this.InputRichTextBox.Size = new System.Drawing.Size(400, 100);
            this.InputRichTextBox.TabIndex = 0;
            this.InputRichTextBox.Text = "";
            // 
            // EnterInputLabel
            // 
            this.EnterInputLabel.AutoSize = true;
            this.EnterInputLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.EnterInputLabel.Location = new System.Drawing.Point(57, 20);
            this.EnterInputLabel.Name = "EnterInputLabel";
            this.EnterInputLabel.Size = new System.Drawing.Size(81, 17);
            this.EnterInputLabel.TabIndex = 1;
            this.EnterInputLabel.Text = "Enter Input:";
            // 
            // RunButton
            // 
            this.RunButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.RunButton.Location = new System.Drawing.Point(60, 147);
            this.RunButton.Name = "RunButton";
            this.RunButton.Size = new System.Drawing.Size(180, 52);
            this.RunButton.TabIndex = 2;
            this.RunButton.Text = "Run";
            this.RunButton.UseVisualStyleBackColor = true;
            this.RunButton.Click += new System.EventHandler(this.RunButton_Click);
            // 
            // OutputPictureBox
            // 
            this.OutputPictureBox.Location = new System.Drawing.Point(3, 3);
            this.OutputPictureBox.Name = "OutputPictureBox";
            this.OutputPictureBox.Size = new System.Drawing.Size(500, 500);
            this.OutputPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.OutputPictureBox.TabIndex = 3;
            this.OutputPictureBox.TabStop = false;
            // 
            // OutputPanel
            // 
            this.OutputPanel.AutoScroll = true;
            this.OutputPanel.Controls.Add(this.OutputPictureBox);
            this.OutputPanel.Location = new System.Drawing.Point(4, 205);
            this.OutputPanel.Name = "OutputPanel";
            this.OutputPanel.Size = new System.Drawing.Size(520, 520);
            this.OutputPanel.TabIndex = 4;
            // 
            // SaveButton
            // 
            this.SaveButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.SaveButton.Location = new System.Drawing.Point(280, 147);
            this.SaveButton.Name = "SaveButton";
            this.SaveButton.Size = new System.Drawing.Size(180, 52);
            this.SaveButton.TabIndex = 5;
            this.SaveButton.Text = "Save";
            this.SaveButton.UseVisualStyleBackColor = true;
            this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click);
            // 
            // CardChooser
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(534, 737);
            this.Controls.Add(this.SaveButton);
            this.Controls.Add(this.RunButton);
            this.Controls.Add(this.EnterInputLabel);
            this.Controls.Add(this.InputRichTextBox);
            this.Controls.Add(this.OutputPanel);
            this.Name = "CardChooser";
            this.Text = "Card Chooser";
            ((System.ComponentModel.ISupportInitialize)(this.OutputPictureBox)).EndInit();
            this.OutputPanel.ResumeLayout(false);
            this.OutputPanel.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.RichTextBox InputRichTextBox;
        private System.Windows.Forms.Label EnterInputLabel;
        private System.Windows.Forms.Button RunButton;
        private System.Windows.Forms.PictureBox OutputPictureBox;
        private System.Windows.Forms.Panel OutputPanel;
        private System.Windows.Forms.Button SaveButton;
    }
}

1
iকার্ড ছাড়াই আপনি কীভাবে "সম্ভবত" বানান করবেন ?
ক্লাদিউ

"অবশ্যই আমি / এল (মূলধন আই, লোয়ারকেস এল)", সুতরাং ছোট হাতের রাজধানী আইয়ের পক্ষে দাঁড়ানো উচিত
ডেভিড রজার্স

ওহ দেখে মনে হচ্ছে আপনার আউটপুটে এটি উল্লেখ করা উচিত
ক্লদিউ

@ ক্লাডিউ হ্যাঁ আমি এই সম্পর্কে কিছুক্ষণের জন্য ভেবেছিলাম, এটি সত্যই দ্বিতীয় প্রশ্নটির দিকে নেমে আসে আমি ইয়িমিন রংকে জিজ্ঞাসা করেছি এবং আমি মনে করি তিনি এটিকে সঠিকভাবে ব্যাখ্যা করেছেন, যদি আমি একটি কার্ডে "এল" আউটপুট আউট করি তবে এটি উদাহরণের মতোই অনুমান করা উচিত it আমি ও উপরের কেস উভয় ক্ষেত্রে ব্যবহার করতে পারি, ফলস্বরূপ এমন আউটপুট তৈরি হবে যা কেসটির সাথে পুরোপুরি মেলে না তবে আমি মনে করি এটি "ঠিক আছে" কারণ এটি এখনও প্রশ্নের শর্ত পূরণ করে, তবে আবার আমি উন্মুক্ত প্রয়োজনে স্পষ্ট করে বলার জন্য, সম্ভবত পরবর্তী সংস্করণে আমি ঘূর্ণিত অক্ষরগুলি বা এমন কিছুর সাহায্যে উত্পন্ন স্ট্রিংগুলি আউটপুট করতে পারি ...
ডেভিড রজার্স

আমি মনে করি একটি ভুল আছে saidশেষ চিঠিটি ডাব্লু বা পি নয়
গর্বিত হাসেলেলার
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.