FAQ Database Discussion Community


SPARQL queries for data-vocabulary.org

sparql,schema.org,vocabulary
I am using SPARQL queries to query the data that is marked up using the Schema.org vocabulary. I see that some sites are still using Data-Vocabulary.org for their mark up. Can I just replace the schema.org with data-vocabulary.org in my SPARQL queries to make the queries work? Is it only...

Adding text or logo with or inside QR Code.Any suggestion [closed]

codeigniter,qr-code
I am using codeignitor qrcode library(qrcode library). $this->load->library('ciqrcode'); $params['data'] = 'This is a text to encode become QR Code'; $params['level'] = 'H'; $params['size'] = 10; $params['savename'] = FCPATH.'tes.png'; $this->ciqrcode->generate($params); echo '<img src="'.base_url().'tes.png" />'; The above code works fine but I need to add unique key below every qr code for...

Textview multiple underline text getting onClick dynamically in android

android,html,textview,android-textview
I should html content load on textview its ok and display well but how to handle multiple underline word getting onclick dynamically. How can i getting click like as Phnom Penh, Siem Reap & so on etc..???? Thanks in advance See snapshot ...

Testing crates with #![no_std]

testing,rust
I'm writing a runtime for a programming language implementation in rust. I'm planning on linking in this runtime with the compiled code I generate, so I don't want to rely on std to keep the binary small. The problem is, when I try to cargo test my runtime, I get...

Class conflicts in loaded shared libraries

c++,c,gcc,dll
Say I have a class in my main process: class MyClass { void doStuff(); int myThing; int mySecondThing; bool myThirdThing; }; And I load a shared library, mysharedlib.so, with a newer version of the class compiled in: class MyClass { void doStuff(); int myThing; int mySecondThing; bool myThirdThing; std::string myFourthThing;...

risk of depending software solution to activemq

java,jms,activemq,software-distribution
I'm implementing a distributed software that have two loosely coupled component and they need to send message in a reliable and scalable way. I find activemq as a implementation of jms standard and do some research and sample implementation. my two key requirements is : scalability reliability (not losing messages)...

Django queryset on related field

django,postgresql,relational-database,django-related-manager
Django is to making a query much more complicated than it needs to be. A Sentiment may have a User and a Card, and I am getting the Cards which are not in the passed User's Sentiments This is the query: Card.objects.all().exclude(sentiments__in=user.sentiments.all()) this is what Django runs: SELECT * FROM...

Creating a Flag within group meeting two criteria within group in SAS

sas
data abc; length datec $19; input id $ param $ datec $ _flg $; daten = input(datec,is8601dt.); format daten is8601dt.; cards; 001 ALT 2013-01-20T09:16 Y 001 AST 2013-01-20T09:16 Y 001 ALP 2013-01-20T09:16 Y 001 TSB 2013-01-21T09:14 Y 002 ALT 2013-02-20T08:16 N 002 AST 2013-02-20T08:16 Y 002 ALP 2013-02-20T08:16 Y 002...

AngularJS with my PHP API: Factory who get values (async:false need alternative)

javascript,angularjs,asynchronous
Two month ago I started to build my own webapp with AngularJS, the problem is that I found out that async: false was deprecated and I need to replace it with something that will work :). So let me show you an exemple of my script: getContent:function(ticketid){ if(sessionService.islogged) { $.ajaxSetup({async:false});...

NodeJS mongodb: use global connection or local connection

node.js,mongodb
I have a set of nodejs scripts that does a lot of queries, inserts and updates to mongodb. I'm facing a choice whether to use a global db connection object and pass it to different functions or in each functions get its own db connection object and close it upon...

Oscommerce display default product image and prevent it from deletion

image,set,default,product,oscommerce
I am working on an oscommerce project where i want to display default product image (i.e no image available) if product image is not uploaded.And even i want it to prevent from deletion.I have tried to upload product not available image for 2-3 products but when deleting products i.e final...

A fixed object inside a fixed object

html,css
I have an interactive background on my website, but the "content" of the site interfere. So I appliedd a position: fixed; to the content of the site, but inside this content there are two objects with position: fixed, that were supposed to move with the page scrolling, but now they...

Programmatically refresh/synchronize an IntelliJ IDEA project via a plugin

java,intellij-idea,intellij-plugin,intellij-14,intellij-idea-14
Is there a way to programmatically refresh/synchronize an IntelliJ IDEA project via a plugin? I'm working on an IntelliJ IDEA plugin that creates a file within the active project. And I want to refresh/synchronize the project automatically via the plugin so that the user can see the changes immediately. Is...

Javascript for dropdown menu (wp_nav_menu) not working

javascript,jquery,wordpress,drop-down-menu
I am attempting to use a script I'm using on another site to get my nav menu drop-down to animate properly. Here is the script: jQuery(window).load(function() { $("#menu > div > ul > li > a").click(function (e) { // binding onclick if ($(this).parent().hasClass('selected')) { $("#menu .selected ul").slideUp(100); // hiding popups...

Adding and using Polymer in Meteor [closed]

javascript,meteor,polymer
How does one make Polymer work in Meteor? I have tried to use atmosphere packages ecwyne:polymer-elements and ecwyne:polymer but I can't get anything working. No observable changes. No one seems to have done a tutorial on the same out there. I am definitely doing it wrong. Would someone be kind...

How do I store the output of a git command in a variable?

linux,bash,shell
What I want is to store the output of a git command (such as git status) inside a variable in a shell script. When I say output, I am talking about the text returned in the terminal on execution of a command, for example: on doing a git status outside...

in NEST, how do I dynamically build a query from a list of terms?

elasticsearch,nest
Say my user provides a list of search terms which I've collected into an array/list, and now I want to combine those OR-wise into a NEST query using MatchPhrase. How would I do that? The code for a (single) search term would look something like this: var search = client.Search<ElasticRequirement>(s...

php does not work always returns 500 error

php
I host 3 web site on an vps. each has a phpt test script a1.com/test.php a2.com/test.php a3.com/test.php a1.com/test.php a2.com/test.php work well but when I call a3.com/test.php it always report error [Wed Jan 28 01:01:52.801563 2015] [fcgid:warn] [pid 27783] (104)Connection reset by peer: [client ***.***.27.***:50211] mod_fcgid: error reading data from FastCGI...

Django get_FOO_display in a list

django
I've got a model Technique with a CharField procedure with Choices. I've got a list with groups of varying numbers of these choices: procs = [['CS'],['C1','C2','ID'],['C1','C2','C3','C4'], ['ID'],['RP'],['GY']] (e.g. 'CS' is Cheese etc) I'm trying get an output such as ['Cheese'], 2 ['Chips','Nuts'], 0 etc for proc in procs: proc_tot =...

malayalam word sense disambiguation in python [closed]

python
# encoding=utf-8 file=open("mm.txt","r+") wordcount={} for word in file.read().split(): if word not in wordcount: wordcount[word] = 1 else: wordcount[word] += 1 print (word,wordcount) file.close(); This work fine for english sentence how to work this code for malayalam sentence...

Make a div Horizontally and Vertically Centered

html,css,twitter-bootstrap,twitter-bootstrap-3
I am new in twitter bootstrap 3. I try to make a div horizontally and vertically centered. What I have done is - <!-- Content --> <div class="container outer_container"> <div class="inner_container"> <h1>Jumbotron heading</h1> <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo,...

Having issue in my application form download

php
Having issue in my application form download.My issue is.once the form is submitted my java script code is not submitting the form to another page.page name is app_print.php.I have implemented js code in php.once every thing is correct.the app_print.php goes to download section.I have hosted in my webserver. Here is...

MOD_REWRITE rule not working ignoring variables

url,mod-rewrite,seo
I did this rule RewriteRule ^([^/.]+)/stock/([^/.]+)/([^/.]+)/([0-9]+) product_list.php?model=$1&year=$5 [L] But it only takes model variable and ignores year. what im i doing wrong?...

Regex for deleting dash and things after it

regex
My data for example is: xyz-2-3 456-2 1-2-4 1 I want to get the answer xyz I use -*$ But nothing happens and the cursor only appear in the beginning and end of each line. what's wrong? ...

How to get the last day of month in postgres?

sql,amazon-redshift,postgresql-8.0
How to find the last day os the month in postgres? I have a date columns stored as numeric(18) in the format(YYYYMMDD) I am trying it to make it date using to_date("act_dt",'YYYYMMDD') AS "act date" then find the last day of this date: like this: (select (date_trunc('MONTH',to_date("act_dt",'YYYYMMDD')) + INTERVAL '1...

What is utsname and systemInfo?

ios,uname
When I found way to get iOS device type (e.g., iPhone 6, iPhone 6 Plus), I found a way to do and it did help but it give me this two question? What is utsname and systemInfo, why we can get the device type through it? Why need the convert...

ip matching in perl

regex,perl,ip,pattern-matching
I have an ip address 129.115.50.255 I have tcpdump file that I am trying to print out all lines except ones that contain the ip address. my code is simply open(IN, "$ARGV[0]"); while($line = <IN>){ next if /129\.115\.50\.255/; print $line, "\n"; } close(IN1); I can't get it to print out...

JQuery Event Listener in AngularJS controller for Dynamic Graph

javascript,jquery,angularjs,dynamic,svg
I currently have a web application using AngularJS as an MVC that loads in data from a couple of JSON files and renders a graph in an SVG element with the data The nodes loaded onto the graph are "circle" elements that each have a unique class name, and I'll...

Add class when div visible on screen

jquery
I have this HTML code : <ul> <li class="menu" id="menu-features"> <a href="#features">Features</a> </li> </ul> <a id="features"></a> <div id="div-features"> <!-- SOME CODE HERE --> </div> and I have this jQuery script : $(document).ready(function(){ if $('#div-features').visible(){ $('#menu-features').addClass("active"); } }); now, here's the problem : I want to add a class to list...

How to turn off mousewheel touching on Ipad in Flexslider

ipad,flexslider
I am using Flexslider and on ipad it is not userfriendly with mousewheel effect because when user reached to this slider part it is difficult to go ahead to bottom.I want to diable it generally.I tried Flexslider option.Here it is, but it is not working $('.promotions-slider').flexslider({ animation : 'slide', slideshow...

Translate a view and get click event

android,android-animation
First of all please excuse me if this question is already asked. I am new to android animations. I want a view lets say an Image View (with animation i.e,smooth movement) to permanently move one position to some other position of the screen lets say if current X co-ordinate to...

Set ng-href to current page

angularjs,angularjs-ng-href
Is it possible to set ng-href to go to the current page? eg: <a ng-href="https://www.facebook.com/sharer/sharer.php?u={{ window.location.href }}">facebook</a> When the above runs, I keep getting: <a ng-href="https://www.facebook.com/sharer/sharer.php?u=" href="https://www.facebook.com/sharer/sharer.php?u=">facebook</a>...

How to set CURLOPT_PROXY in Guzzle right way?

php,curl,guzzle
I am trying to set CURLOPT_PROXY but it doesn't work. Curl is enabled. If I do this by "raw" curl request - everything works.. So? What could be the solution? $client = new GuzzleHttp\Client(); $res = $client->get('http://www.ipmango.com/api/myip', [ 'config' => [ 'curl' => [ 'CURLOPT_PROXY' => '194.135.220.18:8081', ], ] ]);...

exit().remove() doesn't remove old charts before update in d3.js

javascript,jquery,svg,d3.js,charts
I have a code for multiple charts created on the same page using .each function with the first svg. var svg = svg1.enter().append("svg:svg") svg.attr("class", "r_chart") .attr("width", left_width + width) .attr("height", height) .attr('viewBox', '0 0 350 310') .attr('perserveAspectRatio', 'xMinYMid') .each(function(d,no){ var base = d3.select(this); base.selectAll("g").data(d.values); .... }) Can anyone point out...

Error in running commands with manage.py

python,django,python-3.4
I just started learning django by using tango with django. I did everything up till creating django project. The problem I have is running with "manage.py" file. When I ever I type $ python manage.py runserver it says python: can't open file'manage.py' So I tried $ python c:\Users\<username>\tango_with_django_project\manage.py runserver then...

How to draw a circle according to the offset when drop down the tableView

ios,pull-to-refresh
I know how to draw the circle according to the offset. If i drop down the tableView too fast to see the process of the draw,so i want to make it slower.How to make it? Thanks. This is my circle.m property progress is the offset (0.0~1.0). - (void)drawRect:(CGRect)rect {...

Success and failure when querying the database

prolog,prolog-toplevel
So I'm stuck on an exercise that I've been working on. I have the following facts: sd(appleseed0, appleseed1). sd(appleseed0, apple1). sd(appleseed1, apple1). sd(appleseed2, apple1). sd(appleseed0, apple2). sd(appleseed1, apple2). sd(appleseed2, apple2). What this means is that appleseed1 came from appleseed0, apple1 came from appleseed0, etc. The problem I'm having is that...

How to check the number of occurrence of an element in a ruby array

ruby,arrays,count
We have an array, a = [1,2,3,2,4,5,2] Now, I need to get the occurrence of each element in the ruby array one by one. So, here the ocuurrence of element '1' is 1 times. Occurrence of '2' is 3 times and so on. Edited and added the below line later...

Unable to get count increment if two arrays have same elements in PHP

php,arrays
I have two arrays and I am trying to get a count for candidates that appear on both array for each event_id. This is what I tried. $temp = array(); foreach ( $events as $event) { foreach ( $users as $user ) { if ( $event['event_id'] == $user['event_id'] ) {...

jQuery check if one checkbox is checked and another unchecked

jquery,checkbox
I got this HTML: <input type="checkbox" id="checkw" "checked" />Woman<br> <input type="checkbox" id="checkm" />Männer<br> I want to find out if checkw is checked and checkm is unchecked so I tried different ways like: if($('#checkw').prop('checked') || $('#checkm').prop('unchecked')) { alert("w"); } and if($('#checkw').is(':checked') || $('#checkm').is(':unchecked')) { alert("w"); } and if($('#checkw').is(':checked',true) || $('#checkm').is(':checked',false)) {...

How to read and parse the json file and add it into the shell script variable?

json,linux,shell
I am having the file named loaded.json which contains the below json data. { "name" : "xat", "code" : "QpiAc" } { "name" : "gbd", "code" : "gDSo3" } { "name" : "mbB", "code" : "mg33y" } { "name" : "sbd", "code" : "2Vl1w" } Form the shell script i...

Is promotion and widening the same thing?

c++,types,casting
Is there's a difference between promotion and widening, I've heard that widening only describes integral promotion.

Lifetime for passed-in function that is then executed in a thread

multithreading,concurrency,rust,channel,lifetime
I'm trying to build a simple pipeline-like functionality that executes each stage of the pipeline is separate threads and glues them all together with channel passing. Pipe::source(buffer) .pipe(|input, output| {...}) .pipe(|input, output| {...}) .sink(writer) I cannot for the life of me figure out the function signature for the pipe() function....

My form is not getting validated in Zend Famework. Why?

php,zend-framework2,zend-form,zend-rest
I am creating a rest Module for album module of zf2 My Code Snippet for create method : public function create($data) { $form=new AlbumForm(); $album = new Album(); $form->setInputFilter($album->getInputFilter()); $form->setData($data); if ($form->isValid()) { $album->exchangeArray($form->getData()); $id = $this->getAlbumTable()->saveAlbum($album); return new JsonModel(array( 'data' => $this->get($id), )); } All the functionalities like update,select...

Calculating Formula with CTE tree

sql,sql-server-2008,sql-cte
Data I have following partial data id parent multiplier const -- ------ ---------- ----- 1 NULL 1.10 1.00 2 1 1.20 2.00 3 1 1.30 3.00 4 1 2.40 4.00 5 2 2.50 5.00 6 2 2.60 6.00 7 2 2.70 17.00 8 3 2.80 18.00 9 3 3.90 19.00...

Move parent class object to child class

php,oop
I have two classes: class A {...} class B extends A {...} Now I have this object $object = new A(); Now I want this object to be instance from B(so that I can use '$this' inside B class. Because I have many objects from class A. for each I...

Winforms - MDI Parent refresh/re-activate

vb.net,winforms,mdi
I have a MDI Parent form which has a menustrip for the application. My application startup file is the MDI Parent form which on load calls a child login form. Code as below: Dim myForm As Form = New Login Dim formResult As DialogResult = myForm.ShowDialog() If formResult = Windows.Forms.DialogResult.OK...

How to perform a join and/or cogroup operation on two maps in scala [duplicate]

scala,join
This question already has an answer here: Scala: Merge map 5 answers I am looking to match keys in two maps and produce a Tuple2 of their cogroup. so: val m = Map("a" -> "ma", "b" -> "mb") val n = Map("b" -> "nb", "a" -> "na" ) val...

Polymer Paper-Input not working or rendering

javascript,html,css,polymer
I am trying to use the paper-input element in my page, but it didn't seem to work. I then tried to run the code for the demo on the Polymer site, but that didn't work either, and I was getting simple text fields rather than Polymer's paper-input element. I am...

How to display two decimals in jquery

jquery
I am doing average of student marks in jQuery row.append row.append($('<TD></TD>').text(((item.Marks1 + item.Marks2 + item.Marks3) / 300) * 100)); I used like this its not working row.append($('<TD></TD>').text((Math.floor(item.Marks1 + item.Marks2 + item.Marks3) / 300) * 100)); This is average how to accept two decimals this type of formats please help me....

Function declaration vs expression from a performance point of view?

javascript,function,ecmascript-5,function-declaration
There's many javascript articles on the web comparing function declarations function foo (){} to function expressions var foo = function () {}. They usually mention things like hoisting, behaviour within conditionals, etc... But I don't recall any of them talking about performance. Is there any difference? Particularily in ECMA5's strict-mode...

How do I convert a letter to an ASCII value? [closed]

java,char,ascii,value
Let's say char c = s How would I convert S into an ASCII value? ...

Terminal: how can I paste a file to all the subfolders within a directory?

git,terminal,gitignore
Basically, I created a .gitignore file with the following content (ignore all the class files but do not .gitignore file): # Ignore files below *.class # but not these files !.gitignore I want to propagate this to all sub-folders or even sub-sub-folders within the directory. I know I can do...

Centos VirtManager Clone image - Device eth0 does not exist in libvirt

virtual-machine,virtualbox,libvirt
I up the Centos image using VirtualBox ,clone image and convert it into Qcow2 format and tried up using Virt-manager. But i found interface not available in VM. It displays "Bringing up interface eth0: Device eth0 does not seems to be present," I also tried removing the presistance rules ,...

Using function name by variable in pl/sql

function,plsql
I am working on PL/SQL code, My purpose is to declare function with definition then assign it to variable then call it using that variable. declare func varchar2(50); function add(a NUMBER,b NUMBER) return BOOLEAN is c NUMBER; begin c := a+b; dbms_output.put_line(c); end add; begin func :='add'; or func :=add;...

Update Pandas DataFrame with extra columns?

python,pandas
In Pandas, you can update a dataframe with the data from another dataframe. X = pd.DataFrame({'a':[1,2,3,8],'b':[2,4,6,4]}) Y = pd.DataFrame({'b':[10,20,30,40],'c':[5,6,7,8]}) X.update(Y) a b 0 1 10 1 2 20 2 3 30 3 8 40 Is there a way to do it so that the extra columns from Y are included?...

Why the compiler does not recognize Google Mock wildcard?

c++,googletest,googlemock
When I try to use: ON_CALL(mock, foo(_)) Compilation error is thrown: Error 1 error C2065: '_' : undeclared identifier I am using visual studio 2012....

gradle test task execution order of tests

gradle,testng
When I run my testng tests using command line and with tests defined in a testng.xml file, they run in the order they are specified in the testng.xml <suite name="WorkDepot Tests"> <test name="Submit work-result test"> <classes> <class name="workdepot.test.SubmitWorkTest"/> <class name="workdepot.test.WorkResultTest"/> <class name="workdepot.test.SubmitWorkTest"/> <class name="workdepot.test.WorkErrorTest"/> <class name="workdepot.test.SubmitWorkTest"/> <class...

Counting nodes in General tree in python

python,tree
I have created a Tree structure that is not a binary tree and having difficulties in getting the correct node count. class TreeNode(object): def __init__(self, name='root', children=None,Parent=[]): self.Name = name self.Parents=Parent self.Children = [] if children is not None: for child in children: self.add_child(child.Name) def __repr__(self): return self.Name def add_child(self,...

Ambiguous dependency while using @Produces annotation

java,java-ee,dependency-injection,cdi,jboss-weld
I have been studying @Produces annotation of CDI dependency injection from here. I just created my own same example. However, I am facing with ambiguous dependency. public interface Bank { public void withdrawal(); public void deposit(); } public class BankOfAmerica implements Bank { @Override public void withdrawal() { System.out.println("Withdrawal from...

woo-commerce add to cart via category page

wordpress,woocommerce
I would like to know the best/quickest options for implementing bulk adding products to a woo-commerce cart through the category page (without actually having to view the individual item to add it to the cart). I am happy to hook into the code somewhere but I would prefer the use...

-[__NSDictionaryM objectAtIndex:]: unrecognized selector sent to instance

ios,objective-c,xcode,nsmutabledictionary
I searched for all possible combinations and answers on SO, but didn't helped me a lot. All are related to UITableView only. What I am doing is I am fetching my Quiz from server. Quiz contain Sections and each section contain Questions. So flow is like this. Quiz->Section->Question I am...

forcing to ignore some url parameters

c#,.net,web-services,parameters,asmx
I am making an iPhone app where I am using .NET webservice. Let's say below is the URL I have. http://www.myweb.com/wser.asmx/listOfStudents?class=12 Here I was getting list of students with below fields in it. Name Roll Number Class Now client asked to make arabic version. So we update the query to...

how to convert input date to unix (php) time

php,php-5.5
How do you convert an input date like 01/16/2013 to a time format similar to 1422424719. Whats the best way to compare these two time stamp.

PostgreSQL 9.3 : Get day of the week

postgresql,postgresql-9.3,datepart
I want to retrieve day of the week from the given date. For example the date is: 2015-01-28 then it has to return Wednesday My bad try: select date_part('week',now()) as weekday; The above script gives me only number of week but not the day of the week....

Quartz.net: Run a job for specific interval of time

c#,quartz.net
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Quartz; using Quartz.Impl; using Quartz.Job; using ConsoleApplication2; namespace Lesson1 { class Program { static void Main(string[] args) { //Create the scheduler factory ISchedulerFactory schedulerFactory = new StdSchedulerFactory(); //Ask the scheduler factory for a scheduler IScheduler scheduler = schedulerFactory.GetScheduler(); //Start...

How to make QTableView to enter the editing mode only on double-click

python,model,pyqt,qtableview
Setting a Qt.ItemIsEnabled flag makes the QTableView items editable. To enter the item's editing mode the user can simply double-click it. Another way to edit the item is to select it and press a keyboard key. How to disable this second way of entering the item's editing mode? Here is...

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/xml;charset=UTF-8' not supported

java,spring,utf-8
I am getting below exception when I am calling rest service. org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/xml;charset=UTF-8' not supported at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:152) [spring-webmvc-4.1.1.RELEASE.jar:4.1.1.RELEASE] at...

Control Output Within PHP While Loop

php
I have a while loop that a query is in and the MySQL query works just fine. However when I try to output my text saying that the query is successful I get: "Table Succesfully UpdatedTable Succesfully UpdatedTable Succesfully Updated" I know this I happening becuase I am editing 3...

Bootstrap image and text side by side in a div

html,css,css3,twitter-bootstrap
I am trying to put an image and texts side by side in bootstrap inside a single div.. For that I used the class of thumbnail. But using bootstrap thumbnail it makes the image to go at the top and all the texts at the bottom. So I changed it...

Error occured while updating.. System.Data.SqlClient.SqlException: Procedure or function has too many arguments specified

sql-server,stored-procedures,service,arguments
In my project i'm trying to parse XML pockets from one table to multiple tables, using those tables I will show values in the front end UI. After starting the Windows Service the XML pocket has been parsing from one table to multiple tables but one of the Stored Procedure...

request to MVC4 WEB API with Get method from android return 405

android,asp.net-mvc-4
I have ASP.Net MVC4 WEB API, hosted in local IIS. I request the api from android using GET method. Response is 405 Action not Allowed. I Have This Method in Controller : public IEnumerable<Table> GET() { return _repository.GetAll(); } But When I Change the Method to POST: public IEnumerable<Table> POST()...

View value of password edittext while a button is pressed

android
How can I view the value of an edittext view whose input type is "password" when i click a button and when i release the button, the text display goes back to unreadable format? Like what microsoft does in windows 8 when you click the "eye" that is next to...

how can i add a report record in openerp odoo?

report,odoo,openerp-8
I'm using OpenERP 8 odoo and I'm following the report creation tutorial but I get stuck at where i can but the report record code for example: <report id="account_invoices" model="account.invoice" string="Invoices" report_type="qweb-pdf" name="account.report_invoice" file="account.report_invoice" attachment_use="True" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" /> Thanks in advance Reference : http://blog.emiprotechnologies.com/create-qweb-report-odoo/...

How to use “jython-standalone-2.7-b3.jar” in windows 7?

python-2.7,jython,jython-2.5,jython-2.7
I want to upgrade Jython from "jython2.5.4rc1" to "Jython 2.7-beta3". I have downloaded following two files from "http://www.jython.org/downloads.html": 1. Jython 2.7beta3 - Installer - jython-installer-2.7-b3.jar 2. Jython 2.7beta3 - Standalone Jar - jython-standalone-2.7-b3.jar When I doubleclick on "jython-installer-2.7-b3.jar" file, I am getting "Could n ot find the main class:org.python.util.install.Installation.program will...

Add detail text on label of custom UITableViewCell

ios,objective-c,iphone,xcode
There are other similar questions here but none of those answer what I'm looking for. I have a settings screen that should look like this: I have added new UITableViewCell class and connected it to main table with this code: static NSString *cellIdentifier = @"settingCellIdentifier"; SettingsTableViewCell *cell = (SettingsTableViewCell *)[tableView...

Removing duplicates based on column field and modify it

c#,linq,duplicate-removal
Lets say we have the following List/IEnumerable Program : CPE, ECE Old list: Name Assigned_Area Program Ivan Matala Mathematics CPE Ivan Matala Mathematics ECE Jeremy Cruz Science ECE Ivan Matala Science CPE NJ Aquino Engineering CPE MJ Catanaoan Engineering ECE New list: Name Assigned_Area Program Ivan Matala Mathematics All Programs...

How to store ip addresses of visitors in database in php?

php,html,mysql
I have tried this php method to get ip address but it is providing wrong output. the regular method <?php echo $_SERVER['REMOTE_ADDR']; ?> does not provide the appropriate output. when i use this method , i get output like IP address : '::1' is there any problem in my script?...

Dust file doesn't open in Webstorm IDE 8.0.5

webstorm,dust.js
I am trying to open a Dust (.dust) file in WebStorm but it doesn't open. I also installed Dust Plugin from WebStorm Plugin repository but I still can't open a Dust file. I am using WebStorm 8.0.5. I also tried to open Dust with File -> Open option but I...

How to build app for Facebook submission

ios,facebook,xcode6,ios-simulator
I have app that need to submit on Facebook for review. The steps to create app for Facebook are given here: https://developers.facebook.com/docs/ios/creating-ios-simulator-build-for-review But i have simulators shown below: the command to build app shown in Facebook link is for simulator of iOS 7.1 now what command did I use to...

Host verification failed error when running git clone inside dockerfile on AWS EC2 instance as host and a private git repository

git,ssh,amazon-ec2,docker,dockerfile
I am using AWS ec2 instance as private git repository. This instance is also used for running Dockerfile and docker file tries to checkout code from this private repository. My basic setup is done as per https://alvinabad.wordpress.com/2013/03/23/how-to-specify-an-ssh-key-file-with-the-git-command/ option 2. However, when i am running my docker build command: $ sudo...

Java mouseReleased() method query

java,awt,mouse
I have taken the following code from a learning resource. When I run the applet, I notice that 'Up' is only displayed after having dragged the mouse. 'Up' is not displayed if a mouse button is pressed then released in the same location. Why is 'Up' not displayed in the...

behaviour of fread for empty (0kb) files

c,file,fread
Here is sample code which gives segmentation fault while reading empty file. #include <stdio.h> main() { FILE *fp; int i = 0; char buffer[20]; printf("1\n"); fp = fopen("/home/amadhab/aa", "r+"); printf("2\n"); i = fread(buffer, 1, 1, fp); printf("3\n"); printf("i = %d\n", i); } Gives o/p as 1 2 Segmentation fault Does...

How to write partial derivatives in Mathcad

mathcad
I am using Mathcad 14 and I would like to know if one can write partial derivatives in Mathcad. On the Calculus palette we just have the normal derivative symbol.

Rendering partial from another controller breaks app - undefined method `text' for #

ruby-on-rails,ruby,ruby-on-rails-4,rails-activerecord
I'm trying to render partials from another view posts/_index and posts/_new and controller Posts, into another view welcome/index. The posts/_index loads fine, but I can't figure out/understand why the posts/_new throws an error for the :text method which is only defined in the database migration, which I thought would be...

Which files i should refer for simulation in contiki

c,contiki,iot
I am working on contiki as my academic work, now i have question which file i should refer specificaly from example folder in contiki for simulating schenario like - 30 node iot having ipv6 node , all these node send data to master / gateway node whenever any request come...

Entity Framework Generic Inheritance

c#,entity-framework,generics,inheritance
I'm trying to assign a DbSet of class that is inherited from a more generic class. The example below demonstrates what I'm trying to achieve: DbSet<Animal> dbSet; switch (selectedAnimal) { case "Dog": dbSet = _Context.Dog; // DbSet<Dog> break; case "Cat": dbSet = _Context.Cat; // DbSet<Cat> break; case "Pig": dbSet =...

Do all 64 bit intel architectures support SSSE3/SSE4.1/SSE4.2 instructions?

intel,simd,cpu-architecture
I did searched on web and intel Software manual . But am unable to confirm if all Intel 64 architectures support upto SSSE3 or upto SSE4.1 or upto SSE4.2 or AVX etc. So that I would be able to use minimum SIMD supported instructions in my programme. Please help.

Python - Remove first three chars' of string [duplicate]

python,string,integer,strip,pop
This question already has an answer here: Are there limits to using string.lstrip() in python? [duplicate] 3 answers So I have a super long string composed of integers and I am trying to extract and remove the first three numbers in the string, and I have been using the...

Add external javascript file in wordpress

javascript,wordpress
I want to add more than one external javascript files in wordpress theme, I have found code for adding one file, but I need to add more javascript files. How can I do it? function wpTan_scripts() { wp_register_script('app', '/js/app.js', false); wp_enqueue_script( 'app' ); } add_action('wp_enqueue_scripts', 'wpTan_scripts'); ...

Selecting a deeply nested div

css,css-selectors
I would like to move the inline style of the div id="awards" to css, but thus far have only been able to make it work inline. also I'd like to style the h3 within the div, but have been unable to correctly identify that selector either. Any ideas on how...

Making two series point in opposite directions in highcharts

javascript,highcharts
I have a column chart with two series, one of which I want to go down and the other up, like this: However both of the series have positive y-values, which I can't change, e.g. blue = [1746181, 1884428, 2089758, 2222362, 2537431, 2507081, 2443179, 2664537, 3556505, 3680231, 3143062, 2721122, 2229181,...

Java - how to get an element from Arraylist and insert into another Array?

java,arrays,arraylist
I'm very confusing at this point. I'm making a cards game and do not know how to write the "deal" method. The "deal" method deals a certain number of cards to each player in Player array. My deck class contains an ArrayList as this: public ArrayList<WarCard> cardStack = new ArrayList<WarCard>();...

Simple way to delete a relationship by ID in Neo4j Cypher?

neo4j,cypher
Using Match and Where can delete a relationship by ID. Match ()-[r]-() Where ID(r)=1 Delete r Is there a simpler way?...

MVC Why are extra characters in URL?

asp.net-mvc,asp.net-mvc-5,http-post
MVC 5. Delete POST for deletion confirmation view I was used to seeing URLs like http://localhost:64740/Order/ and http://localhost:64740/Order/Delete/2061 But now I see: http://localhost:64740/%28S%28vq45x3gsflin11zvxcuueydg%29%29/Order/Delete/2061 I can't think why the characters are now present. Any idea why the extra characters are coming up? The effect is that now I can't delete any...

Oracle database SELECT… FOR UPDATE with autocommit on

java,oracle,jdbc,oracle11g
I'm running this query against an Oracle database (11g). The connection has the default value for autocommit which is 'true'. Connection con = driver.connect(url, properties); String query = "SELECT EMPID, NAME FROM EMPLOYEE FOR UPDATE"; Statement statement = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet resultSet = statement.executeQuery(query); SELECT... FOR UPDATE states that it...

Xaml Disable Control untill its code behind is executed

wpf,xaml,windows-runtime,winrt-xaml
I have made a customized button as shown below <Border x:Name="myBtn" Grid.Column="0" Width="320" Height="100" Margin="10" HorizontalAlignment="Right" Style="{StaticResource myBtnStyle}" Tapped="myBtn_Tapped"> <Grid> <TextBlock x:Uid="TBmyBtn" Margin="100,20,20,20" Text="Update" Style="{StaticResource myTBStyle}"/> </Grid> </Border> Its tapped event is as shown below private async void myBtn_Tapped(object sender, TappedRoutedEventArgs e) { //Many Network Calls //Updating Local DB //Updating...

Container header bar width won't go 100% with bootstrap

jquery,html,css,twitter-bootstrap
I set the width of .header to width:100% but it doesn't cover the ends of the screen only close to it. I'm using twitter bootstrap's grid to create this site. Here's what it looks like http://andrewhnovak.com/newSite/index.html HTML <!doctype html> <html> <head> <meta charset="utf-8"> <title>Site Demo</title> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> <link...

IntegrityError inside model.DoesNotExist exception in Django

python,django,sqlite3
I try to save webpages to database, the url should be unique. If the url is already exist, i just need to create relation between Webpage class and searching class. But the problem is, i keep getting this IntegrityError even if the database is empty and the operation is happens...

YouTube api: clang: error: linker command failed with exit code 1 (use -v to see invocation)

ios,xcode,linker,google-api,youtube-api
Following are the steps I have followed to integrate YouTube upload in my app, added libGTLTouchStaticlib.a and respective header folder into my project. added libGTLTouchStaticlib.a in General->Linked Frameworks and Library. mentioned -ObjC and -all_load in other linker field of build settings added systemConfigaration and security framework in General->Linked Frameworks and...