• الإعلانات

    • فيصل الحربي

      تسجيل عضوية جديدة في المنتدى   01/31/2016

      السلام عليكم ورحمة الله وبركاته  عزيزي العضو الجديد :  حاليا رسالة الإيميل لتأكيد صحة إيميلكم تذهب للبريد العشوائي ( جاري حل المشكلة )  فإذا لم تجد رسالة التحقق من إيميلكم في صندوق الوارد لديكم إتجه للبريد العشوائي ( JUNK)  وقم بتفعيل إشتراككم من هناك   

jMustafa

اعضاء جدد
  • عدد المشاركات

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

  • تاريخ اخر زياره

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

2 عادي

عن jMustafa

  • الرتبة
    عضو جديد

معلومات الملف الشخصي

  • الجنس ذكر
  1. I haven't developed any database before, but now I need to learn it                     I suffered from this issue in my pc and in my mac                
  2. أرجوا المساعدة يا شباب

    محاولة لتعديل لم أصل إلى نتيجة using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections;namespace ConsoleApplication32{ class Reader { // private static Operator operators = new Operator(); private static Numaric numaric = new Numaric(); // Char[] NUMARIC = {'0','1','2','3','4','5','6','7','8','9','.'}; Char[] OP = {'+','-','*','/'}; Char EQUAL = '='; Char SPACE = ' '; // String line; String[] strNumaricValue; /// <summary> /// /// </summary> public Reader() { } /// <summary> /// /// </summary> /// <param name="line"></param> public Reader(String line) { this.line = line; } /// <summary> /// /// </summary> /// <returns></returns> public bool isNumber() { bool isIt = false; int ii = 0; // spilled the line for(int i = 0 ; i <line.Length; i++) { // chech each char in line for (int j = 0; j < NUMARIC.Length; j++) { // check if it's a number if (line[i] == NUMARIC[j]) { Console.WriteLine("test number ii = {0}",ii); numberKeeper(line[i],ii); } // if (line[i]!= NUMARIC[i]) { if (line[i] == OP[j % 4] && (j % 4) == j) { ii++; Console.WriteLine("test OP"); } } } } return isIt; }//end of IsNumber /// <summary> /// /// </summary> /// <param name="num"></param> void numberKeeper(Char num,int strPostion =0) { double Value = 0.00; int revPostion = 0 ; if (strPostion>0) { revPostion = strPostion - 1; } strNumaricValue = new String[strPostion + 1]; strNumaricValue[strPostion] += num.ToString(); if (revPostion>= 0) { Console.WriteLine("revPostion = {0} strPostion = {1}", revPostion, strPostion); if (revPostion == strPostion - 1) { Value = Convert.ToDouble(strNumaricValue[revPostion]); Console.WriteLine("value = {0}",Value); numaric.addNumber(Value); } } } }}
  3. أرجوا المساعدة يا شباب

    لا أزال أحاول  using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections;namespace ConsoleApplication32{ class Reader { private static Operator operators = new Operator(); private static Numaric numaric = new Numaric(); Char[] NUMARIC = {'0','1','2','3','4','5','6','7','8','9','.'}; Char[] OP = {'+','-','*','/'}; Char EQUAL = '='; Char SPACE = ' '; static String _line = " "; static Int64 STR_NUM_VALUE_LEN = _line.Length; String[] strNumaricValue; public Reader() { } public Reader(String line) { _line = line; } public bool isNumber() { bool isIt = false; bool run = true; double Value; int ii = 0; // spilled the line for(int i = 0 ; i <_line.Length; i++) { // chech each char in line for (int j = 0; j < NUMARIC.Length; j++) { // check if it's a number if (_line[i] == NUMARIC[j]) { Console.WriteLine("test number ii = {0}",ii); numberKeeper(_line[i],ii); } // if (_line[i]!= NUMARIC[i]) { if (_line[i] == OP[j % 4] && (j % 4) == j) { ii++; Console.WriteLine("test OP"); } } } } //FIXED ME for (int kk = 0; kk < strNumaricValue.Length; kk++) { // convert and add number for (int k = 0; k < NUMARIC.Length; k++) { //fixed me if (strNumaricValue[kk].Length >= 0 && strNumaricValue[kk][0] == NUMARIC[k]) { Value = Convert.ToDouble(strNumaricValue[kk]); Console.WriteLine( "v ={0}",Value); numaric.addNumber(Value); isIt = true; } } } return isIt; }//end of IsNumber /// <summary> /// /// </summary> /// <param name="num"></param> void numberKeeper(Char num,int strPostion =0) { int setlenght = strPostion; if (strPostion <= 0 || strPostion == 1) { setlenght = _line.Length * _line.Length; } else if (strPostion > 1) { setlenght = ((int)Math.Ceiling(Math.Pow(strPostion, strPostion))) + _line.Length; } strNumaricValue = new String[_line.Length + strPostion]; strNumaricValue[strPostion] += num.ToString(); } }}
  4. أرجوا المساعدة يا شباب

    بعد التطوير #3     أحصل علي خطء Object reference not set to an instance of an object using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections;namespace ConsoleApplication32{ class Reader { private static Operator operators = new Operator(); private static Numaric numaric = new Numaric(); Char[] NUMARIC = {'0','1','2','3','4','5','6','7','8','9','.'}; Char[] OP = {'+','-','*','/'}; Char EQUAL = '='; Char SPACE = ' '; static String _line = " "; String[] strNumaricValue = new String[100]; public Reader() { } public Reader(String line) { _line = line; } public bool isNumber(String line) { bool isIt = false; bool run = true; double Value; int ii = 0; // spilled the line for(int i = 0 ; i <line.Length; i++) { // chech each char in line for (int j = 0; j < NUMARIC.Length; j++) { // check if it's a number if (line[i] == NUMARIC[j]) { Console.WriteLine("test number ii = {0}",ii); numberKeeper(line[i],ii); } // if (line[i]!= NUMARIC[i]) { if (line[i] == OP[j % 4] && (j % 4) == j) { ii++; Console.WriteLine("test OP"); } } } } for (int q = 0; q < strNumaricValue.Length; q++) { // convert and add number for (int k = 0; k < NUMARIC.Length ; k++) { //fixed me if (strNumaricValue[q].Length >= 0 && strNumaricValue[q][0] == NUMARIC[k]) { Value = Convert.ToDouble(strNumaricValue[q]); Console.WriteLine(Value); numaric.addNumber(Value); isIt = true; } } } return isIt; }//end of IsNumber /// <summary> /// /// </summary> /// <param name="num"></param> void numberKeeper(Char num,int strPostion =0) { strNumaricValue[strPostion] += num.ToString(); } }}
  5. السلام عليكم  ودي أعمل ألة حسبة لكن من دون أستخدام أزرار تقرأ ما يكتب. عندي مشكلة في قرأة النص مثلا لو أدخلت 4594.654n+74 سيخد 4594.65474 public bool isNumber(String line) { bool isIt = false; bool run = true; String strNumaricValue =""; double Value; // spilled the line for(int i = 0 ; i <line.Length; i++) { // chech each char in line for (int j = 0; j < NUMARIC.Length; j++) { // check if it's a unmber if (line[i] == NUMARIC[j]) { Console.WriteLine("test"); strNumaricValue += line[i].ToString(); } // stop if it's not a number else { run = false; break; } } if (!run) { break; } } // convert and add number for (int k = 0; k < NUMARIC.Length ; k++ ) { if (strNumaricValue.Length >= 0 && strNumaricValue[0] == NUMARIC[k] ) { Value = Convert.ToDouble(strNumaricValue); numaric.addNumber(Value); isIt = true; } } return isIt; }//end of IsNumber
  6. لو أضفت عدد عشوائي من العناصر بدخل السيت كيف أعرف عدد العاصر المدخلة 
  7. مشكلة مع IDE Code::Blocks

    عندما أضغط على أكون الرنامج لا يضهر البرنامج على الشاشة لكن يضهر أن البرنامج شغال كما موضح في الصورة   https://www.dropbox.com/s/qkgu6hsenbc2zdr/CodeBlocks.jpg
  8. السلام عليكم و رحمة الله و بركاته   قبل شوي كنت أسخدم شاشة خارجية مع الاب تب, فقسمت الشاشة إللى نصفين بستخام الميزة الموجودة في وندوز٧ فأخدت النصف الأول مع بي دي أف و القسم الثاني جيت أحجزة ألى codeblock بعدة أختف البرنامج.  التجارب فصلت الكيبل أغلقت البرنامج أعت الشغيل حذفت البرتامج وحملتة من جديد في موقع مختلف و نفس الحالة
  9. السلام عليكم    أتمى المساعدة في كيفيت أستخدام  friend ostream& operator<<( ostream& , foo1& )و friend istream& operator>>( istream& , foo2& )على سبيل المثال   إذا كان الهدير فايل  enum X {a,b,c};enum Y {A,B,C};class foo{public:foo();~foo();foo(X,Y);Y gety();X getx();bool operator()(foo* , foo*);friend ostream& operator<<(ostream&, foo&);private:X x;Y y;};فكيف يكون السورس فايل #include "foo.h"foo::foo(){ //ctor}foo::foo(X x, Y y){ this->x = x; this->y = y;}foo::~foo(){ //dtor}X foo::getX(){ return x;}Y foo::getY(){ return y;}bool foo::operator()(foo* foox , foo* fooy){ return foox != fooy ? foox > fooy : foox < fooy;}كيف بأمكاني أ ضيف الفرند أبريتير فنكشن إلى السورس فايل friend ostream& operator<<( ostream& , foo1& )لماذ أحصل على خطاء إذا أضفت رقم بداخل enum enum X{1,2,3,4,5,6,7,8,9};هل هناك أي طريقة لأضافت الأرقام بداخل enum   لكم مني خالص الشكر و تقدير
  10. عندي سوئل أنت إلي كتبت EmployeeMangmentProgram @Override public void Switch() { int NumberOfOperation = 0; System.out.println("Manager Operations:\n" + "1- Insert new Employee\n" + "2- Delete Employee\n" + "3- Print Employees List\n" + "4- back "); System.out.print("Please enter Number Of Operation : "); while (NumberOfOperation != 4) { NumberOfOperation = in.nextInt(); switch (NumberOfOperation) { case 1: InsertEmployee(); System.out.print("Please enter Number Of Operation : "); break; case 2: DeleteEmp(); System.out.print("Please enter Number Of Operation : "); break; case 3: PrintEmployee(); System.out.print("Please enter Number Of Operation : "); break; case 4: EmployeeManagmetProgram.mijore(); break; default: Switch(); } } }الفنكشن ينادي نفسة هدا الشيئ يسمى ريكرشن يفظل انك تبتعد عن الريكيرشن إلا في الحلات الدراسية  كمتطلب دراسي و إلا فلا أو في حالت كود جاهز كهاذا  public Complex[] fft(Complex[] x , int L) { int ii = 0; int kk = 0; int N = x.Length; Complex[] Y = new Complex[N]; // NEED TO MEMSET TO ZERO? if (N == 1) { Y[0] = x[0]; } else { Complex[] E = new Complex[N / 2]; Complex[] O = new Complex[N / 2]; Complex[] even = new Complex[N / 2]; Complex[] odd = new Complex[N / 2]; for (ii = 0; ii < N; ii++) { if (ii % 2 == 0) { even[ii / 2] = x[ii]; } if (ii % 2 == 1) { odd[(ii - 1) / 2] = x[ii]; } } E = fft(even, -1); O = fft(odd, -1); for (kk = 0; kk < N; kk++) { Y[kk] = E[(kk % (N / 2))] + O[(kk % (N / 2))] * twiddles[kk * wSamp / N]; } } return Y; } هدا الكود يستخدم الريكرشن لكن على ما ذكر كتب عن طريق متخصصين في الرياضيات  لانه في الاساس معادلة رياضية بحتة ألة علاقة بالكهرباء طبعاً
  11. عندي console application  محاولة لقراءة الـ wav file  وتحويله إلى Binary  هادا الكود بتاعي لكن أتوقع أنة خطء using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Microsoft.DirectX;using Microsoft.DirectX.DirectSound;using Microsoft.DirectX.AudioVideoPlayback;using NAudio;using NAudio.Wave;using System.Media;namespace ConsoleApplication6{ class Program { static void Main(string[] args) { const String filename = @"C:\Users\user\Documents\Visual Studio 2012\Projects\ConsoleApplication6\ConsoleApplication6\wolf_x.wav"; try { SoundPlayer(filename); } catch (Exception) { Console.WriteLine("couldn't play"); } try { Console.Write(Audiotobinary(filename)); }catch(Exception){ Console.WriteLine("couldn't convert"); } Console.ReadLine(); } private static void SoundPlayer(String fileurl) { using (SoundPlayer Player = new SoundPlayer(fileurl)) { Player.PlaySync(); } } private static String Audiotobinary(String fileurl) { String tobinary; byte[] bytes = System.IO.File.ReadAllBytes(fileurl); tobinary = bytes.ToString(); return tobinary; } }}
  12. هذا الجواب بس من يحب يكتب السوئل

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication5 { class Path { private class Sname { private String _name; private Char _namechar; private int _charnumber; private int _namelenght; private Random ran = new Random(); private static string[] names = {"Dacian" , "Carson" , "Aric" , "Garan" , "Manyard" , "Kellan" , "Oscar" , "Nathan" , "Riley" , "Tave" , "Malik" , "Terrian"}; public String getname() { int which = 0; int lenght = names.Length; which = ran.Next(lenght); _name = names[which]; return names[which]; } public Char[] convertor(String name) { Char[] charname = name.ToCharArray(); return charname; } public Char namechar(Char[] charname) { int which = 0; int lenght = charname.Length; which = ran.Next(lenght); _namechar = charname[which]; _charnumber = which + 1; _namelenght = lenght; return charname[which]; } public String get_name() { return _name; } public Char get_namechar() { return _namechar; } public int get_charnumber() { return _charnumber; } public int get_namelenght() { return _namelenght; } } private String name; private Char namechar; private int charnumber; private int namelenght; public void settheprogram() { Sname namebank = new Sname(); namebank.namechar(namebank.convertor(namebank.getname())); name = namebank.get_name(); namechar = namebank.get_namechar(); charnumber = namebank.get_charnumber(); namelenght = namebank.get_namelenght(); } public String getname() { return name; } public Char getnamechar() { return namechar; } public int getcharnumber() { return charnumber; } public int getnamelenght() { return namelenght; } } }
  13. http://math.hws.edu/eck/cs124/javanotes3/source/   http://www.freejavaguide.com/sql.htm     هدا كود جرب شوة شوية أنا كتبنة بشكل معقد لأني كنت أجرب كم شغلة تقدر تجربة أو انك تزور الروابط ألي فوق /** * */package gussedname;/** * @author user * */public class GussedName { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub RunApp run = new RunApp(); run.Run(); }}package gussedname;public class Messages { public String msg(int msgId) { switch (msgId) { case 0: return "Wellcom The Random Name Game \n"; case 1: return "I will give one letter from a hidden name and the position of the letter and the lenght of the name. \n \n"; case 2: return "This is the letter : "; case 3: return "This is the position of the letter : "; case 4: return "This is the lenght of the name : "; case 5: return "Gusse The Name : "; case 6: return "I win! \n"; case 7: return "You win! \n"; case 8: return "Would you like to play agian?"; case 9: return "Help = 1 - Exit = 0"; case 10: return "For example I would give " + "This is the letter : u \n" + "This is the position of the letter : 2 \n" + "This is the lenght of the name : 7 \n" + "Gusse The Name : Mustafa \n"; case 11 : return "y or Y for Yes - n or N for No"; case 12: return "Thanks A Lot For Trying The Game"; case 13: return "The answer was : \n"; default: return "Program error, this program doesn't contine this further information"; } }}package gussedname;import java.util.Random;public class Path { private String name; private char namechar; private int charnumber; private int namelenght; public void settheprogram() { Namesupplyer namebank = new Namesupplyer(); namebank.namechar(namebank.convertor(namebank.getname())); name = namebank.get_name(); namechar = namebank.get_namechar(); charnumber = namebank.get_charnumber(); namelenght = namebank.get_namelenght(); } public String getname() { return name; } public char getnamechar() { return namechar; } public int getcharnumber() { return charnumber; } public int getnamelenght() { return namelenght; } private class Namesupplyer{ private String _name; private char _namechar; private int _charnumber; private int _namelenght; private Random ran = new Random(); private final String[] names = {"Dacian" , "Carson" , "Aric" , "Garan" , "Manyard" , "Kellan" , "Oscar" , "Nathan" , "Riley" , "Tave" , "Malik" , "Terrian"}; public String getname() { int which = 0; int lenght = names.length; which = ran.nextInt(lenght); _name = names[which]; return names[which]; } public char[] convertor(String name) { char[] charname = name.toCharArray(); return charname; } public char namechar(char[] charname) { int which = 0; int lenght = charname.length; which = ran.nextInt(lenght); _namechar = charname[which]; _charnumber = which + 1; _namelenght = lenght; return charname[which]; } public String get_name() { return _name; } public char get_namechar() { return _namechar; } public int get_charnumber() { return _charnumber; } public int get_namelenght() { return _namelenght; }}}package gussedname;import java.io.PrintWriter;import java.util.Scanner;public class RunApp { private static Path path = new Path(); private static Messages messages = new Messages(); private static PrintWriter pw = new PrintWriter(System.out); private static Scanner input =new Scanner(System.in); public static void Run () { boolean runtheprogram = true; pw.println(messages.msg(0)); pw.println(messages.msg(1)); pw.println(messages.msg(9)); while (runtheprogram) { path.settheprogram(); pw.println(messages.msg(2) + path.getnamechar()); pw.println(messages.msg(3) + path.getcharnumber()); pw.println(messages.msg(4) + path.getnamelenght()); pw.print(messages.msg(5)); String userinput = input.nextLine(); runtheprogram = game(userinput); } pw.println(messages.msg(12)); } private static boolean game(String userinput) { if (userinput == "1") { help(); } else if (userinput == "0") { exit(); } else { if (userinput == path.getname()) { pw.println(messages.msg(7)); } else { pw.println(messages.msg(6)); } } answer(); pw.println(messages.msg(11)); pw.println(messages.msg(8)); userinput = input.nextLine(); pw.println("\n"); if (userinput == "y" || userinput == "Y") { return true; } else if (userinput == "n" || userinput == "N") return false; else if (userinput == "0") exit(); else if (userinput == "1") help(); return true; } private static void answer() { pw.println(messages.msg(13) + path.getname()); } private static void help() { pw.println(messages.msg(10)); } private static void exit() { System.exit(0); }}طبعن كنت أجرب كتابة private class و عتماد و نقل الدوال  public void settheprogram() { Namesupplyer namebank = new Namesupplyer(); namebank.namechar(namebank.convertor(namebank.getname())); name = namebank.get_name(); namechar = namebank.get_namechar(); charnumber = namebank.get_charnumber(); namelenght = namebank.get_namelenght(); }
  14. السلام عليكم الماداة إلي تدرسة أيش مستواة أقصد مدة سنة أولى أو ...... البرنامج حتاجة إلى homework or assignment 
  15. البرنامج عبارة عن لعبة تختار أسم وتعطيك حرف واحد و موقع الحرف في الأسم وأمت تكتب الأسم أذا كان الأسم الي كتبته صحيح تفوز هذا الجواب using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication5{ class Program { private static Path path = new Path(); private static Messages messages = new Messages(); static void Main(string[] args) { run(); Console.WriteLine(messages.msg(12)); Console.ReadKey(); } private static void run() { bool runtheprogram = true; Console.WriteLine(messages.msg(0)); Console.WriteLine(messages.msg(1)); help(); Console.WriteLine(messages.msg(9)); while (runtheprogram) { path.settheprogram(); Console.WriteLine(messages.msg(2),path.getnamechar()); Console.WriteLine(messages.msg(3),path.getcharnumber()); Console.WriteLine(messages.msg(4),path.getnamelenght()); Console.Write(messages.msg(5)); String userinput = Convert.ToString(Console.ReadLine()); runtheprogram = game(userinput); answer(); } } private static bool game(String userinput) { if (userinput == "1") { help(); } if (userinput == "0") { exit(); } else { if (userinput == path.getname()) { Console.WriteLine(messages.msg(7)); } else { Console.WriteLine(messages.msg(6)); } } Console.WriteLine(messages.msg(11)); Console.Write(messages.msg(8)); userinput = Convert.ToString(Console.ReadLine()); Console.WriteLine("\n"); if (userinput == "y" || userinput == "Y") return true; if (userinput == "n" || userinput == "N") return false; return true; } private static void answer() { Console.WriteLine(messages.msg(13),path.getname()); } private static void help() { Console.WriteLine(messages.msg(10)); } private static void exit() { Environment.Exit(0); } }}messages class using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication5{ class Messages { public String msg(int msgId) { switch (msgId) { case 0: return "Wellcom The Random Name Game"; case 1: return "I will give one letter from a hidden name and the position of the letter and the lenght of the name."; case 2: return "This is the letter : {0}"; case 3: return "This is the position of the letter : {0}"; case 4: return "This is the lenght of the name : {0}"; case 5: return "Gusse The Name : "; case 6: return "I win! \n"; case 7: return "You win! \n"; case 8: return "Would you like to play agian?"; case 9: return "Help = 1 - Exit = 0"; case 10: return "For example I would give " + "This is the letter : u \n" + "This is the position of the letter : 2 \n" + "This is the lenght of the name : 7 \n" + "Gusse The Name : Mustafa \n"; case 11 : return "y or Y for Yes - n or N for No"; case 12: return "Thanks A Lot For Trying The Game"; case 13: return "The answer was : {0} \n"; default: return "Program error, this program doesn't contine this further information"; } } }}باقي الجواب أنا كتبت الرنامج في 2:30 س     الأسماء التي تحوية اللعبة DacianCarsonAricGaranManyardKellanOscarNathanRileyTaveMalikTerrianاللعبة في المرفق     ConsoleApplication5.zip