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

نادين01
اعضاء-
عدد المشاركات
62 -
تاريخ الانضمام
-
تاريخ اخر زياره
السمعه بالموقع
1 عاديعن نادين01
-
الرتبة
عضو
معلومات الملف الشخصي
- الجنس أنثى
-
th3g3ek أعطى سمعة إيجابية لــ إجابة على سؤال: ضرب مصفوفتين
-
th3g3ek أعطى سمعة إيجابية لــ إجابة على سؤال: ضرب مصفوفتين
-
السلام عليكم لدي مشكلة في عملية ضرب مصفوفتين باستخدام Thread لكن المشكل فالكود ان thread واحد يحسب جميع الاسطر مثال اذا كانت المصفوفة 3*3 وعدد threads 3 فكل thread يحسب سطر package thread; import java.lang.*;import java.io.*;import java.util.*; class MatriceOpx extends Thread { static int matrice1[][]; static int vecter[][]; static int matrice2[][]; static int resultat[][]; static int n; static int m; static int th; MatriceOpx(int i) { th=i; this.start(); } public void run(){ int i,j,rang;for(rang=0;rang<n;rang++){ if(vecter[rang][0]==0){for(i=0;i<n;i++) { resultat[rang][i]=0; for(j=0;j<n;j++) resultat[rang][i]=resultat[rang][i]+matrice1[rang][j]*matrice2[j][i]; } vecter[rang][0]=1; vecter[rang][1]=th; } }}public static void main(String args[]) { int i,j,k; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("<-- Multiplication de 2 matrices carres des entiers naturels --> "); Scanner e1= new Scanner(System.in); n = e1.nextInt();System.out.println("Veuillez introduiez le nombre de lignes et de colonnes des matrices : ");System.out.println("Veuillez introduiez le nombre de thread:");try{ m = e1.nextInt();}catch(Exception e){} if (m > n) {System.out.print("Non, m <= n");System.out.print("Veuillez introduiez le nombre de thread:"); try { m = e1.nextInt(); }catch(Exception e){} } matrice1=new int[n][n]; matrice2=new int[n][n]; resultat=new int[n][n]; vecter=new int[n][2]; for(i=0;i<n;i++){ vecter[i][0]=0; } System.out.println("Veuillez remplir les cases de la matrice une : "); for(i=0;i<n;i++) { for(j=0;j<n;j++) { try { matrice1[i][j]=150; }catch(Exception e){} } } System.out.println("Veuillez remplir les cases de la matrice deux : "); for(i=0;i<n;i++) { for(j=0;j<n;j++) { try { matrice2[i][j]=50; }catch(Exception e){} } } MatriceOpx mat[]=new MatriceOpx[m];for(i=0;i<m;i++){ mat[i]=new MatriceOpx(i); } try { for(i=0;i<m;i++) mat[i].join(); }catch(Exception e){} System.out.println("Ci dessous le resultat :"); for(i=0;i<n;i++){ k=i+1; System.out.println("le ligne numéro:" + k + " dans la matrice resultat fait le calcule à l'aide de thread N° : " +vecter[i][1] + ""); for(j=0;j<n;j++) System.out.println(resultat[i][j]); } } }
-
السلام عليكم لدي مشكلة في عملية ضرب مصفوفتين باستخدام Thread لكن المشكل فالكود ان thread واحد يحسب جميع الاسطر مثال اذا كانت المصفوفة 3*3 وعدد threads 3 فكل thread يحسب سطر package thread; import java.lang.*;import java.io.*;import java.util.*; class MatriceOpx extends Thread { static int matrice1[][]; static int vecter[][];//poure jeri les thread static int matrice2[][]; static int resultat[][]; static int n; static int m; //static int id=2; static int th; MatriceOpx(int i) { th=i; this.start(); } public void run(){ int i,j,rang;for(rang=0;rang<n;rang++){ if(vecter[rang][0]==0){for(i=0;i<n;i++) { resultat[rang][i]=0; for(j=0;j<n;j++) resultat[rang][i]=resultat[rang][i]+matrice1[rang][j]*matrice2[j][i]; } vecter[rang][0]=1; vecter[rang][1]=th; } }}public static void main(String args[]) { int i,j,k; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("<-- Multiplication de 2 matrices carres des entiers naturels --> "); Scanner e1= new Scanner(System.in); n = e1.nextInt();System.out.println("Veuillez introduiez le nombre de lignes et de colonnes des matrices : ");System.out.println("Veuillez introduiez le nombre de thread:");try{ m = e1.nextInt();}catch(Exception e){} if (m > n) {System.out.print("Non, m <= n");System.out.print("Veuillez introduiez le nombre de thread:"); try { m = e1.nextInt(); }catch(Exception e){} } matrice1=new int[n][n]; matrice2=new int[n][n]; resultat=new int[n][n]; vecter=new int[n][2]; //inisialisation for(i=0;i<n;i++){ vecter[i][0]=0; } System.out.println("Veuillez remplir les cases de la matrice une : "); for(i=0;i<n;i++) { for(j=0;j<n;j++) { try { matrice1[i][j]=150; }catch(Exception e){} } } System.out.println("Veuillez remplir les cases de la matrice deux : "); for(i=0;i<n;i++) { for(j=0;j<n;j++) { try { matrice2[i][j]=50; }catch(Exception e){} } } MatriceOpx mat[]=new MatriceOpx[m];for(i=0;i<m;i++){ mat[i]=new MatriceOpx(i); } try { for(i=0;i<m;i++) mat[i].join(); }catch(Exception e){} System.out.println("Ci dessous le resultat :"); for(i=0;i<n;i++){ k=i+1; System.out.println("le ligne numéro:" + k + " dans la matrice resultat fait le calcule à l'aide de thread N° : " +vecter[i][1] + ""); for(j=0;j<n;j++) System.out.println(resultat[i][j]); } } }
- 3 ردود
-
1
-
شكرا استاذ لكن ليس هذا قصدي مثال: يدخل المستخدم كلمة Bonjour ف lex عندها لا يتعرف عليها لانها ليست عدد ناطق ففي هذه الحالة سيتم طباعة نفس الكلمة أنا أريده عوضا انه يكررها يطبع كلمة اخرى ك: "!rationnel" اظن انها ليست من خصائص lex ؟؟؟ والله اعلم
-
والله اخي الكريم لم افهم فحبذا لو تعطيني مثال بارك الله فيك استاذ
-
أخي الفاضل لدي سؤال آخر %option noyywrapchiffre [0-9]chiffre1 [1-9]nb {chiffre}{chiffre}*nb1 {chiffre1}+rationel ([+-]?{nb}"/"[+-]?{nb1})%%{rationel} { printf ("\n%s ---->est un nombre rationel \n", yytext);}%%main () {yylex();}اذا كان عدد ناطق يتم طباعة ---->est un nombre rationel لكن اذا كان العكس اي انه ليس عدد ناطق، كيف تتم طباعة ---->c'est pas un nombre rationel
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: مساعدة في برنامج lex
-
بارك الله فيك اخي الكريم شكرا لك على المساعدة
-
السلام عليكم لدي مشكلة في برنامج LEX %option noyywrap lettre [A-Za-z]chiffre [0-9]mot_clé "prog"|"var"|"int"|"func"|"proc"|"begin"|"if"|"then"|"else"|"while"|"do"|"opaffect"|"oprel"|"opadd"|"opmul"|"nb"|"not"identificateur {lettre}(_|{lettre}|{chiffre})*nb {chiffre}{chiffre}*oprel "=="|"<>"|"<"|">"|"<="|">="opadd "+"|"-"|"or"opmul "*"|"/"|"div"|"mod"opaffect "=" %% {identificateur} { printf ("id");}{nb} { printf ("nb");}{mot_clé } { printf ("mot_clé");}{oprel} { printf ("oprel");}{opadd} { printf ("opadd");}{opmul} { printf ("opmul");}{opaffect} { printf ("opaffect");} %% main() {yylex();}حيث يظهر لي هذا الخطأ
-
السلام عليكم اريد علاقة بين exit and wait بحيث يقوم processus pere بعرض 20 رقم ثم processus fils بعرض 20 رقم التالية ويعدها يكمل pere الاعداد المتبقية في الملف #include <stdio.h>#include <sys/types.h>#include <unistd.h>#include <stdlib.h>#include <errno.h>#include <sys/wait.h>int main(void){ int i,j ; printf("Je suis le processus %d\n",getpid()) ; printf("Je vais afficher 20 premiers nombres Pere \n"); FILE *po = fopen("nombre","r") ; if (po==NULL){ perror("Impossible ") ; return -1 ; } for(j=0;j<20;j++){ fscanf(po,"%d",&i) ; printf("%d\n",i) ; } printf("La Creation du fils \n") ; switch(fork()){ case -1:perror("impossible de creer un fils") ; exit(-1) ; case 0: printf("Je suis le processus fils %d\n",getpid()) ; printf("Je vais afficher 20 nombres premiers fils \n"); for(j=0;j<20;j++){ printf("Je suis le processus%d ",getpid()); fscanf(po,"%d",&i) ; printf("%d\n",i); } fclose(po) ; printf("Le fils mort \n") ; exit(0); default: printf("Le pere termine la lecture\n") ; while(!feof(po)){ printf("Je suis le processus%d ",getpid()); fscanf(po,"%d",&i) ; printf("%d\n",i) ; } fclose(po) ; } return 0;}
-
Muhammed Magdy أعطى سمعة إيجابية لــ إجابة على سؤال: احتاج function
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: Clear Screen in java?
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: Clear Screen in java?
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: كيفية عمل مثل ذلك
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: احتاج function
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: احتاج function
-
نادين01 أعطى سمعة إيجابية لــ إجابة على سؤال: احتاج function
-
For عن طريق charAt() وهو ماكنت ابحث عنه بارك الله فيك اخي الكريم
- 7 ردود
-
1
-
شكرا لكم لكن وجدت الحل ، انا كنت ابحث عن charAt()
-
السلام عليكم اخواني اريدfuntion التي من خلالها استطيع الحصول على أحرف جملة مثال: informatique i n f o r m a t i q u e والتي توجد بلغة بايثون for lettre in phrase:
-
السلام عليكم انا استعمل قواعد بيانات اوراكل، لكن اين يتم حفظ الجداول؟؟؟؟؟
-
السلام عليكم اريد تصحيح هذا الكود لحساب القاسم المشترك الاكبر procedure TForm1.Button1Click(Sender: TObject);begin val1:=StrToInt(Edit1.Text); val2:=StrToInt(Edit2.Text); asm mov eax,val1; mov ebx,val2; jmp @clacul; @clacul: div ebx; cmp edx,0 ; jne @suitch ; jmp @fini ; @suitch: mov eax,ebx; mov ebx,edx; jmp @clacul ; @fini: end; edit3.text:=IntToStr(val1);end;end.