I am using Sqoop (version 1.4.4) to import data from MySQL to Hive. The data will be a subset of one of tables, i.e. few columns from a table. Is it necessary to create table in Hive before hand. Or importing the data will create the name specified in the command if it is not in the Hive?
Is it possible to send a memorystream like a file to an HTML <embed> The idea is not creating a file in the hard drive. I have created the stream and I can download the file no problem, the problem is passing to the variable to send to the aspx page so I can use it to show the file on a particular div. Is it possible without creating a file in the disk? This is the Code I have: public string ExportMemoryPdf(DataTable dtpdf, String Path) { string User = System.Web.HttpContext.Current.User.Identity.Name.ToString(); string Date = DateTime.Now.ToString(); string Year = DateTime.Now.ToString("yyyy"
I have a Button whose click pops up a dialog box.The dialog box is getting displayed at center.But i want to display it just below the button.How to do this ? I tried using popup window also.Here is the code private void showPopup(final Activity context, Point p) { Display display = getWindowManager().getDefaultDisplay(); width = display.getWidth(); // deprecated height = display.getHeight(); // deprecated int popupWidth =width; int popupHeight =height; // Inflate the popup_layout.xml LinearLayout viewGroup = (LinearLayout) context.findViewById(R.id.popup); LayoutInflater layoutInflater = (Lay
Is it possible to create a Jbutton with both an ActionListener and MouseListener Meaning so i create a button and then when i press it ( throught actionListener) it changes the frame so that AFTER then button was pressed i can press anywhere on the frame and MouseListener would in use. JButton button = new JButton();//Creates Button button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //Insert MouseListener //Then do something with mouseListener } }); Heres the curent code: however they're now in sync when i try to click the button and i cannot call mous
I am new to Java, and learning new things everyday. English is not my mother language, I'm sorry. So, I'm making a maze game in Java to learn while writing code. For my maze game, the player needs to get to the exit of the maze asap. And the time he has, needs to be saved in an encrypted text file. So I've got a package Highscores combining several classes. The code works more or less, it outputs in the console. Now what I need is that that output gets outputted on a JPanel next to my maze. I've added some extra info in the code Here is my highscore class: public class Highscore { // An arrayl
I am supporting some legacy code and it's chugged along fine until recently. I am looking for if there is a setting for JDBC Oracle thin connection where I can specify idle timeout via Java (no connection pooling)? A lot of resources online refer to connection pooling... is it even possible in my case (to specify idle timeout, in a non-pooling situation)? Or is idle time a setting on the specific DB user account? Updates + Questions I was able to log in as the user, and ran a query to try to find out resource limits. select * from USER_RESOURCE_LIMITS; However everything came back "UNLIMITED".
I write a android app, I install my app to my samsung tablet 3 by using eclipse, it works fine, but when I put my app to google market , And I enter market with my tablet I want to install my app but it says no eligible devices for app install what is the problem I do not understand. my manifest file <uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/> <uses-permission android
I'm implementing a wall climbing system into my 2D game and I'm stuck on a few of the trickier parts. My thinking is that I would have my player parent to the wall object when it collides with the 2D collider attached. When the player collides with the wall, the player becomes a child of that wall and is limited to only moving up and down on the wall. When the player jumps, or reaches the top, they are no longer a child of the wall. But the player has the ability to jump on any point onto the wall they land on and stays at that point. Right now I have the parenting part worked out with the fol
While reading this: http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv I came to the phrase: The last step, which involves modulus division by 2^10 - 1, has the effect of merging together each set of 10 bits (from positions 0-9, 10-19, 20-29, ...) in the 64-bit value. (it is about reversing the bits in a number)... so I did some calculations: reverted = (input * 0x0202020202ULL & 0x010884422010ULL) % 1023; b = 74 : 01001010 b * 0x0202020202 : 1000000010000000100000001000000010 = 9494949494 :01001010010010100100101001001010010010100 & 10884422010 :100001000100001000100
When I deploy app using jboss-as-maven-plugin mvn clean jboss-as:deploy application works. When I try to deploy from Eclipse using e.g. "Full publish", it doesn't. I've compared versions of application being deployed and seems that "Full publish" simply copied what has been specified in Properties > Deployment Assembly. Is it possible to use this plugin during "Full publish" ? I want to make use of hot deploy feature for jsp, but without properly configured automatic deployment from Eclipse I'm rather blocked. regards Lukas Wildfly 8.0.0.CR1 Eclipse Keppler SR1 org.jboss.as.plugins:jboss-as-ma
I'm studying a JavaScript book, and I have this example var p = { // x and y are regular read-write data properties. x: 1.0, y: 1.0, // r is a read-write accessor property with getter and setter. // Don't forget to put a comma after accessor methods. get r() { return Math.sqrt(this.x * this.x + this.y * this.y); }, set r(newvalue) { var oldvalue = Math.sqrt(this.x * this.x + this.y * this.y); var ratio = newvalue / oldvalue; this.x *= ratio; this.y *= ratio; }, // theta is a read-only accessor property with getter only. get theta() { return Math.atan2(this.y, this.x); } }; var q = inherit(p);
Are there any tools/libraries available (in linux) to help convert a pdf table to something usable, such as csv? Take for example http://www.sendspace.com/file/dkoq5j . Here is a picture of the page too. I could just type it out of course which might be quickest but I thought it would be interesting to see what can be done automatically. pdftotext extacts the text but just puts everything in a column like this. School name Admission number per year Abacus Argyle Beckford [...] pdftotext -layout is actually pretty good.
I am designing login page. Here I am adding icons for username and password, when I add icons along with icons someother icons also adding how to resolve this . Here is my code. <div class="left-inner-addon "> <i class="icon-user"></i> <input type="text" placeholder="User Name" name='j_username' > </div></div> and css is as follow, <style type="text/css"> .left-inner-addon { position: relative; } .left-inner-addon input { padding-left: 30px; } .left-inner-addon i { position: absolute; padding: 10px 12px; pointer-events: none; } </style> and I dont have reputation to post pic of the login form
I need help for installing gradle. I am using Windows 7. What i did is: I downloaded and unzipped gradle to C:\java\tools\gradle I created a user variable GRADLE_HOME pointing to : C:\java\tools\gradle Then i appended GRADLE_HOME to Path variable like this ...;%GRADLE_HOME%\bin; Finally i tryied gradle -v in cmd but it can't find it. I also appended the full path C:\java\tools\gradle\bin to Path variable but it not working neither. I don't understand what is wrong.
In ORACLE PL/SQL DEVELOPER, am I able to do the following as I could easily do in SQL Server? DECLARE @EmpIDVar INT SET @EmpIDVar = 1234 SELECT * FROM Employees WHERE EmployeeID = @EmpIDVar This seems like such a simple thing and yet it seems impossible to do in Oracle! I know about using & in front of variables that will prompt me to enter their values but why can't I just do something like the above?
Pylint generates this error for subclasses of an abstract class, even when those subclasses are not themselves instantiated and the methods are overridden in the concrete subclasses. Why does Pylint think my abstract subclasses are intended to be concrete? How can I shut up this warning without getting out the hammer and disabling it altogether in the rc file?
Naively, conditionally executed instructions seem like a great idea to me. As I read more about ARM (and ARM-like) instruction sets (Thumb2, Unicore, AArch64) I find that they all lack the bits for conditional execution. Why is conditional execution missing from each of these? Was conditional execution a mistake at the time, or have subsequent changes made it an expensive waste of instruction bits?
I'm working with Face Recognition project and I would like to know what is the difference between EigenFaceRecognizer and EigenObjectRecognizer and which is better to use.
I realize there are a few threads regarding this issue. However, I am new to this, and some of the solutions I found did not work for me. I have an iPhone app that should support all orientations except in one view. This view I would like to lock in portrait only. I tried this code, but it still goes to landscape mode when I flip the phone... what am I doing wrong? - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfac
I'm working on Euler problem #3: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? here is my Perl code just try to get all the factors first but it got segmentation fault, my Perl age is just about 2 month, could not figure out why. Segmentation fault 11 when I run it. #!/usr/bin/perl use warnings; use strict; my $number = 600851475143; my @factors = grep {$number % $_ == 0} (1..$number); print @factors; Run it again with sudo, no more segmentation fault but nothing printed out.
Scope: I have an app that I am starting to build that has the "subscriber/publisher" situation on its core. For those who don't know, the idea behind this schema is that: Someone creates a "Topic" Endpoints subscribe to a "Topic" Any message published to a certain "Topic" is pushed to the subscribers of said "Topic" Considerations: I am going to use Xamarin.IOS and Xamarin.Android as the framework to build this mobile app (so that it can be crossplatform from the begining). RabbitMQ: The RabbitMQ service is built on top of the AMQP pattern which solves my entire problem of modeling the "Topic/
I have compiled and installed python2.6 on my system with python2.7 installed as well. Unfortunately, I did not do it correctly and now my default python is 2.6. When I enter which python && /usr/bin/env python -V I am given /usr/local/bin/python Python 2.6.9 How can I change this? I checked my $PATH variable, but anything relevant to python is not there. The desired version is /usr/bin/python
I don't have any clue how to solve this. I reinstalled the Xcode Commandline tools which were missing previously - but the problem still persists. Compass and CodeKit do not work as expected. Any idea what to do? Marcs-Mac-mini:~ marc$ gem update --system Error loading RubyGems plugin "/Users/marc/.rvm/gems/ruby-2.1.0@global/gems/executable-hooks-1.3.1/lib/rubygems_plugin.rb": ERROR: Failed to build gem native extension. /usr/local/Cellar/ruby/2.1.0/bin/ruby extconf.rb /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/Cellar/ruby
I'm conducting automation testing using Selenium Webdriver. This code is for TestNG dataprovider. I am taking data from Excel sheet to data and it's working fine. When I'm debugging the code, I'm getting TestData as testGoogle1(String search1, String Search2). For 1st iteration it is Search1 = Webdriver, Search2 = Qtp, and so on. What I want is that it should directly return the array of values something like testGoogle1(String search[]) so that in the @Test itself I can add my function iterate all the rows and columns and test them. Can anyone please show me how to write it? Test Data sheet H
I'm not sure anyone will know the answer to this question, unless you are responsible for writing the Jave API, but when the Java API says "equals", does it always mean that a.equals(b) evaluates to true, or sometime does it mean a == b is true? I have recently extended a class and wondered if I needed to override a method depending on where or not it used == or .equals. Specifically, I extended javafx.beans.binding.ObjectExpression and was curious about the .isEqualTo(Object other) method. I checked the source (here) and found that this method uses .equals for comparison. I'm curious if I can
I am trying to make an upload page which takes file to upload. I am using Spring framework here my query is on Upload button I am calling a JavaScript method which should send my file to controller using jQuery AJAX. Is there any way to pass this through JavaScript? Following is the code which I am trying. <body> <div style="text-align: center; margin-top: 60px;"> <form enctype="multipart/form-data"> Select file: <input type="file" name="dataFile" id="fileAttachment"/><br/><br/> <div style="text-align: center; margin-top: 100px;"> <input style="cursor: pointer;" onmouseover="" onclick="uploadA
Im trying to make some VBA form and to calculate some simple values but I dont understand why VBA dosen't recognize Sin() and Cos() functions. For example: I wrote int() and VBA transformed it into Int(), but it doesn't do the same with sin and cos. Moreover, after I'm trying to compile my code Private Sub btn_exit_Click() Unload laborator_2 End Sub Private Sub btn_start_Click() today.Caption = Date rnb_val.Caption = Int(Rnd * 90 + 1) sqrt_val.Caption = Sqr(rnb_val.Caption) si_val.Caption = sin(rnb_val.Caption * 3.14159 / 180) co_val.Caption = rnb_val.Caption * 3.1459 / 180 End Sub I got this
I'm trying to create a 2 step job in Jenkins. I want the second step only to run if the first step fails. (The first step executes a unit test to see if the code I'm compiling is good - if it is not then i want to run some diagnostics in the second step). The conditional step plug seems a good choice for this. However, I can't work out how to use the conditional step plug in to cause the second step to run when the first step fails. The conditional step plug in offers a list of conditions such as 'Never', 'Boolean condition' ... and 'Current Build Status'. I would have thought I should use a '