Search Results

Search found 43 results on 2 pages for 'berkay gursoy'.

Page 2/2 | < Previous Page | 1 2 

  • How to get status code of a POST with Asp.Net HttpWebRequest

    - by Hasan Gürsoy
    I'm trying to ping Google when my web site's sitemap is updated but I need to know which status code does Google or any other service returns. My code is below: HttpWebRequest rqst = (HttpWebRequest)WebRequest.Create("http://search.yahooapis.com/ping?sitemap=http%3a%2f%2fhasangursoy.com.tr%2fsitemap.xml"); rqst.Method = "POST"; rqst.ContentType = "text/xml"; rqst.ContentLength = 0; rqst.Timeout = 3000; rqst.GetResponse();

    Read the article

  • How to define using statements in web.config?

    - by Hasan Gürsoy
    I'm using MySql in my asp.net project. But I don't want to type every "using MySql.Data.MySqlClient;" statement in every aspx.cs file. How can I define this lines in web.config file? I've defined some namespaces like below but this only works for aspx pages: <?xml version="1.0"?> <configuration> <system.web> <compilation debug="false" targetFramework="4.0"/> <pages> <namespaces> <add namespace="System.Web.Configuration"/> <add namespace="MySql.Data"/> <add namespace="MySql.Data.MySqlClient"/> </namespaces> </pages> </system.web> </configuration>

    Read the article

  • Add special characters to Asp.net RegularExpressionValidator for E-Mail

    - by Hasan Gürsoy
    I have a e-mail address validator but I need to add special characters as valid for example ü, ç... Because users in Turkey (or anywhere else) can have a web site url like: hasangürsoy.com My code is below: <asp:TextBox ID="tEMail" runat="server" /> <asp:RequiredFieldValidator ID="rfvEMail" runat="server" ControlToValidate="tEMail" ErrorMessage="* required" /> <asp:RegularExpressionValidator ID="revEMail" runat="server" ControlToValidate="tEMail" ErrorMessage="* invalid" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />

    Read the article

  • JAVA Regular Expression Errors

    - by Berkay
    I'm working on a simply password strength checker and i can not success applying regular expressions. In different resources different kinds of regular expressions are defined. i also find javascript regular expressions but had some problems to adapt. First, these are the regular expressions i need for JAVA: at least one lower case letter at least one upper case letter at least one number at least three numbers at least one special character at least two special characters both letters and numbers both upper and lower case letters, numbers, and special characters My goal is not being a regular expression expert i just want to use the parts i need.If you direct me good tutorials which discusses above for java, will be appreciated. Second, in this link some of them are mentioned but i'm getting problems to apply them. here does not catch the lower case letter (my pass: A5677a) if (passwd.matches("(?=.*[a-z])")) // [verified] at least one lower case letter {Score = Score+5;} Also here i'm getting error : illegal escape character. if (passwd.matches("(?=.*\d)")) // [verified] at least one number Finally, are these expressions all different in different kind of programming or script languages?

    Read the article

  • How to solve JAVA menubar, layout and panel problem ?

    - by Berkay
    i'm not a java guy however i start implementing some security tools with java, in these days i'm creating a gui for my security tools : Here is the how my Gui looks: menuBar = new JMenuBar(); // construct menu bar // hash functions fileMenu = new JMenu("HASH FUNCTIONS"); // define file menu fileMenu.setMnemonic('H'); // shortcut hashes = new JMenuItem("Md5&Sha1"); // define file menu options hashes.setMnemonic('M'); hashes.addActionListener(this); fileMenu.add(hashes); menuBar.add(fileMenu); // add file menu to menu bar // symmetric encryption asMenu = new JMenu("SYMMETRIC ENCRYPTION"); // define format menu asMenu.setMnemonic('S'); // shortcut desItem = new JMenuItem("DES"); // define format menu options desItem.setMnemonic('D'); desItem.addActionListener(this); asMenu.add(desItem); ... ... menuBar.add(helpMenu); // add help menu to menu bar setJMenuBar(menuBar); // put menu bar on application textColor = Color.RED; when from the Menu desitem is selected, desvar is just for not showing the panel multiple times, it calls Panels () else if(e.getSource() == desItem && desvar ==1 ) { // make other panels unvisible. if(hashvar!=1) MyPanel.setVisible(false);//hash functions if(rsavar!=1) MyPanel3.setVisible(false);//rsa function if (dhvar!=1) MyPanel4.setVisible(false);//dh diffie hellman hashvar=1; rsavar=1; dhvar=1; ++desvar; desPanel=true; Panels(); } and in Panels() Method: if (hashPanel){ MyPanel.add("West",radioSHA1); MyPanel.add("West",radioMD5); MyPanel.add("Center", inputField); MyPanel.add("East",SubmitButton); MyPanel.add("South",resultHash); add(MyPanel); validate(); hashPanel=false; } i have many panels for example : -hash functions=mypanel1 , des=mypanel2, rsa functions= mypanel3 , dh= mypanel4 However in may other panals such as rsa function: i have to use some layout properties of the java:in this panel i selected to use gridbaglayout if (dhPanel){ System.out.println("rsa panel burda misin"); MyPanel3.add(pqLabel); MyPanel3.add(pLabel); MyPanel3.add(pTextArea); MyPanel3.add(qLabel); ... ... add(MyPanel3); generate_pqButton.addActionListener(this); calculate_nButton.addActionListener(this); ... ... GridBagLayout layout = new GridBagLayout(); GridBagConstraints gbc = new GridBagConstraints(); setLayout(layout); // x, y, w, h, wx, wy gbc.fill = GridBagConstraints.NONE; add (bit_length_label, gbc, 0, 0, 1, 1, 0, 10); add (p, gbc, 0, 1, 1, 1, 0, 10); add (g, gbc, 0, 2, 1, 1, 0, 10); add (a, gbc, 1, 3, 1, 1, 100, 10); add (x, gbc, 0, 4, 1, 1, 0, 10); add (gx, gbc, 0, 5, 1, 1, 0, 10); add (gxy, gbc, 0, 6, 1, 1, 0, 10); add (b, gbc, 1, 7, 1, 1, 100, 10); add (y, gbc, 0, 8, 1, 1, 0, 10); add (gy, gbc, 0, 9, 1, 1, 0, 10); add (gyx, gbc, 0, 10, 1, 1, 0, 10); add (sk, gbc, 1, 11, 1, 1, 100, 10); add (key, gbc, 0, 12, 1, 1, 0, 10); add (status, gbc, 1, 13, 1, 1, 100, 10); add (dhstart, gbc, 1, 14, 1, 1, 100, 10); add (bit_length_value, gbc, 1, 0, 1, 1, 100, 10); add (p_value, gbc, 1, 1, 1, 1, 100, 10); add (g_value, gbc, 1, 2, 1, 1, 100, 10); add (x_value, gbc, 1, 4, 1, 1, 100, 10); add (gx_value, gbc, 1, 5, 1, 1, 100, 10); add (gxy_value, gbc, 1, 6, 1, 1, 100, 10); add (y_value, gbc, 1, 8, 1, 1, 100, 10); add (gy_value, gbc, 1, 9, 1, 1, 100, 10); add (gyx_value, gbc, 1, 10, 1, 1, 100, 10); validate(); repaint(); rsaPanel=false; } Everthing seems okey however when i swith from one menu to another sometimes components are seen or apper in wrong places or mixed. where i'm doing wrong?

    Read the article

  • what is the best way to generate fake data for classification problem ?

    - by Berkay
    i'm working on a project and i have a subset of user's key-stroke time data.This means that the user makes n attempts and i will use these recorded attempt time data in various kinds of classification algorithms for future user attempts to verify that the login process is done by the user or some another person. (Simply i can say that this is biometrics) I have 3 different times of the user login attempt process, ofcourse this is subset of the infinite data. until now it is an easy classification problem, i decided to use WEKA but as far as i understand i have to create some fake data to feed the classification algorithm. can i use some optimization algorithms ? or is there any way to create this fake data to get min false positives ? Thanks

    Read the article

  • Adapting Machine Learning Algorithms to my Problem

    - by Berkay
    i'm working on a project and need your ideas, advices. First of all, let me tell my problem. There is power button and some other keys of a machine and there is only one user has authentication to use this machine.There are no other authentication methods, the machine is in public area in a company. the machine is working with the combination of pressing power button and some other keys. The order of pressing keys is secret but we don't trust it, anybody can learn the password and can access the machine. i have the capability of managing the key hold time and also some other metrics to measure the time differences between the key such as horizantal or vertical key press times (differences). and also i can measure the hold time etc. These all means i have some inputs, Now i'm trying to get a user profile by analysing these inputs. My idea is to get the authenticated user to press the password n times and create a threshold or something similar to that. This method also can be said BIOMETRICS, anyone else who knows the machine button combination, can try the password but if he is out of this range can not get access it. How can i adapt these into my algorithms? where should i start ? i don't want to delve deep into machine learning, and also i can see the in my first try i can get false positive and false negative values really high, but i can manage it by changing my inputs. thanks.

    Read the article

  • Tools to test softwares against any attacks for programmers ?

    - by berkay
    in these days, i'm interested in software security. As i'm reading papers i see that there are many attacks and researchers are trying to invent new methods for softwares to get more secure systems. this question can be a general including all types of attacks.There are many experienced programmers in SO, i just want to learn what are using to check your code against these attacks ? Is there any tools you use or you don't care ? For example i heard about,static,dynamic code analysis, fuzz testing. SQL injection attacks Cross Site Scripting Bufferoverflow attacks Logic errors Any kind of Malwares Covert Channels ... ... thanks

    Read the article

  • How can UNIX access control create compromise problems ?

    - by Berkay
    My system administrators advice me to be careful when setting access control to files and directories. He gave me an example and i got confused, here it is: a file with protection mode 644 (octal) contained in a directory with protection mode 730. so it means: File:101 100 100 (owner, group,other: r-x r-- r--) Directory:111 011 000 (owner, group,other: rwx -wx ---) How can file be compromised in this case ?

    Read the article

  • How to Sort ip addresses and merge two files in efficent manner using perl or *nix commands?

    - by berkay
    (*) This problem should be done in perl or any *nix commands. i'm working on a program and efficiency matters.The file1 consists ip addresses and some other data: index ipsrc portsrc ip dest port src 8 128.3.45.10 2122 169.182.111.161 80 (same ip src and dst) 9 128.3.45.10 2123 169.182.111.161 22 (same ip src and dst) 10 128.3.45.10 2124 169.182.111.161 80 (same ip src and dst) 19 128.3.45.128 62256 207.245.43.126 80 and other file2 looks like (file1 and file2 are in different order) 128.3.45.10 ioc-sea-lm 169.182.111.161 microsoft-ds 0 0 3 186 3 186 128.3.45.10 hypercube-lm 169.182.111.161 https 0 0 3 186 3 186 128.3.44.112 pay-per-view 148.184.171.6 netbios-ssn 0 0 3 186 3 186 128.3.45.12 cadabra-lm 148.184.171.6 microsoft-ds 0 0 3 186 3 186 1- SORT file1 using IP address in second column and SORT file2 using IP address in first column 2- Merge the 1st, 3rd and 5th columns of File1 with File 2 i need to create a new file which will look: 128.3.45.10 ioc-sea-lm 169.182.111.161 microsoft-ds 0 0 3 186 3 186 --> 2122 80 8 128.3.45.10 hypercube-lm 169.182.111.161 https 0 0 3 186 3 186 --> 2123 22 9 128.3.44.112 pay-per-view 148.184.171.6 netbios-ssn 0 0 3 186 3 186 --> * * * 128.3.45.12 cadabra-lm 148.184.171.6 microsoft-ds 0 0 3 186 3 186 --> * * * basically port numbers and index number will be added.

    Read the article

  • Demystifying gcc under lpthreads

    - by Berkay
    in these i'm playing with thread library and trying to implement some functions. One of the tutorial says that to run the program use : gcc -lpthread -lrt -lc -lm project1.c scheduler.c -o out first of all i need deep understanding of what is gcc doing in each line, lpthread is used for what? what are the contributions of lrt -lc -lm ? project1.c and scheduler.c is compiled together so what should i understand? i checked the code and any of them not included in project1.c or scheduler.c. as an output clearly it gives "out". secondly the author states that to run the program you have to use ./out number filename (For example, ./out 2 sample.txt) To make these clear as far as i understand the main function gets number and sample.txt as an input.(?) thanks for your answers and making me clear.

    Read the article

  • How do the routers communicate with each other ?

    - by Berkay
    Let's say that i want make a request a to a web page which is hosted in Europe (i live in USA).My packets only consist the IP address of the web page, first the domain name to ip address transformation is done, then my packets start their journey through to europe. i assume that MAC addresses never used in this situation? are they? First, my packets deal with many routers on way how these routers communicate with each other?, are router addresses added to my packet headers ? Second, is there a specific path router to router comminication or which conditions affect this route? Third to cross the Atlantic Ocean, are cables used or... ?

    Read the article

  • How to capture user's keystroke times in openmoko?

    - by Berkay
    i will use this data for modelling the user, any good resource or tutorial will be appreciated.(this will be my first experience with openmoko) For example i'm trying to calculate: Key hold time: The time difference between pressing a key and releasing it Digraph time: The time difference between releasing one key and pressing the next one Error rate: The number of times backspace key is pressed. thanks (any kind of useful information for openmoko to help me this problem will be appreciated.)

    Read the article

  • atol(), atof(), atoi() function behaviours, is there a stable way to convert from/to string/integer

    - by Berkay
    In these days i'm playing with the C functions of atol(), atof() and atoi(), from a blog post i find a tutorial and applied: here are my results: void main() char a[10],b[10]; puts("Enter the value of a"); gets(a); puts("Enter the value of b"); gets(b); printf("%s+%s=%ld and %s-%s=%ld",a,b,(atol(a)+atol(b)),a,b,(atol(a)-atol(b))); getch(); } there is atof() which returns the float value of the string and atoi() which returns integer value. now to see the difference between the 3 i checked this code: main() { char a[]={"2545.965"}; printf("atol=%ld\t atof=%f\t atoi=%d\t\n",atol(a),atof(a),atoi(a)); } the output will be atol=2545 atof=2545.965000 atoi=2545 char a[]={“heyyou”}; now when you run the program the following will be the output (why?, is there any solution to convert pure strings to integer?) atol=0 atof=0 atoi=0 the string should contain numeric value now modify this program as char a[]={“007hey”}; the output in this case(tested in Red hat) will be atol=7 atof=7.000000 atoi=7 so the functions has taken 007 only not the remaining part (why?) Now consider this char a[]={“hey007?}; the output of the program will be atol=0 atof=0.000000 atoi=0 So i just want to convert my strings to number and then again to same text, i played with these functions and as you see i'm getting really interesting results? why is that? any other functions to convert from/to string/integer and vice versa?

    Read the article

< Previous Page | 1 2