Jump to content

alien

Active Members
  • Content Count

    331
  • Joined

  • Last visited

  • Days Won

    2

alien last won the day on August 18 2012

alien had the most liked content!

Community Reputation

71 Excellent

About alien

  • Rank
    Registered user

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. "ai tastat un numar gresit" deci fake, ca eu stiu din surse mai sigure ca am telefonul ascultat.
  2. Hai ca mi-a placut de ala: "Hackeri sunt ... prea grei! Profesori...". Asa da, un pic de respect!
  3. Bun. Si ce siguranta am eu sa-mi bag toate datele personale intr-o aplicatie luata de pe un site de hacking? Mie, cel putin, open source imi inspira incredere.
  4. De ce nu publicati codul sursa, open source? Daca tot e gratis.
  5. Foarte curat codul. Recomand sa aruncati un ochi pe el. O sa-l compilez sa vad cum se comporta, din ce am vazut din cod nu ar avea ce sa nu mearga la el. E simplu si eficient
  6. alien

    Salut

    Stiri din domeniu gasesti aici: https://rstforums.com/forum/stiri-securitate.rst Multa bafta lui Tex!
  7. alien

    Ce e LR?

    Exista metoda anonima de plati online folosind LR.
  8. Apropo de coding style, cred ca am mai postat pe aici. E un site ce cuprinde o gramada de standarduri de la management, interface, websites, database, naming convetions. SSW Rules to Better ...
  9. Daca nu scrieti cod ca robotii o sa vedeti ca aveti timp si de documentatie. Eu nu pot sa sufar programatorii care merg pe conceptul "code first, think later". Recunosc, cateodata poate sa fie mai rapid. Dar de cele mai multe ori ajungi in situatia de a implementa un lucru de 10 ori: code, code, code, compile, test, recode, recode, recode, compile, test etc... Dar daca incepi cu un mic design, iti aranjezi putin structura(descri functii, proprietati etc), scri documentatie care sa evidentieze functionalitatea si apoi te apuci de implementarea propriuzisa o sa ai surpriza ca in final sa ai ceea ce se numeste "beautifull code". Si inca ceva: puteti ca ma tarziu sa ajungeti intr-o companie in care dati peste un besmetic ca mine care are tot dreptul sa va dea revert la codul la care ati muncit o zi intreaga intr-o secunda, doar pentru faptul ca nu e documentat sau ca nu se intelege.
  10. Ce o sa ma mai distrez luni la munca! #define struct union #define else
  11. Simple demo C# program made in college to demonstrate tree view file explorer. Poate va ajuta pe astia care sunteti anul 2 pe la info hg clone https://bitbucket.org/rokill3r/filetreeview using System; using System.Collections; using System.Windows.Forms; using System.Drawing; using System.IO; namespace cd_tree { public class FileTree : TreeView { public FileTree() { GenerateImage(); Fill(); } const int HD = 0; const int FOLDER = 1; const int GLMODEL = 2; const int OTHERS = 3; protected void GenerateImage() { ImageList list = new ImageList(); list.Images.Add(new Icon("ico/hd.ico")); list.Images.Add(new Icon("ico/folder.ico")); list.Images.Add(new Icon("ico/glmodel.ico")); list.Images.Add(new Icon("ico/otherfiles.ico")); ImageList = list; } public void Fill() { BeginUpdate(); string[] drives = Directory.GetLogicalDrives(); for (int i = 0; i < drives.Length; i++) { DirTreeNode dn = new DirTreeNode(drives[i]); dn.ImageIndex = HD; Nodes.Add(dn); } EndUpdate(); // modify the tree JIT BeforeExpand += new TreeViewCancelEventHandler(prepare); AfterCollapse += new TreeViewEventHandler(clear); AfterCheck+=new TreeViewEventHandler(prepare_check); } public void Open(string path) { TreeNodeCollection nodes = Nodes; DirTreeNode subnode = null; int i, n; path = path.ToLower(); nodes = Nodes; while (nodes != null) { n = nodes.Count; for (i = 0; i < n; i++) { subnode = (DirTreeNode)nodes[i]; if (path == subnode.Path) { subnode.Expand(); return; } if (path.StartsWith(subnode.Path)) { subnode.Expand(); break; } } if (i == n) return; nodes = subnode.Nodes; } } void prepare(object sender, TreeViewCancelEventArgs e) { BeginUpdate(); DirTreeNode tn = (DirTreeNode)e.Node; try { tn.populate(); EndUpdate(); } catch (Exception ex) { EndUpdate(); MessageBox.Show(ex.Message + "\n\n" + ex.StackTrace, "Problems"); } } void prepare_check(object sender, TreeViewEventArgs e) { BeginUpdate(); DirTreeNode tn = (DirTreeNode)e.Node; try { tn.Expand(); tn.populate(); EndUpdate(); } catch (Exception ex) { EndUpdate(); MessageBox.Show(ex.Message + "\n\n" + ex.StackTrace, "Problems"); } } void clear(object sender, TreeViewEventArgs e) { BeginUpdate(); DirTreeNode tn = (DirTreeNode)e.Node; tn.setLeaf(true); EndUpdate(); } public class DirTreeNode : TreeNode { string path; int type; public virtual string Path { get { return path; } } public DirTreeNode(string s) : base(s) { path = s.ToLower(); setLeaf(true); type = HD; ImageIndex = type; SelectedImageIndex = type; } DirTreeNode(string s, int aType) : base(new FileInfo(s).Name) { path = s.ToLower(); type = aType; ImageIndex = type; SelectedImageIndex = type; if (type == FOLDER || type == GLMODEL) setLeaf(true); } public bool IsSpecialFile(string s) { if (!s.EndsWith(".dll")) return false; ImageIndex = GLMODEL; return true; } internal void populate() { if (type != FOLDER && type != HD) return; ArrayList folder = new ArrayList(); ArrayList special = new ArrayList(); ArrayList other = new ArrayList(); string[] files = Directory.GetFileSystemEntries(Path); for (int i = 0; i < files.Length; i++) { FileAttributes fa = File.GetAttributes(files[i]); if ((fa & FileAttributes.Directory) != 0) folder.Add(new DirTreeNode(files[i], FOLDER)); else { if (IsSpecialFile(files[i])) special.Add(new DirTreeNode(files[i], GLMODEL)); else other.Add(new DirTreeNode(files[i], OTHERS)); } } bool ischecked = false; if (this.Checked == true) ischecked = true; // add the node Nodes.Clear(); foreach (DirTreeNode dtn in folder) { if (ischecked) dtn.Checked = true; Nodes.Add(dtn); } foreach (DirTreeNode dtn in special) { if (ischecked) dtn.Checked = true; Nodes.Add(dtn); } foreach (DirTreeNode dtn in other) { if (ischecked) dtn.Checked = true; Nodes.Add(dtn); } ImageIndex = type; } bool isLeaf = true; internal void setLeaf(bool { ImageIndex = type; Nodes.Clear(); isLeaf = b; if (IsExpanded) return; if (!isLeaf) return; Nodes.Add(new TreeNode()); } } } static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }
  12. I din this in college, 2nd year. I will search and post the code if I find it.
×
×
  • Create New...