Search Results

Search found 5172 results on 207 pages for 'stackoverflow podcast'.

Page 126/207 | < Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >

  • How to call memcmp() on two parts of byte[] (with offset)?

    - by brickner
    Hi, I want to compare parts of byte[] efficiently - so I understand memcmp() should be used. I know I can using PInvoke to call memcmp() - http://stackoverflow.com/questions/43289/comparing-two-byte-arrays-in-net But, I want to compare only parts of the byte[] - using offset, and there is no memcmp() with offset since it uses pointers. int CompareBuffers(byte[] buffer1, int offset1, byte[] buffer2, int offset2, int count) { // Somehow call memcmp(&buffer1+offset1, &buffer2+offset2, count) } Should I use C++/CLI to do that? Should I use PInvoke with IntPtr? How? Thank you.

    Read the article

  • Two tables side by side in one column LaTeX environment

    - by Gacek
    The question is similar to this one: http://stackoverflow.com/questions/1491717/how-to-display-a-content-in-two-column-layout-in-latex but about placing two tables side by side. I have two small tables looking like that: \begin{table}[t] \begin{tabular}{|c|l||r|r||r|r|} %content goes here \end{tabular} \caption{some caption} \end{table} \begin{table}[t] \begin{tabular}{|c|l||r|r||r|r|} %content goes here \end{tabular} \caption{some caption for second table} \end{table} I have one-column document and these tables are really narrow, so I would like to display them side by side (with separate captions) insted of one under another with a lot of unused, white space. I tried to do it with this \multicols but it seems that floats (tables here) cannot be placed inside of it. Any ideas?

    Read the article

  • Is it valid syntax to have ordered and unordered lists in sequence in markdown?

    - by nfm
    I just wrote some markdown and it doesn't seem to render correctly. Is it legal syntax to have an ordered list, followed by newlines, then followed by an unordered list? Or is this a bug in bluecloth? For example: 1. One 2. Two 3. Three * Apple * Banana * Carrot Bluecloth creates a single <ul> and nests apple, banana and carrot as <li>'s under it. Stackoverflow's markdown parser does this too. Am I just doing it wrong? Surely this is a common usage case...

    Read the article

  • trouble accessing localhost from ie7 running on parallels (win xp) on mac os x

    - by Karl R
    I'm running the app engine devserver on localhost:8080, and want to access it from ie7 running on parallels. I've tried all of the tips here: http://stackoverflow.com/questions/61449/how-do-i-access-the-host-from-vmware-fusion And they seem like they should work, particularly accessing via the gateway ip address. I've also sudo ipfw add allow tcp from 8080 to 8089 for good measure. Still no dice. I can access the external internet from ie7. The connection settings on parallels are set to 'Shared networking'. I'm out of ideas.

    Read the article

  • How to change the order of toolbar buttons in Internet Explorer?

    - by Rick
    I know I can simply write to the CommandBandLayout regkey but since I don't know what format it is I'm having doubts if that is safe. Also, this answer suggest it's the wrong solution: http://stackoverflow.com/questions/1239266/how-to-modify-commandbandlayout-reg-key-value But how can I change the order a bit? I have written an Internet Explorer Add-on and I've registered it by putting it in HKCU but by default it falls off the screen so users are having trouble finding it. I would like to make the bar wider or move the button back in the screen.

    Read the article

  • Are there any C++ tools that detect misuse of static_cast, dynamic_cast, and reinterpret_cast?

    - by chrisp451
    The answers to the following question describe the recommended usage of static_cast, dynamic_cast, and reinterpret_cast in C++: http://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-and-reinterpret-cast-be-used Do you know of any tools that can be used to detect misuse of these kinds of cast? Would a static analysis tool like PC-Lint or Coverity Static Analysis do this? The particular case that prompted this question was the inappropriate use of static_cast to downcast a pointer, which the compiler does not warn about. I'd like to detect this case using a tool, and not assume that developers will never make this mistake.

    Read the article

  • How to port Iphone style app into Android?

    - by edwar12345
    first, please see the blog as the link showed below: http://blogs.nitobi.com/joe/2008/10/17/phonegap-now-for-android/comment-page-1/#comment-12918 the author made iPhone Style app in Android emulator, the pic showed below: http: blogs.nitobi.com/joe/wp-content/uploads/2008/10/droidgap.png if anyone knows, Would you please tell me how to make the iphone sytle app in android, as the pic shows? I checked the phonegap demo in the github, it's not the same as the picture showed in the blog. I am so curious about how can make iphone style app in Android? Since it need the Iphone OS to display such effect. Would anyone please tell me how to make it? so pity that the link doesn't work now: https: github.com/bowserj/gap/ your reply will be great appriciated. the same question i asked can be found with link: http: stackoverflow.com/questions/2786787/how-to-implement-iphone-titlebar-in-android

    Read the article

  • Need help using the Windows IP Helper API & ParseNetworString in C#.

    - by JohnnyNoir
    I'm attempting to rewrite some C# web service code that uses the Windows IP Helper API call "SendARP" to retreive a remote system's MAC address. SendARP works great - until you cross a network segment as Arp requests aren't routed. I've been looking at the "ParseNetworkString" documentation after happening across its existance on StackOverflow. The quick & dirty algorithm I have in mind is: public static string GetMacAddress(string strHostOrIP) { if (strHostOrIP is IPAddress) { parse results of nbstat -A strHostOrIP return macAddress } if (strHostOrIP is Hostname) { IPHostEntry hostEntry = null; try { hostEntry = Dns.GetHostEntry(strHostOrIP); } catch { return null; } if (hostEntry.AddressList.Length == 0) { return null; } foreach (IPAddress ip in hostEntry.AddressList) { if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { ipAddress = ip; break; } } } return GetMACAddress(ipAddress); } "ParseNetworkString" is new with Vista/Win2008 so I haven't been able to find example C# code demonstrating its use and I'm no C++ coder so if anyone can point me in the right direction...

    Read the article

  • Programatically get own Phone Number in iPhone OS 4.0

    - by sandy
    I am developing an iPhone application for jail broken phones and in this application I would like to fetch user's phone number. I have gone through the entire stackoverflow.com and found some relevant answers but all of them are obsolete and doesn't work with iOS 4.0 anymore. The most famous solution for this problem is NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"]; but as I mentioned this solution no more works with iOS 4.0 As my application is intended towards the jail broken phones and not intended the Apple app store so I am not worried about my app rejection, hence any private API will also work for me. Also please let me know if we can fetch IMSI number from SIM using any private APIs of iPhone

    Read the article

  • blank space on google home page

    - by topgun_ivard
    2 questions, i was doing nothing productive, and tried selecting the google home page (a left click drag and select whole page) on google.com i see that beside the search box, on the left side, there is an empty space &nbsp; i looked up the source code and there indeed was a <td width=25%>&nbsp;</td> stupid as it may sound, but i was still curious to know why the blank space is out there..or is it just a simple typo?? :) also, any idea what window.lol&&lol() does? curious yet again, google search didnt get me any result and i thought i would turn to stackoverflow to enlighten me... thanks, ivar

    Read the article

  • ASP.NET MVC Generic Controllers and Spring.NET

    - by Jason
    Hello, I am creating an application using ASP.NET MVC (2) and Spring.NET. Since most of my Controller implementations just implement the similar CRUD operations, I would like to just create a single Generic controller, as explained here: http://stackoverflow.com/questions/848904/in-asp-net-mvc-is-it-possible-to-make-a-generic-controller However, the above example doesn't take DI frameworks into consideration. What I'm thinking is to create this (warning: this is an ugly mass of code I need help with): public SpringGenericControllerFactory : DefaultControllerFactory { public IController CreateController(RequestContext requestContext, string controllerName) { // Determine the controller type to return Type controllerType = Type.GetType("MyController").MakeGenericType(Type.GetType(controllerName)); // Return the controller return Activator.CreateInstance(controllerType) as IController; } } The entries in objects.xml would look something like this: <object id="controllerFactory" type="Application.Controllers.SpringGenericControllerFactory" /> <object id="DepartmentController" factory-method="CreateController" factory-object="controllerFactory" /> Can anyone pick through this and offer advice?

    Read the article

  • Selective coloring on dynamic TextBlock content in WPF

    - by user326579
    For selective coloring of static content the following suggestion works fine : http://stackoverflow.com/questions/2435880/is-it-possible-to-seletively-color-a-wrapping-textblock-in-silverlight-wpf However my content will be generated at runtime. For ex. if the Content generated is : "A Quick Brown Fox" Then I need they string "Brown" to be in color Brown and "Fox" to be in color Red The Keyword-Color list is fixed and available to me at runtime. I have looked at the Advanced TextFormatting page on MSDN, but it is too complicated for me, also the sample in there does not compile :( I am looking at creating a custom control which can do this for me. Let me know if anyone has any idea regarding how to go about this. Thanks in advance.

    Read the article

  • C++0x rvalue references - lvalues-rvalue binding

    - by Doug
    This is a follow-on question to http://stackoverflow.com/questions/2748866/c0x-rvalue-references-and-temporaries In the previous question, I asked how this code should work: void f(const std::string &); //less efficient void f(std::string &&); //more efficient void g(const char * arg) { f(arg); } It seems that the move overload should probably be called because of the implicit temporary, and this happens in GCC but not MSVC (or the EDG front-end used in MSVC's Intellisense). What about this code? void f(std::string &&); //NB: No const string & overload supplied void g1(const char * arg) { f(arg); } void g2(const std::string & arg) { f(arg); } It seems that, based on the answers to my previous question that function g1 is legal (and is accepted by GCC 4.3-4.5, but not by MSVC). However, GCC and MSVC both reject g2 because of clause 13.3.3.1.4/3, which prohibits lvalues from binding to rvalue ref arguments. I understand the rationale behind this - it is explained in N2831 "Fixing a safety problem with rvalue references". I also think that GCC is probably implementing this clause as intended by the authors of that paper, because the original patch to GCC was written by one of the authors (Doug Gregor). However, I don't this is quite intuitive. To me, (a) a const string & is conceptually closer to a string && than a const char *, and (b) the compiler could create a temporary string in g2, as if it were written like this: void g2(const std::string & arg) { f(std::string(arg)); } Indeed, sometimes the copy constructor is considered to be an implicit conversion operator. Syntactically, this is suggested by the form of a copy constructor, and the standard even mentions this specifically in clause 13.3.3.1.2/4, where the copy constructor for derived-base conversions is given a higher conversion rank than other implicit conversions: A conversion of an expression of class type to the same class type is given Exact Match rank, and a conversion of an expression of class type to a base class of that type is given Conversion rank, in spite of the fact that a copy/move constructor (i.e., a user-defined conversion function) is called for those cases. (I assume this is used when passing a derived class to a function like void h(Base), which takes a base class by value.) Motivation My motivation for asking this is something like the question asked in http://stackoverflow.com/questions/2696156/how-to-reduce-redundant-code-when-adding-new-c0x-rvalue-reference-operator-over ("How to reduce redundant code when adding new c++0x rvalue reference operator overloads"). If you have a function that accepts a number of potentially-moveable arguments, and would move them if it can (e.g. a factory function/constructor: Object create_object(string, vector<string>, string) or the like), and want to move or copy each argument as appropriate, you quickly start writing a lot of code. If the argument types are movable, then one could just write one version that accepts the arguments by value, as above. But if the arguments are (legacy) non-movable-but-swappable classes a la C++03, and you can't change them, then writing rvalue reference overloads is more efficient. So if lvalues did bind to rvalues via an implicit copy, then you could write just one overload like create_object(legacy_string &&, legacy_vector<legacy_string> &&, legacy_string &&) and it would more or less work like providing all the combinations of rvalue/lvalue reference overloads - actual arguments that were lvalues would get copied and then bound to the arguments, actual arguments that were rvalues would get directly bound. Questions My questions are then: Is this a valid interpretation of the standard? It seems that it's not the conventional or intended one, at any rate. Does it make intuitive sense? Is there a problem with this idea that I"m not seeing? It seems like you could get copies being quietly created when that's not exactly expected, but that's the status quo in places in C++03 anyway. Also, it would make some overloads viable when they're currently not, but I don't see it being a problem in practice. Is this a significant enough improvement that it would be worth making e.g. an experimental patch for GCC?

    Read the article

  • Problem with large Canvas in Silverlight

    - by Fury
    Hi, I am developing (using Silvelight 3) an aplication that creates some kind of timeline and places objects on it. For this purpose I need a really large Canvas (up to 2000000 pixels width) with long lines on it, but whenever I create Canvas even 40000 pixels width it behaves very strangely, randomly disappearing. I have found a post with the description of the exactly same problem on silverlight forums and another one here on the stackoverflow. It seems that is a known problem since silverlight 2, but I can't find any good workaround. Does anybody know such workaround or can check is it still an issue in Silverlight 4? Thanks in advance.

    Read the article

  • Database design - alternatives for Entity Attribute Value (AEV)

    - by Bob
    Hi, see http://stackoverflow.com/questions/695752/product-table-many-kinds-of-product-each-product-has-many-parameters for similar topic. My question: i want to design a database, that will be used for a production facility of different types of products where each product has its own (number of) parameters. because i want the serial numbers to be in one tabel for overview purposes i have a problem with these different paraeters . One solution could be AEV, but it has its downsides, certainly because we have +- 5 products with every product +- 20.000 serial numbers (records). it looks a bit overkill to me... I just don't know how one could design a database so that you have an attribute in a mastertable that says: 'hey, you could find details of this record in THAT detail-table". 'in a way that you qould easely query the results) currenty i am using Visual Basic & Acces 2007. but i'm going to Visual Basic & MySQL. thanks for your help. Bob

    Read the article

  • Avoding multiple thread spawns in pthreads

    - by madman
    Hi StackOverflow, I have an application that is parallellized using pthreads. The application has a iterative routine call and a thread spawn within the rountine (pthread_create and pthread_join) to parallelize the computation intensive section in the routine. When I use an instrumenting tool like PIN to collect the statistics the tool reports statistics for several threads(no of threads x no of iterations). I beleive it is because it is spawning new set of threads each time the routine is called. How can I ensure that I create the thread only once and all successive calls use the threads that have been created first. When I do the same with OpenMP and then try to collect the statistics, I see that the threads are created only once. Is it beacause of the OpenMP runtime ? Thanks.

    Read the article

  • How can I catch runtime error in C++

    - by Yan Cheng CHEOK
    By referring to http://stackoverflow.com/questions/315948/c-catching-all-exceptions try { int i = 0; int j = 0/i; /* Division by 0 */ int *k = 0; std::cout << *k << std::endl; /* De-reference invalid memory location. */ } catch (...) { std::cout << "Opps!" << std::endl; } The above run-time error are unable to be detected. Or, am I having wrong expectation on C++ exception handling feature?

    Read the article

  • FOSS HTML to PDF in Python, .Net or command line?

    - by jle
    I have google as much as I possible, checked stackoverflow several times, and yet I can not find a good html to pdf converter that can handle css. Is there a free and open source solution (even for commercial usage)? There are many solutions, with huge variety of price ranges, but I was looking for something open source and free. I have tried PISA for Python and it works fairly well, but is not free for commercial usage. Is there anything for .Net? I have not had success with iTextSharp.

    Read the article

  • How to tell when my batch of EAP calls are completed?

    - by codemonkie
    This is following my question: http://stackoverflow.com/questions/2607038/c-how-to-consume-web-service-adheres-to-the-event-based-asynchronous-pattern My program is calling the DoStuffAsync() x many times in a batch, hence the callback will get invoked the same number of times upon OnComplete(). Is there a way to find out when my batch is finished such that I can generate a report on the success/failed results? All I can think of is to have a static count variable for x and deduct 1 every time OnComplete() is called, but its kind of silly and error prone I'm afraid. TIA.

    Read the article

  • converting GPS latitude/longitude from different formats to one format (in PHP)

    - by Dave
    Hi. i'm trying to built in support for locations in my application and i'm expecting users to be inputting gps coordinates in a variety of ways. I need to convert all of the below to: latitude - direction (N/s), degres, minutes, seconds; longitude (E/W) - degrees, minuts, seconds. Each user input will be in a single line. eg: 9.182, -39.140625 9.182 / -39.140625 9.182,-39.140625 9.182 -39.140625 21° 16' 674S[some_separator]27° 30' 318E 21 16 674S[some_separator]27 30 318E [some_separator] may be a single space as well... The final format needs to beas: latitude.direction = south latitude.degrees = 21 latitude.minutes = 16 latitude.seconds = 674 longitude.direction = east longitude.degrees = 27 longitude.minutes = 30 longitude.seconds = 318 (a) what is the simplest way of asking ordinary-non-tech users to input the GPS coordinate?s (b) how do i convert the above to the final format? any built in functions that handle these variations in data input? i've seen http://stackoverflow.com/questions/2548943/gps-format-in-php - but i need to handle a more varied input.

    Read the article

  • Software Protection: Shuffeling my application?

    - by Martijn Courteaux
    Hi, I want to continue on my previous question: http://stackoverflow.com/questions/3007168/torrents-can-i-protect-my-software-by-sending-wrong-bytes Developer Art suggested to add a unique key to the application, to identifier the cracker. But JAB said that crackers can search where my unique key is located by checking for binary differences, if the cracker has multiple copies of my software. Then crackers change that key to make them self anonymous. That is true. Now comes the question: If I want to add a unique key, are there tools to shuffle (a kind of obfuscation) the program modules? So, that a binary compare would say that the two files are completely different. So they can't locate the identifier key. I'm pretty sure it is possible (maybe by replacing assembler blocks and make some jumps). I think it would be enough to make 30 to 40 shuffles of my software. Thanks

    Read the article

  • How to generate a PDF from a view using media=print for styles

    - by Riderman de Sousa Barbosa
    Most of the questions in stackoverflow or in other forums, show how to generate views and sends them by email. But my goal is to generate a PDF from a view with the media=print format and sends it in attachment by email. I have a view that displays a report. I use CSS Print to display this report in a print format. (Basically I display some elements and hide others). How can I generate a PDF from this view (with format media=print) and send it by e-mail in attachment. I am using ActionMailer to send emails and iTextSharp to generate PDFs

    Read the article

  • How to ensure that a Serialized object is completely read over a Socket ?

    - by Amitd
    Hi guys, I am trying to write a socket server and Client that communicate with each other via serialized Objects.eg:To Login, Client sends server a serialized Login object and then the server deserialises the object to read login details. Similarly for other types of request/response. I just wanted to be sure if Socket.receive() can read(untill) large serialized objects completely. I have tried this code but seems to fail when a large object is serialised and sent over the internet.(seems to work fine in LAN situations.) http://stackoverflow.com/questions/2134356/sending-large-serialized-objects-over-sockets-is-failing-only-when-trying-to-grow using(MemoryStream ms = new MemoryStream()) { int bytesRead; while((bytesRead = m_socClient.Receive(buffer)) > 0) { ms.Write(buffer, 0, bytesRead); } // access ms.ToArray() or ms.GetBuffer() as desired, or // set Position to 0 and read } Are there any other ways to ensure that the object gets completely read.

    Read the article

  • IE error with jquery counter plugin

    - by Mankey
    I've implemented a jquery counter script (count up from say 50 to 100 with different increments) that I found from this question: jQuery counter to count up to a target number The scripts works great except for in Internet Explorer 8 (and possibly other IE versions?). Here's an error message from IE with the URL to the creator of the script's demo. Message: 'undefined' is null or not an object Line: 32 Char: 17 Code: 0 URI: http://www.ulmanen.fi/stuff/counter.php I'm just wondering if anyone know how this can be fixed. I'm guessing it has to do with el.html() not finding any data but I can't really figure this out. Thanks for any help ^^ I would reply to that post if I could but I can't seem to find any way of doing so (I'm new to stackoverflow, I think I lack privileges).

    Read the article

  • Yahoo account remains open after using openID to login.why?

    - by hd
    hi i have added openid login with Yahoo! and Google in my site. it is ok and works fine. when users select for example Yahoo! to login to my site, they will be logged in in their yahoo mail account too. i think it is not secure because maybe they don't notice to this issue and leave computer while their email account is availble. what do you think about this and what is your solution for your own sites? as i notice the same story is for stackoverflow.com.

    Read the article

< Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >