Daily Archives

Articles indexed Sunday June 1 2014

Page 11/14 | < Previous Page | 7 8 9 10 11 12 13 14  | Next Page >

  • How can I access user files on a disk moved from a Windows 7 machine to an XP machine?

    - by Fantius
    I moved the hard drive from one machine (Win 7) to another (XP) and now certain folders tell me "Access denied". I am logged in as an administrator. I had a different account on the other machine. Neither account authenticated to anything besides the local machine. The old machine is apparently dead, so I can't do anything in there like change permissions, etc. How can I access these files? Edit: After changing the ownerships of all the files and folders on the drive, I am getting a different error. And it is troubling me deeply. "xxx refers to a location that is unavailable. It could be on a hard drive on this computer, or on a network. Check to make sure that the disk is properly inserted, or that you are connected to the Internet or your network, and then try again. If it still cannot be located, the information might have been moved to a different location." No change after rebooting. Any ideas? Surely the files are still there, right?

    Read the article

  • Meaning of directories on Unix and Unix like systems

    - by Luke
    I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc stand for or var? Where does the opt name come from? And while we're on the topic anyway. Can someone give a clear explanation of what directory is best used for what. I sometimes get confused where certain software is installed or what the most appropriate directory is to install software into.

    Read the article

  • VBA - Instead of ActiveExplorer.Selection to set folder, explicitly set folder path

    - by Mike
    Sub MoveItems() Dim Messages As Selection Dim Msg As MailItem Dim NS As NameSpace Set NS = Application.GetNamespace("MAPI") Set Messages = ActiveExplorer.Selection If Messages.Count = 0 Then Exit Sub End If For Each Msg In Messages Msg.Move NS.Folders("Personal Folders").Folders("SavedMail") Next End Sub This code will move all email messages from the currently selected folder in outlook to another folder (SavedMail). I would like to edit the code so that instead of using the currently selected folder as the source for the messages, there would be a hard-coded folder - something like Set Messages = NS.Folders("Personal Folders").Folders("Moved"). I'm a VBA rookie and tried just replacing the Set Messages line with this which resulted in a Run-time error '13': Type mismatch which I think refers to a mismatch of the Dim Messages and the Set Messages commands. I've tried using different Dim definitions with no luck. I'm guessing that someone who knows VBA will see the way to do this right away. Any help would be greatly appreciated. Thanks.

    Read the article

  • Sync local files to S3 similar to Robocopy

    - by Yuck
    I am looking for a way to synchronize an entire local folder structure to Amazon S3, similar to how one might synchronize two folders using Robocopy. Whatever solution I come up with needs to be scheduled to run periodically from the Windows Task Scheduler. So anything that requires a GUI to perform the synchronization is not a viable solution. Standalone Windows .EXE command line utility for Amazon S3 & EC2 looked promising, but seems to have been abandoned and would not work when I tried to use it. Possibly a difference in the way that security is handled now compared to that software's most recent release.

    Read the article

  • How do I use a list of filenames to find a folder on my hard drive, that contains most matches of these filenames?

    - by Web Master
    I need a program that will use a list of file names to find a folder on my hard drive that contains the most of these filenames. Long story short I made a giant map. This map was live and got ruined. New map data files have been generated, and previous map data files have been altered. What does this mean? This means file sizes have been changed, and there will be new files that have never been in the backup folder. Some files map files could also have been generated in other projects. So there could be filenames on my computer not associated with this due to the way the files are named when created. So If I take an indidual file for example "r.-1.-1.mca" This file could show up on my hard drive 10 times. Anyway, the goal is to take 100 map files, turn them into a list, and then search the hard drive and find the folder that has the highest count of matching map file names. Can anyone figure out a way to do this? I am thinking about manually searching for every single file.

    Read the article

  • create video from jpg images using ffmpeg

    - by floppydisk
    I want to make short timelapse video using ffmpeg under ubuntu 12.04 LTS. I have a folder containing all images with names DSC_0000.jpg DSC_0001.jpg and so on. I found this question ffmpeg: create a video from images and I try to run the same command as mentioned there: ffmpeg -i DSC_%d.jpg -vcodec mpeg4 timelapse.avi and it fails with DSC_%d.jpg: No such file or directory I've also tried ffmpeg -i DSC_%04d.jpg -vcodec mpeg4 timelapse.avi and it fails with the same error And also for some reason my ffmpeg does not understand option -start_number, if I run ffmpeg -start_number 0 -i DSC_%d.jpg -vcodec mpeg4 timelapse.avi I get this error: Unrecognized option 'start_number' Failed to set value '0' for option 'start_number' I would appreciate any help

    Read the article

  • Drive still usable if Seatools reports errors?

    - by Rob
    I have a Seagate 3TB Expansion Desktop drive that was part of a Linux RAID 6 array that failed. I eventually did a zero fill both through Seagate DiscWizard and via Linux dd, neither reported errors. When I ran Seatools now, I got: Short DST - Started 5/31/2014 10:04:36 PM Short DST - Pass 5/31/2014 10:05:37 PM Long Generic - Started 5/31/2014 10:15:19 PM Bad LBA: 518242762 Not Repaired (whole bunch of bad LBAs ommited) Bad LBA: 518715255 Not Repaired Long Generic Aborted 6/1/2014 3:12:18 AM i.e. the short test passed, the long test failed. Unfortunately, the drive is out of warranty, so I can't just RMA it. But I hate tossing a drive that can still be used. So, my questions are: If the zero fill succeeded, and the short test passed, can I still use the whole drive? if not, since I'm using LVM on top of RAID, is there a way to tell either of these to just skip the bad area? If not the above, can I just create partitions before and after the part of the drive with the bad LBAs?

    Read the article

  • Can I grant permissions on files in windows 7 using a security identifier from another machine

    - by Thomas
    I have an external hard drive, and I wish to grant permissions on some files to users from 2 different computers without having to hook it up to the 2 different computers. I know the SID of the user on the other computer, I'd like to know if and how I can grant permissions to files using the SID. I'm running Windows 7 Professional 64 bits, and "The Other" computer Win 7 Home Premium 64 bits, they are not in a domain, but separate computers on a home network (not even same homegroup). Note: Duplicated question with: Is there a way to give NTFS file permissions to users from other Windows installations?

    Read the article

  • Hybrid HDD/SSD Volume Windows

    - by ccrama
    Is it possible to create a hybrid drive-like experience using an ssd and a hdd? In theory, frequently used files would be stored on the faster ssd, and larger/less used would be moved to the hdd. I know you can create shared volumes in windows, but the speed differences would create some issues I would assume, and it doesn't have drive preference for what gets stored on what drive. Any programs/info/advice would be great! Thanks! (PS. I saw this question, but it was asked three years ago and some solutions have probably changed)

    Read the article

  • SUBST for OSX? Error when trying to map local folder as network drive on Mac OSX 10.9

    - by Taylor Wright
    I would like to map a local folder as a drive (similar to Window's SUBST). One solution I found was to map a shared folder, but I get the following error when using a local folder: There was a problem connecting to the server “MyDrive.local”. This file server is available on your computer. Access the volumes and files locally. I was using this guide: Mapping Drives (Shared Folders) on Mac OS X

    Read the article

  • How can I split Excel data from one row into multiple rows

    - by Lenny
    Good afternoon, Is there a way to split data from one row and store to separate rows? I have a large file that contains scheduling information and I'm trying to develop a list that comprises each combination of course, day, term and period per line. For example I have a file similiar to this: Crs:Sn Title Tchr TchrName Room Days Terms Periods 7014:01 English I 678 JUNG 300 M,T,W,R,F 3,4 2,3 1034:02 English II 123 MOORE 352 M,T,W,R,F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M,T,W,R,F 3,4 3,4 0180:06 Pub Speaking 23 ROSEN 228 M,T,W,R,F 3,4 5 7200:03 PE I 244 HARILAOU GYM 4 M,T,W,R,F 1,2,3 3 2101:01 Physics/Lab 441 JONES 348 M,T,W,R,F 1,2,3,4 2,3 Should extract to this in an excel file: Crs:Sn Title Tchr# Tchr Room Days Terms Period 7014:01 English I 678 JUNG 300 M 3 2 7014:01 English I 678 JUNG 300 T 3 2 7014:01 English I 678 JUNG 300 W 3 2 7014:01 English I 678 JUNG 300 R 3 2 7014:01 English I 678 JUNG 300 F 3 2 7014:01 English I 678 JUNG 300 M 4 2 7014:01 English I 678 JUNG 300 T 4 2 7014:01 English I 678 JUNG 300 W 4 2 7014:01 English I 678 JUNG 300 R 4 2 7014:01 English I 678 JUNG 300 F 4 2 7014:01 English I 678 JUNG 300 M 3 3 7014:01 English I 678 JUNG 300 T 3 3 7014:01 English I 678 JUNG 300 W 3 3 7014:01 English I 678 JUNG 300 R 3 3 7014:01 English I 678 JUNG 300 F 3 3 7014:01 English I 678 JUNG 300 M 4 3 7014:01 English I 678 JUNG 300 T 4 3 7014:01 English I 678 JUNG 300 W 4 3 7014:01 English I 678 JUNG 300 R 4 3 7014:01 English I 678 JUNG 300 F 4 3 1034:02 English II 123 MOORE 352 M 3 4 1034:02 English II 123 MOORE 352 T 3 4 1034:02 English II 123 MOORE 352 W 3 4 1034:02 English II 123 MOORE 352 R 3 4 1034:02 English II 123 MOORE 352 F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M 3 3 7144:02 Algebra 238 VYSOTSKY 352 T 3 3 7144:02 Algebra 238 VYSOTSKY 352 W 3 3 7144:02 Algebra 238 VYSOTSKY 352 R 3 3 7144:02 Algebra 238 VYSOTSKY 352 F 3 3 7144:02 Algebra 238 VYSOTSKY 352 M 4 3 7144:02 Algebra 238 VYSOTSKY 352 T 4 3 7144:02 Algebra 238 VYSOTSKY 352 W 4 3 7144:02 Algebra 238 VYSOTSKY 352 R 4 3 7144:02 Algebra 238 VYSOTSKY 352 F 4 3 7144:02 Algebra 238 VYSOTSKY 352 M 3 4 7144:02 Algebra 238 VYSOTSKY 352 T 3 4 7144:02 Algebra 238 VYSOTSKY 352 W 3 4 7144:02 Algebra 238 VYSOTSKY 352 R 3 4 7144:02 Algebra 238 VYSOTSKY 352 F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M 4 4 7144:02 Algebra 238 VYSOTSKY 352 T 4 4 7144:02 Algebra 238 VYSOTSKY 352 W 4 4 7144:02 Algebra 238 VYSOTSKY 352 R 4 4 7144:02 Algebra 238 VYSOTSKY 352 F 4 4 0180:06 Pub Speaking 23 ROSEN 228 M 3 5 0180:06 Pub Speaking 23 ROSEN 228 T 3 5 0180:06 Pub Speaking 23 ROSEN 228 W 3 5 0180:06 Pub Speaking 23 ROSEN 228 R 3 5 0180:06 Pub Speaking 23 ROSEN 228 F 3 5 0180:06 Pub Speaking 23 ROSEN 228 M 4 5 0180:06 Pub Speaking 23 ROSEN 228 T 4 5 0180:06 Pub Speaking 23 ROSEN 228 W 4 5 0180:06 Pub Speaking 23 ROSEN 228 R 4 5 0180:06 Pub Speaking 23 ROSEN 228 F 4 5 7200:03 PE I 244 HARILAOU GYM 4 M 1 3 7200:03 PE I 244 HARILAOU GYM 4 M 2 3 7200:03 PE I 244 HARILAOU GYM 4 M 3 3 7200:03 PE I 244 HARILAOU GYM 4 T 1 3 7200:03 PE I 244 HARILAOU GYM 4 T 2 3 7200:03 PE I 244 HARILAOU GYM 4 T 3 3 7200:03 PE I 244 HARILAOU GYM 4 W 1 3 7200:03 PE I 244 HARILAOU GYM 4 W 2 3 7200:03 PE I 244 HARILAOU GYM 4 W 3 3 7200:03 PE I 244 HARILAOU GYM 4 R 1 3 7200:03 PE I 244 HARILAOU GYM 4 R 2 3 7200:03 PE I 244 HARILAOU GYM 4 R 3 3 7200:03 PE I 244 HARILAOU GYM 4 F 1 3 7200:03 PE I 244 HARILAOU GYM 4 F 2 3 7200:03 PE I 244 HARILAOU GYM 4 F 3 3 2101:01 Physics/Lab 441 JONES 348 M 1 2 2101:01 Physics/Lab 441 JONES 348 M 2 2 2101:01 Physics/Lab 441 JONES 348 M 3 2 2101:01 Physics/Lab 441 JONES 348 M 4 2 2101:01 Physics/Lab 441 JONES 348 T 1 2 2101:01 Physics/Lab 441 JONES 348 T 2 2 2101:01 Physics/Lab 441 JONES 348 T 3 2 2101:01 Physics/Lab 441 JONES 348 T 4 2 2101:01 Physics/Lab 441 JONES 348 W 1 2 2101:01 Physics/Lab 441 JONES 348 W 2 2 2101:01 Physics/Lab 441 JONES 348 W 3 2 2101:01 Physics/Lab 441 JONES 348 W 4 2 2101:01 Physics/Lab 441 JONES 348 R 1 2 2101:01 Physics/Lab 441 JONES 348 R 2 2 2101:01 Physics/Lab 441 JONES 348 R 3 2 2101:01 Physics/Lab 441 JONES 348 R 4 2 2101:01 Physics/Lab 441 JONES 348 F 1 2 2101:01 Physics/Lab 441 JONES 348 F 2 2 2101:01 Physics/Lab 441 JONES 348 F 3 2 2101:01 Physics/Lab 441 JONES 348 F 4 2 2101:01 Physics/Lab 441 JONES 348 M 1 3 2101:01 Physics/Lab 441 JONES 348 M 2 3 2101:01 Physics/Lab 441 JONES 348 M 3 3 2101:01 Physics/Lab 441 JONES 348 M 4 3 2101:01 Physics/Lab 441 JONES 348 T 1 3 2101:01 Physics/Lab 441 JONES 348 T 2 3 2101:01 Physics/Lab 441 JONES 348 T 3 3 2101:01 Physics/Lab 441 JONES 348 T 4 3 2101:01 Physics/Lab 441 JONES 348 W 1 3 2101:01 Physics/Lab 441 JONES 348 W 2 3 2101:01 Physics/Lab 441 JONES 348 W 3 3 2101:01 Physics/Lab 441 JONES 348 W 4 3 2101:01 Physics/Lab 441 JONES 348 R 1 3 2101:01 Physics/Lab 441 JONES 348 R 2 3 2101:01 Physics/Lab 441 JONES 348 R 3 3 2101:01 Physics/Lab 441 JONES 348 R 4 3 2101:01 Physics/Lab 441 JONES 348 F 1 3 2101:01 Physics/Lab 441 JONES 348 F 2 3 2101:01 Physics/Lab 441 JONES 348 F 3 3 2101:01 Physics/Lab 441 JONES 348 F 4 3 I'm trying to avoid going line by line separating the data. I'm not well versed on the VBA functionality of Excel, but would like to get started using it. Any help would be greatly appreciated.

    Read the article

  • Add shortcuts to (Windows + X) context menu

    - by KasiyA
    I want to add services.msc into Win+X context menu in windows 8 (x64). I know similar question is in here but it's not good with using Win+X Editor, because it doesn't add Underlined key for shortcuts that added with that and it's not good without having quickly underlined key. I want do that for maually Context menu folder is: C:\Users\User_Name\AppData\Local\Microsoft\Windows\WinX And hide desktop.ini files is as bellows (in ...\WinX\group2\desktop.ini) [LocalizedFileNames] 1 - Run.lnk=@%SystemRoot%\system32\shell32.dll,-12710 4 - Control Panel.lnk=@%SystemRoot%\system32\shell32.dll,-4161 5 - Task Manager.lnk=@%SystemRoot%\system32\authui.dll,-12139 3 - Windows Explorer.lnk=@%SystemRoot%\system32\shell32.dll,-22067 2 - Search.lnk=@%SystemRoot%\system32\shell32.dll,-30517 I copied sevices.msc shortcut into above path in group2 folder and add this line 6 - Sevices.lnk=@%SystemRoot%\system32\sevices.msc,????? in desktop.ini file. First Question: I don't know If this line 6 - Sevices.lnk=@%SystemRoot%\system32\sevices.msc,-????? that I added is correct or not? Also I don't know what to use instead of -????? Last Question: Why desktop.ini contents is not Sorted. I triyed to manually sort them but when I restart Explorer again it was become out of order.Why?

    Read the article

  • Clean thermal paste from touch contact points on the underside of the CPU

    - by Karolinger
    I bought an used CPU (Intel "Core 2" E4700) on eBay and it came with the underside dirty with something that seems it´s thermal paste. Before I send it back, I wonder if it could it still work without cleaning this dirt because the seller supposedly "tested" it to be fully working. Final, is there a way to clean this dirt without damaging the CPU? Or, is it too risky (or too much work) to do so? This is the CPU:

    Read the article

  • Creating a USB stick for installing centos 6.x using DVD1 and DVD2 iso files

    - by user250563
    First, we create 2 partitions on the USB stick that is let's say 16GB. first partition is let's say only 1GB and the second partition is the rest of what is available. after we "w" write the changes, the USB now has 2 partitions. 1 is 1GB 1 is more than 14GB so , we have... sdb1 and sdb2 now. now we need to turn these partitions into filesystems some say i should run these commands after those procedures. mkfs.vfat -F 32 /dev/sdb1 mkfs.ext3 /dev/sdb2 but some web pages recommend using: mkfs.vfat -n BOOT /dev/sdb1 mkfs.ext2 -m 0 -b 4096 -L DATA /dev/sdb2 which is it? so let's say the DVDs are called: CentOS-6.4-x86_64-bin-DVD1.iso CentOS-6.4-x86_64-bin-DVD2.iso so we make a directory: mkdir -p /mnt/dvd1 and then mount it: mount -o loop CentOS-6.4-x86_64-bin-DVD1.iso /mnt/dvd1 and i suppose we don't make a directory for dvd2 and we don't have to mount it ? at this point i do not know what should be done. but i think this step might be next: we make the USB bootable by finding the file named mbr.bin and then moving it to there via these commnad. dd conv=notrunc bs=440 count=1 if=/usr/lib/syslinux/mbr.bin of=/dev/sdb parted /dev/sdb set 1 boot on in other words we are "dd-ing it to 'sdb' not sdb1' or 'sdb2'. and then we use parted to set the boot to on for sdb so far everything looks good? here is the confusing parts.. how exactly do i move these iso files to the usb drive? EVERYTHING BELOW IS A GUESS. so at this point i should copy the folder /mnt/dvd1/isolinux to usb's sdb1 or sdb2 ? rename it to syslinux ? and then inside this syslinux folder there will be a file called... isolinux.cfg ? which should be renamed to syslinux.cfg ? and then copy the contents of /mnt/dvd1/images/* to USB's sdb2 ? but i think i am also suppose to copy and paste the both CentOS-6.4-x86_64-bin-DVD1.iso CentOS-6.4-x86_64-bin-DVD2.iso somewhere into this USB's sdb2 partition, correct ? almost like a drag and drop kind of a thing? or do they go into any folders ? centos' own web site has some instructions but those instructions do not work. http://wiki.centos.org/HowTos/InstallFromUSBkey i once got this working but things got ruined, i have to do it again and this time take notes.

    Read the article

  • Anywhere Access with Windows Server 2012 Essentials

    - by Zman771
    I have Windows Server 2012 Essentials and I'm trying to set up Anywhere Access so I can remotely access files.  This feature was really easy to access in Windows Home Server and I'm trying to duplicate that functionality here.   I've tried going through the Anywhere Access wizard several times but I can't get past the SSL Certificates step.  I don't want to purchase a certificate; is there any other way to enable remote file access?

    Read the article

  • Joining H264 *without* re-encoding

    - by jdmuys
    I have two halves of a single show in two .MP4 files, encoded in H264. I would like to join them without re-encoding. Is this possible? I managed to create a joined video as a Quicktime file (.mov) using Quicktime Pro, but then Quicktime Pro will not convert it back to .MP4 without re-encoding. This may be because looking inside the .mov file, the two H264 videos are in there still separated as individual "objects". I am also struggling with MPEG StreamClip without reaching a real solution. But I may have missed something. Note that I do not have the same issue with MPEG2 files. I can export them to a .MPEG container or a .TS file for example, and then I can join them without re-encoding using MPEG Streamclip. Any suggestion welcome, preferably using Mac software.

    Read the article

  • Good Bye FY'14

    - by rajeshr
    As we welcome Fiscal Year 2015 at Oracle, looking forward to an exciting times ahead, let me take a moment to reflect on the last few laps of the FY'14. No better way to do that putting up pictures that speaks thousand words. A huge batch who attended back to back programs on Solaris 11 Network Administration, Solaris ZFS Administration, Solaris Zone Administration (19 - 30 May 2014) at Hyderabad. Transition to Solaris 11 session (5-9 May 2014) at Hyderabad. Exadata Install & Maintenance session (28 April - 2 May 2014) at Singapore.

    Read the article

  • how embed a video on EaselJS [on hold]

    - by user3697195
    i try to make a videoplayer with EaselJS and the console dont says about it this is my HTML http://pastebin.com/djY4cpyX this is my Javascript function init() { var stage = new createjs.Stage('gameCanvas');; video = document.createElement('video'); video.setAttribute('webkit-playsinline'); video.src = 'js/bitmap/trailer.mp4'; var Video = new createjs.Bitmap(video); stage.addChild(Video); createjs.Ticker.addEventListener(stage); createjs.Ticker.setFPS(24); stage.update(); }

    Read the article

  • Would having an undergraduate certificate in Computer Science help me get employed as a computer programmer? [on hold]

    - by JDneverSleeps
    I am wondering how would employers perceive the Universtiy Certificate in Computing and Information Systems offered by Athabasca University (a distance education institution... The university is legit and accredited by the Government of Alberta, Canada). I already have a BSc in Statistics from University of Alberta (a classic brick and mortar public university in Alberta, Canada)...so I can state in my resume that I have a "university degree"..... Luckily, I was able to secure a very good employment in my field after the graduation from the U of A. The main reason why I am interested in taking the certificate program through Athabasca is because knowing how to program can increase the chance for promotion in my current job. I also believe that if something turns out bad in my current job and if I ever need to look for a new place to work, having the certificate in computer science will help me get employed as a computer programmer (i.e. my choice for the new job wouldn't be restricted to the field of Statistics). Athabasca University is claiming that the certificate program is meant to be equivalent to the undergraduate minor in computing science. I carefully looked at the certificate's curriculum and as far as I am concerned, the certificate program does have the same level of rigour as the undergraduate minor in Computer Science programs offered by other Canadian universities. I am also confident that the certificate program will get me to pick up enough skills/background to start a career as a computer programmer. The reasons why I am not 100% sure on getting the certificate is worth the tuition are: Athabasca University is a distance education institution (accredited by government but still) The credential that I will receive is "university certificate", not a "undergraduate degree" Do you think it's a good idea for me to pursue the certificate, given the two facts above? again, I already have my Bachelor's degree - although it is not in CS Thanks,

    Read the article

  • mocha testing for the lazies, single key-press for all possible tests

    - by laggingreflex
    I have a batch file that lists all the test files I have and asks me which test I want to perform, like Test. [U]nit, [I]ntegration : i (user input) Integration. [A]ll, [2][U]serInteraction, [3][R]esultGeneration : u 2 User Interaction. Running "mocha integration\2userint.js" ... So essentially I have configured a batch "option" for each test file I have, which I can choose to run individually or all together. But adding and removing tests is a pain. Is there something that does this or anything like this automatically? Like reads all the files and asks me which file(s) I want to test. A GUI with checkboxes would be ultimate! but I'll take anything. I'm working in node.js

    Read the article

  • Creating an object that is ready to be used & unset properties - with IoC

    - by GetFuzzy
    I have a question regarding the specifics of object creation and the usage of properties. A best practice is to put all the properties into a state such that the object is useful when its created. Object constructors help ensure that required dependencies are created. I've found myself following a pattern lately, and then questioning its appropriateness. The pattern looks like this... public class ThingProcesser { public List<Thing> CalculatedThings { get; set; } public ThingProcesser() { CalculatedThings = new List<Thing>(); } public double FindCertainThing() { CheckForException(); foreach (var thing in CalculatedThings) { //do some stuff with things... } } public double FindOtherThing() { CheckForException(); foreach (var thing in CalculatedThings) { //do some stuff with things... } } private void CheckForException() { if (CalculatedThings.Count < 2) throw new InvalidOperationException("Calculated things must have more than 2 items"); } } The list of items is not being changed, just looked through by the methods. There are several methods on the class, and to avoid having to pass the list of things to each function as a method parameter, I set it once on the class. While this works, does it violate the principle of least astonishment? Since starting to use IoC I find myself not sticking things into the constructor, to avoid having to use a factory pattern. For example, I can argue with myself and say well the ThingProcessor really needs a List to work, so the object should be constructed like this. public class ThingProcesser { public List<Thing> CalculatedThings { get; set; } public ThingProcesser(List<Thing> calculatedThings) { CalculatedThings = calculatedThings; } } However, if I did this, it would complicate things for IoC, and this scenario hardly seems appropriate for something like the factory pattern. So in summary, are there some good guidelines for when something should be part of the object state, vs. passed as a method parameter? When using IoC, is the factory pattern the best way to deal with objects that need created with state? If something has to be passed to multiple methods in a class, does that render it a good candidate to be part of the objects state?

    Read the article

  • Handling Types for Real and Complex Matrices in a BLAS Wrapper

    - by mga
    I come from a C background and I'm now learning OOP with C++. As an exercise (so please don't just say "this already exists"), I want to implement a wrapper for BLAS that will let the user write matrix algebra in an intuitive way (e.g. similar to MATLAB) e.g.: A = B*C*D.Inverse() + E.Transpose(); My problem is how to go about dealing with real (R) and complex (C) matrices, because of C++'s "curse" of letting you do the same thing in N different ways. I do have a clear idea of what it should look like to the user: s/he should be able to define the two separately, but operations would return a type depending on the types of the operands (R*R = R, C*C = C, R*C = C*R = C). Additionally R can be cast into C and vice versa (just by setting the imaginary parts to 0). I have considered the following options: As a real number is a special case of a complex number, inherit CMatrix from RMatrix. I quickly dismissed this as the two would have to return different types for the same getter function. Inherit RMatrix and CMatrix from Matrix. However, I can't really think of any common code that would go into Matrix (because of the different return types). Templates. Declare Matrix<T> and declare the getter function as T Get(int i, int j), and operator functions as Matrix *(Matrix RHS). Then specialize Matrix<double> and Matrix<complex>, and overload the functions. Then I couldn't really see what I would gain with templates, so why not just define RMatrix and CMatrix separately from each other, and then overload functions as necessary? Although this last option makes sense to me, there's an annoying voice inside my head saying this is not elegant, because the two are clearly related. Perhaps I'm missing an appropriate design pattern? So I guess what I'm looking for is either absolution for doing this, or advice on how to do better.

    Read the article

  • Where do all these Java technologies lead to? [on hold]

    - by user1502178
    For a new job, the HR gave me list of Java technologies to study: JSP/Servlet Ant, Maven Hibernate Spring Core, Spring MVC REST JMS Mongo, Cassandra Solr, Elastic Search I have never been a java guy, but I am ready to learn these, but I need to know where all these technologies lead to, are they worth doing? and how long will they approximately take if I have university level experience in programming and CS?

    Read the article

  • Making A Photo-Sharing App For Android In Eclipse [on hold]

    - by user3694394
    I've only just started developing mobile apps, which is something that I've been wanting to learn for a while now. I'm from an indie games studio, making PC games for around the last 3 years, and I finally decided to move into android app development. The only problem I'm having is that I don't know where to start. The project which I'm aiming to create will be something similar to Instagram, basically a photo-sharing app which allows users to take new photos, or pull them from their device, and add filters to them, before posting them. I have a rough idea of how I could go about doing this, but I need pointing towards any tutorials available for each specific step. So, here's my idea: Create a UI in eclipse (this wont be a problem for me, I should be able to do this fine through xml files) Setup a server-side database to store all user info and uploaded images (the images will need to be converted into byte arrays, and I have no idea how to do this through a database). My best idea would be to use a MySQL database to do this. Add user interactions (likes, favourites, reposts, etc.). This would, again, have to be stored in the database (or, at least, i think it would). Add the ability to take new photos using the phone's camera (I can probably do this anyway, using the Camera API). Add the ability to pull existing photos from the device (again, pretty simple to do). Add the ability to add filters to any photos (I had a look around, and there are some repos and resources which allow you to do this, but they're mainly for iOS development). Add facebook/twitter integration (possibly) to allow phots to be shared to other social networks. Create a news feed which shows users all of the latest photos from their friends, and allows them to post their own images to it. Give all registered users their own wall/page which has their latest posts/images displayed on it. Add the ability to allow users to follow other users, and display their followed users posts on their news feed. Yep. It's not going to be easy, and I don't even know if it's possible for me to do alone in Eclipse. However, this is the plan, and I'm going to do my best to learn everything I need to know to do this successfully. My actual question would be how should I start doing this- where do I begin learning how to do all of this? I've had a look at snapify, which can be edited via Parse, but I won't be spending hundreds of dollars (since I'm 15 and just don't have the available funds) on software. I have extensive knowledge of Java (again, I've been making games for around 3 years, mainly in Java), and various scripting languages. So, hopefully, this will be of some use here. Thanks in advance, Josh.

    Read the article

  • Example of persisting an inheritance relationship using ORM

    - by Schemer
    I have some experience with OOP and RDBs, but very little exposure to web programming. I am trying to understand what non-trivial types of problems are solved by ORM. Of course, I am familiar with the need for data persistence, but I have never encountered a need for persisting relationships between objects, a situation which is indicated in many online articles about ORM. I am not asking about the process of persisting a POJO to a database and restoring it later. Nor am I asking about why ORM frameworks are useful -- or a pain in the butt -- for doing so. I am particularly interested in how the need arises to persist and restore relationships between objects. In various documentation, I have seen many examples of persisting POJOs to a database, but the examples have all been for only very simple objects that are essentially nothing more than records anyway: a constructor, some private fields, and getter/setter methods. The motivation for persisting such an "object-record" seems obvious and trivial. This example: Hibernate ORM Tutorial offers such an example, but goes on to discuss mismatch issues of granularity, inheritance, identity, associations, and navigation that are not motivated by the example. If someone could offer a toy example of an instance where, say, the need arises to persist an inheritance relationship, I would be grateful. This might be blindingly obvious for anyone who has already encountered this situation but I have not and a great deal of searching and reading have not turned up any examples.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14  | Next Page >