Search Results

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

Page 89/3518 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • How do you organize your projects?

    - by Sergio
    Do you have any particular style of organizing projects? For example, currently I'm creating a project for a couple of schools here in Bolivia, this is how I organized it: TutoMentor (Solution) TutoMentor.UI (Winforms project) TutoMentor.Data (Class library project) How exactly do you organize your project? Do you have an example of something you organized and are proud of? Can you share a screenshot of the Solution pane? In the UI area of my application, I'm having trouble deciding on a good schema to organize different forms and where they belong. Edit: What about organizing different forms in the .UI project? Where/how should I group different form? Putting them all in root level of the project is a bad idea.

    Read the article

  • How to write PowerShell code part 2 (Using function)

    - by ybbest
    In the last post, I have showed you how to use external configuration file in your PowerShell script. In this post, I will show you how to create PowerShell function and call external PowerShell script.You can download the script here. 1. In the original script, I create the site directly using New-SPSite command. I will refactor it so that I will create a new function to create the site using New-SPSite. The PowerShell function is quite similar to a C# method. You put your function parameters in () and separate each parameter by a comma (,). Then you put your method body in {}. function add ([int] $num1 , [int] $num2){ $total=$num1+$num2 #Return $total $total } 2. The difference is you do not need semi-colon (;) at the end of each statement and when calling the method you do not need comma (,) to separate each parameter. function add ([int] $num1 , [int] $num2){ $total=$num1+$num2 #Return $total $total } #Calling the function [int] $num1=3 [int] $num2=4 $d= add $num1 $num2 Write-Host $d 3. If you like to return anything from the function, you just need to type in the object you like to return, not need to type return .e.g. $ObjectToReturn not return $ObjectToReturn

    Read the article

  • Perl script rendered in browser as code through symlink - fine when accessed directly

    - by John Dittmar
    I have a Rails 4 app that has some views that post to Perl cgi scripts. The perl scripts are accessed via a symbolic link to a folder called "cgi-bin". When I navigate to a perl script through the symbolic link they are rendered as text instead of executed (ie: localhost:3000/cgi-bin/test.cgi), however when I access them directly they execute without issue (ie. localhost/path/to/cgi-bin/test.cgi). I am using apache2 on os x. In the directory localhost/path/to/ I have an .htaccess file that contains the following: # General Apache options AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI I have the exact same lines in the .htaccess file that I have in localhost:3000/ I have also uncommented the AllowOverride all in httpd.conf. The are no errors in apache's error log. When I access the direct link to test.cgi a new line is appended to apache's access log, when I access the script through the symbolic link (and it is rendered as text), there is no line appended to the access log. Any idea why this error occurs? This setup worked fine in a previous version of rails of OS X, but recently I upgraded to Mavericks and figured I should update the Rails application to v4.0 as well.

    Read the article

  • Dealing with the node.js callback pyramid

    - by thecoop
    I've just started using node, and one thing I've quickly noticed is how quickly callbacks can build up to a silly level of indentation: doStuff(arg1, arg2, function(err, result) { doMoreStuff(arg3, arg4, function(err, result) { doEvenMoreStuff(arg5, arg6, function(err, result) { omgHowDidIGetHere(); }); }); }); The official style guide says to put each callback in a separate function, but that seems overly restrictive on the use of closures, and making a single object declared in the top level available several layers down, as the object has to be passed through all the intermediate callbacks. Is it ok to use function scope to help here? Put all the callback functions that need access to a global-ish object inside a function that declares that object, so it goes into a closure? function topLevelFunction(globalishObject, callback) { function doMoreStuffImpl(err, result) { doMoreStuff(arg5, arg6, function(err, result) { callback(null, globalishObject); }); } doStuff(arg1, arg2, doMoreStuffImpl); } and so on for several more layers... Or are there frameworks etc to help reduce the levels of indentation without declaring a named function for every single callback? How do you deal with the callback pyramid?

    Read the article

  • SQL Profiler Through StreamInsight Sample Solution

    In this postI show how you can use StreamInsight to take events coming from SQL Server Profiler in real-time and do some analytics whilst the data is in flight.  Here is the solution for that post.  The download contains Project that reads events from a previously recorded trace file Project that starts a trace and captures events in real-time from a custom trace definition file (Included) It is a very simple solution and could be extended.  Whilst this example traces against SQL Server it would be trivial to change this so it profiles events in Analysis Services.       Enjoy.

    Read the article

  • Encrypt shared files on AD Domain.

    - by Walter
    Can I encrypt shared files on windows server and allow only authenticated domain users have access to these files? The scenario as follows: I have a software development company, and I would like to protect my source code from being copied by my programmers. One problem is that some programmers use their own laptops to developing the company's software. In this scenario it's impossible to prevent developers from copying the source code for their laptops. In this case I thought about the following solution, but i don't know if it's possible to implement. The idea is to encrypt the source code and they are accessible (decrypted) only when developers are logged into the AD domain, ie if they are not logged into the AD domain, the source code would be encrypted be useless. How can be implemented this using EFS?

    Read the article

  • Need suggestions on how to create a website with an encrypted database.

    - by SFx
    Hi guys, I want to create a website where a user enters content (say a couple of sentences) which eventually gets stored in a backend database (maybe MySQL). But before the content leaves the client side, I want it to get encrypted using something on client like maybe javascript. The data will travel over the web encrypted, but more importantly, will also be permanently stored in the backend database encrypted. Is JavaScript appropriate to use for this? Would 256 bit encryption take too long? Also, how do you query an encrypted database later on if you want to pull down the content that a user may have submitted over the past 2 months? I'm looking for tips, suggestions and any pointers you guys may have in how to go about learning about and accomplishing this. Thanks!

    Read the article

  • Which are the most frequent exceptions thrown in Java applications? [on hold]

    - by Chris
    1. Do you know of any statistics about the frequency of exceptions (checked and unchecked) thrown at runtime in typical Java applications? for example: NullPointerException: 25% of all exceptions ClassCastException: 15% of all exceptions etc. 2. Which are the most frequent exceptions according to your own experiences? 3. Would you agree that the NullPointerException is generally the most often thrown exception? I am asking this question in the context of the compiler development of the PPL programming language (www.practical-programming.org). The goal is to auto-detect a maximum of frequent exceptions at compile-time. For example, detecting all potential NullPointerExceptions at compile-time leads to null-safe software which is more reliable.

    Read the article

  • PhillyNJ Presentation and Code Files on Windows Service Design

    - by RonGarlit
    Thanks to everyone who braved the bad weather for the PhillyNJ meeting tonight. I’ve posted the files on my SKYDRIVE at the folder on this link. https://skydrive.live.com/redir.aspx?cid=79d1d19d50ff06b6&resid=79D1D19D50FF06B6!1069&parid=79D1D19D50FF06B6!106 I hope everyone found something useful from tonight presentation given that a good portion of it is one of the more boring (yet interesting) subjects.   Have Fun! The Ron

    Read the article

  • Does anyone do hardware benchmarks on compiling code?

    - by Colen
    I've seen a bunch of sites that benchmark new hardware on gaming performance, zipping some files, encoding a movie, or whatever. Are there any that test the impact of new hardware (like SSDs, new CPUs, RAM speeds, or whatever) on compile and link speeds, either linux or windows? It'd be really good to find out what mattered the most for compile speed and be able to focus on that, instead of just extrapolating from other benchmarks.

    Read the article

  • What do you think about RefactoringManifesto.org?

    - by Gan
    Quite some time ago, on December 19 2010, a site called RefactoringManifesto.org was launched. The site is to voice concerns about refactoring. It lists ten main points as shown below (head over the website to see more details): Make your products live longer! Design should be simple so that it is easy to refactor. Refactoring is not rewriting. What doesn't kill it makes it stronger. Refactoring is a creative challenge. Refactoring survives fashion. To refactor is to discover. Refactoring is about independence. You can refactor anything, even total crap. Refactor – even in bad times! What do you think about this? Would you sign the manifesto? If not, why?

    Read the article

  • What significant progress have we made in Rapid Application Development?

    - by Frank Computer
    Since the introduction of OOPL's and event-driven programming, I feel like developing an application has become harder and more tedious, when it should have been the other way around! We should have development tools which can generate prototype apps which can be quickly and easily customized into sophisticated applications, even by novice users! We really need new ideas in this area of software development and I would like to know of any good ideas. If we can't really find them, then we should ask "Where did we miss the boat?.. Why?.. and What should we be doing?"

    Read the article

  • How to camel-case where consecutive words have numbers?

    - by Rob I
    Just wondering if anybody has a good convention to follow in this corner-corner-corner case. I really use Java but figured the C# folks might have some good insight too. Say I am trying to name a class where two consecutive words in the class name are numeric (note that the same question could asked about identifier names). Can't get a great example, but think of something like "IEEE 802 16 bit value". Combining consecutive acronyms is doable if you accept classnames such as HttpUrlConnection. But it seriously makes me throw up a little to think of naming the class IEEE80216BitValue. If I had to pick, I'd say that's even worse than IEEE802_16BitValue which looks like a bad mistake. For small numbers, I'd consider IEEE802SixteenBitValue but that doesn't scale that well. Anyone out there have a convention? Seems like Microsoft's naming guidelines are the only ones that describe acronym naming in enough detail to get the job done, but nobody has addressed numbers in classnames.

    Read the article

  • CommunityEngine + TinyMCE + Safari or Chrome + My server sometimes generate corrupted code

    - by user31362
    Hello All, I'm using Community engine. It is really a great job But I encountered a strange phenomenon I couldn't solve it. This problem happens only when I open any page contains tinymce by using safari or chrome browsers. It shows me a corrupted code and the page is damaged. kindly check the following photo: http://img190.imageshack.us/img190/5880/screenshot20100111at115.png notice "Delete this user" link then check the source code. There is a weird code injecting itself in the original code. The weird code is tinymce thing: <script type="text/javascript" src="http://ce.mysite.net/plugin_assets/ community_engine/javascripts/tiny_mce/themes/advanced/langs/en.js? 1260693864"></script> <script type="text/javascript" src="http://ce.mysite.net/plugin_assets/ community_engine/javascripts/tiny_mce/plugins/curblyadvimage/langs/ en.js?1260693864"></script> it injected between onclick=" and if (confirm.... I deployed CE on my laptop and my server. I didn't see this problem locally but sometimes (not always) this problem appears on my server. I'm sure that I installed all required gems on the server This bug is annoyed me and I wish to help me. Thanks

    Read the article

  • Is having 'Util' classes a cause for concern? [closed]

    - by Matt Fenwick
    I sometimes create 'Util' classes which primarily serve to hold methods and values that don't really seem to belong elsewhere. But every time I create one of these classes, I think "uh-oh, I'm gonna regret this later ...", because I read somewhere that it's bad. But on the other hand, there seem to be two compelling (at least for me) cases for them: implementation secrets that are used in multiple classes within a package providing useful functionality to augment a class, without cluttering its interface Am I on the way to destruction? What you say !! Should I refactor?

    Read the article

  • Code execution time out occationally

    - by Athul k Surendran
    I am working on an e-commerce website. There is a case where I need to fetch the whole data in database through third-party API and send it to an indexing engine. This third-party API has many functions like getproducts, getproductprice, etc., and each of that functions will return the data in XML format. From there I will take charge, I will use various API calls and will handle the XML data with XSLT. And will write to a CSV file. This file will be uploaded to an Indexing engine. Right now I have details of 8000 products to feed the engine, and almost all time the this process takes about 15 min to complete, and sometimes fails. I can't find a better solution for this. I am thinking about handling the XML data in C# itself and get rid of XSLT. As I think, XSLT is far slower than C#. Is it a good Idea? Or what else I can do to solve this issue?

    Read the article

  • Toutes les semaines un peu de code pour aller plus loin avec Windows 7, Windows API Code Pack

    En cette fin d'année, la communauté de Developpez.com s'est alliée avec Microsoft France pour relayer une série de questions / réponses sur le développement Windows 7. A partir d'aujourd'hui, nous poserons une question chaque lundi sur une fonctionnalité propre au développement d'applications Windows 7. La bonne réponse de la question de la semaine sera ensuite dévoilée la semaine suivante avec un exemple de mise en pratique. Êtes-vous prêt à relever le défi ? Pensez-vous bien connaître les possibilités que proposent les API Windows 7 ? C'est ce que nous allons voir dès aujourd'hui, nous attendons vos propositions ! La réponse de la semaine : Quel est le nom de l'API .NET qui...

    Read the article

  • Configuring Site Policy in SharePoint 2013 using server code

    - by panjkov
    When you create Site Policy in SharePoint, you can configure its options using browser, which is particularly convenient when you have that policy configured for publishing in Content Type Hub. But, when you need to configure multiple sites with same policy, and you for any reason have to deploy multiple instances of same site policy, this browser-based editing process is not something that you would want to use. In that case, some way of configuring policy options automatically would be helpful...(read more)

    Read the article

  • Dealing with the node callback pyramid

    - by thecoop
    I've just started using node, and one thing I've quickly noticed is how quickly callbacks can build up to a silly level of indentation: doStuff(arg1, arg2, function(err, result) { doMoreStuff(arg3, arg4, function(err, result) { doEvenMoreStuff(arg5, arg6, function(err, result) { omgHowDidIGetHere(); }); }); }); The official style guide says to put each callback in a separate function, but that seems overly restrictive on the use of closures, and making a single object declared in the top level available several layers down, as the object has to be passed through all the intermediate callbacks. Is it ok to use function scope to help here? Put all the callback functions that need access to a global-ish object inside a function that declares that object, so it goes into a closure? function topLevelFunction(globalishObject, callback) { function doMoreStuffImpl(err, result) { doMoreStuff(arg5, arg6, function(err, result) { callback(null, globalishObject); }); } doStuff(arg1, arg2, doMoreStuffImpl); } and so on for several more layers... Or are there frameworks etc to help reduce the levels of indentation without declaring a named function for every single callback? How do you deal with the callback pyramid?

    Read the article

  • Looking for a code Plugin !!

    - by GrumpyOldDBA
    SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS( SELECT 1 FROM INFORMATION_SCHEMA . TABLES WHERE TABLE_SCHEMA = 'dbo' AND TABLE_NAME = 'MSPaymentForExtraction' ) BEGIN CREATE TABLE [dbo] . [MSPaymentForExtraction] ( [MSPaymentID] [int] NOT NULL IDENTITY ( 1 , 1 ) NOT FOR REPLICATION ) ON [PRIMARY] END GO...(read more)

    Read the article

  • What should NOT be included in comments? (opinion on a dictum by the inventor of Forth)

    - by AKE
    The often provocative Chuck Moore (inventor of the Forth language) gave the following advice (paraphrasing): "Use comments sparingly. Programs are self-documenting, with a modicum of help from mnemonics. Comments should say WHAT the program is doing, not HOW." My question: Should comments say WHY the program is doing what it is doing? Update: In addition to the answers below, these two provide additional insight. 1: Beginner's guide to writing comments? 2: http://programmers.stackexchange.com/a/98609/62203

    Read the article

  • jQuery 1.8 b1 est disponible, le code du framework est maintenant réparti dans différents modules

    jQuery 1.8 b1 est disponible jQuery est utilisé par 50 % des grands sites du web, mais les navigateurs et les appareils sur lesquels il fonctionne ont beaucoup changé depuis 6 ans. De même, la manière et les outils pour concevoir un site web se modifient rapidement. jQuery doit s'adapter en permanence à son environnement. Comme il en a été décidé lors de la sortie de la version 1.7, l'équipe de développement se pose maintenant en permanence les questions : « Cet ajout est-il indispensable ? Que peut-on supprimer ? » De nouvelles obsolescences ont été ajoutées à la liste des obsolescences annoncées à l'époque. Ces questions sont cruciales dans le domaine des appareils mobiles, jQuery doit mettre à la disposition du dé...

    Read the article

  • Access Control Service v2: Registering Web Identities in your Applications [code]

    - by Your DisplayName here!
    You can download the full solution here. The relevant parts in the sample are: Configuration I use the standard WIF configuration with passive redirect. This kicks automatically in, whenever authorization fails in the application (e.g. when the user tries to get to an area the requires authentication or needs registration). Checking and transforming incoming claims In the claims authentication manager we have to deal with two situations. Users that are authenticated but not registered, and registered (and authenticated) users. Registered users will have claims that come from the application domain, the claims of unregistered users come directly from ACS and get passed through. In both case a claim for the unique user identifier will be generated. The high level logic is as follows: public override IClaimsPrincipal Authenticate( string resourceName, IClaimsPrincipal incomingPrincipal) {     // do nothing if anonymous request     if (!incomingPrincipal.Identity.IsAuthenticated)     {         return base.Authenticate(resourceName, incomingPrincipal);     } string uniqueId = GetUniqueId(incomingPrincipal);     // check if user is registered     RegisterModel data;     if (Repository.TryGetRegisteredUser(uniqueId, out data))     {         return CreateRegisteredUserPrincipal(uniqueId, data);     }     // authenticated by ACS, but not registered     // create unique id claim     incomingPrincipal.Identities[0].Claims.Add( new Claim(Constants.ClaimTypes.Id, uniqueId));     return incomingPrincipal; } User Registration The registration page is handled by a controller with the [Authorize] attribute. That means you need to authenticate before you can register (crazy eh? ;). The controller then fetches some claims from the identity provider (if available) to pre-fill form fields. After successful registration, the user is stored in the local data store and a new session token gets issued. This effectively replaces the ACS claims with application defined claims without requiring the user to re-signin. Authorization All pages that should be only reachable by registered users check for a special application defined claim that only registered users have. You can nicely wrap that in a custom attribute in MVC: [RegisteredUsersOnly] public ActionResult Registered() {     return View(); } HTH

    Read the article

  • Is there a correlation between complexity and reachability?

    - by Saladin Akara
    I've been studying cyclomatic complexity (McCabe) and reachability of software at uni recently. Today my lecturer said that there's no correlation between the two metrics, but is this really the case? I'd think there would definitely be some correlation, as less complex programs (from the scant few we've looked at) seem to have 'better' results in terms of reachability. Does anyone know of any attempt to look at the two metrics together, and if not, what would be a good place to find data on both complexity and reachability for a large(ish) number of programs? (As clarification, this isn't a homework question. Also, if I've put this in the wrong place, let me know.)

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >