Search Results

Search found 87928 results on 3518 pages for 'code poet'.

Page 150/3518 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • Best Tools for Software Maintenance Engineering

    - by Pev
    Yes, the dreaded 'M' word. You've got a workstation, source control and half a million lines of source code that you didn't write. The documentation was out of date the moment that it was approved and published. The original developers are LTAO, at the next project/startup/loony bin and not answering email. What are you going to do? {favourite editor} and Grep will get you started on your spelunking through the gnarling guts of the code base but what other tools should be in the maintenance engineers toolbox? To start the ball-rolling; I don't think I could live without source-insight for C/C++ spelunking. (DISCLAIMER: I don't work for 'em).

    Read the article

  • Error after passing variable from jquery to code in c#

    - by Moraru Viorel
    I try to pass variable from jquery to code c# but something is wrong. I have in js this code: <script type="text/javascript"> var mySerial = '12345'; var fooUrl = '@Url.Action("Foo", "Home")'; window.location.href = fooUrl + '?mySerial' + encodeURIComponent(mySerial); </script> in controller : [HttpPost] public ActionResult Foo(string mySerial) { return View(); } After execution I keep this url: http://localhost:2214/@Url.Action("Foo",%20"Home")?mySerial12345 and I don't understand where's the problem, can someone help me?

    Read the article

  • How to add exception in this jquery code?

    - by metal-gear-solid
    How to add exception in this jquery code? $(function() { $("table tr:nth-child(even)").addClass("striped"); }); this code is applying on all tables. but for specfic pages i don't want strip effect. I've differnt body id on each page. I want to know how to add exception for a id. $(function() { $("table tr:nth-child(even)").addClass("striped"); //I want to add exception to not to add striped class to only to page with <body id="nostrip"> });

    Read the article

  • Help with output generated by this C code using fork()

    - by Seephor
    I am trying to figure out the output for a block of C code using fork() and I am having some problems understanding why it comes out the way it does. I understand that when using fork() it starts another instance of the program in parallel and that the child instance will return 0. Could someone explain step by step the output to the block of code below? Thank you. main() { int status, i; for (i=0; i<2; ++i){ printf("At the top of pass %d\n", i); if (fork() == 0){ printf("this is a child, i=%d\n", i); } else { wait(&status); printf("This is a parent, i=%d\n", i); } } }

    Read the article

  • What are the effects of using VS2005 to migrate from .NET 1.1

    - by andy
    Hey guys, I'm working on some legacy code for a client, involving Microsoft Content Management System (MCMS). Currently, everything is local, the code, MCMS, SQLServer, and IIS (5.x). I copied the project folder, and then opened the new copied solution in VS2005, and let it do it's conversion thing. But now nothing works. I've nnotice there have been some changes to IIS profile. What are the extent of these changes...?? Also, my VS2003 fails to recognize the Web Project?? Anyone have any idea what's going on? cheers!

    Read the article

  • Tips on how to deploy C++ code to work every where

    - by User1
    I'm not talking about making portable code. This is more a question of distribution. I have a medium-sized project. It has several dependencies on common libraries (eg openssl, zlib, etc). It compiles fine on my machine and now it's time to give it to the world. Essentially build engineering at its finest. I want to make installers for Windows, Linux, MacOSX, etc. I want to make a downloadable tar ball that will make the code work with a ./configure and a make (probably via autoconf). It would be icing on the cake to have a make option that would build the installers..maybe even cross-compile so a Windows installer could be built in Linux. What is the best strategy? Where can I expect to spend the most time? Should the prime focus be autoconf or are there other tools that can help?

    Read the article

  • c++/cli pass (managed) delegate to unmanaged code

    - by Ron Klein
    How do I pass a function pointer from managed C++ (C++/CLI) to an unmanaged method? I read a few articles, like this one from MSDN, but it describes two different assemblies, while I want only one. Here is my code: 1) Header (MyInterop.ManagedCppLib.h): #pragma once using namespace System; namespace MyInterop { namespace ManagedCppLib { public ref class MyManagedClass { public: void DoSomething(); }; }} 2) CPP Code (MyInterop.ManagedCppLib.cpp) #include "stdafx.h" #include "MyInterop.ManagedCppLib.h" #pragma unmanaged void UnmanagedMethod(int a, int b, void (*sum)(const int)) { int result = a + b; sum(result); } #pragma managed void MyInterop::ManagedCppLib::MyManagedClass::DoSomething() { System::Console::WriteLine("hello from managed C++"); UnmanagedMethod(3, 7, /* ANY IDEA??? */); } I tried creating my managed delegate and then I tried to use Marshal::GetFunctionPointerForDelegate method, but I couldn't compile.

    Read the article

  • Drupal node reference

    - by Nikunj Kotecha
    I am using two content types - test_parent & test_child In test_child there are two fields, both of type datetime And in test_parent there are two fields, week_no & 7 node references I am using node_save to save a new node. After saving a node of parent type, and then saving the node of child type, i want to update the node it into the parent type. I have completed creation of both nodes from code, and also i am able to update nid in parent type from code. The problem is, the change in db is getting reflected in db but not on drupal node view. Even if i edit the node from drupal, it's showing -none- selected in node reference. Please help.

    Read the article

  • jQuery code to track clicks on outgoing links (google analystics)

    - by Tristan
    Hello, I found this on the web: $('a[href^=http]:not("[href*=://' + document.domain + ']")').click(function() { pageTracker._trackPageview('/outgoing/' + $(this).attr('href')); }); But it's not working. In my Google Analytics account there are no /outgoing/ links showing (it's been 24+ hours since I implemented it). What's wrong with this code? I'm using jQuery of course ;) (PS : i already have : <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA MY CODE"); pageTracker._trackPageview(); } catch(err) {}</script>)

    Read the article

  • code deployment options

    - by bobinabottle
    We've been looking at automating our server and code deployments. We've already decided on puppet for our server configurations, but are looking for a more "push" style tool to use for code deployments. I'm currently looking at either using capistrano or fabric, but I'm not sure what would be the most mature to use? We deploy a number of different services, none of which are currenlty written in rails or django, so we don't mind about language. What would be the best one to build custom deployment scripts? Or have I missed another tool out there? We are also considering git pushing with hooks for deployment, but feel it will be limited/hacky in what we want to achieve with it. Any thoughts or experience would be great to hear. Cheers

    Read the article

  • get_called_class hack not working with eval-code.

    - by Ekampp
    Hi there. I am using a ge_called_class hack for allowing late static binding in php version 5.2 (found here). I have the following in my code: # db_record.php $ac = "ForumThread"; $objects = $ac::find("all"); This will not work in php 5.2 for some reason, so I have done this: # db_record.php $ac = "ForumThread"; eval("\$objects = {$ac}::find('all');"); This on the other hand will not work with the get_called_class function. I get an error that the file function can't read the evaled section of code. So how do I solve this problem? Best regards.

    Read the article

  • Good File Organization Suggestions for Developer

    - by Paul
    I am struggling a little with folder organization to organize the many projects that I work on. I work on OS X - right now I am using ~/Development/ as the root folder, and I have many types of projects. For example, I have my iPhone apps under ~/Development/Xcode I develop in many languages, from PHP, to Ruby, to Python, to Objective-C. So, for example, I might have a couple of open-source apps based on PHP where I am using the Zend framework. Some of these projects are for clients, others are tests/experiments when learning a new language or general experimenting. I am really interested in how other developers have organized code/projects and could pass along some advice to make it very easy to navigate through code/projects related to many languages and types of projects.

    Read the article

  • How do I generate (ActionSctipt) classes for a new project?

    - by Iain
    Whenever I start a new game, I make a whole bunch of classes that extend my base classes, so: com.blah.Game extends com.iainlobb.Game and has some setup code com.blah.Player extends com.iainlobb.Player, and has some setup code etc Now all I need is a way to generate these classes at the start of the project so I don't have to create each one manually. It will save me at least an hour of faffing around per game. So how do I do it? I normally use FlashDevelop but I also have FlexBuilder 3, or I'm happy to download whatever other software I need (PC). Thanks.

    Read the article

  • Porting C++-code from Windows to Unix: systemcalls colliding with name of functions

    - by marvin2k
    Hi I'm porting some crufty C++ Windows-code to Linux, which uses functions called "open" and "close" inside every class... Very bad style, or? Luckily that wasn't a problem in windows, since their systemcalls are named different. When I try to call the systemcalls open() or close() I'm getting some compiler error about "no matching function for call for class:open()". I can't rename all our functions named "class::open" and "class::close" in the whole code, and I have to use open() and close() since I'm working with serial ports. So my question is: How can I tell the compiler, which open I mean? How can I escape or hide the namespace of a class in C++?

    Read the article

  • Good code visualization / refactoring tools for C++?

    - by Paul D.
    I've found myself coming across a lot of reasonably large, complicated codebases at work recently which I've been asked to either review or refactor or both. This can be extremely time consuming when the code is highly concurrent, makes heavy use of templates (particularly static polymorphism) and has logic that depends on callbacks/signals/condition variables/etc. Are there any good visualization tools for C++ period, and of those are there any that actually play well with "advanced" C++ features? Anything would probably be better than my approach now, which is basically pen+paper or stepping through the debugger. The debugger method can be good for following a particular code path, but isn't great for seeing the big picture you really need when doing serious refactoring. EDIT: I should mention that Visual Studio plugins aren't going to be a lot of help to me, since our stuff is mostly Linux-only.

    Read the article

  • How to bundle shell script and C code?

    - by eSKay
    I have a C shell script that calls two C programs - one after the another with some file handling before, in-between and afterwards. Now, as such I have three different files - one C shell script and 2 .c files. I need to give this script to other users. The problem is that I have to distribute three files - which the users must keep in the same folder and then execute the script. Is there some better way to do this? [I know I can make one C code file out of those two... but I will still be left with a shell script and a C code. Actually, the two C codes do entirely different things... so I want them to be separate]

    Read the article

  • Where to put WPF specific code when using MVVM

    - by Surfbutler
    I'm just getting up to speed on MVVM, but all the examples I've seen so far are binding View controls to simple non-WPF specific data types such as strings and ints. However in our app I want to be able to set a button's border brush based on a number in the Model. At the moment, I translate the number into a brush in the ViewModel to keep the View XAML only, but is that right? I don't like putting WPF specific code in the ViewModel, but equally I don't like the idea of putting code-behind on my View panel. Which is the best way? Thanks

    Read the article

  • Simple wrapping of C code with cython

    - by Jose
    Hi, I have a number of C functions, and I would like to call them from python. cython seems to be the way to go, but I can't really find an example of how exactly this is done. My C function looks like this: void calculate_daily ( char *db_name, int grid_id, int year, double *dtmp, double *dtmn, double *dtmx, double *dprec, double *ddtr, double *dayl, double *dpet, double *dpar ) ; All I want to do is to specify the first three parameters (a string and two integers), and recover 8 numpy arrays (or python lists. All the double arrays have N elements). My code assumes that the pointers are pointing to an already allocated chunk of memory. Also, the produced C code ought to link to some external libraries.

    Read the article

  • Code won't exit foreach block

    - by Matt
    I've got the following C# code segment that takes a list, finds objects that are ready to update, then shoves them into a temp list, deletes from the main list, and then goes on its merry way. My issue is that the foreach block, which cycles through my main list, won't exit. TempLog.Clear(); //Ensure TempLog is empty foreach (CLogger ready in PlayerLog) { if (ready.UpdateReady == true) // Record is ready to be updated in database { TempLog.Add(ready); // Add record to templog PlayerLog.Remove(ready); // Remove from playerlog } } <---- Never reaches this point if (TempLog.Count > 0) // Just check that templog isn't empty { new Thread(Update).Start(); // Run update code } I've put heaps of debugging in, and I can watch PlayerLog start at 1, TempLog at 0, then it enters the foreach loop, picks up that the record UpdateReady flag is on, TempLog goes to 1, PlayerLog goes to 0, then it just stops.. No errors, just stops.. Thanks for the help :)

    Read the article

  • How can this code be made more Pythonic?

    - by usethedeathstar
    This next part of code does exactly what I want it to do. dem_rows and dem_cols contain float values for a number of things i can identify in an image, but i need to get the nearest pixel for each of them, and than to make sure I only get the unique points, and no duplicates. The problem is that this code is ugly and as far as I get it, as unpythonic as it gets. If there would be a pure-numpy-solution (without for-loops) that would be even better. # next part is to make sure that we get the rounding done correctly, and than to get the integer part out of it # without the annoying floatingpoint-error, and without duplicates fielddic={} for i in range(len(dem_rows)): # here comes the ugly part: abusing the fact that i overwrite dictionary keys if I get duplicates fielddic[int(round(dem_rows[i]) + 0.1), int(round(dem_cols[i]) + 0.1)] = None # also very ugly: to make two arrays of integers out of the first and second part of the keys field_rows = numpy.zeros((len(fielddic.keys())), int) field_cols = numpy.zeros((len(fielddic.keys())), int) for i, (r, c) in enumerate(fielddic.keys()): field_rows[i] = r field_cols[i] = c

    Read the article

  • Appending html code to a section inside a dialog window isn't working in IE6

    - by user338413
    I'm using jQuery's validation on a form. When the form is validated, I'm using a submitHandler to fill a dialog with data from the form then I open the dialog to display it. Works great except for in IE6. Nothing displays. I've tried initializing the dialog before and after running the validation code but neither makes a difference. Here's the validation code: $("#acct").validate({ ... submitHandler: function() { fillVerificationDialog(); $("#verification_dialog").dialog('open'); return false; } }); Here's the fillVerificationDialog: function fillVerificationDialog() { $("#dialog-data").empty(); $("<span class='label'>").text("First Name: ").appendTo("#dialog-data"); $("<span class='value'>").text($("#firstname").val()).appendTo("#dialog-data"); $("<br/>").appendTo("#dialog-data"); ... }

    Read the article

  • switch statement with returns -- code correctness

    - by houbysoft
    Hi, let's say I have code in C with approximately this structure: switch (something) { case 0: return "blah"; break; case 1: case 4: return "foo"; break; case 2: case 3: return "bar"; break; default: return "foobar"; break; } Now obviously, the "break"s are not necessary for the code to run correctly, but it sort of looks like bad practice if I don't put them there to me. What do you think? Is it fine to remove them? Or would you keep them for increased "correctness"?

    Read the article

  • An old flaw in X Window System. How does it work?

    - by Legend
    I was going through an article today when it mentioned the following: "We've found many errors over the years. One of the absolute best was the following in the X Window System: if(getuid() != 0 && geteuid == 0) { ErrorF("Only root"); exit(1); } It allowed any local user to get root access. (The tautological check geteuid == 0 was intended to be geteuid() == 0. In its current form, it compress the address of geteuid to 0; given that the function exists, its address is never 0)." The article explained what was wrong with the code but I would like to know what it means to say that "It allowed any local user to get root access". I am not an expert in C but can someone give me an exact context in which this exploit would work? Specifically, what I mean is, lets say I am the local user, how would I get root access if we assume this code to be present somewhere?

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >