דילוג לתוכן
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום
כיווץ
תחומים

תחומים - פורום חרדי מקצועי

💡 רוצה לזכור קריאת שמע בזמן? לחץ כאן!
חגיח

חגי

@חגי
הפסקת מעקב מעקב
אודות
פוסטים
658
נושאים
13
שיתופים
0
קבוצות
0
עוקבים
4
עוקב אחרי
0

פוסטים

פוסטים אחרונים הגבוה ביותר שנוי במחלוקת

  • אני לא מצליח להגיע ל console בצורה נורמלית
    חגיח חגי
    תכנות

    @WWW
    קשיא פאר מעשה 🙂
    אני בכרום, והמסך נתקע אם אני לא לוחץ על הכפתור ההוא.
    באדג' זה גם עובד לי 🤔
    7dd1f56f-f610-4b67-9188-2b229ffef43f-image.png


  • אני לא מצליח להגיע ל console בצורה נורמלית
    חגיח חגי
    תכנות

    @WWW כתב באני לא מצליח להגיע ל console בצורה נורמלית:

    @חגי עבד לך בGMAIL???

    ועדיין עובד.


  • אני לא מצליח להגיע ל console בצורה נורמלית
    חגיח חגי
    תכנות

    זה אתר שמכיל קוד anti debugging, הפיתרון בשביל שלא תעצר הריצה היא ללחוץ פה:
    e2e348b2-e5a2-40ce-8a4b-70f4bbc76a7a-image.png


  • איך חושפים אלמנטים מוסתרים באופן גורף?
    חגיח חגי
    תכנות

    @אהרן
    אם אתה רוצה לגבור על חוק CSS שמוגדר עם !important, אתה צריך ליצור גם חוק inline ולהשתמש ב!important

    el.style.visibility = "visible !important";
    

    תעשה כך גם לopacity ולכל הdisplay:noneים למיניהם (צריך לחפש אותם אולי עם computedStyle קודם, ולגלות איזה display כן צריך להתאים להם, שזה קצת מסובך)


  • JS קבלת נתונים על תכונות של טקסט מסומן
    חגיח חגי
    תכנות

    כדי למנוע מצב של בעיית XY, אולי תכתוב מה בדיוק הצורך שלך, ולא מה אתה מנסה לעשות?
    אולי יש פתרונות אחרים שיוכלו להציע לך.


  • JS- שינוי button ל input
    חגיח חגי
    תכנות

    @הפצת-אנקי כתב בJS- שינוי button ל input:

    innerHTML

    אולי תחליף את innerHTML ל-outerHTML, זה עוזר?


  • JS קבלת נתונים על תכונות של טקסט מסומן
    חגיח חגי
    תכנות

    @הפצת-אנקי
    אני יכול להציע פיתרון חלופי?

    getComputedStyle(document.getSelection().baseNode.parentElement)['font-size']
    

    אם זה לא פיתרון למקרה שלך, אשמח לנסות לעזור.
    פשוט נראה לי שהפיתרון שלך זה לא הכיוון הנכון.


  • האם יש תוכנה לתרגום על המסך?
    חגיח חגי
    תוכנה

    @י-פל
    איך יכולה להיות תוכנה שהיא לא בחלון נפרד?
    ב-QTranslate זה מייצר לך את החלון ליד הטקסט שסימנת
    dbc9c10d-b0ed-4622-ac18-818a1794c793-image.png
    5f14bdc8-aa49-48a3-aeda-ee29290600ac-image.png


  • האם יש תוכנה לתרגום על המסך?
    חגיח חגי
    תוכנה

    לא הבנתי את הנקודה של הצילום מסך, אבל אני משתמש בתוכנת QTranslate והיא מאוד נוחה.


  • עזרה בהבנת קוד פייתון (NCLS)
    חגיח חגי
    תכנות

    זה עוזר לך? ביקשתי מCHATGPT להסביר את הקוד ולתרגם אותו לJS

    what does this code do?

    ncls = NCLS(starts, ends, ids.astype("int64"))
    starts = np.arange(n)
    ends = np.arange(1, n+1)
    ids = starts
    ids, overlaps = ncls.all_overlaps_both(starts, ends, ids.astype("int64"))
    

    This code appears to be using an object of the NCLS class, which stands for "non-contiguous label-set" and is used to efficiently query overlapping intervals in a sequence.

    The NCLS object is constructed using three arrays: starts, ends, and ids. These arrays represent the start and end positions of intervals in the sequence, and a unique identifier for each interval.

    The all_overlaps_both method of the NCLS object is then called with the same starts, ends, and ids arrays as arguments. This method returns two arrays: ids and overlaps. The ids array is a subset of the input ids array, containing only the identifiers of the intervals that overlap with at least one other interval. The overlaps array is a boolean array of the same length as the input ids array, where True indicates that the corresponding interval overlaps with at least one other interval and False indicates that it does not.

    It's worth noting that the input ids array is cast to the int64 data type before being passed to the NCLS object constructor and the all_overlaps_both method. This is likely because the NCLS class and its methods expect integer values as input.

    can you convert that to javascript
    Sure! Here is a possible implementation of the NCLS class and the all_overlaps_both method in JavaScript:

    class NCLS {
      constructor(starts, ends, ids) {
        // Check that the input arrays have the same length
        if (starts.length !== ends.length || starts.length !== ids.length) {
          throw new Error("Input arrays must have the same length");
        }
        this.starts = starts;
        this.ends = ends;
        this.ids = ids;
      }
    
      allOverlapsBoth(starts, ends, ids) {
        // Check that the input arrays have the same length
        if (starts.length !== ends.length || starts.length !== ids.length) {
          throw new Error("Input arrays must have the same length");
        }
        const overlaps = new Array(starts.length).fill(false);
        const overlappingIds = [];
        for (let i = 0; i < starts.length; i++) {
          for (let j = 0; j < starts.length; j++) {
            if (i === j) continue; // Don't compare an interval with itself
            if (starts[i] < ends[j] && starts[j] < ends[i]) {
              // The intervals i and j overlap
              overlaps[i] = true;
              overlaps[j] = true;
              if (!overlappingIds.includes(ids[i])) overlappingIds.push(ids[i]);
              if (!overlappingIds.includes(ids[j])) overlappingIds.push(ids[j]);
            }
          }
        }
        return { ids: overlappingIds, overlaps };
      }
    }
    
    // Example usage:
    const ncls = new NCLS([0, 5, 10], [5, 10, 15], [1, 2, 3]);
    const { ids, overlaps } = ncls.allOverlapsBoth([0, 5, 10], [5, 10, 15], [1, 2, 3]);
    console.log(ids); // [1, 2, 3]
    console.log(overlaps); // [true, true, true]
    

    This implementation creates an NCLS object with three properties: starts, ends, and ids. The allOverlapsBoth method compares each pair of intervals and sets the corresponding element in the overlaps array to true if the intervals overlap. It also adds the identifiers of the overlapping intervals to the overlappingIds array. Finally, the method returns an object with two properties: ids, containing the overlapping identifiers, and overlaps, containing a boolean array indicating which intervals overlap.


  • עזרה בהבנת קוד פייתון (NCLS)
    חגיח חגי
    תכנות

    @davidnead
    אפשר את הקוד המלא?


  • בירור על פיתוח תוכנה עבור מוסד ת"ת
    חגיח חגי
    תכנות

    @A0533057932
    כמדומני ששילבתי כמה API של גוגל ביחד, וזה יצר לי את המסלול הכי מומלץ.


  • בירור על פיתוח תוכנה עבור מוסד ת"ת
    חגיח חגי
    תכנות

    לגוגל יש API בדיוק בשביל הדברים האלה. אז זה כבר מפשט את הפיתוח משמעותית.


  • מחשב נייד
    חגיח חגי
    חומרה

    כמדומני שלנתונים האלו, כל מחשב אמור להיות טוב.
    לגבי מה שאמרו מעליי, לא נראה לי שאתם צריכים את החווית צפיה הכי טובה, או יכולות עיבוד גבוהות. אז בעיקרון כל מחשב אמור להיות מספיק טוב.

    אורך החיים של המחשב לא תלוי בחוזק המעבד שלו, או גודל הRAM שלו, במקרה של ספק אפשר לכתוב פה את הדגם שאתם שוקלים לקנות ולשאול אם זה מחשב טוב.

    אני באופן אישי משתמש לדברים כאלה בchromebook שקניתי "מחודש" מאוד בזול וזה עובד מצוין. זה בדיוק הדברים עבורם ייעדו את הchromebookים.


  • שיתוף | תוכנת סודוקו
    חגיח חגי
    תוכנה

    @קומפיונט
    4a8d5144-d9c7-4bec-af16-bf10f74d0f93-image.png
    🤔

    אני לא מצליח לשכנע את ווינדוס דפנדר שזה תמים, גם אחרי שסימנתי לו allow on device
    עריכה: בסוף הצלחתי


  • WPF + Entity framework -information
    חגיח חגי
    תכנות

    חשבתי שבלייזור נועד לעבוד בסביבת ווב, אבל מסתבר שגם מיקרוסופט בעד להשתמש בו עם web view באפליקציה שולחנית

    https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/tutorials/windows-forms?view=aspnetcore-7.0

    יש למיקרוסופט עוד משהו לאפליקציות שולחניות (חדש יחסית) שנקרא MAUI, אבל הוא רק שולחני, הוא לא ירוץ בסביבת ווב. אבל הוא נועד לתת אפליקציה נאטיבית עם נראות מודרנית.


  • פריצת נוקיה
    חגיח חגי
    תוכנה

    יש בנוקיה 215 שירים והודעות בלי לשנות כלום במכשיר

    ע"ע (יש שם מקום לראות פיצ'רים של הפלאפון)
    https://www.gsmarena.com/nokia_215_4g-reviews-10533.php

    יותר ספציפית:
    7cf25c24-5577-492e-a447-4d769cf16874-image.png


  • python
    חגיח חגי
    תכנות

    @שרה-רחל
    א.
    תיקון:

    if __name__=='__main__':
        print("hello world")
    

    ב.
    דוגמה פשוטה לדבר:
    נניח שmain.py נמצא בתוך חבילה ששמה example
    9dfb776b-9458-447c-ab0b-bafb5ac6f8fe-image.png
    main.py:

    def example(*args):
        print(*args)
    
    example('hello world'')
    

    עכשיו כשאני רוצה לייבא את הפונקציה example בקוד אחר אני עושה ככה:
    917aa3f1-85ab-45e6-8cd2-3bab59cdfdd7-image.png

    אוי.. אני רק רציתי את הפונקציה, זה מאוד לא נוח שעכשיו זה גם מריץ לי את הפונקציה example('hello world') אבל אני כן הייתי רוצה לייצא את החבילה שלי בצורה כזאת שיהיה אפשר להריץ אותה בצורה עצמאית, גם לא בשביל לייצא את הפונקציות.

    סתם מעניין אותי לדעת, מה זה __name__?

    אני אשנה את main.py

    def example(*args):
        print(*args)
    
    example(__name__)
    

    עכשיו כשאני אייבא את הפונקציה, זה ידפיס לי את __name__
    5be115c3-0392-4d95-96c1-d0eb451a83f9-image.png
    אהה.. זה השם של החבילה והמודול שלי, אבל מה יקרה אם אני אריץ את הקובץ ישירות עם פייתון?
    74e8bf0d-82c8-4a9b-a81d-54e38cf3d06a-image.png

    אם כך זה פשוט 🙂 אני רק אבדוק שאני לא מריץ את החבילה ישירות, אני כבר יודע איך עושים את זה:

    def example(*args):
        print(*args)
    
    if __name__ == '__main__':
        example(__name__)
    

    ועכשיו אבדוק:
    611123ed-b802-47c6-9f38-2e53ebd17ae6-image.png

    אהה יופי, בדיוק מה שרציתי.


  • שינוי DB לפי DB FIRST והגדרת 2 שדות למפתח ראשע אחד
    חגיח חגי
    תכנות

    @ממ
    לשאלה הראשונה, לא אמור להיות הבדל בשמירה בין db first ל-code first

    context.SaveChanges();
    

    לשאלה השניה, אפשר לעשות מפתח ראשי אחד, ולהוסיף עוד שדה אינדקס
    https://www.w3schools.com/sql/sql_create_index.asp#:~:text=CREATE UNIQUE INDEX Syntax

  • 1
  • 2
  • 17
  • 18
  • 19
  • 20
  • 21
  • 32
  • 33
  • 19 / 33
  • התחברות

  • אין לך חשבון עדיין? הרשמה

  • התחברו או הירשמו כדי לחפש.
  • פוסט ראשון
    פוסט אחרון
0
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום