Posts

Showing posts from March, 2015

Isabelle HOL on Windows 10 -

i installed windows 10 (64bit). since then, isabelle hol no longer starting, after re-installation (which ran through smoothly). error message following: "startup error: error starting java vm". happens 2 versions tested (2013-2 , 2015). jvm.dll specified in configuration file, exists in right folder. additionally, have installed java sdk in newest version (8.51) in both, 32bit , 64bit. there known compatibility problem windows 10? isabelle used work windows 7 , 8. thank you help. update (150822) from developer's mailing list, there's link test release: news: updated jdk-8u60, support x86_64-windows www4.in.tum.de/~wenzelm/test/isabelle_21-aug-2015 that's working different isabelle2015, in how things paths, might find things needs windows 10, or may not. however, if works, there may incompatibilities isabelle2015 (in theorem proving). regardless, isabelle gets released 1 2 times year, , wouldn't expect special released windows 10 wit

c - segmentation fault (core dumped) when taking a string from user and finding its length using strlen() -

i know string literals stored in read-only memory ,so can't update them. what's wrong strlen() function.it works if initialize char *s within program. i.e char *s="hey"; length=strlen(s); printf("%d\n",length);// works and doesn't when taking string user char *s; int length; scanf("%s",s); length=strlen(s); printf("%d\n",length); //this doesn't. gives segmentation fault you have allocate memory going read string. exampe char s[20] = { '\0' }; int length; scanf("%19s",s); length=strlen(s); printf("%d\n",length); if declared s this char *s; then pointer not initialized. if declared s this char *s="hey"; then scanf try change string literal results in undefined behaviour of program.

ibm connections assigning file to folder -

i have problem when try assign file folder, file , folder exist in system when use method upload folder of file response it's success file not figure folder. i use method post /basic/api/collection/{collection-id}/feed in collection-id change folder uuid don't works. you know how assign file folder? system.out.println("uploading " + filename + " in " + parentfoldername); abdera abdera = new abdera(); factory factory = abdera.getfactory(); entry entry = factory.newentry(); //entry entry.settitle(parentfoldername); entry.setid(parentfolderuuid); inputstream in = req.getinputstream(); entry.setcontent("application/pdf"); entry.setlanguage("en"); abderaclient abderaclient = new abderaclient(abdera); abderaclient.addcredentials(utils.configjson.getstring("connectionsserverurl"), null, null,

javascript - Retrieving Facebook Profile Picture URL -

i using satellizer authentication in mean app. after auth complete want profile picture of user. following code. angular controller (function(){ 'use strict'; angular .module('nayakans07') .controller('registercontroller', registercontroller); function registercontroller ($scope, $auth) { $scope.authenticate = function (provider) { $auth.authenticate(provider) .then(function (res) { console.log(res); }, autherrorhandler); }; function autherrorhandler (err) { console.log(err); } } })(); node.js route handler (function () { 'use strict'; var request = require('request'); var qs = require('querystring'); var tokenhelper = require('../helpers/tokenhelper.js'); var config = require('../config/configuration.js'); var member = require('../models/m

javascript - Phaser.js : cannot read property '0' on tiled map layer -

i'm working paser.js on meteor.js server. it worked wperfectly until try use tiled maps described here . here code : js : if (meteor.isclient) { template.game.oncreated(function() { var game = new phaser.game(800, 600, phaser.auto, '', { preload: preload, create: create, update: update }); var map; var backgroundlayer; var blocklayer; var bg; function preload() { // load game assets // images, spritesheets, atlases, audio etc.. game.load.tilemap('mytilemap', 'assets/tilemaps/scifi.json', null, phaser.tilemap.tiled_json); game.load.image('mytileset', "assets/tilemaps/scifi_platformtiles_32x32.png"); } function create() { map = game.add.tilemap('mytilemap'); map.addtilesetimage('scifi_platformtiles_32x32', 'mytileset'); backgroundlayer = map.createlayer('background'); blocklayer = map.createlayer('blocklayer'); } functio

maven - Ubuntu 14.04 - wget is hanging -

i trying run install maven in docker image using command: run wget --no-proxy --no-verbose -o /tmp/apache-maven-3.2.2.tar.gz http://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz but hangs in command line terminal. no output, nothing after that. don't prompted enter command in shell until hit ctrl + c. edit 1 : tried running command --no-proxy , result once again: root@2ff7e62d1e7c:/# wget --no-verbose -o /tmp/apache-maven-3.2.2.tar.gz http:// archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar. gz 2015-08-16 17:19:07 url:http://archive.apache.org/dist/maven/maven-3/3.2.2/binar ies/apache-maven-3.2.2-bin.tar.gz [6940967/6940967] -> "/tmp/apache-maven-3.2.2. tar.gz" [1] i above output, after running wget without --no-proxy edit 2: ok did download file (i think), it's in red color? apache-maven-3.2.2.tar.gz is in /tmp/apache-maven-3.2.2.tar.gz on container, in red color? edit 3:

java - How to execute tasks in ExecutorService sequentially? -

i have 3 threads joined, i.e. second thread executes after first dies. this code have: public class main { public static void main(string args[]) throws exception { final thread thrda = new thread(() -> system.out.println("message 1")); final thread thrdb = new thread(() -> system.out.println("message 2")); final thread thrdc = new thread(() -> system.out.println("message 3")); thrda.start(); thrda.join(); thrdb.start(); thrdb.join(); thrdc.start(); thrdc.join(); } } how implement functionality using executorservice instead of 3 thread objects? if want/need execute group of jobs 1 after in single thread different main app thread, use executors#newsinglethreadexecutor . executorservice es = executors.newsinglethreadexecutor(); es.submit(() -> system.out.println("message 1")); es.submit(() -> system.out.println("message 2"

css - migration from html4 to html5 -

i have application developed in vs2005 , html4. first of question is, there tool migration html4 html5. my plan first select html5 dropdown available in vs2012 change doctype definition master page <!doctype html> , fix warning replace cell padding padding , etc. does these steps sufficient in order convert application in httml5 ? are these steps sufficient in order convert application in html5? in short, yes, that's pretty it. html5 explicitly designed backward compatible html4; there little should need change apart doctype. there few things aware of, might need changing: a few older html tags have been deprecated in html5. can't use things <blink> , <marquee> or other awful things that. weren't using them anyway though? also attributes have been deprecated, in favour of using css instead. if you're using width or height or color attributes in html tags, should replace them css. same applies <font> tag; use c

Does this Bootstrap responsive layout need two separate grids? -

i want login page on xs/sm viewports: label1 [input1] label2 [input2] and md/lg viewports: label1 label2 [input1] [input2] however solution requires separate grid each <div class="container-fluid"> <!-- small screens --> <div class="visible-xs visible-sm"> <div class="row"> <div class="col-xs-12"> <label for="username">username</label> </div> <div class="col-xs-12"> <input type="text" name="username" /> </div> </div> <div class="row"> <div class="col-xs-12"> <label for="password">password</label> </div>

c++ - value lost after assignment in a pointer -

this code printing 0 this->min_node->right , this->min_node->left in function add_node_to_the_list . not able figure out why happening when have assigned values variables in previous iterations. value available when printing in main after calling function value lost. #include<iostream> #include<vector> #include<iterator> namespace a1{ /******************************declarations*********************************/ class node{ //private member declaration //public member declaration public: int key; public: int degree; public: bool mark; public: node * left; public: node * right; public: node * child; public: node * parent; //private method declaration //public method declaration public: node(int); }; class heap{ //private member declaration private: int node_count; private: void add_node_to_the_list(node *); //public member declaration public: node * min_node; //private metho

android - RecyclerView Image background change randomly -

i've implemented recyclerview cardview. each cardview has imageview want change background color depending on result of query (empty result set -> grey / non empty result set -> red), implemented on onbindviewholder of recyclerview adapter. here's adapter's code (i've removed of code sake of clarity): public class favdirsadapter extends recyclerview.adapter { private layoutinflater minflater; private cursor mcursor; private context mcontext; private int range; private fragmentmanager mfragmentmanager; public favdirsadapter(context context, cursor cursor, fragmentmanager fm) { minflater = layoutinflater.from(context); mcursor = cursor; mcontext = context; range = cursor.getcount(); mfragmentmanager = fm; } @override public favdirsviewholder oncreateviewholder(viewgroup parent, int viewtype) { final view view = minflater.inflate(r.layout.item_fav_dirs_list, parent, false); return new favdirsviewholder(view); } @override

segue - SWIFT: Passing Data from one class to another -

so have been using prepareforsegue pass data 1 variable class. works fine when variable passing data destinationviewcontroller. happens when it's not? example: taking moving viewcontroller1 viewcontroller2 want data viewcontroller1 go "non viewcontroller" class though still want segue vc2 happen. any ideas? thank you! override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) { if (segue.identifier == "stoprecording") { //let playsoundsvc:playsoundsviewcontroller = segue.destinationviewcontroller as! playsoundsviewcontroller let audioeffectsclass = audioeffect() let data = sender as! recordedaudio audioeffectsclass.receivedaudio = data } } import foundation import avfoundation class audioeffect { let session = avaudiosession.sharedinstance() var audioengine: avaudioengine! var audioplayernode: avaudioplayernode! var audiofile: avaudiofile! var receivedaudio: rec

Java - Assigning an array to an object reference -

this question has answer here: is array object in java 8 answers how come can assign array object reference object x = (object) new int[] { 1, 2, 3 };// no error object y = new int[] { 1, 2, 3 };//no error do java arrays inherit object similar classes? i expected give me compile time error. doing this: system.out.println(x.tostring() + " " + x.getclass().getname() + " " + x.getclass().gettypename()); results in: [i@15db9742 [i int[] do java arrays inherit object similar classes? yes, because arrays instances of classes, other objects. why have hashcode , tostring , getclass , inherit them object . from jls§10.1 : the supertype relation array types not same superclass relation. direct supertype of integer[] number[] according §4.10.3, direct superclass of integer[] object according class object integer[]

Volley + OkHttp on Android gives error on status 200 response -

when make request volley goes , stringrequest goes onresponse. but when switch volley + okhttp combination, request goes through, receive same response before following error message: e/volley﹕ [122319] basicnetwork.performrequest: unexpected response code 200 <my request url> java.io.ioexception: closed com.android.volley.networkerror: java.io.ioexception: closed @ com.android.volley.toolbox.basicnetwork.performrequest(basicnetwork.java:182) @ com.android.volley.networkdispatcher.run(networkdispatcher.java:114) caused by: java.io.ioexception: closed @ okio.realbufferedsource$1.read(realbufferedsource.java:345) @ java.io.inputstream.read(inputstream.java:162) @ com.android.volley.toolbox.basicnetwork.entitytobytes(basicnetwork.java:254) @ com.android.volley.toolbox.basicnetwork.performrequest(basicnetwork.java:130)             at com.android.volley.networkdispatcher.run(networkdispatcher.java

c# .net WCF Eventhandler completion -

how determine when eventhandler wcf complete? i have 2 static variables don't set until loop using check status complete. create variables , call wcf using asynch functions created static var globalresults; static bool myeventcomplete; main() { globalresults = null; myeventcomplete = false; wcfclient wcf = new wcfclient(); //create event handler wcf asynch call wcf.myfunccompleted += new eventhandler<myfunccompletedeventargs>wcf_myfunccompleted); wcf.myfuncasync(wcfparameter.tostring()); int counter = 1; //need determine when event handler complete use data returned wcf while (myeventcomplete == false && globalresults == null && counter < 10000) { counter++; } } //eventhandler public static void wcf_myfunccompleted(object sender, myfunccompletedeventargs e) { globalresults = e.result; myeventcomplete = true; } the eventhandler updates variables

scala - How can I encode this in ScalaCSS? -

i'm trying translate css scalacss , can't quite figure out how encode pattern of "class subclass". here specific example: .navbar-top-links { margin-right: 0; } .navbar-top-links li { display: inline-block; } .navbar-top-links li:last-child { margin-right: 15px; } in quickstart can see use of & define child styles: ".navbar-top-links" - ( marginright(0), &("li") - ( display.inlineblock, &.lastchild - marginright(15 px) ) )

java - Getters/(Setters) for classes? -

a friend of mine brought should use getters classes, considered practice or not? couldn't find answer elsewhere. and how setters classes? exist? thanks input. public class movement { private player p; public movement(player p) { this.player = p; } // methods } public class player { /** * movement class handles players movements */ private movement movement; public player() { this.movement = new movement(this); } public movement getmovement() { return this.movement; } } @people saying duplicate question not simple variables require protection being private. habit of adding getter class, don't since class public. and how setters classes? exist? afaik, not in java. whenever want modify class properties or behaviour, change members or methods respectively (by "setter" methods in cases, yes), or provide constructor class create specified ins

sql - MySQL Query NOT IN another Query -

select distinct d.customer_id, d.date_added `order` d d.customer_id not in ( select distinct i.customer_id `order` i.date_added > '2015-02-15 14:00:00' ) order d.date_added desc; the above query should return customer_id of customers have not ordered after 15 feb 2015 (i think). first record is 17168, 2015-08-16 17:36:00 what doing wrong? this below query select distinct i.customer_id,i.date_added `order` i.date_added > '2015-02-15 14:00:00' order i.date_added asc; returns expected result i.e. list of customer ids orders placed after 15 feb p.s. customer_id can not null can customer_id or data_added null ? try select distinct d.customer_id,d.date_added order d d.customer_id not in (select distinct i.customer_id order i.date_added > '2015-02-15 14:00:00' , customer_id not null , i.date_added not null) order d.date_added desc; edit the way wrote query customer_ids order before '2015-02-15 14:0

javascript - Database access from UWP app in HTML5/JS -

what best way use database (be redis, sqlite, websql or actually) uwp app being developed in html5/javascript ? c# or vb.net app guess quite easy, since can use stuff this . how js-based app? i guess 1 option wrapper c# project , use data layer (since believe js/html project can invoke methods in other projects in solution). best/easiest way or there other options i'm missing somehow? feels bit clumsy, since prefer solution 100% javascript in case. you use indexeddb in uwp javascript apps. you can find samples online ( here example) , relevant msdn documentation here .

Android:Activity to Fragment -

i want convert activity fragment able use in navigation drawer have errors that's activity public class recyclerviewactivity extends activity { private list<person> persons; private recyclerview rv; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.recyclerview_activity); rv=(recyclerview)findviewbyid(r.id.rv); rv.sethasfixedsize(true); linearlayoutmanager llm = new linearlayoutmanager(this); rv.setlayoutmanager(llm); initializedata(); initializeadapter(); } private void initializedata(){ persons = new arraylist<>(); persons.add(new person("emma wilson", "23 years old", r.drawable.emma)); persons.add(new person("lavery maiss", "25 years old", r.drawable.lavery)); persons.add(new person("lillie watts", "35 years old", r.drawable.lillie)); persons.add(new person("ass&q

php: Database Class with PDO. How can i make it better? -

so started little more practice in php , want create object oriented forum. therefor want have database class such like: <?php class database { public $databaseconnection; function __construct(){ $this->databaseconnection = new pdo('sqlite:test.sq3', 0, 0); $this->databaseconnection->setattribute(pdo::attr_errmode, pdo::errmode_exception); $params = null; $pdostatement = $this->databaseconnection->prepare('create table if not exists user( id integer primary key, username varchar(40) not null unique, numberoflogins integer default 0, bannedstatus boolean default false, dateofjoining time )'); $pdostatement->execute(array_values((array) $params)); } function query($sql, $params = null){ $s = $this->databaseconnection->prepare($sql); $s->execute(array_values((

list - collection-repeat and ion-option-button issues (again!) -

i writing application using socket.io , ionic. have handle list of 6000 people i've decide use collection-repeat , swipe + ion-option-button verify items (remove list) names on list can removed , changes broadcasted rest of apps using sockets have own list updated in real-time if if list change, each row assigned new data html stays same, including state of swiped button! here screen recording of bug: https://youtu.be/15ozj7g1dq0 you can see list shrinking because user removing items list , broadcasting me through websockets, button doesn't move along item , stays in same place. the problem doesn't happen ng-repeat can't use ng-repeat this. , can't use $ioniclistdelegate.closeoptionbuttons() go around problem because can annoying users. there possible solution this? resumed code sample: 1) people controller $rootscope.verify = function(){ this.person.verified = true; //broadcast main controller $rootscope.$broadcast('verify',

javascript - How to change the value of a JSON data while diplaying in a list? -

i getting data database key value pairs , trying populate values in list view. while looping change value of data (item.student_class) 'your next class 2' if value class1. when try below, changes values in list. var buffer=""; $.each(data, function(index, val){ for(var i=0; < val.length; i++){ var item = val[i]; //if student's class class1, change value below if(item.student_class= 'class1'){var studentclass='your next class 2';} buffer+='<li id="' + item.student_id+ '" data-student_class="'+studentclass+'"><a href="#"><b>' + item.student_name+'</b><span class="af-badge" style="background-color:#4a4">'+studentclass+'</span><br/>'+item.join_date+'</a></li>'; } $('#student_list').html(buffer); }); could please me how can

android - RecyclerView onCreateViewHolder Return Type Incompatibility With Multiple Custom ViewHolders -

i'm trying use multiple viewholders in recyclerview in order swap these views out @ run time. have created 2 classes extend recyclerview.viewholder: menuitemviewholder public class menuitemviewholder extends recyclerview.viewholder implements view.onclicklistener { public textview menuitemtext; public imageview menuitemphoto; public recyclerviewadapter rva; public menuitemviewholder(view itemview) { super(itemview); itemview.setonclicklistener(this); rva = caller; menuitemtext = (textview) itemview.findviewbyid(r.id.grid_text); menuitemphoto = (imageview) itemview.findviewbyid(r.id.grid_image); } @override public void onclick(view view) { toast.maketext(view.getcontext(), "clicked position = " + getposition(), toast.length_short).show(); } } selecteditemviewholder public class selecteditemviewholder extends recyclerview.viewholder implements view.onclicklistener { public textview menuitemtext; public imageview menuitemphoto; pub

java - What's the difference when using numeric literal in termination expression of a for statement? -

why piece of code: string value = joptionpane.showinputdialog("enter x"); //input = 100 int x = integer.parseint(value); double result = 1; (int = 1; <= x; i++) //used variable "x" here { result += (x * 1.0) / fact(i); x *= x; } public static int fact(int n) { int fact = 1; (int = 1; <= n; i++) { fact *= i; } return fact; } work differently one? string value = joptionpane.showinputdialog("enter x"); //input = 100 int x = integer.parseint(value); double result = 1; (int = 1; <= 100; i++) //and here used value "100" { result += (x * 1.0) / fact(i); x *= x; } public static int fact(int n) { int fact = 1; (int = 1; <= n; i++) { fact *= i; } return fact; } the change made using value 100 instead of using variable x in termination expression! when run first code, get: 9.479341033333334e7 however, second 1 get nan why? the difference betwe

java - Issues with JTable Row Selection -

Image
i making use of custom jtable , abstracttablemodel, have encountered interesting behavior when comes highlighting/selecting rows. alright, upon startup table looks so, good: but unfortunately, selecting row gives me this: occurs in 2 ways: when row in editable "boolean" column clicked, there quick flash looks above picture before entire row highlighted. when row divider directly below row clicked in "boolean" column. in case, table stays above picture until row selected. the booleanrenderer , used internally jtable render tablemodel values of type boolean.class , not exhibit behavior. typical implementation conditions foreground , background colors based on default values specified current & feel. in outline, (presumedly custom) renderer needs this: @override public component gettablecellrenderercomponent( jtable table, object value, boolean isselected, boolean hasfocus, int row, int col) { …

ruby on rails - How to access a model that belongs_to 2 models with all 3 models nested under another model? -

i'm modelling decision matrix, each decision (n of them), there x alternatives choose , y goals meet. each of x*y pairings of alternative , goal has score associated. other documentation (listed below) has explained simpler modelling challenges, i'm still lost. how model decision matrix , use score attributes . below code snippets of each model , test tried. decisions class decision < activerecord::base has_many :alternatives, dependent: :destroy has_many :goals, dependent: :destroy has_many :scores, dependent: :destroy validates :name, presence: true, length: { maximum: 50 } end alternatives class alternative < activerecord::base belongs_to :decision has_many :scores, dependent: :destroy validates :decision_id, presence: true validates :name, presence: true, length: { maximum: 50 } end goals class goal < activerecord::base belongs_to :decision has_many :scores, dependent: :destroy validates :decision_id, presence: true

How to update an a postgreSQL unique key constraint -

i keep getting error within application duplicate key value violates unique constraint "product_supplierinfo_pkey" detail: key (id)=(409) exists. this on table product_supplierinfo. the actual next sequence number key constraint needs 5461 not 409. can please tell me correct query update key unique constraint? @chris collins, please post output of \d product_supplierinfo . imagine created table id serial . you should see name of sequence next default value id field come. product_supplierinfo_id_seq . then do, assuming above names correct, select * product_supplierinfo_id_seq; . see next value 410. if correct, select setval('product_supplierinfo_id_seq', 5461); .

How to Build matrix in R -

i have samples a:z , want make matrix have sample column , value column 1's. result should this. samples values 1 b 1 c 1 d 1 . . . . z 1 use cbind create matrix cbind(samples, values=1) but matrix can hold single class output columns 'character' i suggest use data.frame hold columns of different class. data.frame(samples, values=1) if want 'samples' column character class, use option stringsasfactors=false . default true .

android - Activity killed / onCreate called after taking picture via intent -

i trying take picture using intent. problem after taking picture activity, calls startactivityforresult, seems destroyed oncreate called again. here code taking pictures after clicking imageview, image should replaced: if (!getpackagemanager().hassystemfeature( packagemanager.feature_camera)) { util.makelongtoast(r.string.lang_no_camera); } else { intent intent = new intent(mediastore.action_image_capture); startactivityforresult(intent, take_item_photo); } ... @override protected void onactivityresult(int requestcode, int resultcode, intent data) { log.v(tag, "onactivityresult called"); if (requestcode == take_item_photo) { if (data != null) { imageuri = data.getdata(); try { img_photo.setimagebitmap(media.getbitmap( getcontentresolver(), imageuri)); } catch (filenotfoundexception e) {

javascript - Passing array of JSON to postgres without double backslash -

i working on node.js version v0.12.7 my goal input question_id array postgres database. problem fail pass array of json postgres function not solution in worst case try 1 one query. my attempt convert input array of question_id example : array [2,4,1,3] json : [{ order : 1, question_id : 2}, { order : 2, question_id : 4}, { order : 3, question_id : 1},{ order : 3, question_id : 3} ] then pass pg. i convert array of integer array of json exports.intarray2json function. exports.intarray2json = function(req){ return new promise(function(fulfill,reject){ var arr = []; var in_array = req.body.questionlist; for(var = 1 ; <= in_array.length ; i++){ var data = {order : i, question_id : in_array[i-1]}; arr.push(data); } fulfill(arr); }); }; after that. stringify array of objects. , json.parse() it. in short name them var , var b. unfortunately, neither nor b works. when use in data array. console.log of 'a' case:

javascript - OpenLayers 3 Rotation example behaves differently in IE/Chrome embedded WebBrowser control on Win32 touch device -

i trying implement rotation on open street map(osm) using openlayers 3(ol3) in wpf application using following example http://openlayers.org/en/v3.5.0/examples/rotation.html when open above html file using ie/chrome browser directly, map rotates absolutely fine when perform rotation on win32 touch device(windows 8 tablet), when open same html file in webbrowser control in wpf application rotation works when enable shift+alt on on-screen keyboard. i using internet explorer 10 , have added below tag webbrowser control emulates ie 10. <meta http-equiv="x-ua-compatible" content="ie=10,chrome=1"> i not able understant why rotation functions differently normal browser , webbrowser control. missing something?? please help!! finally!!! got breakthrough issue. difference in rotation behaviour legacy input model issue in ie web browser control. the feature_ninput_legacymode feature control determines whether legacy input model enabled. defau

realm - Model with the same property name throws error: has properties that are declared multiple times in its class hierarchy -

i have project displays 2 types of document, 1 local storage , dropbox, have 2 model, xxdocument , dbdocument. both model have properties such name, extension , last updated. assume it's common scenario, on start realm throws , error: terminating app due uncaught exception 'rlmexception', reason: 'object 'dbdocument' has properties declared multiple times in class hierarchy: 'name', 'lastupdated', 'extension'' what's right way handle this? prefix each property model name? edit just clear few things. i've tried use super class hold common field , use 2 separated class without super class, both case not work. case 1: xxdocument - name - extension - lastupdated dbdocument - name - extension - lastupdated - rev - filepath case 2: case 1: basedocument - name - extension - lastupdated xxdocument -> basedocument // xxdocument class has no properties now dbdocument -> basedocument - rev - filepath

javascript - How to get id and type in php foreach loop and send to server via ajax? -

so have 2 files index.php , changelikedislike.php. think issue javascript trying type , id not know how go that. javascript function being called in foreach->li->divs. working before this: data: datastring, added schoolid data of ajax it's data: {datastring:datastring, schoolid:schoolid}, index.php <?php $last_id = 0; foreach ($list $rs) { $last_id = $rs['id']; // keep last id paging ?> <li> <div style="width:100%; color:#000;"> <?php echo '<div class="product_like thumb-div"><img src="like.png" class="rating-image " onclick=changelikedislike("like","'.$rs['id'].'")> <br><span id="product_like_'.$rs['id'].'">'.$rs['plike'].'</span></div>'

coded ui tests - Searching controls dynamically by adding search properties in code -

Image
i trying identify controls @ runtime adding search properties in code , when required. using coded ui in visual studio 2012. please refer screenshot below. test scenario is: 1) click on particular tab (the 2 nd tab selected in screenshot) the tab list fixed can create 1 control in uimap each tab. 2) inside every tab, there tabular structure data. table headings fixed number of rows , data inside rows dynamic. 3) check checkbox required tag 4) select type required tag i have created uimap as: added following code: uiequipmenttagtext.searchproperties.add(new propertyexpression(wpftext.propertynames.name, "1302"));// want second row fetch respective checkbox control, using: uitestcontrol uiequipmenttagcell = uiequipmenttagtext.getparent();//get cell of tag name uitestcontrol uiequipmenttagrow = uiequipmenttagcell.getparent();//get row uitestcontrol uiequipmentcheckboxcell = uiequipmenttagrow.getchildren()[0];//get first cell i.e checkbox cell uitestcon

android - Intent.ACTION_BATTERY_CHANGED check after every battry percentage decay -

i want implement battery percentage alert when battery level goes 15% of mobile,so have implemented service because of application not in foreground.and service runs in background.and inside service reciever runs. problem service stops , check battery percentage kills. please suggest solution if somes1 has

How to sync code between two git repositories? -

i have ios app both ipad version , iphone version. different in ui part. currently 2 separate projects , managed respective git repositories. every time common code changed in 1 project, have copy code other project. causes bugs because of changed code not copied. for single file, sample change history looks like: [in ipad project]change 1st line of file "a.txt", write in "ipad ui code" [in iphone project]change 1st line of file "a.txt", write in "iphone ui code" [in iphone project]change 2nd line of file "a.txt", write in "common code" i want sync 2nd line "common code" between 2 projects. , keep difference in 1st line. the file "a.txt" in iphone project should be: ipad ui code common code the file "a.txt" in iphone project should be: iphone ui code common code you can teach repository of solve conflict rerere merge can conflict , merge other diff conflict r

angularjs - Time Picker not working on bootstrap -

i have following code , it's not working expected. when click on timer icon, nothing happens. <ul class="dropdown-menu customscroll" role="menu" aria-labelledby="btn-append-to-body" ng-show="!myvm.showeta"> <li role="menuitem"> <a href="#">start time <div class="input-group bootstrap-timepicker"> <input type="text" id="timepicker1" class="form-control input-small" placeholder="" aria-describedby="sizing-addon2" ng-model=myvm.starttime" ng-change="myvm.getetacount('starttime');myvm.applyfilterforresultcount()" /> <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span> </div> </a> </li> <li

emgucv - Homography in Emgu CV 3.0 -

i newbie in image processing. want homography image capturing camera. can me homography capture image ? thank much this i've done , doesn't work. i'm stuck image<bgr, byte> rgb_image = capturekamera1.queryframe(); image<bgr, byte> destimage = new image<bgr, byte>(352, 288); imagebox1.image = rgb_image; double[,] srcp = { { 74, 82 }, { 281, 81 }, { 281, 211 }, { 68, 205 } }; double[,] dstp = { { 81, 7 }, { 160, 7 }, { 36, 158 }, { 207, 158 } }; double[,] homog = new double[3, 3]; matrix<double> srcpm = new matrix<double>(rgb_image); matrix<double> dstpm = new matrix<double>(destimage); matrix<double> homogm = new matrix<double>(homog); cvinvoke.cvgetaffinetransform(srcpm.ptr, dstpm.ptr, homogm.ptr); cvinvoke.cvperspectivetransform(rgb_image.ptr, destimage.ptr, homogm.ptr); imagebox2.image = destimage; check this method. has 2 constructors choose better you.

html - Hiding the scrollbar when it is not moving in CSS -

is possible state of movement in css, without jquery, , use hiding scrollbar? this should achievable trough jquery scrollevent jquery: https://api.jquery.com/scroll/ scrollevent stop: jquery scroll() detect when user stops scrolling hide scrollbar: hiding scrollbar on html page in end, may (not tested): <script> $( window ).scroll(function() { //show scrollbar $( "body" ).css( "overflow", "scroll" ); // check if still scrolling, else hide scrollbar cleartimeout($.data(this, 'scrolltimer')); $.data(this, 'scrolltimer', settimeout(function() { // scrollevent not happened, hiding scrollbar $( "body" ).css( "overflow", "hidden" ); }, 250)); }); </script>