Search Results

Search found 4893 results on 196 pages for 'expect'.

Page 7/196 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How many rewrite rules should I expect to manage?

    - by Scott Ackerson
    I'm dealing with a hosting team that is fairly skiddish of managing many rewrite rules. What are your experiences with the number of rules your sites are currently managing? I can see dozens (if not more) coming up as the site grows and contracts and need to set expectations that this isn't out of the norm. Thanks

    Read the article

  • What job title should be most suitable for my object in resume and what salary range should I expect

    - by user354177
    I was a classic asp developer in 2000. After a year of full-time employment, I left the field. I found a part-time position as an asp developer again in 2005 and taught myself vb.net. In 2007, I got the current full-time job as an Asp.net web developer. I taught myself C#, LING t0 SQL, Web Services, AJAX, and creating all kinds of reports with reporting services. One and half years ago, I sent myself to part-time graduate program in Database and Web Systems. I'll have two semesters to go and so far my GPA is 4.0/4.0. My job responsibility is to collect business requirements from other departments, design the database, write stored procedures, create aspx pages, and create reports. I love what I do and want to advance my career to the next level. What I enjoy most is to design the relational database. I would want to become an .Net Architect eventually. I got an interview. They were looking for asp.net web developer. But I was surprised and disappointed that position would only create aspx pages. I would not even have opportunity to write stored procedures, let alone design the database (those would be provided by another group). Furthermore, they asked me some detailed questions about web forms, some of which I did not know the answers. they might be disappointed as well. I am eager to learn and can apply what I learn to real projects right away. I believe no matter what specific skills I am lacking for a new position, I can catch up quickly. I am looking for $70k range job. The object in my resume is Experience C# Web Application Developer. Due to the experience from last interview, I wonder if the object is really what I want. Could somebody answer my questions? Thank you.

    Read the article

  • Accidentally Uninstalled Ubuntu Desktop and Anacron. Reinstalled. What Can I Expect?

    - by Volomike
    Unfortunately when I installed the cron package to take a look at it, I didn't realize that I was also uninstalling Ubuntu Desktop and Anacron. Crap!!! So, I then did apt-get install anacron ubuntu-desktop, which also removed fcron. However, I need to know what instability issues I may now encounter because I have done this change and changed it back. I mean, now that anacron is back and ubuntu-desktop is back, am I out of the woods? Or, will I lose any important jobs that need to run periodically from anacron?

    Read the article

  • Ssh, run a command on login, and then Stay Logged In?

    - by jonathan
    I tried this with expect, but it didn't work: it closed the connection at the end. Can we run a script via ssh which will log into remote machines, run a command, and not disconnect? So ssh in a machine, cd to such and such a directory, and then run a command, and stay logged in. -Jonathan (expect I used) #!/usr/bin/expect -f set password [lrange $argv 0 0] spawn ssh root@marlboro "cd /tmp; ls -altr | tail" expect "?assword:*" send -- "$password\r" send -- "\r" interact

    Read the article

  • how to match a regulas expresion like (%i1) in python pexpect

    - by mike
    I want to use maxima from python using pexpect, whenever maxima starts it will print a bunch of stuff of this form: $ maxima Maxima 5.27.0 http://maxima.sourceforge.net using Lisp SBCL 1.0.57-1.fc17 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) i would like to start up pexpect like so: import pexpect cmd = 'maxima' child = pexpect.spawn(cmd) child.expect (' match all that stuff up to and including (%i1)') child.sendline ('integrate(sin(x),x)') chil.expect( match (%o1 ) ) print child.before how do i match the starting banner up to the prompt (%i1)? and so on, also maxima increments the (%i1)'s by one as the session goes along, so the next expect would be: child.expect ('match (%i2)') child.sendline ('integrate(sin(x),x)') chil.expect( match (%o2 ) ) print child.before how do i match the (incrementing) integers?

    Read the article

  • Rhino Mocks and ordered test with unordered calls

    - by Shaddix
    I'm using Rhino.Mocks for testing the system. I'm going to check the order of calling .LoadConfig and .Backup methods. I need .LoadConfig to be the first. Currently the code is like this: var module1 = mocks.Stub<IBackupModule>(); var module2 = mocks.Stub<IBackupModule>(); module1.Expect(x => x.Name).Return("test"); module2.Expect(x => x.Name).Return("test2"); using (mocks.Ordered()) { module1.Expect(x => x.LoadConfig(null)); module2.Expect(x => x.LoadConfig(null)); module1.Expect(x => x.Backup()); module2.Expect(x => x.Backup()); } mocks.ReplayAll(); The problem is, that there's also a call to .Name property, and i'm not interesting when it'll be called: before .LoadConfig or after the .Backup - it just doesn't matter. And when I run this I'm getting Exception: Unordered method call! The expected call is: 'Ordered: { IConfigLoader.LoadConfig(null); }' but was: 'IIdentification.get_Name();' Is there a way to deal with this? Thanks

    Read the article

  • As an experiment I want to work a bit with AWS. How much might I expect to pay?

    - by dartdog
    I'm about to go to Pycon, and while I have my hosting at Webfaction one of the tutorials (JKM) asks for students to have AWS instances. I've been trying to figure out what some minimum charge examples might look like? I'll have a lamp server with Django and a requisite amount of storage but next to no traffic,,Any one have some guidance/advice? My Google searches and look here did not turn up much useful info?

    Read the article

  • From TFS to Git

    - by Saeed Neamati
    I'm a .NET developer and I've used TFS (team foundation server) as my source control software many times. Good features of TFS are: Good integration with Visual Studio (so I do almost everything visually; no console commands) Easy check-out, check-in process Easy merging and conflict resolution Easy automated builds Branching Now, I want to use Git as the backbone, repository, and source control of my open source projects. My projects are in C#, JavaScript, or PHP language with MySQL, or SQL Server databases as the storage mechanism. I just used github.com's help for this purpose and I created a profile there, and downloaded a GUI for Git. Up to this part was so easy. But I'm almost stuck at going along any further. I just want to do some simple (really simple) operations, including: Creating a project on Git and mapping it to a folder on my laptop Checking out/checking in files and folders Resolving conflicts That's all I need to do now. But it seems that the GUI is not that user friendly. I expect the GUI to have a Connect To... or something like that, and then I expect a list of projects to be shown, and when I choose one, I expect to see the list of files and folders of that project, just like exploring your TFS project in Visual Studio. Then I want to be able to right click a file and select check-in... or check-out and stuff like that. Do I expect much? What should I do to easily use Git just like TFS? What am I missing here?

    Read the article

  • Where Twitter Stands Heading Into 2013

    - by Mike Stiles
    As Twitter continued throughout 2012 to be a stage on which global politics and culture played itself out, the company itself underwent some adjustments that give us a good indication of what users and brands can expect from the platform in 2013. The power of the network did anything but fade. Celebrities continued to use it to connect one-on-one. Even the Pope signed on this year. It continued to fuel revolutions. It played an exponentially large factor in this US Presidential election. And around the world, the freedom to speak was challenged as users were fired, sued, sometimes even jailed for their tweets. Expect more of the same in 2013, as Twitter has entrenched itself, for individuals, causes and brands, as the fastest, easiest, most efficient way to message the masses so some measure of impact can come from it. It’s changed everything, and it’s not finished. These fun facts reveal the position of strength with which Twitter enters 2013: It now generates a billion tweets every 2.5 days It has 500 million+ users The average Twitter user has tweeted 307 times 32% of everyone using the Internet uses Twitter It’s expected to bring in $540 million in ad revenue by 2014 11 new accounts are created every second High-level Executive Summary: people love it, people use it, and they’re going to keep loving and using it. Whether or not outside developers love it is a different matter. 2012 marked a shift from welcoming the third party support that played at least some role in Twitter being so warmly embraced, to discouraging anything that replicates what Twitter can do itself…or plans to do itself. It’s not the open playground it once was. Now Twitter must spend 2013 proving it can innovate in-house and keep us just as entranced. Likewise, Twitter is distancing itself from Facebook. Images from the #1 platform’s Instagram don’t work on Twitter anymore, and Twitter’s rolling out their own photo filter product. Where the two have lived in a “plenty of room for everybody” symbiosis up to now, 2013 could see the giants ramping up a full-on rivalry. Twitter is exhibiting a deliberate strategy. Updates have centered on more visually appealing search results, and making finding and sharing content easier. Deals have been cut with some media entities so their content stands out. CEO Dick Costolo has said tweets aren’t the attraction, they’re what leads you to content. Twitter aims to be a key distributor of media and info. Add the addition of former News Corp. President Peter Chernin to the board, and their hashtag landing page experience for events, and their media behemoth ambitions get pretty clear. There are challenges ahead and Costolo has also laid those out; entry into China, figuring out how to have Twitter deliver both comprehensive and relevant, targeted experiences, and the visualization of big data. What does this mean for corporations? They can expect a more media-rich evolution and growing emphases on imagery. They can expect more opportunities to create great media content and leverage Twitter for its distribution. And they can expect new ways to surface in searches. Are brands diving in? 56% of customer tweets to companies get completely and totally ignored. Ugh. A study Twitter recently conducted with Compete shows people who see tweets from retailers are more likely to buy a product. And, the more retailer tweets they see, the more likely they are to purchase on the retail site. As more of those tweets point to engaging media content from the brand, the results should get even better. Twitter appears ready for 2013. Enterprise brands have some work to do. @mikestilesPhoto Stuart Miles, freedigitalphotos.net

    Read the article

  • powermock : ProcessBuilder redirectErrorStream giving nullPointerException

    - by kaustubh9
    I am using powermock to mock some native command invocation using process builder. the strange thing is these test pass sometimes and fail sometimes giving a NPE. Is this a powermock issue or some gotcha in the program. the snippet of the class under test is.. public void method1(String jsonString, String filename) { try { JSONObject jObj = new JSONObject(jsonString); JSONArray jArr = jObj.getJSONArray("something"); String cmd = "/home/y/bin/perl <perlscript>.pl<someConstant>" + " -k " + <someConstant> + " -t " + <someConstant>; cmd += vmArr.getJSONObject(i).getString("jsonKey"); ProcessBuilder pb = new ProcessBuilder("bash", "-c", cmd); pb.redirectErrorStream(false); Process shell = pb.start(); shell.waitFor(); if (shell.exitValue() != 0) { throw new RuntimeException("Error in Collecting the logs. cmd="+cmd); } StringBuilder error = new StringBuilder(); InputStream iError = shell.getErrorStream(); BufferedReader bfr = new BufferedReader( new InputStreamReader(iError)); String line = null; while ((line = bfr.readLine()) != null) { error.append(line + "\n"); } if (!error.toString().isEmpty()) { LOGGER.error(error`enter code here`); } iError.close(); bfr.close(); } catch (Exception e) { throw new RuntimeException(e); } and the unit test case is .. @PrepareForTest( {.class, ProcessBuilder.class,Process.class, InputStream.class,InputStreamReader.class, BufferedReader.class} ) @Test(sequential=true) public class TestClass { @Test(groups = {"unit"}) public void testMethod() { try { ProcessBuilder prBuilderMock = createMock(ProcessBuilder.class); Process processMock = createMock(Process.class); InputStream iStreamMock = createMock(InputStream.class); InputStreamReader iStrRdrMock = createMock(InputStreamReader.class); BufferedReader bRdrMock = createMock(BufferedReader.class); String errorStr =" Error occured"; String json = <jsonStringInput>; String cmd = "/home/y/bin/perl <perlscript>.pl -k "+<someConstant>+" -t "+<someConstant>+" "+<jsonValue>; expectNew(ProcessBuilder.class, "bash", "-c", cmd).andReturn(prBuilderMock); expect(prBuilderMock.redirectErrorStream(false)).andReturn(prBuilderMock); expect(prBuilderMock.start()).andReturn(processMock); expect(processMock.waitFor()).andReturn(0); expect(processMock.exitValue()).andReturn(0); expect(processMock.getErrorStream()).andReturn(iStreamMock); expectNew(InputStreamReader.class, iStreamMock) .andReturn(iStrRdrMock); expectNew(BufferedReader.class, iStrRdrMock) .andReturn(bRdrMock); expect(bRdrMock.readLine()).andReturn(errorStr); expect(bRdrMock.readLine()).andReturn(null); iStreamMock.close(); bRdrMock.close(); expectLastCall().once(); replayAll(); <ClassToBeTested> instance = new <ClassToBeTested>(); instance.method1(json, fileName); verifyAll(); } catch (Exception e) { Assert.fail("failed while collecting log.", e); } } I get an error on execution an the test case fails.. Caused by: java.lang.NullPointerException at java.lang.ProcessBuilder.start(ProcessBuilder.java:438) Note : I do not get this error on all executions. Sometimes it passes and sometimes it fails. I am not able to understand this behavior.

    Read the article

  • Parsing line with delimiter in Python

    - by neversaint
    I have lines of data which I want to parse. The data looks like this: a score=216 expect=1.05e-06 a score=180 expect=0.0394 What I want to do is to have a subroutine that parse them and return 2 values (score and expect) for each line. However this function of mine doesn't seem to work: def scoreEvalFromMaf(mafLines): for word in mafLines[0]: if word.startswith("score="): theScore = word.split('=')[1] theEval = word.split('=')[2] return [theScore, theEval] raise Exception("encountered an alignment without a score") Please advice what's the right way to do it?

    Read the article

  • How to distinguish date at midnight from date w/o time in Oracle?

    - by Swiety
    I would like to distinguish date at midnight (i.e. '12/05/2010 00:00:00') from date without time specified (i.e. '12/05/2010'). This value is provided by user, sometimes it is only date which is important, sometimes it is date and time and later the application is expected to show the time only when it was explicitly provided. So for the following inputs I would expect the following outputs: for '12/05/2010' I would expect '12/05/2010' for '12/05/2010 09:23' I would expect '12/05/2010 09:23' for '12/05/2010 00:00' I would expect '12/05/2010 00:00' I know I can model it in two separate columns, date and time, but I was wondering was there any way of handling this in single date column?

    Read the article

  • Upstart can't determine my process' pid

    - by sirlark
    I'm writing an upstart script for a small service I've written for my colleagues. My upstart job can start the service, but when it does it only outputs queryqueue start/running; note the lack of a pid as given for other services. #/etc/init/queryqueue.conf description "Query Queue Daemon" author "---" start on started mysql stop on stopping mysql expect fork env DEFAULTFILE=/etc/default/queryqueue umask 007 kill timeout 30 pre-start script #if [ -f "$DEFAULTFILE" ]; then # . "$DEFAULTFILE" #fi [ ! -f /var/run/queryqueue.sock ] || rm -rf /var/run/queryqueue.sock #exec /usr/local/sbin/queryqueue -s /var/run/queryqueue.sock -d -l /tmp/upstart.log -p $PIDFILE -n $NUM_WORKERS $CLEANCACHE $FLUSHCACHE $CACHECONN end script script #Originally this stanza didn't exist at all if [ -f "$DEFAULTFILE" ]; then . "$DEFAULTFILE" fi exec /usr/local/sbin/queryqueue -s /var/run/queryqueue.sock -d -l /tmp/upstart.log -p $PIDFILE -n $NUM_WORKERS $CLEANCACHE $FLUSHCACHE $CACHECONN end script post-start script for i in `seq 1 5` ; do [ -S /var/run/queryqueue.sock ] && exit 0 sleep 1 done exit 1 end script The service in question is a python script, which when run without error, forks using the code below right after checking command line options and basic environmental sanity, so I tell upstart to expect fork. pid = os.fork() if pid != 0: sys.exit(0) The script is executable, and has a python shebang. I can send the TERM signal to the process manually, and it quits gracefully. But running stop queryqueue claims queryqueue stop/waiting but the process is still alive and well. Also, it's logs indicate it never received the kill signal. I'm guessing this is because upstart doesn't know which pid it has. I've also tried expect daemon and leaving the expect clause out entirely, but there's no change in behaviour. How can I get upstart to determine the pid of the exec'd process

    Read the article

  • OS X Login Authentication Against Leopard Server

    - by mattdwen
    I am doing a few tests with OS X Server before I have to do a deploy in a few months. I have configured Open Directory, and created a few users. I've configured Directory Utility on a 10.5 client, but the login authentication doesn't work the way I would expect. I would expect I could user a username/password from any user created in Open Directory and be able to log into the client. Instead, it appears I need to create a local user, which you then sync with a directory user using Directory Utility. Alternatively, if I add an Active Directory config to the client, I can use any AD user, as I would expect. Am I hoping for the impossible, or is something likely wrong with the configuration?

    Read the article

  • Ldap access lists users even if user has no rights...

    - by Patkos Csaba
    I am trying to set up a more complex Active Directory structure for some testing purposes. What I did so far: set up 2 windows (one 2008 and one 2003) to control the same domain set up an Organizational Unit (ou): Developers set up 2 child OUs: "one" and "two" each OU has it's admin: adminOne and adminTwo I denied all access to OU "two" by removing on the Security tab all the groups I don't want to access it. now, when I log in as adminOne and I try to click on OU "two" it says I don't have permissions to see the users and properties of "two" - this is perfect, it's what I want Here comes my problem: I do a LDAP query with the adminOne user on the "Developers" What I expect to happen: I expect to retrieve the users from Developer - One I expect to NOT be able to retrieve the users from Developers - Two What actually happens: ldap shows all the users, both from Developers - One and Developers - Two, even if the user should not have permissions to Developers - Two And now my question: is there any specific settings on Windows 2003 or 2008 Active Directory servers which allow or deny access over LDAP? I could not find any.

    Read the article

  • How do I stop GNU Freetalk from automatically filling in the buddy name?

    - by Journeyman Geek
    I'm using GNU Freetalk along with expect in order to send notifications to my phone – Freetalk has a readline interface, and I use expect to make a series of non interactive scripts that send information to another Jabber account. I'd like to have these scripts end freetalk 'properly' – that is to say user@domainname message one user@domainname message two /quit which would print out message one message two then quit. However Freetalk 'helpfully' adds user@domainame automatically so I get message one message two /quit as the output. The expect script still ends, but there's a delay. How would I stop Freetalk from adding in the 'buddy' address automatically?

    Read the article

  • Accessing server by dedicated IP address

    - by Sherwin Flight
    I'm having an issue with my hosting provider after migrating to a new account. It's taking some time to get the problem sorted out, so I am hoping someone here can shed some light on the situation. The server is running WHM/cPanel, and the site I am trying to access has a dedicated IP address. When I connect to the server like this http://IP.HERE instead of showing my the website the way I would expect, it is showing the contents of a subfolder. So, while I would expect it to load public_html/ it is loading public_html/somefolder/ instead. Any idea why this is happening instead of showing the sites homepage the way I would expect? EDIT It is not redirecting, so the url is just http://IP.ADDRESS/, but the files listed are from a subfolder. So, it LOOKS at though I went to http://IP.ADDRESS/subfolder, when the URL says it should be showing the main folder contents. When I access the site using the domain name, it works properly, so I assume the document root is set correctly.

    Read the article

  • Alice In Wonderland: Good, but not Great

    - by Theo Moore
    We went to see Alice In Wonderland today. We both like Tim Burton a lot (the stranger the better) and like Johnny Depp very well also. After seeing all the previews and such, we were fired up to see this film. Honestly, I thought it was good but not great. I was prepared to be wow-ed, but I wasn't. Perhaps I expected too much. I did like it, but I'll not own it nor would I expect to see it again...unless someone I know decides they want to see it. I was about to say something to reassure you that I wasn't going to provide any spoilers but two things occurred to me: one, I never give spoilers and two, why worry about spoilers for a film that so closely follows a book? My comments about the film are hard to describe, but the basic gist is that it doesn't really feel like it..."works" to me. I can't get any more specific than that, much as I'd like to do so. Something about it seems sort of disjointed and not in that Alice way you'd expect. My only specific comment is that I didn't like the actor who plays Alice very well. She was very flat and just didn't sell he character to me. She seemed a bit, well, plastic. Depp was as good as you'd expect him to be, I am happy to say. Obviously Lewis Carroll couldn't have imagined this made into film, but I can't help thinking that he'd see this and say that Depp was the perfect Mad Hatter. So, I'd definitely recommend seeing it (we saw it in 3D which was cool, but not really necessary) at least once, but don't be surprised if you're kinda meh afterwards.

    Read the article

  • Best of "The Moth" 2012

    - by Daniel Moth
    As with previous years (2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011) I’d like to wish you a Happy New Year and share a quick review of my blog posts from 2012 (plus speculate on my 2013 blog focus). 1. Like 2011, my professional energy in 2012 was dominated by C++ AMP including articles, blog posts, demos, slides, and screencasts. I summarized that over two posts on the official team blog that I linked to from my blog post here titled: “The last word on C++ AMP”, which also subtly hinted at my change of role which I confirmed in my other post titled “Visual Studio Continued Excitement”. 2. Even before I moved to the Visual Studio Diagnostics team in September, earlier in the year I had started sharing blog posts with my thoughts on that space, something I expect to continue in the new year. You can read some of that in these posts: The way I think about Diagnostic tools, Live Debugging, Attach to Process in Visual Studio, Start Debugging in Visual Studio, Visual Studio Exceptions dialogs. 3. What you should also expect to see more of is thoughts, tips, checklists, etc around Professional Communication and on how to be more efficient and effective with that, e.g. Link instead of Attaching, Sending Outlook Invites, Responding to Invites, and OOF checklist. 4. As always, I sometimes share random information, and noteworthy from 2012 is the one where I outlined the Visual Studio versioning story (“Visual Studio 11 not 2011”, and after that post VS 11 was officially baptized VS2012) and the one on “How I Record Screencasts”. Looking back, unlike 2011 there were no posts in 2012 related to device development, e.g. for Windows Phone. Expect that to be rectified in 2013 as I hope to find more time for such coding… stay tuned by subscribing using the link on the left. Comments about this post by Daniel Moth welcome at the original blog.

    Read the article

  • what are some good interview questions for a position that consists of reviewing code for security vulnerabilities?

    - by John Smith
    The position is an entry-level position that consists of reading C++ code and identifying lines of code that are vulnerable to buffer overflows, out-of-bounds reads, uncontrolled format strings, and a bunch of other CWE's. We don't expect the average candidate to be knowledgeable in the area of software security nor do we expect him or her to be an expert computer programmer; we just expect them to be able to read the code and correctly identify vulnerabilities. I guess I could ask them the typical interview questions: reverse a string, print a list of prime numbers, etc, but I'm not sure that their ability to write code under pressure (or lack thereof) tells me anything about their ability to read code. Should I instead focus on testing their knowledge of C++? Ask them if they understand what a pointer is and how bitwise operators work? My only concern about asking that kind of question is that I might unfairly weed out people who don't happen to have the knowledge but have the ability to acquire it. After all, it's not like they will be writing a single line of code, and it's not like we are looking only for people who already know C++, since we are willing to train the right candidate. (It is true that I could ask those questions only to those candidates who claim to know C++, but I'd like to give the same "test" to everyone.) Should I just focus on trying to get an idea of their level of intelligence? In other words, should I get them to talk and pay attention to the way they articulate their thoughts, and so on?

    Read the article

  • High-level description of how experimental C++ features are developed?

    - by Praxeolitic
    Herb Sutter in a video answers a question about the concepts proposal considered for C++11 and from his remarks it sounds like multiple groups offered prototype implementations but all of them left concerns about slow compile times. The comment surprised me because it suggests that, at least in some cases, the prototypes being developed are not just proofs of concept -- they're even expected to perform. All the work that must take has me curious. For mature languages, especially C++, how are experimental language features developed? Is it much different from developing a compiler that implements a standard? Does a developer have a sense of if it will work and perform or even if it ever could? What are the most time consuming parts and are any parts surprisingly easier than one might expect? The question is not what does the C++ standards committee do, but rather the part that comes before. When an experimental implementation for a proposal is being put together and there aren't any completely solidified rules, how is the sausage made? I'm not a professional compiler developer nor do I expect answers with step by step accounts. I'd like a high-level idea of how this would be done or if there are any general patterns at all. I don't know what to expect from the answers but even if there are no rules to the process and the small number of people who do this just cowboy it and then, for stuff that worked out, write up the "official version" as a proposal, that answer would still be informative.

    Read the article

  • Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

    - by codykrieger
    Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart to manage a Rails app's Unicorn master process. Here is my current /etc/init/app.conf: description "app" start on runlevel [2] stop on runlevel [016] console owner # expect daemon script APP_ROOT=/home/deploy/app PATH=/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$PATH $APP_ROOT/bin/unicorn -c $APP_ROOT/config/unicorn.rb -E production # >> /tmp/upstart.log 2>&1 end script # respawn That works just fine - the Unicorns start up great. What's not great is that the PID detected is not of the Unicorn master, it's of an sh process. That in and of itself isn't so bad, either - if I wasn't using the automagical Unicorn zero-downtime deployment strategy. Because shortly after I send -USR2 to my Unicorn master, a new master spawns up, and the old one dies...and so does the sh process. So Upstart thinks my job has died, and I can no longer restart it with restart or stop it with stop if I want. I've played around with the config file, trying to add -D to the Unicorn line (like this: $APP_ROOT/bin/unicorn -c $APP_ROOT/config/unicorn.rb -E production -D) to daemonize Unicorn, and I added the expect daemon line, but that didn't work either. I've tried expect fork as well. Various combinations of all of those things can cause start and stop to hang, and then Upstart gets really confused about the state of the job. Then I have to restart the machine to fix it. I think Upstart is having problems detecting when/if Unicorn is forking because I'm using rbenv + the ruby-local-exec shebang in my $APP_ROOT/bin/unicorn script. Here it is: #!/usr/bin/env ruby-local-exec # # This file was generated by Bundler. # # The application 'unicorn' is installed as part of a gem, and # this file is here to facilitate running it. # require 'pathname' ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath) require 'rubygems' require 'bundler/setup' load Gem.bin_path('unicorn', 'unicorn') Additionally, the ruby-local-exec script looks like this: #!/usr/bin/env bash # # `ruby-local-exec` is a drop-in replacement for the standard Ruby # shebang line: # # #!/usr/bin/env ruby-local-exec # # Use it for scripts inside a project with an `.rbenv-version` # file. When you run the scripts, they'll use the project-specified # Ruby version, regardless of what directory they're run from. Useful # for e.g. running project tasks in cron scripts without needing to # `cd` into the project first. set -e export RBENV_DIR="${1%/*}" exec ruby "$@" So there's an exec in there that I'm worried about. It fires up a Ruby process, which fires up Unicorn, which may or may not daemonize itself, which all happens from an sh process in the first place...which makes me seriously doubt the ability of Upstart to track all of this nonsense. Is what I'm trying to do even possible? From what I understand, the expect stanza in Upstart can only be told (via daemon or fork) to expect a maximum of two forks.

    Read the article

  • Java AtomicInteger: what are the differences between compareAndSet and weakCompareAndSet?

    - by WizardOfOdds
    (note that this question is not about CAS, it's about the "May fail spuriously" Javadoc). The only difference in the Javadoc between these two methods from the AtomicInteger class is that the weakCompareAndSet contains the comment: "May fail spuriously". Now unless my eyes are cheated by some spell, both method do look to be doing exactly the same: public final boolean compareAndSet(int expect, int update) { return unsafe.compareAndSwapInt(this, valueOffset, expect, update); } /* ... * May fail spuriously. */ public final boolean weakCompareAndSet(int expect, int update) { return unsafe.compareAndSwapInt(this, valueOffset, expect, update); } So I realize that "May" doesn't mean "Must" but then why don't we all start adding this to our codebase: public void doIt() { a(); } /** * May fail spuriously */ public void weakDoIt() { a(); } I'm really confused with that weakCompareAndSet() that appears to do the same as the compareAndSet() yet that "may fail spuriously" while the other can't. Apparently the "weak" and the "spurious fail" are in a way related to "happens-before" ordering but I'm still very confused by these two AtomicInteger (and AtomicLong etc.) methods: because apparently they call exactly the same unsafe.compareAndSwapInt method. I'm particularly confused in that AtomicInteger got introduced in Java 1.5, so after the Java Memory Model change (so it is obviously not something that could "fail spuriously in 1.4" but whose behavior changed to "shall not fail spuriously in 1.5").

    Read the article

  • Web user expectations

    - by Ash
    When designing a good Web GUI what expectations can we expect from an end user? I've come up with the following, but I wonder if there are any others which can suggest.. If I click on a hyperlink it will take me to another page/part of this page If I tick/untick a checkbox it might alter the page state (enable/disable elements) If I click on a button I expect it to do something to data. If I click on a button I expect something to happen immediately (either to the current page, or for me to be taken to another page) If I have clicked on a hyperlink and it has taken me to another page, I expect to be able to use the Back button to get back to the previous page in a state similar to that which I left it in If I change something in a form, I can change it back to its previous value if necessary Unless I click on the 'Submit' button nothing should happen to my data. If I bookmark/favourite a page then it should show the same related data each time I visit it If text is underlined and looks like a link, it should be a link and act as one The reasoning behind this question is more a 'UI from hell' one. For example I have come across pages which checking a tickbox next to a record will delete it, straight away, via ajax. To me that just seems wrong, a checkbox is a toggle - something which a delete operation definitely isn't!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >