I run project deploy in Maven project and get the problem as below: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project iris: Cannot deploy artifacts when Maven is in offline mode -> [Help 1] Could you help me figure out this problem?
I see that someone made the react-native-linear-gradient library for gradients in React Native, but is there support in React Native natively for gradients? Something like: style = StyleSheet.create({ backgroundGradient: "vertical", backgroundGradientTop: "#333333", backgroundGradientBottom: "#666666" });
I'm trying to run the rails (4.1.2) console rails c RAILS_ENV=test And I'm getting this: > config.eager_load is set to nil. Please update your > config/environments/*.rb files accordingly: > > * development - set it to false * test - set it to false (unless > you use a tool that preloads your test environment) * production - > set it to true > > /Users/xxxxxx/.rvm/gems/ruby-2.2.2/gems/activerecord-4.1.12/lib/active_record/connection_adapters/connection_specification.rb:257:in > `resolve_symbol_connection': 'RAILS_ENV=test' database is not > configured. Available: ["development", "test", "produ
So I'm trying to parse a JSON request that looks a bit like this: { "source_code":"MOODY", "code":"DAAAYLD", "name":"Aaa Corporate Bond Yield", "data":[ [ "2015-08-11", 3.96 ], [ "2015-08-10", 4.06 ], [ "2015-08-07", 3.96 ] ] } There's a few more items I've left out but they're not important. Now, I'm using var jsonData = JsonConvert.DeserializeObject<JsonResponseObj>(GetRawData(code)); to make a JsonResponseObj which looks like: public class JsonResponseObj { [JsonProperty("name")] public string name { get; set; } [JsonProperty("code")] public string code { get; set; } [JsonProperty("source_c
In my code behind i am generating html string <a href='#' class='my-post' onclick='myFunc(" + Id + ")'> <div class='my-idea'> <span >23</span> <span class='heart'></span> </div> </a> I have implemented myFunc function in code behind as below funcString += "function myFunc(id){"; funcString += "document.getElementById(\"" + btn1.ClientID + "\").click();"; funcString += "}"; Then on btn1 click event i do some processing protected void btnSubmitWinnerPage_Click(object sender, EventArgs e) { // some processing } Now i want to change background color of div inside that href tag when button is click
I am using python-docx and am trying to insert the a <w:bookmarkStart> tag. I do not see any immediate API method to create the tag. So I googled several references to gain access to the raw XML using the document._document_part attribute. However, when I attempt to use it, python tells me it does not exist: >>> import docx >>> document = docx.Document() >>> print document._document_part Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Document' object has no attribute '_document_part' I am using python-docx 0.8.5. Is there a method to add a <w:bookmarkSt
This question is different to the other Erlang crypto failure question posted as the environment is not Windows, the openssl and libssl-dev prerequisites were installed in the standard way. The issue is identified at source within Erlang, rather than a Riak issue, although it is related. Installing Erlang 16B02 as a prerequisite for Raik 2.1.1 on Ubuntu 14.04 LTS x64. Erlang was downloaded and installed as per the riak guide to installing erlang: http://docs.basho.com/riak/latest/ops/building/installing/erlang/ Prequisites installed before Erlang (including openssl and libssl-dev). Build worke
I need to update a list of objects in one query. I have class Parent which has a list of Child in ManyToMany relation. I need to update a list of Parent by setting children list to empty(remove all children references from join table). Currently i'm setting children list to empty and updating each entity in a query with a merge action,but when i have a large list of pharmacies there are too many queries. i tried this query: update Parent p set p.children=:children where p in (:parents) where :children is a new HashSet<Child> but it gives me error unexpected end of subtree Is there any way to u
I try to render direction route on google map and my issue was, when I am try to get another direction route previously rendered route not clear. I want to know how I reset rendered route on the map. Here my code. function direction(dest, lat, lng) { $('#direction').slideUp(); $('#results').slideDown(); $('#dest-direction').val(dest); $('#direction-form').submit(function () { var ori = $('#origin-direction').val(); map.setZoom(7); var currentLatLng = new google.maps.LatLng(lat, lng); map.setCenter(currentLatLng); var directionsRenderer = new google.maps.DirectionsRenderer(); directionsRenderer
I am new to ionic and I am trying to run a sample app of ionic on my phone (Samsung Galaxy s4) and I am unable to do so. I already have "USB Debugging" on in Developer Options. As seen above even though my phone is connected it runs on emulator. The app works on emulator without an issue When I do $ionic run android In logs says: No target specified and deploying to emulator The emulator comes up and has no issues in running the app. Then I tried $adb devices -l Its shows my device XXX listed there Now I try running $ionic run --devices Its says : Unknown platform : XXX I tried $ionic run -d '
Specifically, I have blocks of code for install that I want the user to be able to quickly copy and paste into a terminal. I'd like a button to 'copy to clipboard' for the code block. Since there's a 'copy to clipboard' button for the git clone URLs, I was wondering if I could piggy back off that or if not whether there was some relatively simple I could add to the MD to make this happen. Or is this simply not possible with the processing and 'safication' the MD text goes through?
I want to read a specific character sequence with Tesseract like this post : Tesseract OCR: is it possible to force a specific pattern? I have tried bazaar matching pattern in Tesseract with the pattern \d\d\d\A\A and OCR still recognize other words which doesn't match. I have tried to use the "tessedit_char_whitelist" parameter but I can't choose the position of the characters with that. I launch the command : tesseract image.jpg result -l eng bazaar And I have this message : Please provide at least 4 concrete characters at the beginning of the pattern Invalid user pattern \A\A\d\d\d Tesserac
Is there any Hive function available to convert from Julian date to calendar date? There are multiple types of Julian date. The Julian date I have takes 15001 for 2015-01-01. I couldn't find any relevant information on this page: Hive Manual - Date Functions
I am working on side stuff where the data provided is in a .data file. How do I open a .data file to see what the data looks like and also how do I read from a .data file programmatically through python? I have Mac OSX NOTE: The Data I am working with is for one of the KDD cup challenges
I am writing a website as a collection of all my stuff (blog posts, YouTube vids etc.) and want to have a page of YouTube embeds. I want to have two columns of embeds, but cant figure out how to. If I edit the css and make the certain bits float to the correct side, it changes nothing. This is what my edited css looks like: div.leftBodyVideo{ width: 45%; float: left; } div.rightBodyVideo{ width: 45%; float: right; } I then changed the html to align the correct tags right, but that didn't work either. it put the iframes that are meant to be right aligned in a weird position: https://lh3.googleu
So I've been researching solutions for Caps Lock detection for a form, using JavaScript/jQuery. There is a huge thread on stackoverflow offering many solutions. But the only problem is they don't check whether Caps Lock is pressed directly per se. They detect whether a capital letter has been entered and that the shift key has not been depressed. The drawbacks of this is that my Caps Lock warning message will not toggle on/off until the user starts typing into the form, which is hardly optimal. Here is my code. document.onkeypress = function(e){ e = e || window.event; var s = String.fromCharCo
I have a form with a DataGridView and CheckBox. What I want is when DataGridView index changes it should change CheckBox checked state, or if I press arrow down or up CheckBox should change depending on cell value. Here is my code: Public Sub cellclick() Dim row As DataGridViewRow Dim r As Integer = usergrid.CurrentRow.Index row = Me.usergrid.Rows(r) 'the value of the cell("ACCES1") maybe yes or no If row.Cells("ACCESS1").Value.ToString = "YES" Then CheckBox1.CheckState = CheckState.Checked 'i also try checkbox1.checked=true ElseIf row.Cells("ACCESS1").Value.ToString = "NO" Then CheckBox1.Chec
Hi i am getting the following error which run the server using Node.js and socket.io. Error: Missing error handler on `socket`. TypeError: Cannot read property 'connected' of undefined at Socket.<anonymous> (C:\Documents and Settings\Subhrajyoti\Desktop\Restore \htdocs\video broadcast\server.js:68:13) at Socket.emit (events.js:95:17) at Socket.onevent (C:\Documents and Settings\Subhrajyoti\Desktop\Restore\htd ocs\video broadcast\node_modules\socket.io\lib\socket.js:330:8) at Socket.onpacket (C:\Documents and Settings\Subhrajyoti\Desktop\Restore\ht docs\video broadcast\node_modules\socket.io\li
Note: I am aware of this question Could two planets be tidally locked to each other so close they share their atmosphere? My question is not about that. It is specifically about human travel. By a cosmic accident, Slartibartfast's design, or through God's will there is a planet that is shaped like an old-fashioned dumbbell. Each lobe is Earth-sized and Earth-like in terms of their basic composition - at least on the surface. What lies under the surface may be assumed to be whatever is necessary to hold the structure together. You can assume a degree of hollowness if that helps with the plausib
In my project I am using MVC4,C# and itextsharp to generate pdf from html. I need to insert header with a logo and template name, and footer with paging (page number/Total number of pages). I am done the the footer, I have used this code to add footer to the pdf file: public static byte[] AddPageNumbers(byte[] pdf) { MemoryStream ms = new MemoryStream(); ms.Write(pdf, 0, pdf.Length); // we create a reader for a certain document PdfReader reader = new PdfReader(pdf); // we retrieve the total number of pages int n = reader.NumberOfPages; // we retrieve the size of the first page Rectangle psize
I am trying to load my custom library as an extension of CI_Controller in CodeIgniter 3.0, but it does not seem to work. This is my source code. Library class MY_Login extends CI_Controller { function __construct() { parent::__construct(); // call with constructor. $this->isLogin(); } function isLogin() { // source code } } Controller class Dashboard extends CI_Controller { protected $CI; public function __construct() { parent::__construct(); $this->load->library("MY_Login"); $this->CI =& get_instance(); } }
This might be more a question on computer architecture than on C++ itself, but I was wondering if pass-by-reference could theoretically be implemented without using pointers in a language like C++. Here are three examples of code that have similar function and structure. //Version 1: Uses global variable #include <iostream> int global_var = 0; int increment(void) {return ++global_var;} int main(void) { while (global_var < 100) printf("Counter: %i\n", increment()); return 0; } //Version 2: Uses pass-by-pointer #include <iostream> int increment(int* ptr) {return ++(*ptr);} int main(void) { int l
I am having a transaction using spring data , and I am trying to do an save operation (insert operation) . [SQL0913] Row or object table in Schema type *FILE in use. Following is the entity @Entity @IdClass(OsytxlId.class) @Table(name="OSYTXL") @NamedQuery(name="Osytxl.findAll", query="SELECT o FROM Osytxl o") public class Osytxl implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name="TLCONO") private BigDecimal tlcono; @Id @Column(name="TLDIVI") private String tldivi; @Id @Column(name="TLLINO") private BigDecimal tllino; @Column(name="TLLMTS") private BigD
I want to have black lines around each cell of a raster. Below is the example data. I mean, instead of this frame/borderless cells I want this(cells with borders) How can I achieve this? library(raster) require(graphics) require(grDevices) library(colorRamps) data<-matrix(c(1,0.4,0.5,0.8,-0.9,0.3,-0.89,-0.62,-0.33),ncol=3) r <- raster(nrows=dim(data)[1],ncols=dim(data)[2], xmn=-1,xmx=1,ymn=-1,ymx=1) r[]<-data setValues(r,factor(data)) plot(r,col=c(topo.colors(200)),axes=FALSE,box=FALSE)
I have a excel sheet where I have columns that say "I like TSX but I prefer 350" "I like beamer but I am fan of S-Class" I want to replace this with "I like Acura but I prefer BMW" "I like BMW but I am fan of Mercedes" I have another excel sheet with the match and replace values. For example TSX, Acura TL, Acura 350 BMW Beamer, BMW etc. I know how to use vlookup, but this is way advance for me. Any help? Thanks you.
I'm using PHP's built-in DOMDocument() class to do some simple web-scraping. However, I get the error: Class 'App\Http\Controllers\III_Ranks\DOMDocument' not found Here's my code: <?php namespace App\Http\Controllers\III_Ranks; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Http\Response; class RanksController extends Controller { public function getRanks() { $list1 = new DOMDocument(); //etc... } } I figure this is a namespace issue, but I have no idea how to access DOMDocument()
So i have been doing some JavaScript and is currently learning jQuery. Time to time i get a bit confused by how jQuery does things compared to JS. Got an HTML audio tag that looks something like this: <audio id="audio" src="audio.mp3"></audio> With JS i simply play it with: document.getElementById('audio').play(); So i figured, doing the same with jQuery would just be: $('#audio').play(); That doesn't work, instead i have to write it like this: $('#audio')[0].play(); Can anyone explain this to me? Thanks.