Search Results

Search found 94919 results on 3797 pages for 'new folder'.

Page 13/3797 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Switch or a Dictionary when assigning to new object

    - by KChaloux
    Recently, I've come to prefer mapping 1-1 relationships using Dictionaries instead of Switch statements. I find it to be a little faster to write and easier to mentally process. Unfortunately, when mapping to a new instance of an object, I don't want to define it like this: var fooDict = new Dictionary<int, IBigObject>() { { 0, new Foo() }, // Creates an instance of Foo { 1, new Bar() }, // Creates an instance of Bar { 2, new Baz() } // Creates an instance of Baz } var quux = fooDict[0]; // quux references Foo Given that construct, I've wasted CPU cycles and memory creating 3 objects, doing whatever their constructors might contain, and only ended up using one of them. I also believe that mapping other objects to fooDict[0] in this case will cause them to reference the same thing, rather than creating a new instance of Foo as intended. A solution would be to use a lambda instead: var fooDict = new Dictionary<int, Func<IBigObject>>() { { 0, () => new Foo() }, // Returns a new instance of Foo when invoked { 1, () => new Bar() }, // Ditto Bar { 2, () => new Baz() } // Ditto Baz } var quux = fooDict[0](); // equivalent to saying 'var quux = new Foo();' Is this getting to a point where it's too confusing? It's easy to miss that () on the end. Or is mapping to a function/expression a fairly common practice? The alternative would be to use a switch: IBigObject quux; switch(someInt) { case 0: quux = new Foo(); break; case 1: quux = new Bar(); break; case 2: quux = new Baz(); break; } Which invocation is more acceptable? Dictionary, for faster lookups and fewer keywords (case and break) Switch: More commonly found in code, doesn't require the use of a Func< object for indirection.

    Read the article

  • Hiring New IT Employees versus Promoting Internally for IT Positions

    Recently I was asked my opinion regarding the hiring of IT professionals in regards to the option of hiring new IT employees versus promoting internally for IT positions. After thinking a little more about this question regarding staffing, specifically pertaining to promoting internally verses new employees; I think my answer to this question is that it truly depends on the situation. However, in most cases I would side with promoting internally. The key factors in this decision should be based on a company/department’s current values, culture, attitude, and existing priorities.  For example if a company values retaining all of its hard earned business knowledge then they would tend to promote existing employees internal over hiring a new employee. Moreover, the company will have to pay to train an existing employee to learn a new technology and the learning curve for some technologies can be very steep. Conversely, if a company values new technologies and technical proficiency over business knowledge then a company would tend to hire new employees because they may already have experience with a technology that the company is planning on using. In this scenario, the company would have to take on the additional overhead of allowing a new employee to learn how the business operates prior to them being fully effective. To illustrate my points above let us look at contractor that builds in ground pools for example.  He has the option to hire employees that are very strong but use small shovels to dig, or employees weak in physical strength but use large shovels to dig. Which employee should the contractor use to dig a hole for a new in ground pool? If we compare the possible candidates for this job we will find that they are very similar to hiring someone internally verses a new hire. The first example represents the existing workers that are very strong regarding the understanding how the business operates and the reasons why in a specific manner. However this employee could be potentially weaker than an outsider pertaining to specific technologies and would need some time to build their technical prowess for a new position much like the strong worker upgrading their shovels in order to remove more dirt at once when digging. The other employee is very similar to hiring a new person that may already have the large shovel but will need to increase their strength in order to use the shovel properly and efficiently so that they can move a maximum amount of dirt in a minimal amount of time. This can be compared to new employ learning how a business operates before they can be fully functional and integrated in the company/department. Another key factor in this dilemma pertains to existing employee and their passion for their work, their ability to accept new responsibility when given, and the willingness to take on responsibilities when they see a need in the business. As much as possible should be considered in this decision down to the mood of the team, the quality of existing staff, learning cure for both technology and business, and the potential side effects of the existing staff.  In addition, there are many more consideration based on the current team/department/companies culture and mood. There are several factors that need to be considered when promoting an individual or hiring new blood for a team. They both can provide great benefits as well as create controversy to a group. Personally, staffing especially in the IT world is like building a large scale system in that all of the components and modules must fit together and preform as one cohesive system in the same way a team must come together using their individually acquired skills so that they can work as one team.  If a module is out of place or is nonexistent then the rest of the team will suffer until the all of its issues are addressed and resolved. Benefits of Promoting Internally Internal promotions give employees a reason to constantly upgrade their technology, business, and communication skills if they want to further their career Employees can control their own destiny based on personal desires Employee already knows how the business operates Companies can save money by promoting internally because the initial overhead of allowing new hires to learn how a company operates is very expensive Newly promoted employees can assist in training their replacements while transitioning to their new role within a company. Existing employees already have a proven track record in regards fitting in with the business culture; this is always an unknown with all new hires Benefits of a New Hire New employees can energize and excite existing employees New employees can bring new ideas and advancements in technology New employees can offer a different perspective on existing issues based on their past experience. As you can see the decision to promote an existing employee from within a company verses hiring a new person should be based on several factors that should ultimately place the business in the best possible situation for the immediate and long term future. How would you handle this situation? Would you hire a new employee or promote from within?

    Read the article

  • IIS 5 default website (Stopped) after new install on new box

    - by unknown (yahoo)
    We just got new boxes at work. Running Xp, IIs 5.1 (yeah I know corporate decision, not mine) when I go look at inetmgr (iis) the default website it stopped. if restarted, I get an error that it didn't respond in a timely manor I ran netstat -an, and -o and saw nothing had port 80 open. cleared my event viewer, restarted iis and restarted iisadmin service (and theirby smtp) no errors in the event log. I ran aspnet_regiis -i jsut in case. Still no joy. I'm stumped. Can any think of anything else to try? Thanks, E-

    Read the article

  • new with exception with Microsoft

    - by wsd
    As I'm coding for both Windows and Linux, I have a whole host of problems. Microsoft Visual C++ has no stdint header, but for that I wrote my own. Now I found out that MS C++'s new operator does not throw an exception, so I want to fix this a quickly as possible. I know I can define a Macro with Parameters in Parenthesis, can I define a macro that replaces MyClass x = new MyClass(); with #ifdef MSC_VER if(!(MyClass x = new MyClass()) { throw new std::bad_alloc(); } #else MyClass x = new MyClass(); #endif (or something equivalent), AND works in BOTH MS C++ and G++ ? Or alternatively if that is not possible, a batch file to run over the Code to do this? I have become rather dependent on this exception being thrown.

    Read the article

  • Fetch new Mails (Also from Subfolders) from another IMAP server as new Mail in Postfix

    - by Tobi
    everyone. I have installed Postfix on a server with Aliases and Domains from a MySQL Database. It is configured to forward some adresses to other Mail Accounts and also delivers some mails in local mailboxes that will be queried over a dovecot imap server. For this example let there be two users: [email protected] what is a user that gets its mail just forwarded to let's say [email protected] [email protected] what is a user that accesses its mail from local IMAP. Now, I want to fetch some Mails from another mailserver and handle them as if they were sent to a user of my Mailserver. Lets say those corelations exist: [email protected] has two external accounts: [email protected] and [email protected] [email protected] has also one external account [email protected] The Problem is the new mails on that other Mailserver is not always in the inbox, it might be in subdirectories: mailinglists/all or mailinglists/it but also in mailinglists/some-other-department which is not interesting and should not be delivered. I already found a programm called fetchmail but I cannot find how to fetch subdirectories or decide which subdirectories are fetched.

    Read the article

  • unable to copy release folder to desktop using AppleScript

    - by Miraaj
    Hi all, I tried this script to copy release folder of one of my Xcode projects to desktop: tell application "Finder" set targetFolder to folder "release" of folder "build" of folder "8_15pm" of folder "26th_March" of folder "XYZ" of startup disk set destinationFolder to folder "Desktop" of folder "miraaj" of folder "Users" of startup disk copy targetFolder to destinationFolder end tell I was expecting that I will obtain a folder named as release on my desktop but I did not get any :( Can anyone suggest me where I am wrong or some better way to do this?? Thanks, Miraaj

    Read the article

  • Pack URI how to get contents of folder

    - by Konrad
    I have the following directory structure (all files as resources): Project \Maps +map.xml ... +something.xml To get to every file I use following syntax: "pack://application:,,,/Maps/map.xml" My question is - how to get contents of pack://application:,,,/Maps/ as FileInfo [] or List.

    Read the article

  • Open a new page on click of a link on new window

    - by Pankaj Khurana
    Hi, I have a page in which i have provided a link clicking on which should redirect to a new page on the new window. My code is <a href="javascript:void(0);" class="webMnu" onclick="window.open('http://proschoolonline.com/payments','plain');">Enroll</a> The problem is that it is working fine in firefox(opens in a new tab) but in internet explorer its opening in a popup (not in a new tab). How can i open this new page in new tab? Please help me on this. Thanks Pankaj

    Read the article

  • A resource for installation or setup folder hierarchy of various applications

    - by Luay
    Is there a web site (or something else) that has information on folders and their hierarchy where various programs and applications are installed? Please let me explain. I am writing an application that (part of what it does) references certain files installed by other application. To be able to determine the file paths for these folders I have to download and install each application seperatly on my development pc, search for the file I want, and then write its path in my application. This method is very time consuming and, frankly, boring, as it requires downloading and installing each application (some of them in excess of 600MB) and then locating the required file just to be able to "know" its path. So, I was wondering if there is something that could speed things up. like, for example, a website that would have such information. I tried each of the applications own website for information but no dice. Any help from you will be much appreciated. Many thanks

    Read the article

  • How to enable a symlink in this case

    - by Bragboy
    I cannot categorize this question under ubuntu since it has nothing to do with it. But I know people here can definitely answer this. I login to one of my deployment boxes using SSH (no ubuntu here). I am working in a tool called TeamCity which uses a folder called ".BuildServer" under home directory of the user. This folder may grow in size as the application runs but the current user is only given a limited amount of space. But the good thing this I got a folder access outside /home/deploy (deploy being the user here) folder. I now want to link this .BuildServer inside the /home/deploy directory to the other folder where I got permission for (meaning all the files should be re-routed to that directory) Hope my question was clear, please help.

    Read the article

  • Mount VMware Shared Folder to Ubuntu 12.04.3

    - by Chef Pharaoh
    I tried to create a shared folder to my Ubuntu 12.04.3 VM using VMware 5 from my Mac but I don't see the folder anywhere. I've tried to use some commands as suggested here and here, but nothing is still showing... I just get the error: Error: cannot canonicalize mount point: No such file or directory So I make the folder I'm trying to mount to or just try to mount directly to my home folder and get this error now: Error: cannot mount filesystem: No such device Any help is appreciated.

    Read the article

  • How do I zip up a folder but exclude the .git subfolder

    - by Tom
    I'm trying to create a zip file from a folder and I'd like to exclude the .git sub-folder from the resulting zip file. I have gone to the parent folder of the one I want to zip (called bitvolution) and I'm doing: zip -r bitvolution.zip bitvolution -x ".git" But it doesn't exclude the .git sub-folder. I've tried various combinations, -x .git*, -x \.git/*, -x .git/\*, -x \.git/\*. I've also tried using the full path for the exclude argument... but just didn't get there.

    Read the article

  • Forcing Zeitgeist to index Dropbox folder

    - by Jarmo
    I am running Ubuntu 11.10, and I would like to force Zeitgeist to index my Dropbox folder. I understand that Zeitgeist is a passive service that logs particular events (such as opening or downloading files) for later searches, but I have large Dropbox folder that was downloaded without being logged by Zeitgeist. Short of manually opening and closing all files in my Dropbox folder, is there a way to have Zeitgeist index this folder so that I can later search it using the dash? Thanks!

    Read the article

  • Desparately Need Help: After a mishap, a folder shows 0 files in it

    - by bobby
    I'm hoping some of you guys may be able to shed some light on this scenario: I had a odt document on which I was working from one of many files in a folder among many on an internal hard-drive. Some kind of glitch occured and the document crashed (this could have been some kind of power charge whilst another hard drive was being unmounted). As I looked into the folders surrounding the folder in which my odt document was stored, they start to show 0 files in them. I immediately switched off the PC and then re-started. Upon the re-start, the folders would show the 1,000s of files I've stored in them and then within 5 minutes, as I started to back them up, freeze, cut-off the process of transfer. When I tried to open anything on the internal hard-drive, be it an avi film, an mp3, a cbr or a word doc, they all showed blank or would work. Some folders had vastly less files showing. Eventually, things calmed down. I closed the PC, checked that the connections were in firmly, gave it a vacuum and restarted the PC. All the files eventually showed up and I started to back them up (which I'd brought a hard drive for anyway but been distracted and not done). All folders show except the one which contained the document I was working on at the time of the trouble. Strangely, it was one that should itself full on several occasions on restarts. It shows zero files now. Properties shows zero files and zero space taken by it. Yet when I drop a file into this folder by pasting it in, it disappears too. Opening the folder, there is nothing there. But if I paste that document again, the PC asks would I like to replace the existing file with the same name (that I can't see), when I click yes, the file appears. When I exit, the folder shows the 0 files in the folder. Going back into the folder, it has disappeared again. I'm hoping that someone can help give me tips to recover the files in the folder, it would be greatly, greatly appreciated. All other films, music, comics, documents show and are fine!

    Read the article

  • How do I access a shared folder using credentials other than the ones I logged in with?

    - by George Sealy
    I have a lab full of Windows 7 machines, and a shared login (user360) that all my students use. I also have a shared folder that they can all have read/write access to (for moving files around easily). My problem is that I also want to be able to create a shared folder for each student for submitting assignments. I can set up a shared folder with permissions for just a single user, and not the 'user360' account. The problem is, when I'm logged in as user360, and I try to open the 'StudentA', Windows never asks me for alternate credentials, it just refuses access because the user360 account is not allowed access. Can anyone suggest a fix for this?

    Read the article

  • Problems syncing photos and strange effects of uploaded files from other devices

    - by Daniel
    I have a Galaxy Spica (GT-i5700) Android v2.1, rooted with Leshak dev 7 #123. But never mind the root info, the problem would be the same unrooted. The photos from this phone is stored in "sdcard/images", nevertheless the phone also creates a "sdcard/DCIM" but only stores some thumbnails there. Problem nr 1: U1 only reads the DCIM-folder for automatic photo-upload. So photos stored in this phone is not uploaded. If I move photos to "DCIM" folder, U1 recognises the photos and start uploading them. Possible solution: Could there be an option in the settings, to set preferred photo folder? Problem nr 2: Out of 74 pictures, 12 did not get uploaded. Pressing "Retry failed transfers" in Settings does nothing. Pressing the files where status is "Upload failed, tap to retry" only changes the status to "Uploading..." but nothing gets uploaded. If I upload another file to U1, it is uploaded directly without any problem. It has nothing to do with file size, 1,1 MB files has been uploaded fine whilst some failed are 0,8 MB. Problem nr 3: The photos from DCIM are in my case uploaded to a folder called "Pictures - GT-I5700" in U1. If I log in to the homepage and from there upload another photo in "Pictures - GT-I5700", it shows up in U1 on my phone fine. But when I tap it, U1 downloads the photo to "sdcard/U1/Pictures - GT-I5700". If it sync photos from "sdcard/DCIM" to a specific folder, why not also download files to the same folder from which it is synced? After a while of usage, syncing and uploading files from different clients it would be a mishmash of folders and places files are stored and considering that I see no use of U1 at all. Another question: If my SD card in some way breaks down/some folders cannot be read/card temporarly changed and U1 is running, does U1 consider that as files deleted and also delete from the cloud?

    Read the article

  • How to Edit or Add a New Row in jqGrid

    - by Paul
    My jqGrid that does a great job of pulling data from my database, but I'm having trouble understanding how the Add New Row functionality works. Right now, I'm able to edit inline data, but I'm not able to create a new row using the Modal Box. I'm missing that extra logic that says, "If this is a new row, post this to the server side URL" instead of modifying existing data. (Right now, hitting Submit only clears the form and reloads the grid data.) The documentation states that Add New Row is: jQuery("#editgrid").jqGrid('editGridRow',"new",{height:280,reloadAfterSubmit:false}); but I'm not sure how to use that correctly. I've spent alot of time studying the Demos, but they seem to all use an external button to fire the new row command, rather than using the Modal Form, which I want to do. My complete code is here: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jqGrid</title> <link rel="stylesheet" type="text/css" media="screen" href="../css/ui-lightness/jquery-ui-1.7.2.custom.css" /> <link rel="stylesheet" type="text/css" media="screen" href="../css/ui.jqgrid.css" /> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script src="../js/i18n/grid.locale-en.js" type="text/javascript"></script> <script src="jquery.jqGrid.min.js" type="text/javascript"></script> </head> <body> <h2>My Grid Data</h2> <table id="list" class="scroll"></table> <div id="pager" class="scroll c1"></div> <script type="text/javascript"> var lastSelectedId; jQuery('#list').jqGrid({ url:'grid.php', datatype: 'json', mtype: 'POST', colNames:['ID','Name', 'Price', 'Promotion'], colModel:[ {name:'product_id',index:'product_id', width:25,editable:false}, {name:'name',index:'name', width:50,editable:true, edittype:'text',editoptions:{size:30,maxlength:50}}, {name:'price',index:'price', width:50, align:'right',formatter:'currency', editable:true}, {name:'on_promotion',index:'on_promotion', width:50, formatter:'checkbox',editable:true, edittype:'checkbox'}], rowNum:10, rowList:[5,10,20,30], pager: $('#pager'), sortname: 'product_id', viewrecords: true, sortorder: "desc", caption:"Database", width:500, height:150, onSelectRow: function(id){ if(id && id!==lastSelectedId){ $('#list').restoreRow(lastSelectedId); $('#list').editRow(id,true,null,onSaveSuccess); lastSelectedId=id; }}, editurl:'grid.php?action=save'}) .jqGrid('navGrid','#pager', {refreshicon: 'ui-icon-refresh',view:true}, {height:280,reloadAfterSubmit:true}, {height:280,reloadAfterSubmit:true}, {reloadAfterSubmit:true}) .jqGrid('editGridRow',"new",{height:280,reloadAfterSubmit:false}); function onSaveSuccess(xhr) {response = xhr.responseText; if(response == 1) return true; return false;} </script></body></html> If it makes it easier, I'd be willing to scrap the inline editing functionality and do editing and posting via modal boxes. Any help would be greatly appreciated.

    Read the article

  • Handling multiple sessions for same user credentials and avoiding new browser window opening in my w

    - by Kabeer
    Hello. I want to handle following scenarios in my new web application. If multiple users log into the application with same credentials, the application should deny access. Since I have out of process session store, I would be able to make out when this situation happens. So I can deny all requests after first successful attempt. This will however not work if the user instead of logging out of the application, closes the browser. The session will continue to reflect in the store for the period of timeout value. If a user attempts to open a new browser windows (Ctrl+N), the application should defeat this attempt. Every new page can potentially fiddle with cookies. I want to therefore deny the users the ability to open new window.

    Read the article

  • How to prevent a globally overridden "new" operator from being linked in from external library

    - by mprudhom
    In our iPhone XCode 3.2.1 project, we're linking in 2 external static C++ libraries, libBlue.a and libGreen.a. libBlue.a globally overrides the "new" operator for it's own memory management. However, when we build our project, libGreen.a winds up using libBlue's new operator, which results in a crash (presumably because libBlue.a is making assumptions about the kinds of structures being allocated). Both libBlue.a and libGreen.a are provided by 3rd parties, so we can't change any of their source code or build options. When we remove libBlue.a from the project, libGreen.a doesn't have any issues. However, no amount of shuffling the linking order of the libraries seems to fix the problem, nor does any experimentation with the various linking flags. Is there some way to tell XCode to tell the linker to "have libGreen's use of the new operator use the standard C++ new operator rather than the one redefined by libBlue"?

    Read the article

  • JBoss: Adding a New Binding for a New Service

    - by mlaverd
    Hello, Warning: I'm a J2EE newbie. I have a server application that receives TLS connections containing Protocol Buffers messages. I'd like to port it to J2EE to take advantage of all its powerful features. Is there a way to add a binding that would have TLS enabled and would speak to my piece of code for interpreting and handling the request's data? If so, how? Thanks in advance!

    Read the article

  • Reallocating memory via "new" in C++

    - by BSchlinker
    Quick question regarding memory management in C++ If I do the following operation: pointer = new char [strlen(someinput_input)+1]; And then perform it again, with perhaps a different result being returned from strlen(someinput_input). Does this result in memory being left allocated from the previous "new" statement? IE, is each new statement receiving another block of HEAP memory from the OS, or is it simply reallocating? Assuming I do a final delete pointer[]; will that deallocate any and all memory that I ever allocated via new to that pointer? Thanks

    Read the article

  • Pasting to Excel from Word - stop a Word new line being converted into a new cell

    - by Sean McRaghty
    So I have a table in MS Word which has two columns. In the second column the text is spread on multiple lines, ie I have pressed 'Enter' to achieve this. When I paste into Excel, it converts these separate lines into separate cells. What I want it to do is to keep the lines in the same cell, just on different lines, ie what would happen if I were to press Alt+Enter in a cell in excel. How would I go about this?

    Read the article

  • Opening a new screen from xml file text.

    - by Clozecall
    Hey all I'm looking to edit my app so that when a text within an xml file is selected, a new window opens. I've found various ways of making a new screen open via a class, but I need it done from a xml file. My program as a tablayout, and here is some of the stuff displayed within my first tab: <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> android:id="@+id/ScrollView01" android:layout_height="wrap_content" android:layout_width="fill_parent" <TextView android:textColor="#FFFFFF" android:text="First Header here" android:textStyle="bold" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:textColor="#FFFFFF" android:text="First body text here" android:layout_width="fill_parent" android:layout_height="wrap_content" /> So basically I need it so that when a text is selected, a new screen pops up. As said the reason this specifically has to be done in xml is because this is all apart of a tab layout, It would be great if the next within each tab could open a a new screen. Thanks.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >