Daily Archives

Articles indexed Monday June 7 2010

Page 9/113 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Connecting to SFTP service via Java Runtime process

    - by ohseekay
    Under my project, I have a Java class file, inside of which I have a routine which executes the following external SFTP script file: #!/bin/sh echo "cd AV/OASIS" >> sftp echo "put $1 $2" >> sftp echo "get AV/OASIS/$2 $3$2" >> sftp echo "bye" >> sftp /usr/local/bin/sftp -b sftp id@domain cat /dev/null > sftp exit 0 The Java code which executes the script file is as below: String script = "full path of script"; Process p = Runtime.getRuntime().exec(script + " " + param1 + " " + param2 + " " + param3); However, I'm not sure why, but the log generated by the class file always shows the error "Host key verification failed. Connection closed." I'd isolated that line in the script which connected to the remote machine, and ran it on the local machine (where this class file and script file are stored), and the command executed successfully I'd manually run the command which the Java class file will execute and it also tested okay: $ script.sh param1 param2 param3 I'd tried to look up the error message on the Internet, and apparently it seems to have something to do with known_hosts. Could this be the reason, or is there something else I'm missing? Thanks so much!

    Read the article

  • can't open file which download with php code

    - by user304828
    header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); i downloaded file but can't open file ? why ?

    Read the article

  • Alternatives to RPX?

    - by keruilin
    I'm looking into integrating with some external APIs that will improve website sign-in experience. RPX seems to be highly functional. The one issue that I have with it is that you can't link accounts unless you purchase the premium. With that said... Are there currently any viable alternatives to RPX? Strengths/weaknesses?

    Read the article

  • Does DotNetNuke support ASP.NET MVC?

    - by Alexander
    Hi, I'm going to build a web app. I need some CMS that can be integrated with ASP.NET MVC. The possible solution list is: 1) Oxite 2) MVC CMS 3) AtomSite 4) N2. Sorry for obvious question, but can the DotNetNuke be used with ASP.NET MVC? TIA

    Read the article

  • USB keyboard stopped working in Ubuntu with error -71

    - by tapan
    I have a usb keyboard which was working perfectly till now (about a year since i have been regularly using ubuntu). It suddenly stopped working. It stopped working when I connected a USB HDD. Now the keyboard works randomly .. working for a while and then stops working for a longer time. Here is the dmesg output : [ 705.817076] usb 5-1: device not accepting address 8, error -71 [ 705.928032] usb 5-1: new low speed USB device using uhci_hcd and address 9 [ 706.336060] usb 5-1: device not accepting address 9, error -71 [ 706.448055] usb 5-1: new low speed USB device using uhci_hcd and address 10 [ 706.568044] usb 5-1: device descriptor read/64, error -71 [ 706.792049] usb 5-1: device descriptor read/64, error -71 [ 707.008060] usb 5-1: new low speed USB device using uhci_hcd and address 11 [ 707.128041] usb 5-1: device descriptor read/64, error -71 [ 707.352052] usb 5-1: device descriptor read/64, error -71 [ 707.456068] hub 5-0:1.0: unable to enumerate USB device on port 1 Based on the suggestions here i tried the following two things: echo -1 > /sys/module/usbcore/parameters/autosuspend echo Y > /sys/module/usbcore/parameters/old_scheme_first However, i am still facing the same problem. Can anyone help me out with this ? I'm using Ubuntu 10.04 Lucid Lynx.

    Read the article

  • A many-to-many relation joined disallows intellisense/lookup in joined table

    - by BerggreenDK
    I want to be able to select a product and retrieve all sub-parts(products) within it. My approach is to find the Product id and then retrieve the list of ProductParts with that as a parent and while fetching those, follow the key back to the Product child to get the name and details of each Part. I was hoping to use something similar to: part.linked_product_id.name I have two tables. One for [Product] and and a relation [ProductPart] that has two FK ID's to [Product] Table Product() { int ID; // (PRIMARY, NOT NULL) String Name; ... details removed for overview purpose... } Table ProductPart() { int Product_ID; // FK (linked with relation to Product/parent) int Part_Product_ID; // FK (linked with relation to Product/childen) ... details removed for overview purpose... } I have checked the SQL-diagram and it shows the two relations (both are one to many) and in my DBML they also looks right. Here is my LINQ to SQL snippet that doesnt work for me... wondering why my joins dont work as supposed. FaultySnippet() { ProductDataContext db = new ProductDataContext(); var list = ( from part in db.ProductParts join prod in db.Products on part.Part_Product_ID equals prod.ID where (part.Product_ID == product_ID) select new { Name = part.Part_Product_ID. ?? // <-- NO details from Joined table? ... rest of properties from ProductPart join... I hoped... } ); }

    Read the article

  • jquery - loose click() event after ajax call ???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and close's upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • 'NoneType' object has no attribute 'day'

    - by Asinox
    Hi guy, i dont know where is my error, but Django 1.2.1 is give this error: 'NoneType' object has no attribute 'day' when i try to save form from the Administrator Area models.py from django.db import models from django.contrib.auth.models import User class Editorial(models.Model): titulo = models.CharField(max_length=250,help_text='Titulo del editorial') editorial = models.TextField(help_text='Editorial') slug = models.SlugField(unique_for_date='pub_date') autor = models.ForeignKey(User) pub_date = models.DateTimeField(auto_now_add=True) activa = models.BooleanField(verbose_name="Activa") enable_comments = models.BooleanField(verbose_name="Aceptar Comentarios",default=False) editorial_html = models.TextField(editable=False,blank=True) def __unicode__(self): return unicode(self.titulo) def get_absolute_url(self): return "/editorial/%s/%s/" % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug) class Meta: ordering=['-pub_date'] verbose_name_plural ='Editoriales' def save(self,force_insert=False, force_update=False): from markdown import markdown if self.editorial: self.editorial_html = markdown(self.editorial) super(Editorial,self).save(force_insert,force_update) i dont know why this error, thanks guys sorry with my English

    Read the article

  • Can I populate multiple DropDownLists from one SqlDataSource using parameters?

    - by death_au
    Basically, I have four asp:DropDownLists and I wish to populate all of them from the same table, with certain conditions. For example, I have this data source: <asp:SqlDataSource ID="ReferenceDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:mrapConnectionString1 %> SelectCommand="SELECT * FROM [reference_data] WHERE ([component] = @component)" > <SelectParameters> <asp:Parameter DefaultValue="MB" Name="component" Type="String" /> </SelectParameters> </asp:SqlDataSource> And I want to know if I can change that component parameter to be different for each of my four dropdown lists. I tried adding the following code on the DataBinding event for my DropDown: ReferenceDataSource1.SelectParameters.Remove(ReferenceDataSource1.SelectParameters["component"]); ReferenceDataSource1.SelectParameters.Add("component", "MB"); But I ironically got a StackOverflowException...

    Read the article

  • 403 error with codeignitor

    - by DJB
    When I type in the standard web address for my site, I get a 403 error. However, when I type in a more exact address, say pointing to an index.php file, everything shows up fine. I'm using Anodyne Productions' Nova (SMS 3) which uses codeignitor. All accompanying software (PHP/MySQL) is compatible. I'm not a very technical person, so I'm hoping that this is an easy fix. Thanks for taking the time to answer.

    Read the article

  • Handling inconcistent resource availability in Project 2007

    - by Lachlan McDonald
    Afternoon all, I have four resources; a project manager, and three developers. The project manager can work anywhere from 9 to 5pm each day, but only for a total of 10 hours per week. It doesn't matter when he works, as long as he isn't over-allocated 10 hours per week. The developers on the other hand can only work up to 2 hours per day, for a total of 10 hours per week. If they work more than 2 hours in a day, they are over-allocated. How do I best configure Project to handle this kind of scheduling requirement?

    Read the article

  • How make data entry using autogenerated texboxes in ASP.NET MVC?

    - by elbaid
    I'm asking a simple question on how to do data entry when using a custom number of textboxes. Usualy, in books, or tutorials, we consider a fixed number of entries for the controller. But what if the number of entries varies? For a concrete example, imagine some number of products which we need to enter quantity. How to manage this if one time we have 3 products and the other time we have 10 products? Thank you.

    Read the article

  • Is it possible ot mix named pipe with select in perl

    - by Haiyuan Zhang
    I need to write a daemon that supposed to have one TCP socket and one named pipe. Usually if I need to implement a multi IO server with "pure" sockets, the select based multi-IO model is always the one I will choose. so does anyone of you have ever used named pipe in select or you can just tell me it is impossible. thanks in advance.

    Read the article

  • Garbage data from serial port.

    - by sasayins
    Hi I wrote a code in Linux platform that read the data in serial port, my code below: int fd; char *rbuff=NULL; struct termios new_opt, old_opt; int ret; fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY); if( fd == -1 ) { printf("Can't open file: %s\n", strerror(errno)); return -1; } tcgetattr(fd, &old_opt); new_opt.c_cflag = B115200 | CS8 | CLOCAL | CREAD; new_opt.c_iflag = IGNPAR /*| ICRNL*/; new_opt.c_oflag = 0; new_opt.c_lflag = ICANON; tcsetattr(fd, TCSANOW, &new_opt); rbuff = malloc(NBUFF); printf("reading..\n"); memset(rbuff,0x00,NBUFF); ret = read(fd, rbuff, NBUFF); printf("value:%s",rbuff); if(ret == -1) { printf("Read error:%s\n",strerror(errno)); return -1; } tcsetattr(fd, TCSANOW, &old_opt); close(fd); My problem is the code above doesn't read the first data that was transmitted, then the second transmission the data is garbage, then the third is the normal data. Did I missed a setting in the serial port? Thanks.

    Read the article

  • How to explain to a client that you've gone over-budget and you'll need more money/time to deliver w

    - by General Tapioca
    My situation is that I have agreed on a per-project proposal with the client. The proposal is vague, but still names functionality in a way that can be argued as to whether it's included or not, while leaving some room for interpretation. I originally pressed as much as I could to get a per-month contract, arguing that the project is mostly non-predictable, but the client refused. Being a small company, I had to fold and signed a contract on an estimate based on my group's estimations. At this point we have reached completion on about 85% of the features (we think) but we ran out of budget. We have been working for almost two years with this client in previous contracts, and we have delivered a good product that they are happy with, so we have a good standing relationship. More info: -There has been a bit of scope-creep, but I don't think enough for me to hide behind that argument -We've been delivering partial releases about monthly. -We don't have systematic user-testing in place.

    Read the article

  • Scala actors: receive vs react

    - by jqno
    Let me first say that I have quite a lot of Java experience, but have only recently become interested in functional languages. Recently I've started looking at Scala, which seems like a very nice language. However, I've been reading about Scala's Actor framework in Programming in Scala, and there's one thing I don't understand. In chapter 30.4 it says that using react instead of receive makes it possible to re-use threads, which is good for performance, since threads are expensive in the JVM. Does this mean that, as long as I remember to call react instead of receive, I can start as many Actors as I like? Before discovering Scala, I've been playing with Erlang, and the author of Programming Erlang boasts about spawning over 200,000 processes without breaking a sweat. I'd hate to do that with Java threads. What kind of limits am I looking at in Scala as compared to Erlang (and Java)? Also, how does this thread re-use work in Scala? Let's assume, for simplicity, that I have only one thread. Will all the actors that I start run sequentially in this thread, or will some sort of task-switching take place? For example, if I start two actors that ping-pong messages to each other, will I risk deadlock if they're started in the same thread? According to Programming in Scala, writing actors to use react is more difficult than with receive. This sounds plausible, since react doesn't return. However, the book goes on to show how you can put a react inside a loop using Actor.loop. As a result, you get loop { react { ... } } which, to me, seems pretty similar to while (true) { receive { ... } } which is used earlier in the book. Still, the book says that "in practice, programs will need at least a few receive's". So what am I missing here? What can receive do that react cannot, besides return? And why do I care? Finally, coming to the core of what I don't understand: the book keeps mentioning how using react makes it possible to discard the call stack to re-use the thread. How does that work? Why is it necessary to discard the call stack? And why can the call stack be discarded when a function terminates by throwing an exception (react), but not when it terminates by returning (receive)? I have the impression that Programming in Scala has been glossing over some of the key issues here, which is a shame, because otherwise it's a truly excellent book.

    Read the article

  • Proper reconstitution of Aggregate objects in the Repository?

    - by Jebb
    Assuming that no ORM (e.g. Doctrine) is used inside the Repository, my question is what is the proper way of instantiating the Aggregate objects? Is it instantiating the child objects directly inside the Repository and just assign it to the Aggregate Root through its setters or the Aggregate Root is responsible of constructing its child entities/objects? Example 1: class UserRepository { // Create user domain entity. $user = new User(); $user->setName('Juan'); // Create child object orders entity. $orders = new Orders($orders); $user->setOrders($orders); } Example 2: class UserRepository { // Create user domain entity. $user = new User(); $user->setName('Juan'); // Get orders. $orders = $ordersDao->findByUser(1); $user->setOrders($orders); } whereas in example 2, instantiation of orders are taken care inside the user entity.

    Read the article

  • Working with a figure file in Matlab

    - by 49er
    I've got a .fig file showing the intensities of 2d data. How do I obtain the values when I load it in Matlab? Is it even possible? When I try playing with the children properties I am able to obtain only the size of my x and y vectors, not the values themselves which I don't know how to extract.

    Read the article

  • LINQ to SQL -- Can't modify return type of stored procedure.

    - by Kyle Ryan
    When I drag a particular stored procedure into the VS 2008 dbml designer, it shows up with Return Type set to "none", and it's read only so I can't change it. The designer code shows it as returning an int, and if I change that manually, it just gets undone on the next build. But with another (nearly identical) stored procedure, I can change the return type just fine (from "Auto Generated Type" to what I want.) I've run into this problem on two separate machines. Any idea what's going on? Here's the stored procedure that works: USE [studio] GO /****** Object: StoredProcedure [dbo].[GetCourseAnnouncements] Script Date: 05/29/2009 09:44:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[GetCourseAnnouncements] @course int AS SELECT * FROM Announcements WHERE Announcements.course = @course RETURN And this one doesn't: USE [studio] GO /****** Object: StoredProcedure [dbo].[GetCourseAssignments] Script Date: 05/29/2009 09:45:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[GetCourseAssignments] @course int AS SELECT * FROM Assignments WHERE Assignments.course = @course ORDER BY date_due ASC RETURN

    Read the article

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