Daily Archives

Articles indexed Monday March 29 2010

Page 21/123 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • What strategy do you use to sync your code when working from home

    - by Ben Daniel
    At my work I currently have my development environment inside a Virtual Machine. When I need to do work from home I copy my VM and any databases I need onto a laptop drive sized external USB drive. After about 10 minutes of copying I put the drive in my pocket and head home, copy back the VM and databases onto my personal computer and I'm ready to work. I follow the same steps to take the work back with me. So if I count the total amount of time I spend waiting around for files to finish copying in order for me to take work home and bring it back again, it comes to around 40 minutes! I do have a VPN connection to my work from home (providing the internet is up at both sites) and a decent internet speed (8mbits down/?up) but I find Remote Desktoping into my work machine laggy enough for me to want to work on my VM directly. So in looking at what other options I have or how I could improve my existing option I'm interested in what strategy you use or recommend to do work at home and keeping your code/environment in sync. EDIT: I'd prefer an option where I don't have to commit my changes into version control before I leave work - as I like to make meaningful descriptive comments in my commits, committing would take longer than just copying my VM onto a portable drive! lol Also I'd prefer a solution where my dev environment stays in sync too. Having said that I'm still very interested in your own solutions even if they don't exactly solve my problem as best as I'd like. :)

    Read the article

  • Ruby SerialPorts Gem

    - by Seth Archer
    Using Ruby SerialPorts Gem to interact with hardware. When I write a byte array to the hardware using a program called "Serial Port Monitor" the hardware responds correctly. However, when I write the same byte array using ruby it doesn't work unless I do a read request just before the write request. This device doesn't respond correctly with this sp = SerialPort.new(args) sp.write [200.chr, 30.chr, 6.chr, 5.chr, 1.chr, 2.chr, 0.chr, 244.chr] But it does if I add a read request before the write. Like this sp SerialPort.new(args) sp.read sp.write [200.chr, 30.chr, 6.chr, 5.chr, 1.chr, 2.chr, 0.chr, 244.chr] This works, but I'm at a loss as to why. I should also add that the first snippet does work occasionally maybe 1/10 of the time.

    Read the article

  • C# Get HTML Element Data with Post Back

    - by user303938
    One site would take data from the site var.C # PostBack method.But when the page's source code as submitted does not renewed.Object Can not Be Coming Referanced error.So I do post but the page refresh itself.This post has been displayed next to new data coming from the user how can I get? Thanks...

    Read the article

  • SSH from Windows hangs when using insert mode in vim on Dreamhost: Why?

    - by cletus
    I have SSH set up using Cygwin on Windows XP SP3 to Dreamhost. It works fine except that when I edit a file with vi and use insert mode (eg press 'i' and type in some stuff). I then try and hit escape and ZZ to save/exit and it hangs instead. My edits aren't saved and I have to kill the session (locally) and kill the vi process on Dreamhost. This is highly annoying. It's not reliable either. Sometimes it does work. Also, this happens with PuTTY too.

    Read the article

  • Database hidden in SQL Server

    - by Colin Desmond
    During an aborted TFS import (2008 into 2010), I have managed to "lose" a database in 2008. The database is not visible in Management Studio, but the SQL Server exe has a handle on the .mdf file (according to UnLocker), it says it cannot attach it because the file is in use and it cannot attach a copy of the file (created when SQL Server was stopped), as it says a DB of the same name is already attached. Given I am using the same TFS admin account I have always used and have always been able to see the database in, why is this database missing and, more importantly, how do I get it back again?

    Read the article

  • Corrupt Vista Account - With a twist

    - by oldSkool-Soldier
    I have a Windows Vista system whose profile seems to have been corrupted. Many solutions seem to indicate that you create another admin account, log in as that account, and delete the offending profile information for the account that is corrupted. Here's the twist: There are two accounts on this System - 1. Administrator Account 2. Standard Account. It's the Administrator Account which has become corrupted. If you attempted to do any user managment / attempt to create a new account under the 'Standard Account', UAC prompts for a user/pass. It has the admin account come up by default, and asking for a password (of which, there is none). When you click 'OK' - nothing happens (no doubt due to the fact that the account is corrupted, so it can't verify who or what is trying to allow the administrative privilage). Can anyone think of a way of fixing this account, or creating another administrator account to resolve this issue? Many thanks in advance.

    Read the article

  • Why is my connection to Playstation Network so unreliable? [closed]

    - by jammus
    Hello friends. I'm 28 and my girlfriend is 24. Our home internet connection is pretty reliable, it's almost always up and can get fairly high download speeds. However, my experience with the Playstation Network is pretty frustrating. I'm always getting kicked off or getting quite high latency. Are there any tips or tricks that you might help my on-line gaming run more smoothly? I'm using a wireless connection for the PS3, is this likely to affect things?

    Read the article

  • What virtualization solution should I try next, after hitting problems w/ VMWare Player in dual-netw

    - by Alex R
    I have been using VMWare Player 2.5 for a while (Ubuntu guest on Vista host, 32-bit). VMWare had worked great until now but then I hit a brick wall: Due to some reorganization of my home network, the host machine now has to use a wireless connection to reach the Internet, while the printer, fileserver, and other important stuff are attached to a local gigabit hub. I have tried several tricks, such as editing the .vmx file, changing settings in vmnetcfg, etc, but I'm still unable to get the virtual Ubuntu box to connect each of the two virtual NICs to different networks (I did get it to recognize two NICs, but both DHCP'd onto the gigabit LAN). So, I'm ready to dump vmware for something with a little more low-level control of network settings. Virtualization is such a crowded space, I could spend months evaluating every product out there. I'm hoping for a shortcut... Can anyone recommend the best VM for my situation described above? Thanks

    Read the article

  • Unix [Homework]: Get a list of /home/user/ directories in /etc/passwd

    - by KChaloux
    I'm very new to Unix, and currently taking a class learning the basics of the system and its commands. I'm looking for a single command line to list off all of the user home directories in alphabetical order from the /etc/passwd directory. This applies only to the home directories, and not the contents within them. There should be no duplicate entries. I've tried many permutations of commands such as the following: sort -d | find /etc/passwd /home/* -type -d | uniq | less I've tried using -path, -name, removing -type, using -prune, and changing the search pattern to things like /home/*/$, but haven't gotten good results once. At best I can get a list of my own directory (complete with every directory inside it, which is bad), and the directories of the other students on the server (without the contained directories, which is good). I just can't get it to display the /home/user directories and nothing else for my own account. Many thanks in advance.

    Read the article

  • Problem installing mod_jk on Ubuntu karmic apache httpd 2.2.12 and tomcat 6

    - by Deny Prasetyo
    I have a problem when configuring mod_jk on ubuntu i use apache httpd 2.2.12 and tomcat 6 I installed apache httpd and lib mod_jk from synaptic and use default configuration. Here my mod_jk.conf Load mod_jk module Update this path to match your modules location LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so Where to find workers.properties Update this path to match your conf directory location JkWorkersFile /etc/apache2/workers.properties Where to put jk logs Update this path to match your logs directory location JkLogFile /etc/apache2/logs/mod_jk.log Set the jk log level [debug/error/info] JkLogLevel info Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" Send everything for context /ws to worker ajp13 JkMount /themark ajp13 JkMount /themark/* ajp13 Send everything for context /jsp-examples to worker ajp13 JkMount /static ajp13 JkMount /static/* ajp13 Send everything for context /servelts-examples to worker ajp13 JkMount /servlets-examples ajp13 JkMount /servlets-examples/* ajp13 and this my workers.properties Define 1 real worker named ajp13 worker.list=ajp13 Set properties for worker named ajp13 to use ajp13 protocol, and run on port 8009 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 worker.ajp13.lbfactor=50 worker.ajp13.cachesize=10 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=300 when i start apache httpd and tomcat 6. it seem that mod_jk load successfully and tomcat 6 recognized the ajp connector. here my tomcat 6 log INFO: Starting Coyote HTTP/1.1 on http-8080 Mar 29, 2010 11:48:34 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Mar 29, 2010 11:48:34 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/16 config=null here my mod_jk.log [Mon Mar 29 11:06:53 2010][6688:3499775792] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized [Mon Mar 29 11:16:59 2010][18277:1983043376] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized [Mon Mar 29 11:16:59 2010][18278:1983043376] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized but when i access http://localhost/themark it won't work. it seems that apache httpd can load the mod_jk module but it can listen the ajp. is there somebody ever had same problem? nb: i use the same config in windows using xampplite and it works well

    Read the article

  • Scheme Formatting Help

    - by Logan
    I've been working on a project for school that takes functions from a class file and turns them into object/classes. The assignment is all about object oriented programming in scheme. My problem however is that my code doesn't format right. The output it gives me whenever I give it a file to pass in wraps the methods of the class in a list, making it so that the class never really gets declared. I can't for the life of me figure out how to get the parenthesis wrapping the method list to remove. I would really appreciate any help. Below is the code and the class file. ;;;; PART1 --- A super-easy set of classes. Just models points and lines. Tests all of the ;; basics of class behavior without touching on anything particularly complex. (class pointInstance (parent:) (constructor_args:) (ivars: (myx 1) (myy 2)) (methods: (getx () myx) (gety () myy) (setx (x) (set! myx x)) (show () (begin (display "[") (display myx) (display ",") (display myy) (display "]"))) )) (require (lib "trace.ss")) ;; Continue reading until you hit the end of the file, all the while ;; building a list with the contents (define load-file (lambda (port) (let ((rec (read port))) (if (eof-object? rec) '() (cons rec (load-file port)))))) ;; Open a port based on a file name using open-input-file (define (load fname) (let ((fport (open-input-file fname))) (load-file fport))) ;(define lis (load "C:\\Users\\Logan\\Desktop\\simpletest.txt")) ;(define lis (load "C:\\Users\\Logan\\Desktop\\complextest.txt")) (define lis (load "C:\\Users\\Logan\\Desktop\\pointinstance.txt")) ;(display (cdaddr (cdddar lis))) (define makeMethodList (lambda (listToMake retList) ;(display listToMake) (cond [(null? listToMake) retList ;(display "The list passed in to parse was null") ] [else (makeMethodList (cdr listToMake) (append retList (list (getMethodLine listToMake)))) ] ) )) ;(trace makeMethodList) ;this works provided you just pass in the function line (define getMethodLine (lambda (functionList) `((eq? (car msg) ,(caar functionList)) ,(caddar functionList)))) (define load-classes (lambda paramList (cond [(null? paramList) (display "Your parameters are null, man.")] [(null? (car paramList))(display "Done creating class definitions.")] [(not (null? (car paramList))) (begin (let* ((className (cadaar paramList)) (classInstanceVars (cdaddr (cddaar paramList))) (classMethodList (cdr (cadddr (cddaar paramList)))) (desiredMethodList (makeMethodList classMethodList '())) ) ;(display "Classname: ") ;(display className) ;(newline)(newline) ;(display "Class Instance Vars: ") ;(display classInstanceVars) ;(newline)(newline) ;(display "Class Method List: ") ;(display classMethodList) ;(newline) ;(display "Desired Method List: ") ;(display desiredMethodList)) ;(newline)(newline) ;---------------------------------------------------- ;do not delete the below code!` `(define ,className (let ,classInstanceVars (lambda msg ;return the function list here (cond ,(makeMethodList classMethodList '()))) )) ;--------------------------------------------------- ))] ) )) (load-classes lis) ;(load-classes lis) ;(load-classes-helper lis) ;(load-classes "simpletest.txt") ;(load-classes "complextest.txt") ;method list ;(display (cdr (cadddr (cddaar <class>))))

    Read the article

  • Can I use Html Agility Pack for this?

    - by chobo2
    Hi I could not find any tutorials on their site. I am wondering can I use Html Agility Pack and use it to parse a string? Like say I have string = "<b>Some code </b> could I use agility pack to get rid of the <b> tags? All the examples I seen so far have been loading like html documents.

    Read the article

  • What should be the RegEx if I want to find the text between the phrases " IF (NEW." and " !"?

    - by Parth
    What should be the RegEx if I want to find the text between the phrases " IF (NEW." and " !"? Likewise I am thinking of the pattern as $pattern = '/(?<= IF (NEW.)[^ !]+/'; I am matching it as $input = $row4['ACTION_STATEMENT']; preg_match_all($pattern, $input, $captures); What if I want $captures as an array, in which all values will be stored which will match with above pattern being in between of this pattern?

    Read the article

  • How to write an error message from an BCP operation to a log file and stop processing the batch file

    - by Newbie
    I have a BCP operation in a batch command file. when there is an error in the BCP Operation I need to stop the processing and write the err msg in the log file I've used to -e option to write the error message during a BCP operation to a err file. The err file is getting created in the location but does not contain any error message written to it. My BCP statement is like this. BCP DbName.dbo.tableName In FileLocation -e Errorfile -S ServerName -T -c Is there a way to get the error level and then stop the processing. Appreciate quick help.

    Read the article

  • Git and Mercurial - Compare and Contrast

    - by TM
    For a while now I've been using subversion for my personal projects. More and more I keep hearing great things about Git and Mercurial, and DVCS in general. I'd like to give the whole DVCS thing a whirl, but I'm not too familiar with either option. What are some of the differences between Mercurial and Git? Note that I'm not trying to find out which one is "best" or even which one I should start with. I'm mainly looking for key areas where they are similar and where they are different, because I am interested to know how they differ in terms of implementation and philosophy.

    Read the article

  • How to set CPU affinity in Wine or CrossOver?

    - by penyuan
    There are some old games who don't like the multicore processors in today's computers. I am wondering if there is a way to set the CPU affinity for them to '1' under Wine or CrossOver? i.e. In a native Windows environment you would right click on the game's process in the Task Manager then set the affinity there. I've came across a program called RunFirst.exe, but can't figure out a way to run it, then the game in one command. Suggestions are appreciated. Thanks!

    Read the article

  • Get directory contents in date modified order

    - by nevan
    Is there an method to get the contents of a folder in a particular order? I'd like an array of file attribute dictionaries (or just file names) ordered by date modified. Right now, I'm doing it this way: get an array with the file names get the attributes of each file store the file's path and modified date in a dictionary with the date as a key Next I have to output the dictionary in date order, but I wondered if there's an easier way? If not, is there a code snippet somewhere which will do this for me? Thanks.

    Read the article

  • Exporting data from php page to word document

    - by udaya
    Hi I exported data from php page to word document but the problm is the header is not available in all pages I got the same problem while i am exporting the datas to pdf but i got the result for that one by using fpdf library In pdf i got the results like this ex page1 slno name 1 udaya 2 sankar In page 2 slno name 3 chendu 4 Akila I want the same kind of result in word how to get that This is the function i used function changeDetails() { $bType = $this-input-post('textvalue'); if($bType == "word") { $this-load-library('table'); $data['countrytoword'] = $this-AddEditmodel1-export(); $this-table-set_heading('Name','Country','State','Town'); $out = $this-table-generate($data['countrytoword']); header("Content-Type: application/vnd.ms-word"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-disposition: attachment; filename=$cur_date.doc"); echo ''; echo 'CountryList'; print_r($out); } } Name Country State Town

    Read the article

  • Copy **kwargs to self?

    - by Mark
    Given class ValidationRule: def __init__(self, **kwargs): # code here Is there a way that I can define __init__ such that if I were to initialize the class with something like ValidationRule(other='email') then self.other would be "added" to class without having to explicitly name every possible kwarg?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >