Galaxy Pledges - level up your mind
Vuoi reagire a questo messaggio? Crea un account in pochi click o accedi per continuare.
Andare in basso
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Mer Dic 02, 2020 4:28 pm
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Mer Dic 02, 2020 4:31 pm


Ultima modifica di Admin il Mer Dic 02, 2020 6:40 pm - modificato 1 volta.

_________________
Modifiche Forum - Parte Grafica - Pagina 2 NTHV9Qp
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Mer Dic 02, 2020 4:46 pm
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Mer Dic 02, 2020 4:47 pm
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Sab Dic 05, 2020 7:09 am
Codice:
/*[size=12][/size]
* -- Code Highlight Select --[size=12][/size]
* Version: 1.0 EN (2018-03-15)[size=12][/size]
* Author: Wecoc[size=12][/size]
* Description: New BBCode to insert codes by lang[size=12][/size]
* Info: https://github.com/google/code-prettify[size=12][/size]
*/[size=12][/size]
 [size=12][/size]
$(function() {[size=12][/size]
 [size=12][/size]
  /*--------------------- CONFIGURATION ---------------------*/[size=12][/size]
 [size=12][/size]
  // Define your version.[size=12][/size]
  // 0: phpBB2, 1: phpBB3, 2: punBB, 3: Invision, 4: modernBB[size=12][/size]
  var version = 1,[size=12][/size]
 [size=12][/size]
  // Set the skin for your printed code, these are the available skins:[size=12][/size]
  //       default, desert, sunburst, sons-of-obsidian, doxy[size=12][/size]
  // Or you can make your custom skin using CSS.[size=12][/size]
  // For more info: https://rawgit.com/google/code-prettify/master/styles/index.html[size=12][/size]
 [size=12][/size]
  skin = "default",[size=12][/size]
 [size=12][/size]
  // Display line numbers[size=12][/size]
  linenums = true,[size=12][/size]
 [size=12][/size]
  // Display all line numbers, or only 5, 10, 15...[size=12][/size]
  linenums_all = true,[size=12][/size]
 [size=12][/size]
  // Set here the texts to be displayed[size=12][/size]
  lang = {[size=12][/size]
    code:    "Code",[size=12][/size]
    line:    "Start line (optional)",[size=12][/size]
    insert:    "insert",[size=12][/size]
    tooltip:    "Pretty Code"[size=12][/size]
  },[size=12][/size]
 [size=12][/size]
  /* Here you define the languages you want to be selected in your forum,[size=12][/size]
  I setted all by default, just delete the ones you don't need.[size=12][/size]
  The first column is the hljs value (please don't change), the second is the[size=12][/size]
  name it will be displayed in the forum (you can change it if you want) */[size=12][/size]
  languages = {[size=12][/size]
    "apollo":   "Apollo",[size=12][/size]
    "bsh":    "Bash",[size=12][/size]
    "basic":   "Basic",[size=12][/size]
    "c":    "C",[size=12][/size]
    "cc":    "CC",[size=12][/size]
    "clj":   "Clojure",[size=12][/size]
    "cpp":    "CPP",[size=12][/size]
    "cs":    "CS",[size=12][/size]
    "csh":   "CSH",[size=12][/size]
    "css":    "CSS",[size=12][/size]
    "cv":   "CV",[size=12][/size]
    "cyc":   "CYC",[size=12][/size]
    "dart":   "Dart",[size=12][/size]
    "erlang":   "Erlang",[size=12][/size]
    "go":   "Go",[size=12][/size]
    "hs":   "Haskell",[size=12][/size]
    "htm":   "HTM",[size=12][/size]
    "html":   "HTML",[size=12][/size]
    "java":   "Java",[size=12][/size]
    "js":   "JavaScript",[size=12][/size]
    "tex":   "LaTeX",[size=12][/size]
    "lasso":   "Lasso",[size=12][/size]
    "llvm":   "LLVM",[size=12][/size]
    "logtalk":   "Logtalk",[size=12][/size]
    "lua":   "Lua",[size=12][/size]
    "m":   "Makefile",[size=12][/size]
    "matlab":   "MATLAB",[size=12][/size]
    "mumps":   "Mumps",[size=12][/size]
    "mxml":   "MXML",[size=12][/size]
    "n":   "Nemerle",[size=12][/size]
    "pascal":   "Pascal",[size=12][/size]
    "perl":   "Perl",[size=12][/size]
    "pl":   "PL",[size=12][/size]
    "pm":   "PM",[size=12][/size]
    "py":   "Python",[size=12][/size]
    "r":   "R",[size=12][/size]
    "rd":   "RD",[size=12][/size]
    "rb":   "Ruby",[size=12][/size]
    "rust":   "Rust",[size=12][/size]
    "scala":   "Scala",[size=12][/size]
    "lisp":   "Scheme",[size=12][/size]
    "sh":   "SH",[size=12][/size]
    "ml":   "SML",[size=12][/size]
    "sql":   "SQL",[size=12][/size]
    "swift":   "Swift",[size=12][/size]
    "tcl":   "TCL",[size=12][/size]
    "vb":   "Visual Basic",[size=12][/size]
    "vhdl":   "VHDL",[size=12][/size]
    "wiki":   "Wiki",[size=12][/size]
    "xhtml":   "XHTML",[size=12][/size]
    "xml":   "XML",[size=12][/size]
    "xq":   "XQ",[size=12][/size]
    "xsl":   "XSL",[size=12][/size]
    "yaml":   "YAML"[size=12][/size]
  };[size=12][/size]
 [size=12][/size]
  /*------------------ END OF CONFIGURATION ------------------*/[size=12][/size]
 [size=12][/size]
  // Load the Prettify script[size=12][/size]
  if (skin == "default" || skin == "") {[size=12][/size]
    $.getScript("https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js");[size=12][/size]
  } else {[size=12][/size]
    $.getScript("https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=" + skin);[size=12][/size]
  }[size=12][/size]
 [size=12][/size]
  // Draw code lines[size=12][/size]
  if (linenums && linenums_all) {[size=12][/size]
    $('head').append('<style type="text/css">li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8,li.L9{list-style-type: decimal !important;}');[size=12][/size]
  }[size=12][/size]
 [size=12][/size]
  $.each(languages, function(tag, value) {[size=12][/size]
    var code_tag = 'code';[size=12][/size]
    if (version == 0) { code_tag = '.cont_code' };[size=12][/size]
    $('table.code-' + tag + ' ' + code_tag).each(function(i, block) {[size=12][/size]
      // Set starting line[size=12][/size]
      var l = '1';[size=12][/size]
      var td = $(block).parents('td').attr('id');[size=12][/size]
      if (td) { l = td.match(/line--(\d*)/)[1]; }[size=12][/size]
      // Print the code[size=12][/size]
      $(block).wrapInner('<pre class="prettyprint ' + (linenums ? 'linenums:' + l + ' ' : '') + 'lang-' + tag + '" />');[size=12][/size]
      // Set table width to 100% of the post (bugfix)[size=12][/size]
      $('head').append('<style type="text/css">table.code-' + tag + '{width: 100%;}');[size=12][/size]
      if (version == 0) { $('head').append('<style type="text/css">dl.codebox{width: 100%;}'); }[size=12][/size]
      // Set the code padding to 0 (bugfix)[size=12][/size]
      $('head').append('<style type="text/css">pre.prettyprint{ margin: 0; }');[size=12][/size]
      // Change "Code:" by the name of the current code language[size=12][/size]
      var dt = $(block).parents('dl.codebox')[0].firstChild;[size=12][/size]
      if (version == 0) {[size=12][/size]
        dt.innerHTML = '<dt><span class="genmed"><b>' + value + ':</b></span></dt>'[size=12][/size]
      } else {[size=12][/size]
        dt.innerHTML = value + ':';[size=12][/size]
      }[size=12][/size]
    });[size=12][/size]
  });[size=12][/size]
 [size=12][/size]
  // Set new BBCode icon[size=12][/size]
  if (!$.sceditor) return;[size=12][/size]
  $('head').append($('<style>', {[size=12][/size]
      text: '.sceditor-button-codepretty div{background-image:url(https://i.servimg.com/u/f62/19/86/96/38/code_i10.png)!important}'[size=12][/size]
  }));[size=12][/size]
 [size=12][/size]
  $.sceditor.command.set('codepretty', {[size=12][/size]
    dropDown : function(editor, caller, callback) {[size=12][/size]
      // Create code select[size=12][/size]
      var a = document.createElement('DIV'), b = document.createElement('SELECT');[size=12][/size]
      a.innerHTML = '<label unselectable="on">' + lang.code + '</label>';[size=12][/size]
      for (var i in languages) {[size=12][/size]
        var o = document.createElement('OPTION');[size=12][/size]
        o.value = i;[size=12][/size]
        o.innerHTML = languages[i];[size=12][/size]
        b.append(o);[size=12][/size]
      }[size=12][/size]
      b.style.width = "100%";[size=12][/size]
      b.style.marginBottom = "8px";[size=12][/size]
      a.append(b);[size=12][/size]
      editor.createDropDown(caller, 'codepretty', a);[size=12][/size]
      // Create line number input[size=12][/size]
      var c = document.createElement('DIV');[size=12][/size]
      if (linenums) {[size=12][/size]
        c.innerHTML = '<label unselectable="on">' + lang.line + '</label>';[size=12][/size]
        var i = document.createElement('INPUT');[size=12][/size]
        i.type = "text";[size=12][/size]
        i.defaultValue = "1";[size=12][/size]
        c.append(i);[size=12][/size]
      }[size=12][/size]
      a.append(c);[size=12][/size]
      // Create insert button[size=12][/size]
      var d = document.createElement('DIV');[size=12][/size]
      d.innerHTML = '<input type="button" class="button" value="' + lang.insert + '">';[size=12][/size]
      d.onclick = function() {[size=12][/size]
        var code = $(b)[0].value, line = '1';[size=12][/size]
        if (linenums) { line = $(i)[0].value; if (line == '' || line < 1) { line = '1' }; }[size=12][/size]
        callback(code, line);[size=12][/size]
        editor.closeDropDown(true);[size=12][/size]
        return false;[size=12][/size]
      };[size=12][/size]
      a.append(d);[size=12][/size]
    },[size=12][/size]
    // wysiwyg[size=12][/size]
    exec : function(caller) {[size=12][/size]
      var editor = this;[size=12][/size]
      $.sceditor.command.get('codepretty').dropDown(editor, caller, function(code, line) {[size=12][/size]
        if (parseInt(line) > 1) {[size=12][/size]
          editor.insert('[table class="code-' + code + '"][tr][td id="line--' + line + '"][code]',[size=12][/size]
                        '[/code][/td][/tr][/table]', true, true, true);[size=12][/size]
        } else {[size=12][/size]
          editor.insert('[table class="code-' + code + '"][tr][td][code]',[size=12][/size]
                        '[/code][/td][/tr][/table]', true, true, true);[size=12][/size]
        }[size=12][/size]
      });[size=12][/size]
    },[size=12][/size]
 [size=12][/size]
    // source[size=12][/size]
    txtExec : function(caller) {[size=12][/size]
      var editor = this;[size=12][/size]
      $.sceditor.command.get('codepretty').dropDown(editor, caller, function(code, line) {[size=12][/size]
        if (parseInt(line) > 1) {[size=12][/size]
          editor.insert('[table class="code-' + code + '"][tr][td id="line--' + line + '"][code]',[size=12][/size]
                        '[/code][/td][/tr][/table]', true, true, true);[size=12][/size]
        } else {[size=12][/size]
          editor.insert('[table class="code-' + code + '"][tr][td][code]',[size=12][/size]
                        '[/code][/td][/tr][/table]', true, true, true);[size=12][/size]
        }[size=12][/size]
      });[size=12][/size]
    },[size=12][/size]
    tooltip : lang.tooltip;[size=12][/size]
  });[size=12][/size]
  toolbar = toolbar.replace(/code,/,'code,codepretty,'); // add the button to the toolbar[size=12][/size]
});
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Mer Dic 09, 2020 10:37 am
Codice:
# Define the number set
numbers = {23, 90, 56, 78, 12, 34, 67}
 
# Add a new data
numbers.add(50)
# Print the set values
print(numbers)

message = "Number is not found"

# Take a number value for search
search_number = int(input("Enter a number:"))
# Search the number in the set
for val in numbers:
    if val == search_number:
        message = "Number is found"
        break

print(message)
Admin
Amministratore
Customize Profile : Paper rubbing
Reputazione : 13
Messaggi : 420
Exp : 1446
Data di iscrizione : 24.11.20
Età : 30
Località : Italia
Visualizza il profilohttps://www.galaxypledges.net

Modifiche Forum - Parte Grafica - Pagina 2 Empty Re: Modifiche Forum - Parte Grafica

Mer Dic 09, 2020 10:39 am
Codice:
# import getpass module
import getpass

# Take password from the user
passwd = getpass.getpass('Password:')

# Check the password
if passwd == "fahmida":
    print("You are authenticated")
else:
    print("You are not authenticated")
Torna in alto
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.