Search Results

Search found 14958 results on 599 pages for 'non technical'.

Page 156/599 | < Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >

  • What Use are Threads Outside of Parallel Problems on MultiCore Systesm?

    - by Robert S. Barnes
    Threads make the design, implementation and debugging of a program significantly more difficult. Yet many people seem to think that every task in a program that can be threaded should be threaded, even on a single core system. I can understand threading something like an MPEG2 decoder that's going to run on a multicore cpu ( which I've done ), but what can justify the significant development costs threading entails when you're talking about a single core system or even a multicore system if your task doesn't gain significant performance from a parallel implementation? Or more succinctly, what kinds of non-performance related problems justify threading? Edit Well I just ran across one instance that's not CPU limited but threads make a big difference: TCP, HTTP and the Multi-Threading Sweet Spot Multiple threads are pretty useful when trying to max out your bandwidth to another peer over a high latency network connection. Non-blocking I/O would use significantly less local CPU resources, but would be much more difficult to design and implement.

    Read the article

  • AIO network sockets and zero-copy under Linux

    - by remyhorton
    I have been experimenting with async Linux network sockets (aio_read et al in aio.h/librt), and one thing i have been trying to find out is whether these are zero-copy or not. Pretty much all i have read so far discusses file I/O, whereas its network I/O i am interested in. AIO is a bit of a pain to use and i suspect is non-portable, so wondering whether its worth persevering with it. Zero-copy is just about the only advantage (albiet a major one for my purposes) it would have over (non-blocking) select/epoll..

    Read the article

  • nicely display file rename history in git log

    - by Jian
    The git command git log --format='%H' --follow -- foo.txt will give you the series of commits that touch foo.txt, following it across renames. I'm wondering if there's a git log command that will also print the corresponding historical file name beside each commit. It would be something like this, where we can interpret '%F' to be the (actually non-existent) placeholder for filename. git log --format='%H %F' --follow -- foo.txt I know this could be accomplished with git log --format='%H' --follow --numstat -- foo.txt but the output is not ideal since it requires some non-trivial parsing; each commit is strewn across multiple lines, and you'll still need to parse the file rename syntax ("bar.txt => foo.txt") to find what you're looking for.

    Read the article

  • "set -e" in shell and command substitution

    - by ivant
    In shell scripts set -e is often used to make them more robust by stopping the script when some of the commands executed from the script exits with non-zero exit code. It's usually easy to specify that you don't care about some of the commands succeeding by adding || true at the end. The problem appears when you actually care about the return value, but don't want the script to stop on non-zero return code, for example: output=$(possibly-failing-command) if [ 0 == $? -a -n "$output" ]; then ... else ... fi Here we want to both check the exit code (thus we can't use || true inside of command substitution expression) and get the output. However, if the command in command substitution fails, the whole script stops due to set -e. Is there a clean way to prevent the script from stopping here without unsetting -e and setting it back afterwards?

    Read the article

  • Check the encoding of text in SQlite

    - by JJG
    I'm having a nightmare dealing with non Eurpean texts in SQlite. I think the problem is that SQlite isn't encoding the text in UTF8. So I want to check what the encoding is, and hopefully change it to utf8. I encoded a CSV in UTF8 and simply imported it to SQlite but the non-roman text is garbled. I would like to know: 1)how to check the encoding. 2)How to change the encoding if it is not utf8. I've been reading about Pragma encoding, but I'm not sure how to use this.

    Read the article

  • Why is the dictionary debug visualizer less useful in Visual Studio 2010 for Silverlight debugging?

    - by Kevin
    I was debugging in Visual Studio 2010, which we just installed and trying to look at a dictionary in the quick watch window. I see Keys and Values, but drilling into those shows the Count and Non-Public members, Non-Public members continues the trail and I never see the values in the dictionary. I can run test.Take(10) and see the values, but why should I have to do that. I don't have VS 2008 installed anymore to compare, but it seems that I could debug a dictionary much easier. Why is it this way now? Is it just a setting I set somehow on my machine? Test code: Dictionary<string, string> test = new Dictionary<string, string>(); test.Add("a", "b"); EDIT: I've just tried the same debug in a Console app and it works as expected. The other project is a Silverlight 4 application, why are they different? Console Debug Screen Shot Silverlight 4 Debug Screen Shot:

    Read the article

  • Best indexing strategy for several varchar columns in Postgres

    - by Corey
    I have a table with 10 columns that need to be searchable (the table itself has about 20 columns). So the user will enter query criteria for at least one of the columns but possibly all ten. All non-empty criteria is then put into an AND condition Suppose the user provided non-empty criteria for column1 and column4 and column8 the query would be: select * from the_table where column1 like '%column1_query%' and column4 like '%column4_query%' and column8 like '%column8_query%' So my question is: am I better off creating 1 index with 10 columns? 10 indexes with 1 column each? Or do I need to find out what sets of columns are queried together frequently and create indexes for them (an index on cols 1,4 and 8 in the case above). If my understanding is correct a single index of 10 columns would only work effectively if all 10 columns are in the condition. Open to any suggestions here, additionally the rowcount of the table is only expected to be around 20-30K rows but I want to make sure any and all searches on the table are fast. Thanks!

    Read the article

  • C++ context menu image at left side showing partially, no fully

    - by Samir
    In C++ #define BITMAP_MAIN 201 //in resource.h BITMAP_MAIN BITMAP "main.bmp" // in .rc file // showing icon in menu... HBITMAP imgMain = LoadBitmap( aHinstance, MAKEINTRESOURCE(BITMAP_MAIN) ); SetMenuItemBitmaps ( hSubmenu, uMenuIndex, MF_BYPOSITION, imgMain, imgMain); The problem is in non-English XP OS the main.bmp is showing partially in the context menu. In Vista, Window7 main.bmp is showing just fine. Also in English XP its ok. But why the image is not showing fully in non-English XP? How would I use .ico file here instead of .bmp? This is to make the image transparent.

    Read the article

  • mod_rewrite: remove trailing slash (only one!)

    - by tshabalala
    Hello. I use mod_rewrite/.htaccess for pretty URLs. I'm using this condition/rule to eliminate trailing slashes (or rather: rewrite to the non-trailing-slash-URL, by a 301 redirect; I'm doing this to avoid duplicate content and because I like URLs with no trailing slashes better): RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_HOST} !^\.localhost$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L] Working well so far. Only drawback: it also forwards "multiple-trailing-slash"-URLs to non-trailing-slash-URLs. Example: http://example.tld/foo/bar////// forwards to http://example.tld/foo/bar while I only want http://example.tld/foo/bar/ to forward to http://example.tld/foo/bar. So, is it possible to only eliminate trailing slashes if it's actually just one trailing slash? Sorry if this is a somewhat annoying or weird question! Thanks.

    Read the article

  • ContextSwitchDeadlock Was Detected error in C#

    - by assassin
    Hi, I am running a C# application, and during run-time I get the following error: The CLR has been unable to transition from COM context 0x20e480 to COM context 0x20e5f0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. Can anyone please help me out with the problem here? Thanks a lot.

    Read the article

  • Purpose of boost::checked_delete

    - by Channel72
    I don't understand the purpose of boost::checked_delete. The documentation says: The C++ Standard allows, in 5.3.5/5, pointers to incomplete class types to be deleted with a delete-expression. When the class has a non-trivial destructor, or a class-specific operator delete, the behavior is undefined. Some compilers issue a warning when an incomplete type is deleted, but unfortunately, not all do, and programmers sometimes ignore or disable warnings. The supplied function and class templates can be used to prevent these problems, as they require a complete type, and cause a compilation error otherwise. So the C++ standard allows you to delete incomplete types, which causes undefined behavior if the type has a non-trivial destructor. What? How can an incomplete type have any destructor at all? Isn't an incomplete type just a prototype?

    Read the article

  • What good practices, if any, has the agile movement lost?

    - by clarke ching
    I am a long time agile advocated but one of the things that bothers me about Agile is that a lot of agile practitioners, especially the younger ones, have thrown out or are missing a whole lot of good (non Scrum, non XP) practices. Alistair Cockburn's style of writing Use Cases springs to mind; orthogonal arrays (pairwise testing) is another. I hope this is an okay forum to ask this, but since I read mostly Agile related books and articles and work with mostly Agile folk ... is there anything I'm missing? Thanks for all your help. StackOverlow is a fantastic resource.

    Read the article

  • Deleting partial data from a field in MySQL

    - by Graham
    I am trying to remove a specific set of data from a MySQL database field, however I am not sure what the best statement would be for this. For example, if I have a data in a field such as... The use of a secondary password will allow you to gain access to your account from a non-authenticated computer. A non-authenticated computer is any computer that is not your primary computer, an elected authenticated computer or a computer that automatically deletes cookies. <p>This is a test</p> ...and I want to remove <p>This is a test</p> from the field, what statement would be best?

    Read the article

  • How to avoid becoming a programmer while still beign closely involved with computer science/Industry

    - by WeShallOvercome
    I am studying computer science (A masters at an Ivy league), however most of the jobs i find involve way too much of programming. And frankly programming is not an issue, however programming without a meaning (read financial institution (non trading), other non mainstream jobs) bore me to death! I dont want to end up becoming a .NET,C#, Java kind of programmer. Can someone tell where i should look for jobs if i wish to do some real computer science work such as Machine Learning etc. I don't mind programming but becoming a Financial Software dev at Bloomeberg or an SDET at Microsoft isn't actually one of my goals. [note: I have interviewed for intern both positions listed above, and thankfully i got an intern for a data mining position in a top 750 Alexa rank web company] Sorry if angered anyone with a subjective question

    Read the article

  • Nonstatic conversion functions; Casting different types, e.g. DirectX vector to OpenGL vector

    - by Markus
    I am currently working on a game "engine" that needs to move values between a 3D engine, a physics engine and a scripting language. Since I need to apply vectors from the physics engine to 3D objects very often and want to be able to control both the 3D, as well as the physics objects through the scripting system, I need a mechanism to convert a vector of one type (e.g. vector3d<float>) to a vector of the other type (e.g. btVector3). Unfortunately I can make no assumptions on how the classes/structs are laid out, so a simple reinterpret_cast probably won't do. So the question is: Is there some sort of 'static'/non-member casting method to achieve basically this: vector3d<float> operator vector3d<float>(btVector3 vector) { // convert and return } btVector3 operator btVector3(vector3d<float> vector) { // convert and return } Right now this won't compile since casting operators need to be member methods. (error C2801: 'operator foo' must be a non-static member)

    Read the article

  • Using Closure Properties to prove Regularity

    - by WATWF
    Here's a homework problem: Is L_4 Regular? Let L_4 = L*, where L={0^i1^i | i>=1}. I know L is non-regular and I know that Kleene Star is a closed operation, so my assumption is that L_4 is non-regular. However my professor provided an example of the above in which L = {0^p | p is prime}, which he said was regular by proving that L* was equal to L(000* + e) by saying each was a subset of one another (e in this case means the empty word). So his method involved forming a regex of 0^p, but how I can do that when I essentially have one already?

    Read the article

  • Is It Safe to Cast Away volatile?

    - by Yan Cheng CHEOK
    Most of the time, I am doing this way. class a { public: ~ a() { i = 100; // OK delete (int *)j; // Compiler happy. But, is it safe? // Error : delete j; } private: volatile int i; volatile int *j; }; int main() { a aa; } However, I saw an article here: https://www.securecoding.cert.org/confluence/display/seccode/EXP32-C.+Do+not+access+a+volatile+object+through+a+non-volatile+reference Casting away volatile allows access to an object through a non-volatile reference. This can result in undefined and perhaps unintended program behavior. So, what will be the workaround for my above code example?

    Read the article

  • How to make a jquery datePicker button image unclickable

    - by Farzana
    I have a jquery UI datePicker in my page. I have a text box on which the date is displayed. The code is: $("#cal").datepicker({ minDate: new Date(), defaultDate: new Date(), buttonImage: '/images/calendar.gif', constrainInput: false, closeText: 'Close', showButtonPanel: true, showButtonText: 'Choose a date', buttonImageOnly : true, showOn : 'button' }); $("#till").datepicker('setDate', today); I want to disable this on some conditions. I use the following code to disable: $("#cal").datePicker('disable'); It blacks out the text box but the image is still clickable. The problem is in IE, the date picker pop up comes up but does not close when the image button associated with the date picker is clicked. I also tried to bind a onclick function with the image to make it non-clickable. But that does not work as well. How can make the date picker image button non-clickable when the date picker is disabled. Any help would be appreciated. Thanks, Farzana

    Read the article

  • C++ streams question (explanation of comment in code)

    - by skyeagle
    I am playing around with the fastCGI application found here. The following comment is in the code: if (content) delete []content; // If the output streambufs had non-zero bufsizes and // were constructed outside of the accept loop (i.e. // their destructor won't be called here), they would // have to be flushed here. My knowledge of C++ streams is rather weak. Could someone please explain the following: which streambufs are being referred to in the comment? under what conditions would the streambufs had non-zero bufsizes? last but not the least, can someone point to a resource (pun intended) online that provides a clear but gentle introduction to C++ IO streams?

    Read the article

  • Can't select database table even though the code is right

    - by Lisa
    I am trying to display a list of my vbulliten threads on a non-vbulliten portion of my site. However I can't select the vbulliten database: <?php $host = "localhost"; $user = "my username"; $pass = "my password"; $dbname = "tableprefix_forum"; mysql_connect($host, $user, $pass) or die ("Could not connect to database server."); mysql_select_db($dbname) or die ("Could not select database."); ?> I am substituting some things here in this example but all my credentials are correct including my db server username, password and forum db name. So what is the problem? Is it due to some internal security feature in vbulliten, does this system not allow you to connect to it's db if the page trying to connect to it is a non-vbulliten page?

    Read the article

  • Does an HTTPS SharePoint Site Need to Use HTTPS-Compliant Web Parts?

    - by bporter
    I am new to SharePoint, so this question may be a little naive. However, I sincerely appreciate any help with this. We are planning to create a new sub-site within our company's intranet site, which is built on SharePoint 2007. We want to add a 3rd-party weather web part (which is just a widget to display the local weather forecast) to the home page of the new intranet site. Since the intranet site uses HTTPS, do we need to find an HTTPS-compliant web part? Or, is it possible to use any web part and then configure it to use HTTPS? I'm assuming that if we use a non-HTTPS web part, then users will get some sort of "This page contains both secure and non-secure items" error message when they load the page.

    Read the article

  • How can I resolve ASP.NET "~" app paths to the website root without a Control being present?

    - by jdk
    I want to Resolve "~/whatever" from inside non-Page contexts such as Global.asax (HttpApplication), HttpModule, HttpHandler, etc. but can only find such Resolution methods specific to Controls (and Page). I think the app should have enough knowledge to be able to map this outside the Page context. No? Or at least it makes sense to me it should be resolvable in other circumstances, wherever the app root is known. Update: The reason being I'm sticking "~" paths in the web.configuration files, and want to resolve them from the aforementioned non-Control scenarios. Update 2: I'm trying to resolve them to the website root such as Control.Resolve(..) URL behaviour, not to a file system path.

    Read the article

  • Problems getting PowerPoint Combobox to list items correctly

    - by mike toyn
    I am creating a PowerPoint in which I want users to be able to select an item from a list in a combo box. Nothing needs to happen after this, it is just to provide a record, on screen, of their choice. My problem is that I seem to either be able to populate the combo box and users can select an item but the list gets longer each time the combobox is clicked on (i.e each time it is clicked on the list gets duplicated). Or alternatively, I can clear the combo box, then populate it but in this scenario, the users choice also seems to get cleared. VBA example 1: Private Sub ComboBox1_DropButtonClick() With ComboBox1 .AddItem " ", 0 .AddItem "speed", 1 .AddItem "provisionality", 2 .AddItem "automation", 3 .AddItem "replication", 4 .AddItem "communicability", 5 .AddItem "multi-modality", 6 .AddItem "non-linearity", 7 .AddItem "capacity", 8 .AddItem "interactivity", 9 End With End Sub VBA example 2: Private Sub ComboBox1_DropButtonClick() ComboBox1.Clear With ComboBox1 .AddItem " ", 0 .AddItem "speed", 1 .AddItem "provisionality", 2 .AddItem "automation", 3 .AddItem "replication", 4 .AddItem "communicability", 5 .AddItem "multi-modality", 6 .AddItem "non-linearity", 7 .AddItem "capacity", 8 .AddItem "interactivity", 9 End With End Sub Can anyone help?

    Read the article

  • How to replace all the blanks within square brackets with an underscore using sed?

    - by Ringerrr
    I figured out that in order to turn [some name] into [some_name] I need to use the following expression: s/\(\[[^ ]*\) /\1_/ i.e. create a backreference capture for anything that starts with a literal '[' that contains any number of non space characters, followed by a space, to be replaced with the non space characters followed by an underscore. What I don't know yet though is how to alter this expression so it works for ALL underscores within the braces e.g. [a few words] into [a_few_words]. I sense that I'm close, but am just missing a chunk of knowledge that will unlock the key to making this thing work an infinite number of times within the constraints of the first set of []s contained in a line (of SQL Server DDL in this case). Any suggestions gratefully received....

    Read the article

< Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >