When I attempt to build my android project after updating to the latest version of android studio/developer tools I have been getting these errors: [Fatal Error] :1:38: A pseudo attribute name is expected. FAILED FAILURE: Build failed with an exception. What went wrong: A problem was found with the configuration of task ':apoAppAndroid:generatePharmoreDebugBuildConfig'. No value has been specified for property 'buildConfigPackageName'. I though Package Name had been deprecated, what am I doing wrong? Here is a shortened version of my gradle file apply plugin: 'android' android { compileSdkVers
I'm trying to call a procedure with MyBatis. This is the procedure signature: PROCEDURE pr_start(io_calc IN OUT TYPE_CALC, in_restart BOOLEAN DEFAULT TRUE, in_user VARCHAR2 DEFAULT NULL); It's in a package named PACKAGE_PP. This is how TYPE_CALC is declared: CREATE OR REPLACE TYPE TYPE_CALC AS OBJECT ( modelField VARCHAR2(5 CHAR), sysField VARCHAR2(5 CHAR), hexField VARCHAR2(5 CHAR) ); This is my XML mapping: <select id="pr_start" statementType="CALLABLE" parameterType="map"> { exec PACKAGE_PP.pr_start( #{io_calc,mode=INOUT,jdbcType=STRUCT,jdbcTypeName=TYPE_CALC}, #{in_restart,mode=IN,jdbcType
I have a std::set of a class which stores some master data. Below is how my set looks like: std::set<TBigClass, TBigClassComparer> sSet; class TBigClassComparer { public: bool operator()(const TBigClass s1, const TBigClass s2) const { //comparison logic goes here } }; Now I want to filter data in this set based on some fields of the TBigClass and store it in another set for manipulation. std::set<int>::iterator it; for (it=sSet.begin(); it!=sSet.end(); ++it) { //all the records with *it.some_integer_element == 1) //needs to be put in another set for some data manipulation } Could anyone tell m
I wanted to sort a grid view by column when user clicks on a column header. Here user can click any column and grid view is sorted based on the column clicked. This is my code: <asp:GridView ID="gvEmployeeStatus" runat="server" AutoGenerateColumns="false" AllowPaging="True" PageSize="10" AllowSorting="true" OnPageIndexChanging="gvEmployeeStatus_PageIndexChanging" OnSorting="gvEmployeeStatus_Sorting" > protected void gvEmployeeStatus_Sorting(object sender, GridViewSortEventArgs e) { loginName = (String)(Session["LoginName"]); dsLoginDetail = clsBLogic.TblLogin(loginName); tblEmployeeNo = dsLogi
I have trying to submit a form using jquery. Form is submitted correctly but it do not clear the form after submission. here is my jquery code <script type="text/javascript"> $(document).ready(function(){ $("#save").click(function(){ $("#myform").submit(); $("#myform")[0].reset(); }); }); </script> here is my form <form action="http://localhost/newsletter/index.php/email/send" method="post" accept-charset="utf-8" id="myform" name="myforms"> <p> <label for="name">Email Address </label> <input type="text" name="email" id="email" value="<?php echo set_value('email');?>"> <input type="button" valu
I am using Getpt::Long to take the arguments from the command line and assign them to their respective variables. But, I am getting errors when I am printing it. The code and the error is as follows: #!usr/bin/perl use strict; use warnings; use Getopt::Long; GetOptions( "mount_path=s" => \my $old_path, "var=s" => \my $var, "log_path=s" => \my $log_path, ) or die "Error in input variables\n"; print <<"END_INPUTS"; These are your inputs: old_path= $old_path var = $var log_path=$log_path Press enter twice if all looks GOOD ********************************************************* END_INPUTS The c
I am using Getpt::Long to take the arguments from the command line and assign them to their respective variables. But, I am getting errors when I am printing it. The code and the error is as follows: #!usr/bin/perl use strict; use warnings; use Getopt::Long; GetOptions( "mount_path=s" => \my $old_path, "var=s" => \my $var, "log_path=s" => \my $log_path, ) or die "Error in input variables\n"; print <<"END_INPUTS"; These are your inputs: old_path= $old_path var = $var log_path=$log_path Press enter twice if all looks GOOD ********************************************************* END_INPUTS The c
I thought I knew how to do this, but when I am actually doing it, doesn't seem like I know how to do this. What I am trying to achieve is display a filtered rows of table that is in dataset when search btn is clicked. Allow users to make changes on the datagridview or update selected rows with values provided on textbox on the update panel when Update btn is clicked. But I can't seem to achieve this. private void Display() { bindingSourceDisplay.DataSource=_dsNorthwind.Customers.Where(x=>!x.IsRegionNull() && !x.IsFaxNull() && !x.IsPostalCodeNull()).Take(10); dgvSearchResult.DataSource = bindin
How can this happen. Isn't liquibase supposed to create this table for itself... This is an in memory database created for unit testing. public void setUp(String contexts) { try { ResourceAccessor resourceAccessor = new FileSystemResourceAccessor(); Class.forName("org.hsqldb.jdbcDriver"); holdingConnection = getConnectionImpl(); HsqlConnection hsconn = new HsqlConnection(holdingConnection); liquibase = new Liquibase(CHANGE_LOG, resourceAccessor, hsconn); liquibase.dropAll(); liquibase.update(contexts); hsconn.close(); } catch (Exception ex) { LOG.error("Error during database initialization", e
What are the main differences between Unity 2D project and unity 3D project! Does unity render faster 2D projects than 3D? Or does 2D prefabs/textures require less memory than 3D? Is there an option for creating 2D meshes in 2D projects? Thank you for your time!
I am having some trouble with using the send mail functionality of pear with wamp. I went through with the steps in this link : (http://pear.php.net/manual/en/installation.checking.php) to check if my pear was installed correctly, and it seems like I have it right. <?php require_once 'System.php'; var_dump(class_exists('System', false)); ?> The code above returns bool(true). So I am assuming that my paths are set right. But for the code below I am getting an error. <?php include 'Mail.php'; include 'Mail/mime.php' ; $text = 'Text version of email'; $html = '<html><body>HTML version of email</b
I am using wp_trim_words() to trim excerpts on my homepage. It works fine except that it strips HTML tags from the excerpts. I need to keep certain pieces of the excerpt bold (using <strong>). Following the instructions here, I tried replacing the wp_trim_words function with custom code where $text = wp_strip_all_tags( $text ); is changed to $text = strip_tags($text, '<strong>');. However, this breaks the site. What am I doing wrong? // Remove Reverie Trim Words function remove_trim_words() { remove_filter('get_the_excerpt', 'wp_trim_words'); add_filter('get_the_excerpt', 'oakwood_trim_words')
I'm fairly new to Selenium WebDriver. I wrote code to read the login credentials and values from the excel sheet by using Data Provider. It runs through the first set up data(login functionality) perfectly giving me the green status bar. In my application, after login, I want to select values by sending index and Selection(In Administration Method) from the same excel sheet but I failed to read values. For hard coded values its working fine. can anyone please give me the idea how to write it. Used Excel Sheet: Below is my code: import java.io.File; import jxl.Sheet; import jxl.Workbook; import
I'm using this environment: spring 4.0.5 spring security 3.2.4 In my environment I have a SSO system and I need to integrate my web applicationin this system. This system is a private product. The final result of the SSO mechanism is to put a parameter in the request header. So what I should do in my application is: check if a header parameter is present in the request if the header parameter is not present, I have to redirect to the login page of this system if the header parameter is present, I have to authenticate on the Spring security context This scenario is similar to the CAS integratio
I have a table in my database named posts where I’d like to create search engine functionality. Here are the basic fields for this: table: `Posts` `post_id` (pk) `title` `keywords` `visible` // this is the critical point I have created also this method in my post_model: public function search() { $this->db->select('post_id, title, etc etc ...'); // separate the words $words = preg_split('/[\s]+/', htmlentities((trim($this->input->post('search'))))); // set fields that you wish to search $search_fields = array('title', 'keywords'); // build the query foreach ($words as $word) { foreach ($search
I’d like some help please. I have a table iin my database named posts, where I’d like to create a search engine functionality. Here are the basic fields for this: table: Posts post_id (pk) title keywords visible // **** this is the critical point **** I have created also this method in my post_model: public function search() { $this->db->select('post_id, title, etc etc ...'); // separate the words $words = preg_split('/[\s]+/', htmlentities((trim($this->input->post('search')))) ) ; // set fields that you wish to search $search_fields = array('title', 'keywords'); // build the query foreach ($w
I want to know if it is possible to generate automatic touch at regular intervals of time, say 5 seconds in another application. For example..I want to develop an application which will create a touch response just as we touch the screen, at a particular coordinate at regular fixed interval. Please help.
How long does it take for a new Google Maps API key take to become active? I have just added a new key and a new package to an existing key, but neither seem to work. Is it an issue with the key getting activated?
I am using django-encrypted-fields to encrypt the data on my database. But I want to be able to filter them according to user's criteria e.g search a client with specific name (search term). But as I have read here and everywhere, you can't filter if you use EncryptedFields. So I was wondering is it ok to use standard for loops to iter on every db record and see if search term matches the fields of your model? eg clients = Client.objects.all() post_data = form.cleaned_data search_result = [] for client in clients: if (post_data['charfield1'].lower() in client.charfield1.lower() and post_data['
Context: I want to compile and test all modules in a multi-module project but if any fail either compilation or tests I want the overall build to fail. Default configurations either stop on the first failure or skip modules after a test failure Running: mvn clean install stops at the first failing module. If you add: mvn clean install -fae //fail at end then all modules are run, but if tests fail then any dependent modules are skpped: [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] --------------------------------------------------
I'm trying to create a server (a computer with Bluetooth) that listen to Bluetooth messages. I'm using 32 feet library. But I'm getting a exception, and I cannot find what it is. The exception is: No supported Bluetooth protocol stack found. here is the code: using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using InTheHand; using InTheHand.Net.Bluetooth; using InTheHand.Net.Ports; using InTheHand.Net.Sockets; using System.IO; namespace Bluetoot_Tutorial { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private vo
I'm writing a simple recursive ls program in bash (which I'm very not experienced at, so feel free to be brutal). The program is supposed to print out each file (possibly directory) on a separate line, and each time a new directory is entered, the output is shifted over by 4 spaces, to give it a tree-like output. Currently, it doesn't print out files with spaces correctly, and it doesn't put a forward slash after directories. (More details below.) Code recls () { # store current working directory # issues: seems bad to have cwd defined up here and used down below in getAbsolutePath -- too much
I use Spring - Maven - Eclipse and I'm facing this ugly exception regarding the context initialization. It works fine when I place the configurations files under WEB-INF but I read that it's recommended to place them in the src/main/resources folder. At that moment, the exception is raised. I've spent a few hours trying to solve it on my own but i was unsuccessful. What's wrong with my configuration ? Thank you for your help. Stack traces Severe: Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext re
I am migrating away from XML config for Spring context configuration. Instead when I try to use the functionally equivalent @EnableTransactionManagement on a Spring 4.0.3.RELEASE Java Configuration, my Spring context fails to instantiate with the following exception: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99) at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:101) at org.springframework.test.context.su
I need to document many CLI commands using Sphinx doc. I have searched everywhere for an extension that could be used to produce an output similar to how github documents CLI commands: https://developer.github.com/v3/#parameters Is there any extension that I missed that could help with that? If not, can anyone point the direction to building one? I need to be able to document for example like this: .. sourcecode:: cli $ curl -i "https://api.github.com/repos/vmg/redcarpet/issues?state=closed" and have that output.
script.php $filename = realpath(sprintf("%s/%s", getcwd(), $argv[1])); var_dump($filename); Let's try some things [/foo/bar/bof] $ php script.php ../foo.txt string(16) "/foo/bar/foo.txt" [/foo/bar/bof] $ php script.php ../nonexistent.txt bool(false) Dammit! realpath is returning false because the file doesn't exist. What I'd like to see for the ../nonexistent.txt is string(24) "/foo/bar/nonexistent.txt" How can I get the canonicalized path for any relative path in PHP? Note: I saw some questions regarding resolving symlink paths. Answers to these questions are not applicable to my question.
I have implemented this jQuery-based modal box: http://leanmodal.finelysliced.com.au/. It works perfect, and it is quite easy to use. However, it is not responsive - contrary to the rest of the website. Here is what I got so far: CSS-part #lean_overlay { position: fixed; z-index:100; top: 0px; left: 0px; height:100%; width:100%; background: #000; display: none; } div.modalbox { background: #FFFFFF; border-radius: 5px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.7); padding : 10px; width: 400px; display : none; position : absolute; } .modalbox-header { background: url("../images/hd-bg.png") repeat scro
I have two question about oracle export and import. First of all,I want to export only user and their roles not tables,trigger and other object Later import user How i can do? Other question is while importing operation, can i get error?Because, which object importing early roles or user? Unless importing roles, user can't assign roles?
I know I can add some if blocks around to avoid this problem, but I am looking for a best practice or good/nice way to handle this kind of programming problem. I am looping through the result of a function, without storing the result first in a separate variable; something like this: for item in mycustimitemgetter.itter(): dosomething() The itter function is returning None instead of an empty list [], and Python throws an exception per None. This is correct python behavior and nothing's wrong with it. But I'm looking for a best practice solution to: a) keep the code clean and simple (not stori