Search Results

Search found 40310 results on 1613 pages for 'two factor'.

Page 3/1613 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Two-Hop SSH connection with two separate public keys

    - by yigit
    We have the following ssh hop setup: localhost -> hub -> server hubuser@hub accepts the public key for localuser@localhost. serveruser@server accepts the public key for hubuser@hub. So we are issuing ssh -t hubuser@hub ssh serveruser@server for connecting to server. The problem with this setup is we can not scp directly to the server. I tried creating .ssh/config file like this: Host server user serveruser port 22 hostname server ProxyCommand ssh -q hubuser@hub 'nc %h %p' But I am not able to connect (yigit is localuser): $ ssh serveruser@server -v OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012 debug1: Reading configuration data /home/yigit/.ssh/config debug1: /home/yigit/.ssh/config line 19: Applying options for server debug1: Reading configuration data /etc/ssh/ssh_config debug1: Executing proxy command: exec ssh -q hubuser@hub 'nc server 22' debug1: permanently_drop_suid: 1000 debug1: identity file /home/yigit/.ssh/id_rsa type 1000 debug1: identity file /home/yigit/.ssh/id_rsa-cert type -1 debug1: identity file /home/yigit/.ssh/id_dsa type -1 debug1: identity file /home/yigit/.ssh/id_dsa-cert type -1 debug1: identity file /home/yigit/.ssh/id_ecdsa type -1 debug1: identity file /home/yigit/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1 debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1 pat OpenSSH_5* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.1 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA cb:ee:1f:78:82:1e:b4:39:c6:67:6f:4d:b4:01:f2:9f debug1: Host 'server' is known and matches the ECDSA host key. debug1: Found key in /home/yigit/.ssh/known_hosts:33 debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/yigit/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Trying private key: /home/yigit/.ssh/id_dsa debug1: Trying private key: /home/yigit/.ssh/id_ecdsa debug1: No more authentication methods to try. Permission denied (publickey). Notice that it is trying to use the public key localuser@localhost for authenticating on server and fails since it is not the right one. Is it possible to modify the ProxyCommand so that the key for hubuser@hub is used for authenticating on server?

    Read the article

  • Two Persistence Units, Two entityManagerFactory(s), SPring, JPA, Hibernate

    - by sebajb
    I am using Two entityManagerFactory{1,2} based on two persistence units, autowired through spring, hibernate, with resource local. My DaoImpls are configured with the PersistenceUnit(unitName='...') according to the unit needed. I was under the impression that using them with the unitName specified would allow me to use x number of PUs without problem but I still get: expected single matching bean but found two: [emf1, emf2]. Am I missing some other configuration?

    Read the article

  • can I connect two modems and comunicate on two side

    - by GongT
    I just wondering how modems work. I know the process of "modulation" and "demodulation". So I wanto know is "demodulation" are simple revese of "modulation" in real world. The PC can got an IP address when connect as type 1 What will happen when I connect them like type 2? type 1 : [PC] ================= [router] type 2 : [PC] === [m] ------- [m] === [router] [m] : modem(exactly same) === : Ethernet cable --- : DSL cable (phone line, maybe optical fiber, or something else?) ISP has a large number of model, Is them same thing as the one in my home(but with diffrent size/speed/price...etc)? Or it's completely different thing?

    Read the article

  • Connecting Adium to Google Talk with a 2-factor authentication account isn’t working

    - by Robin
    Anyone else having this problem? After turning on 2-factor authentication on my Google Account I stopped being able to log in through Adium (Mac IM client that uses Pidgin’s libpurple for IM). Obviously you need to generate an application-specific password but these won’t let me log in. Application specific passwords work with other applications (e.g. Reeder for feeds and calendering on my phone). Google specifically mention Adium in their examples of setting up an application password for Google Talk so I doubt it’s a generic Adium problem. I can still access Google Talk for this account if I use a talk widget on a Google Website (Plus, or iGoogle for example). My bug report to Adium including a connection log file is up on their Trac: http://trac.adium.im/ticket/15310 . No activity there though. I also asked around in their IRC channel but no-one else could replicate the problem. If I had to guess then I’d think it was a consequence of me not having a GMail account associated with my Google account. I don’t see exactly why that would cause it, but it seems like a fairly unusual setup that might not have been tested for.

    Read the article

  • C#, finding the largest prime factor of a number

    - by Juan
    Hello! I am new at programming and I am practicing my C# programming skills. My application is meant to find the largest prime factor of a number entered by the user. But my application is not returning the right answer and I dont really know where the problem is. Can you please help me? using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("Calcular máximo factor primo de n. De 60 es 5."); Console.Write("Escriba un numero: "); long num = Convert.ToInt64(Console.ReadLine()); long mfp = maxfactor(num); Console.WriteLine("El maximo factor primo es: " + num); Console.Read(); } static private long maxfactor (long n) { long m=1 ; bool en= false; for (long k = n / 2; !en && k > 1; k--) { if (n % k == 0 && primo(k)) { m = k; en = true; } } return m; } static private bool primo(long x) { bool sp = true; for (long i = 2; i <= x / 2; i++) { if (x % i == 0) sp = false; } return sp; } } }

    Read the article

  • given two bits in a set of four, fine position of two other bits

    - by aaa
    hello I am working on a simple combinatorics part, and found that I need to recover position of two bits given position of other two bits in 4-bits srring. for example, (0,1) maps to (2,3), (0,2) to (1,3), etc. for a total of six combinations. My solution is to test bits using four nested ternary operators: ab is a four bit string, with two bits set. c = ((((ab & 1) ? (((ab & 2) ? ... ))) : 0) abc = ab | c recover the last bit in the same fashion from abc. can you think of a better way/more clever way? thanks

    Read the article

  • Communication between two applications running on two different versions of Tomcat

    - by Saurabh
    I have two web application running on two different versions of Tomcat. App1 is on Tomcat5 and App2 is on Tomcat6. Is there any way, so that I can make a communication among these two. For example - If there is a JavaScript file in App2/js/mycode.js, then I would like to refer this from App1/page/mypage.jsp. For both applications I have defined context as - App1.xml (Tomcat5\conf\Catalina\localhost) <Context path="/App1" docBase="C:/eclipse/workspace/App1" debug="0"> </Context> App2.xml (Tomcat6\conf\Catalina\localhost) <Context path="/App2" docBase="C:/eclipse/workspace/App2" debug="0"> </Context>

    Read the article

  • two's complement, why the name "two"

    - by lenatis
    i know unsigned,two's complement, ones' complement and sign magnitude, and the difference between these, but what i'm curious about is: why it's called two's(or ones') complement, so is there a more generalize N's complement? in which way did these genius deduce such a natural way to represent negative numbers?

    Read the article

  • Android Bottombar with two buttons having different backgrounds and a common background for two butt

    - by cppdev
    Hi, I have a linear layout in my main.xml which has a listview. Now I want to create a bottom bar below listview. Bottombar has a background image and two buttons with their individual background images. I want to put these two buttons on common background image. I have read that this can be achieved using FrameLayout. But since I am using LinearLayout as base layout in my main.xml, is there any way to this design using linearlayout ?

    Read the article

  • Replace values in a dataframe based on another factor which contains NA's in R

    - by PaulHurleyuk
    I have a dataframe which contains (among other things) a numeric column with a concentration, and a factor column with a status flag. This status flag contains NA's. Here's an example df<-structure(list(conc = c(101.769, 1.734, 62.944, 92.697, 25.091, 27.377, 24.343, 55.084, 0.335, 23.280), status = structure(c(NA, NA, NA, NA, NA, NA, 2L, NA, 1L, NA), .Label = c("<LLOQ", "NR"), class = "factor")), .Names = c("conc", "status"), row.names = c(NA, -10L), class = "data.frame") I want to replace the concentration column with a string for some values of the flag column, or with the concentration value formatted to a certain number of significant digits. When I try this ifelse(df$status=="NR","NR",df$conc) The NA's in the status flag don't trigger either the true or false condition (and return NA) - as the documentation suggests it will. I could loop over the rows and use IF then else on each one but this seems inefficient. Am I missing something ? I've tried as.character(df$status) as well which doesn't work. My mojo must be getting low....

    Read the article

  • Factor Clojure code setting many different fields in a Java object

    - by chris
    How do I factor code setting many different fields in a Java object? I would like to factor (set! (. employee name) "Chris") (set! (. employee age) 100) (set! (. employee salary) 5000) to (doseq [field '((name "Chris") (age 100) (salary 5000))] (set! (. employee (first field)) (second field))) However this won't work because the period is a macro, and tries to evaluate (first field) literally. By the way, I understand that setting fields is not good practice. I need to inter-operate with legacy code.

    Read the article

  • android: having two listviews in two listactivities didn't work

    - by Yang
    I guess my previous question wasn't clear enough (http://stackoverflow.com/questions/2549585/android-failed-to-setcontentview-when-switching-to-listactivity), so I explain as follows. In my app I have two listactivities which uses two different listviews: public class Activity1 extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { try{ super.onCreate(savedInstanceState); setContentView(R.layout.listview1); } public class Activity2 extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { try{ super.onCreate(savedInstanceState); setContentView(R.layout.listview2); } } As required by android, listview must have an ID which is exactly "@android:id/list". If I set the listview in both listview1 and listview2 with the same ID, then they will end up using the same format of listview, which is not what I want. But if I set one of the IDs to be sth like "@+id/listview2", android gave me the error: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' How do I handle this dilema?

    Read the article

  • MYSQL Inner Join two table over two keys

    - by bertsisterwanda
    I am doing a query to return all users shopping carts, stored in the sb_carts table. The product information stored in sb_carts is referenced over two keys product_sku and school_id. It needs to reference both to return a unique product with unique stock levels etc. When I execute the following query it returns one row, I am expecting 3 rows. I have tried breaking the inner join into two separate joins but this still returns only 1 result. joining only on one key has the desired result, but may be retuning the wrong product. A left join returns 3 rows but some data is missing product specific Here is a simplified example of what I am doing SELECT sb_carts.product_sku FROM sb_carts INNER JOIN sb_products ON sb_products.sku = sb_carts.product_sku AND sb_products.school_id = sb_carts.school_id WHERE sb_carts.order_id = 0 AND sb_carts.user_id = 2 GROUP BY sb_carts.cart_id

    Read the article

  • Two Different Types of Associatons on the Same Two Tables in Rails

    - by tmo256
    I have two models, users and themes, that I'm currently joining in a HABTM association in a themes_users table. Basically, after a user creates a new theme, it becomes available to other users to select for their own use. However, only the original creator of the theme should have the ability to edit it. So, I need to have some other kind of association to handle that relationship, something like an created_by_id field in the theme. In this way, the user model acts as two different roles: they can be an implementer of a theme AND/OR the owner of the theme. The implementer relationship is handled by the themes_users join table; the question is: What is the right way to handle this secondary association? Do I need to make users polymorphic and then make the created_by_id reference an "owner"? Or is there something easier? Thanks so much for your help!

    Read the article

  • XPath to compare two distinct attributes of two elements

    - by user364902
    Suppose I have this XML: <x> <e s="1" t="A"/> <e s="2" t="A"/> <e s="1" t="B"/> </x> Is there any way to write an xpath to find any nodes named "e" which have the same value of @s as another node but a different value of @t for the same node. The first part is easy: //e[@s = //e/@s] as is the second part: //e[@t != //e[@t]] But I don't see any way to construct an xpath that compares two different attributes for two separate elements "e". Is there a way within the xpath syntax, or is it hopeless?

    Read the article

  • two log4j files for EAR with two modules

    - by nicktmro
    Hi, I have an EAR that is made up of two modules. Both expose services and share common code. Imagine that the ear has a common.jar shared by a webservices.war and webapp.war. I use log4j to log the activities. I would like to be able to have two log files (webservices.log and webapp.log) capturing the events that are specific to each of them plus all the stuff that is handled by the common.jar. How should I configure my categories and my appenders to achieve this? At the moment I have the following packages: com.myapp for shared stuff com.myapp.webservices for the webservices and com.myapp.webapp for the webapp. My problem is that I don't know how I can capture the com.myapp (common stuff) in both log files by using a single log4j configuration file. I have tried setting up multiple configuration files but when JBoss would work OK Websphere would break and the other way round... Thank you

    Read the article

  • Why does the Java Collections Framework offer two different ways to sort?

    - by dvanaria
    If I have a list of elements I would like to sort, Java offers two ways to go about this. For example, lets say I have a list of Movie objects and I’d like to sort them by title. One way I could do this is by calling the one-argument version of the static java.util.Collections.sort( ) method with my movie list as the single argument. So I would call Collections.sort(myMovieList). In order for this to work, the Movie class would have to be declared to implement the java.lang.Comparable interface, and the required method compareTo( ) would have to be implemented inside this class. Another way to sort is by calling the two-argument version of the static java.util.Collections.sort( ) method with the movie list and a java.util.Comparator object as it’s arguments. I would call Collections.sort(myMovieList, titleComparator). In this case, the Movie class wouldn’t implement the Comparable interface. Instead, inside the main class that builds and maintains the movie list itself, I would create an inner class that implements the java.util.Comparator interface, and implement the one required method compare( ). Then I'd create an instance of this class and call the two-argument version of sort( ). The benefit of this second method is you can create an unlimited number of these inner class Comparators, so you can sort a list of objects in different ways. In the example above, you could have another Comparator to sort by the year a movie was made, for example. My question is, why bother to learn both ways to sort in Java, when the two-argument version of Collections.sort( ) does everything the first one-argument version does, but with the added benefit of being able to sort the list’s elements based on several different criteria? It would be one less thing to have to keep in your mind while coding. You’d have one basic mechanism of sorting lists in Java to know.

    Read the article

  • Secure Yourself by Using Two-Step Verification on These 16 Web Services

    - by Chris Hoffman
    Two-factor authentication, also known as 2-step verification, provides additional security for your online accounts. Even if someone discovers your password, they’ll need a special one-time code to log in after you enable two-factor authentication on these services. Notably absent from this list are banks and other financial institutions. It’s a shame that you can use two-factor authentication to protect your in-game currency in an MMORPG, but not the real money in your bank account. Secure Yourself by Using Two-Step Verification on These 16 Web Services How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot

    Read the article

  • get the length/width of value in a factor

    - by Brandon
    How do you get the length of a variable. I am trying to get the last character of factor but the width/length of the contents is variable. I was trying to do something like this: newvariable <- substr(oldvariable, length(oldvariable) -1, length(oldvariable))

    Read the article

  • How to enable a two-finger drag on a mac in Silverlight?

    - by Edward Tanguay
    In a Silverlight 4 application I have a ScrollViewer which I enable the user to scroll with the mouse wheel by using SetIsMouseWheelScrollingEnabled(): <ScrollViewer x:Name="CodeBoxScrollViewerModelSingular" tk:DockPanel.Dock="Left" Style="{StaticResource ScrollViewerCodeBoxStyle}"> <TextBox Text="{Binding SingularModelFileContent}" Style="{StaticResource TextBoxCodeBoxStyle}"/> </ScrollViewer> CodeBoxScrollViewerModelSingular.SetIsMouseWheelScrollingEnabled(true); However, someone tested it on a Mac and said: The only problem I noticed on a quick test was that I couldn't scroll down by using a two-finger drag, which has been standard UI behavior on the Mac for several years now. Is there any way to enable a "two-finger drag" on the Mac as you can enable mouse wheel scrolling?

    Read the article

  • Multiplying two matrices from two text files with unknown dimensions

    - by wes schwertner
    This is my first post here. I've been working on this c++ question for a while now and have gotten nowhere. Maybe you guys can give me some hints to get me started. My program has to read two .txt files each containing one matrix. Then it has to multiply them and output it to another .txt file. My confusion here though is how the .txt files are setup and how to get the dimensions. Here is an example of matrix 1.txt. #ivalue #jvalue value 1 1 1.0 2 2 1 The dimension of the matrix is 2x2. 1.0 0 0 1 Before I can start multiplying these matrices I need to get the i and j value from the text file. The only way I have found out to do this is int main() { ifstream file("a.txt"); int numcol; float col; for(int x=0; x<3;x++) { file>>col; cout<<col; if(x==1) //grabs the number of columns numcol=col; } cout<<numcol; } The problem is I don't know how to get to the second line to read the number of rows. And on top of that I don't think this will give me accurate results for other matrices files. Let me know if anything is unclear. UPDATE Thanks! I got getline to work correctly. But now I am running into another problem. In matrix B it is setup like: #ivalue #jvalue Value 1 1 0.1 1 2 0.2 2 1 0.3 2 2 0.4 I need to let the program know that it needs to go down 4 lines, maybe even more (The matrices dimensions are unknown. My matrix B example is a 2x2, but it could be a 20x20). I have a while(!file.eof()) loop my program to let it loop until the end of file. I know I need a dynamic array for multiplying, but would I need one here also? #include <iostream> #include <fstream> using namespace std; int main() { ifstream file("a.txt"); //reads matrix A while(!file.eof()) { int temp; int numcol; string numrow; float row; float col; for(int x=0; x<3;x++) { file>>col; if(x==1) { numcol=col; //number of columns } } string test; getline(file, test); //next line to get rows for(int x=0; x<3; x++) { file>>test; if(x==1) { numrow=test; //sets number of rows } } cout<<numrow; cout<<numcol<<endl; } ifstream file1("b.txt"); //reads matrix 2 while(!file1.eof()) { int temp1; int numcol1; string numrow1; float row1; float col1; for(int x=0; x<2;x++) { file1>>col1; if(x==1) numcol1=col1; //sets number of columns } string test1; getline(file1, test1); //In matrix B there are four rows. getline(file1, test1); //These getlines go down a row. getline(file1, test1); //Need help here. for(int x=0; x<2; x++) { file1>>test1; if(x==1) numrow1=test1; } cout<<numrow1; cout<<numcol1<<endl; } }

    Read the article

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