Daily Archives

Articles indexed Friday March 12 2010

Page 27/130 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Xcode acting strange

    - by Moshe
    I am typing code from Head First iPhone Development (O'reilly) and Xcode will build and run fine once and then, without any modification to the code, the second build will fail. Why?(I'm using command+R)

    Read the article

  • Windows Workflow Foundation - Application-Integrated Debugging

    - by user292103
    I've got a typical n-tier app that has a heavy workflow component to it, so I'm interested in using WWF. There's a server-side piece that runs as a Windows Service, and there's the client-side piece written in Silverlight. To have a really great, seamlessly integrated experience for my users, what I want is to incorporate both a workflow designer and a workflow debugger into the application. Not Visual Studio, but something tightly integrated right into the app itself. Using the Silverlight client, the user (probably more of a power user) can design workflows. But not only that, they can open a debugger from within the Silverlight client, set breakpoints (which are really remote breakpoints back to the Windows Service), catch in-process workflows, and step through them. Wouldn't that be great? I think I have some idea how I might go about incorporating an integrated designer (use a Silverlight diagramming component, save the diagram to .XAML, parse the .XAML to re-create the diagram, etc., etc.) but how on Earth would I do the debugger? I have no idea how I would do that part. Is there some kind of debugging support engineered into WWF?

    Read the article

  • Grep / RegExp help

    - by Calvin
    Hi everyone! I apologize if this is a really stupid question. I have data in the format: etc etc etc <span>etc etc etc</span> etc etc etc etc etc etc <span>etc etc etc</span> etc etc etc etc etc etc <span>etc etc etc</span> etc etc etc Is there a way to grep each line for a match that falls outside of the span tags?

    Read the article

  • Maven best practice for generating artifacts for multiple environments [prod, test, dev] with CI/Hud

    - by jaguard
    I have a project that need to be deployed into multiple environments (prod, test, dev). The main differences mainly consist in configuration properties/files. My idea was to use profiles and overlays to copy/configure the specialized output. But I'm stuck into if I have to generate multiple artifacts with specialized classifiers (ex: "my-app-1.0-prod.zip/jar", "my-app-1.0-dev.zip/jar") or should I create multiple projects, one project for every environment ?! Should I use maven-assembly-plugin to generate multiple artifacts for every environment ? Anyway, I'll need to generate all them at once so it seams that the profiles does not fit ... still puzzled :( Any hints/examples/links will be more than welcomed. As a side issue, I'm also wondering how to achieve this in a CI Hudson/Bamboo to generate and deploy these generated artifacts for all the environments, to their proper servers (ex: using SCP Hudson plugin) ?

    Read the article

  • log4net - why would the same MyLog.Debug line not work at one point of startup, but work at another

    - by Greg
    Hi, During startup of my WinForms application I'm noting that there are a couple of points (before the MainForm renders) that do a "MyDataSet.GetInstance()". For the first one the MyLog.Debug line comes through in the VS2008 output window, but for a later one it does work and come through. What could explain this? What settings could I check at debug time to see why an output line for a MyLog.Debug line doesn't come out in the output window? namespace IntranetSync { public class MyDataSet { private static readonly ILog MyLog = LogManager.GetLogger(typeof(MyDataSet)); public static MyDataSet GetInstance() { MyLog.Debug("MyDataSet GetInstance() ====================================="); if (myDataSet == null) { myDataSet = new MyDataSet(); } return myDataSet; } . . . PS. What I have been doing re log4net repository initialization is putting the following line as a private variables in the classes I use logging - is this OK? static class Program { private static readonly ILog MyLog = LogManager.GetLogger(typeof(MainForm)); . . . public class Coordinator { private static readonly ILog MyLog = LogManager.GetLogger(typeof(MainForm)); . . . public class MyDataSet { private static readonly ILog MyLog = LogManager.GetLogger(typeof(MyDataSet)); . . .

    Read the article

  • String or binary data would be truncated -- Heisenberg problem

    - by harpo
    When you get this error, the first thing you ask is, which column? Unfortunately, SQL Server is no help here. So you start doing trial and error. Well, right now I have a statement like: INSERT tbl (A, B, C, D, E, F, G) SELECT A, B * 2, C, D, E, q.F, G FROM tbl ,othertable q WHERE etc etc Note that Some values are modified or linked in from another table, but most values are coming from the original table, so they can't really cause truncation going back to the same field (that I know of). Eliminating fields one at a time eventually makes the error go away, if I do it cumulatively, but — and here's the kicker — it doesn't matter which fields I eliminate. It's as if SQL Server is objecting to the total length of the row, which I doubt, since there are only about 40 fields in all, and nothing large. Anyone ever seen this before? Thanks. UPDATE: I have also done "horizontal" testing, by filtering out the SELECT, with much the same result. In other words, if I say WHERE id BETWEEN 1 AND 100: Error WHERE id BETWEEN 1 AND 50: No error WHERE id BETWEEN 50 AND 100: No error I tried many combinations, and it cannot be limited to a single row.

    Read the article

  • Servlet Profiling

    - by MontyBongo
    What is the best way to undertake Servlet profiling? In particular I am looking for a solution that can show the execution times of the method calls within the servlet. I am running the Servlet within a Tomcat environment. I have tried VisualVM but it only allows me to see the method calls from the Tomcat thread rather than the Servlets themselves.

    Read the article

  • Cannot ping host stale ARP cache?

    - by gkchicago
    I am having a strange issue with a Debian (Lenny/Linux 2.6.26-2-amd64) that has been driving me nuts. On some machines within my network I can ping the host in question just fine, other times I have to manually hard-code the ARP ethernet address for the IP in order to establish connectivity. I've finally worked it down to somehow involving ARP. I just found how to fix it in a way that made it work but I'm looking for help explaining this issue and also I don't trust my fix to be permanent.. My thought process has been the following but I just can't make any sense out of it: Could it be the card? (Intel 82555 rev 4) Could it be because there are two network cards? (Default route is eth0) Could it be because of the network aliases? Lenny? AMD x86_64? Argh.. Thank you for any insight you might have // Ping doesn't go thru [gordon@ubuntu ~]$ ping 192.168.135.101 PING 192.168.135.101 (192.168.135.101) 56(84) bytes of data. --- 192.168.135.101 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3014ms // Here's the ARP Table, sometimes the .151 address is good, sometimes it // also matches the Gateways MAC like .101 is doing right here. [gordon@ubuntu ~]$ cat /proc/net/arp IP address HW type Flags HW address Mask Device 192.168.135.15 0x1 0x2 00:0B:DB:2B:24:89 * eth0 192.168.135.151 0x1 0x2 00:0B:6A:3A:30:A6 * eth0 192.168.135.1 0x1 0x2 00:1A:A2:2D:2A:04 * eth0 192.168.135.101 0x1 0x2 00:1A:A2:2D:2A:04 * eth0 // Drop the bad arp table listing and set it manually based on /sbin/ifconfig [gordon@ubuntu ~]$ sudo arp -d 192.168.135.101 [gordon@ubuntu ~]$ sudo arp -s 192.168.135.101 00:0B:6A:3A:30:A6 // Ping starts going thru..?!? [gordon@ubuntu ~]$ ping 192.168.135.101 PING 192.168.135.101 (192.168.135.101) 56(84) bytes of data. 64 bytes from 192.168.135.101: icmp_seq=1 ttl=64 time=15.8 ms 64 bytes from 192.168.135.101: icmp_seq=2 ttl=64 time=15.9 ms 64 bytes from 192.168.135.101: icmp_seq=3 ttl=64 time=16.0 ms 64 bytes from 192.168.135.101: icmp_seq=4 ttl=64 time=15.9 ms --- 192.168.135.101 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3012ms rtt min/avg/max/mdev = 15.836/15.943/16.064/0.121 ms The following is my network config on this. gordon@db01:~$ /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:0b:6a:3a:30:a6 inet addr:192.168.135.151 Bcast:192.168.135.255 Mask:255.255.255.0 inet6 addr: fe80::20b:6aff:fe3a:30a6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15476725 errors:0 dropped:0 overruns:0 frame:0 TX packets:10030036 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:18565307359 (17.2 GiB) TX bytes:3412098075 (3.1 GiB) eth0:0 Link encap:Ethernet HWaddr 00:0b:6a:3a:30:a6 inet addr:192.168.135.150 Bcast:192.168.135.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth0:1 Link encap:Ethernet HWaddr 00:0b:6a:3a:30:a6 inet addr:192.168.135.101 Bcast:192.168.135.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth1 Link encap:Ethernet HWaddr 00:e0:81:2a:6e:d0 inet addr:10.10.62.1 Bcast:10.10.62.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:81ff:fe2a:6ed0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10233315 errors:0 dropped:0 overruns:0 frame:0 TX packets:19400286 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1112500658 (1.0 GiB) TX bytes:27952809020 (26.0 GiB) Interrupt:24 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:387 errors:0 dropped:0 overruns:0 frame:0 TX packets:387 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:41314 (40.3 KiB) TX bytes:41314 (40.3 KiB) gordon@db01:~$ sudo mii-tool -v eth0 eth0: negotiated 100baseTx-FD, link ok product info: Intel 82555 rev 4 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD gordon@db01:~$ sudo route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface localnet * 255.255.255.0 U 0 0 0 eth0 10.10.62.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.135.1 0.0.0.0 UG 0 0 0 eth0

    Read the article

  • How to override the behavior of Input type="file" Browse button?

    - by jay sean
    Hi All, I need to change the locale/language of the browse button in input type="file" We have a special function to change the locale of any text to the browser language such as en-US es-MX etc. Say changeLang("Test"); // This will display test in Spanish if the browser // locale is es-MX What I need to do is to change the language of the browse button. Since it is not displayed, I can't code it like changeLang("Browse..."); That's why I need to get the code of this input type and override so that I can apply my function to Browse text. It will be appreciated if you can give a solution for this. Thanks! Jay...

    Read the article

  • Asynchronous COMET query with Tornado and Prototype

    - by grundic
    Hello everyone. I'm trying to write simple web application using Tornado and JS Prototype library. So, the client can execute long running job on server. I wish, that this job runs Asynchronously - so that others clients could view page and do some stuff there. Here what i've got: #!/usr/bin/env/ pytthon import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options import os import string from time import sleep from datetime import datetime define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler): def get(self): self.render("templates/index.html", title="::Log watcher::", c_time=datetime.now()) class LongHandler(tornado.web.RequestHandler): @tornado.web.asynchronous def get(self): self.wait_for_smth(callback=self.async_callback(self.on_finish)) print("Exiting from async.") return def wait_for_smth(self, callback): t=0 while (t < 10): print "Sleeping 2 second, t={0}".format(t) sleep(2) t += 1 callback() def on_finish(self): print ("inside finish") self.write("Long running job complete") self.finish() def main(): tornado.options.parse_command_line() settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), } application = tornado.web.Application([ (r"/", MainHandler), (r"/longPolling", LongHandler) ], **settings ) http_server = tornado.httpserver.HTTPServer(application) http_server.listen(options.port) tornado.ioloop.IOLoop.instance().start() if __name__ == "__main__": main() This is server part. It has main view (shows little greeting, current server time and url for ajax query, that executes long running job. If you press a button, a long running job executes. And server hangs :( I can't view no pages, while this job is running. Here is template page: <html> <head> <title>{{ title }}</title> <script type="text/javascript" language="JavaScript" src="{{ static_url("js/prototype.js")}}"></script> <script type='text/javascript' language='JavaScript'> offset=0 last_read=0 function test(){ new Ajax.Request("http://172.22.22.22:8888/longPolling", { method:"get", asynchronous:true, onSuccess: function (transport){ alert(transport.responseText); } }) } </script> </head> <body> Current time is {{c_time}} <br> <input type="button" value="Test" onclick="test();"/> </body> </html> what am I doing wrong? How can implement long pooling, using Tornado and Prototype (or jQuery) PS: I have looked at Chat example, but it too complicated. Can't understand how it works :( PSS Download full example

    Read the article

  • Could not install appliation via Desktop Manager..

    - by tek3
    I am trying to install an application onto my device..I have compiled the application using JDK 4.5.0 and also signed it with RIM signing keys...But i am unable to install my application onto my device(8900) through desktop manager..It keeps on showing "application is not compatible with your device and cannot be loaded"... Since i have compiled my application in JDK 4.5, it must be compatible with all devices having OS 4.5.0...Any pointers to what might be going wrong??? Is there any version miss match??

    Read the article

  • REGEX help, to remove <SPAN>s from the results

    - by nobosh
    The following REGEX: '(?i)]+class="findme"[^]*(.+?)' is resulting in: WTC Captive was created with a $1 billion FEMA grant and provides insurance coverage How can the REGEX above be updated to just send back: WTC Captive was created with a $1 billion FEMA grant and provides insurance coverage

    Read the article

  • How do you make Python wait so that you can read the output?

    - by anonnoir
    I've always been a heavy user of Notepad2, as it is fast, feature-rich, and supports syntax highlighting. Recently I've been using it for Python. My problem: when I finish editing a certain Python source code, and try to launch it, the screen disappears before I can see the output pop up. Is there any way for me to make the results wait so that I can read it, short of using an input() or time-delay function? Otherwise I'd have to use IDLE, because of the output that stops for you to read. (My apologies if this question is a silly one, but I'm very new at Python and programming in general.)

    Read the article

  • When -exactly- does the Rails3 application get initialized?

    - by bergyman
    I've been fighting left and right with rails 3 and bundler. There are a few gems out there that don't work properly if the rails application hasn't been loaded yet. factory_girl and shoulda are both examples, even on the rails3 branch. Taking shoulda as an example, when trying to run rake test:units I get the following error: DEPRECATION WARNING: RAILS_ROOT is deprecated! Use Rails.root instead. (called from autoload_macros at c:/code/test_harness/vendor/windows_gems/gems/shoulda-2.10.3/lib/shoulda/autoload_macros.rb:40) c:/code/test_harness/vendor/windows_gems/gems/shoulda-2.10.3/lib/shoulda/autoload_macros.rb:44:in 'join': can't convert #<Class:0x232b7c0> into String (TypeError) from c:/code/test_harness/vendor/windows_gems/gems/shoulda-2.10.3/lib/shoulda/autoload_macros.rb:44:in 'block in autoload_macros' from c:/code/test_harness/vendor/windows_gems/gems/shoulda-2.10.3/lib/shoulda/autoload_macros.rb:44:in 'map' from c:/code/test_harness/vendor/windows_gems/gems/shoulda-2.10.3/lib/shoulda/autoload_macros.rb:44:in 'autoload_macros' from c:/code/test_harness/vendor/windows_gems/gems/shoulda-2.10.3/lib/shoulda/rails.rb:17:in '<top (required)>' Digging a bit deeper into lib/shoulda/rails, I see this: root = if defined?(Rails.root) && Rails.root Rails.root else RAILS_ROOT end # load in the 3rd party macros from vendorized plugins and gems Shoulda.autoload_macros root, File.join("vendor", "{plugins,gems}", "*") So...what's happening here is while Rails.root is defined, Rails.root == nil, so RAILS_ROOT is used, and RAILS_ROOT==nil, which is then being passed on to Shoulda.autoload_macros. Obviously the rails app has yet to be initialized. With Rails3 using Bundler now, there's been some hubub over on the Bundler side about being able to specify an order in which the gems are required, but I'm not sure whether or not this would solve the problem at hand. Ultimately my questions is this: When exactly does the environment.rb file (which actually initializes the application) get pulled in? Is there any harm to bumping up when the app is initialized and have it happen before the Bundler.require line in config/application.rb? I've tried to hack bundler to specify the order myself, and have the rails gem pulled in first, but it doesn't appear to me that requiring the rails gem actually initializes the application. As this line (in config/application.rb) is being called before the app is initialized, any gem in the bundler Gemfile that requires rails to be initialized is going to tank. # Auto-require default libraries and those for the current Rails environment. Bundler.require :default, Rails.env

    Read the article

  • In pure XAML, is it possible to get a Line to align to part of a Grid?

    - by Jeff Wilcox
    Is it possible to create a Line in XAML (without any C# code behind) to align a line inside of a layout container such as a Grid? I'd like to effectively have: <Grid> <Line StrokeThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Stroke="Red"/> </Grid> I need to use StrokeDashArray and StrokeDashOffset, otherwise I would just use a Border control with the BorderThickness set to "0,0,0,1"... Thanks for any ideas!

    Read the article

  • C# Is it possible to interrupt a specific thread inside a ThreadPool?

    - by Lirik
    Suppose that I've queued a work item in a ThreadPool, but the work item blocks if there is no data to process (reading from a BlockingQueue). If the queue is empty and there will be no more work going into the queue, then I must call the Thread.Interrupt method if I want to interrupt the blocking task, but how does one do the same thing with a ThreadPool? The code might look like this: void Run() { try { while(true) { blockingQueue.Dequeue(); doSomething(); } } finally { countDownLatch.Signal(); } } I'm aware that the best thing to do in this situation is use a regular Thread, but I'm wondering if there is a ThreadPool equivalent way to interrupt a work item.

    Read the article

  • ASIHTTP: addOperation when other threads are running

    - by user262325
    Hello everyone I have a project using ASIHTTP to multi download files from a site when I add a new request: [networkQueue cancelAllOperations]; [networkQueue setDownloadProgressDelegate:a]; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector(requestDone:)]; NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDelegate:self]; [request startAsynchronous]; [networkQueue addOperation:request]; [networkQueue go]; it reported: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[ASINetworkQueue addOperation:]: operation is executing and cannot be enqueued' It looks like I can not add a new request when others are running. Welcome any comment Thanks interdev

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >