اذهب إلى المحتوى

Mari Carmen

الأعضاء
  • المساهمات

    33
  • تاريخ الانضمام

  • تاريخ آخر زيارة

آخر الزوار

لوحة آخر الزوار معطلة ولن تظهر للأعضاء

إنجازات Mari Carmen

عضو مساهم

عضو مساهم (2/3)

5

السمعة بالموقع

  1. كيف يمكني عمل text file؟؟
  2. ممكن مساعده باول 3 مطاليب وعمل text file You are to design a program that reads a text file having words in it. you program should build a doubly linked list of all words read from the named file. if the word already exists in the list, increase the frequency for that word and otherwise insert the new word in the list. your program then should display a menu with the following options: Add a word from the keyboard. search for a word. delete a word display the entire list. save the list to a file. exit program.
  3. لكل node لها next و prev وpointer واحد الي هو "head " باشر على اول node و head->next باشر على اخر node وnext تاع اخر node باشر على اول node وكل node عندها pointer اضافي باشر على اخر node وpointer اخر ياشر على head وهذه رسمت لينكد ليست وكيف يمكني عمل addfront و addback
  4. كيف ممكن احل مشكله Shallow Copy problem باستخدام strcpy void addFront(T *item) { Node<T>* p = new Node<T>; p->next = NULL; p->data = item; if (head == NULL) { head= p; n++; } else { p->next = head; head = p; n++; } }
  5. ممكن مساعده في تصميم صوره لمشروع متجر باسم "Unique Shop"
  6. ممكن مساعده لأنشاء صفحه تحتوي معلومات عن فندق jQuery.docx
  7. نعم لكن لم اتمكن من البحث عن كلمة بل فقره
  8. - The border styles in the list are: solid, dashed and dotted. - By clicking on “Create the styled paragraph“, you should insert the text ( in the text area) in a paragraph below with the selected style properties. - By clicking on search (after putting a word to look for it), the paragraph that appeared below should highlight every matched word in it. If it is not exist it should display below that the word does not exist. - By clicking on “Clear Search” you should remove all the highlights that appear on it from the last searching process. - You should display the web page in a very similar way to the above suggestion. كيف ممكن اعدل على كود اني ابحث عن كلمة موجوده ب text area وكيف ممكن اعمل شكل كما في صوره <!DOCTYPE html> <html> <head> <style> aside { float: left; padding: 20px; width: 70%; height: 300px } section:after { content: ""; display: table; clear: both; } footer { padding: 10px; text-align: center; color: white; } </style> </head> <body> <header> <textarea id="TextEditor" rows="30" cols="50" placeholder="Copy and Paste a text here ..."></textarea> </header> <section> <h1>Styling a paragraph</h1> <label for="textcolor">Text Color:</label> <input type="color" id="textcolor" value="#ff0000"><br> <label for="backgroundcolor">Background Color:</label> <input type="color" id="backgroundcolor" value="#ff0000"><br> <input type="radio" value="1" checked="checked">With Border<br> <input type="radio" value="0">Without Border<br> <label for="bordercolor">Border Color:</label> <input type="color" id="bordercolor" value="#ff0000"><br> <input type="button" value="Create the styled button"> <aside> <h1>Searching for a text</h1> </aside> </section> <footer> <div id="Results"></div> </footer> <script> document.querySelector('input[type = button]').addEventListener("click", function(){ document.getElementById("Results").innerHTML = document.getElementById("TextEditor").value; if(document.querySelector('input[type = radio]:checked').value === 1){ document.getElementById("Results").style.border = "thick solid "+document.getElementById("bordercolor").value; } document.getElementById("Results").style.color = document.getElementById("textcolor").value; document.getElementById("Results").style.backgroundColor = document.getElementById("backgroundcolor").value; }); </script> </body> </html>
  9. كيف يمكني ان ابحث عن كلمة داخل الفقره
  10. ممكن مساعده بعمل كود html و JavaScript لموقع تعديل وتنسيق النصوص كما هو موضح في الصورة
  11. #include<iostream> #include<string> #include<stack> using namespace std; bool isOperator(char ch) { if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '%' || ch == '>' || ch == '<' || ch == '<=' || ch == '>=' || ch == '==' || ch == '!=' || ch == '&&' || ch == '||' || ch == '(') return true; else return false; } int precedence(char op) { if (op == '*' || op == '/' || op == '%') return 100; else if (op == '(') return 0; else if (op == '+' || op == '-') return 50; else if (op == '>' || op == '<' || op == '<=' || op == '>=') return 40; else if (op == '==' || op == '!=') return 30; else if (op == '&&') return 20; else if (op == '||') return 10; } double evaluate(double x, double y, char op) { if (op == '+') return y + x; else if (op == '-') return y - x; else if (op == '*') return y * x; else if (op == '/') if (x != 0) return y / x; else { cout << "divbyzero"; return 0; } else { cout << "invalid operator"; return -1; } } void main() { string exp; // infix cout << "input exp" << endl; getline(cin, exp); string postfix = ""; int j = 0; stack <char> s; for (int i = 0; i < exp.length(); i++) { if (exp[i] == '(') s.push(exp[i]); else if (exp[i] == ')') { while (!s.empty() && s.top() != '(') { postfix += s.top(); s.pop(); } //end while s.pop(); // to remove ( from stack } else if (exp[i] >= '0' && exp[i] <= '9') { postfix += exp[i]; } else if (isOperator(exp[i]) && s.empty()) { s.push(exp[i]); } else if (isOperator(exp[i]) && !s.empty()) { while (!s.empty() && precedence(exp[i]) <= precedence(s.top())) { postfix += s.top(); s.pop(); } s.push(exp[i]); } } while (!s.empty()) { postfix += s.top(); s.pop(); } cout << "postfix= " << postfix << endl; // Evaluation part stack <double> d; for (int i = 0; i < postfix.length(); i++) { if (!isOperator(postfix[i]) - 0) d.push(postfix[i]-'0'); else { double x = d.top(); d.pop(); double y = d.top(); d.pop(); double z = evaluate(x, y, postfix[i]); d.push(z); } }// end loop postfix double res = d.top(); d.pop(); cout << "Final result=" << res << endl; if (!d.empty()) cout << " Bad result" << endl; } ممكن مساعده كيف اعمل logic expiration
  12. هي كود html ..ممكن مساعده بكود JavaScript: <!DOCTYPE html> <html> <body> <h1 >Welcome Back</h1> <hr> <br> <p> Hello class </p> <p> No more Covid19 </p> <p> Be safe </p> <p> Best wishes </p> <h2 >See you soon</h2> <hr> <br> <input type="text" > <input type="button" value="Insert header"> <br><br> <input type="color" > <input type="button" value="Apply to background"> <br><br> <input type="text" > <input type="button" value="Insert header"> <br><br> <input type="button" value="Show paragraphs"> </body> </html> Copy and paste the previous code and do the following: 1- When the user writes inside the text box and clicks Insert to header, this will change the header of the page with the written text. 2- When the user selects a color and clicks Apply, the background color of the page should be changed. 3- When the user clicks on a paragraph, this will change the background color of the paragraph to yellow. 4- When the user double clicks on any paragraph, this will hide the paragraph. 5- Clicking on Show all paragraphs, this will show all the paragraphs in the page. When the user clicks on any paragraph ( the color of the background should be yellow), when the user clicks on another paragraph, only one paragraph should have the background color been set to yellow.
  13. #include<iostream> #include<string> #include<stack> using namespace std; bool isOperator(char ch) { if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '%' || ch == '>' || ch == '<' || ch == '<=' || ch == '>=' || ch == '==' || ch == '!=' || ch == '&&' || ch == '||'||ch=='(') return true; else return false; } int precedence(char op) { if (op == '*' || op == '/' || op == '%') return 100; else if (op == '(') return 0; else if (op == '+' || op == '-') return 50; else if (op == '>' || op == '<' || op == '<=' || op == '>=') return 40; else if (op == '==' || op == '!=') return 30; else if (op == '&&') return 20; else if (op == '||') return 10; } double evaluate(double x, double y, char op) { if (op == '+') return y + x; else if (op == '-') return y - x; else if (op == '*') return y * x; else if (op == '/') if (x != 0) return y / x; else { cout << "divbyzero"; return 0; } else { cout << "invalid operator"; return -1; } } void main() { string exp; // infix cout << "input exp" << endl; getline(cin, exp); string postfix = ""; int j = 0; stack <char> s; for (int i = 0; i < exp.length(); i++) { if (exp[i] == '(') s.push(exp[i]); else if (exp[i] == ')') { while (!s.empty() && s.top() != '(') { postfix += s.top(); s.pop(); } //end while s.pop(); // to remove ( from stack } else if (exp[i] >= '0' && exp[i] <= '9') { postfix += exp[i]; } else if (isOperator(exp[i]) && s.empty()) { s.push(exp[i]); } else if (isOperator(exp[i]) && !s.empty()) { while (!s.empty() && precedence(exp[i]) <= precedence(s.top())) { postfix += s.top(); s.pop(); } s.push(exp[i]); } } while (!s.empty()) { postfix += s.top(); s.pop(); } cout << "postfix= " << postfix << endl; // Evaluation part stack <double> d; for (int i = 0; i < postfix.length(); i++) { if (!isOperator(postfix[i])) d.push(postfix[i]); else { double x = d.top(); d.pop(); double y = d.top(); d.pop(); double z = evaluate(x, y, postfix[i]); d.push(z); } }// end loop postfix double res = d.top(); d.pop(); cout << "Final result=" << res << endl; if (!d.empty()) cout << " Bad result" << endl; } يوجد عندي مشكله بل ضرب كيف ممكن احلها ... وكيف بقدر اعمل مقارنه بل عمليات مساوه او اكبر واصغر كما في صوره
  14. stacks.pdf
×
×
  • أضف...