Posts

Showing posts from January, 2010

gis - Spatial join in R -

i have 2 shapefiles—let’s call them shp1.shp , shp2.shp—and want create new shapefile of overlaps between two. essentially, i'm trying determine geographies shp1 fall within shp2. shp1 polygons contain shp2 polygons, , shp2 polygons fall within multiple shp1 polygons. if start library(sp) large_list <- over(shp1,shp2, returnlist = true) that gets me large list of shared geographies. how take list , use spatial join, , create new shapefile? i'm relatively new r (especially gis) , appreciated. you might find answer in function intersect , package raster library(raster) newshape <- intersect(shape1, shape2)

java - Android VpnService Configuration -

i trying use vpnservice android setup simple tun device on client side , on receiving side have c++ server running. i having lot of problems vpnservice. need, need packets outbound android phone routed tun device, , in program route through datagram channel server. when send string, works fine, when send other data through datagram channel, don't see udp packets in wireshark :\ also, new java , datagram channels. here code //to establish tunnel builder.setsession("myvpnservice") .addaddress("192.168.56.0", 32) .adddnsserver("8.8.8.4") .addroute("0.0.0.0", 1); minterface=builder.establish(); what above configurations doing? isn't tun device supposed have 1 ip(from experience doing on linux), ""192.168.56.0", 32". when try add route "0.0.0.0", 0 whole android phone hangs , restarts :\ while (true) { int length; // read outgoing

ios - why are my new flurry parameters not showing up? -

i have been tracking flurry events in ios app , show in dashboard. tried add new parameter existing event, , activated event on phone bunch of times yesterday, still don't see occurrences of new parameters on event in dashboard. does flurry not allow add new parameters existing event? the flurry sdk communicates our servers twice per session. first time when session started , sets timestamp session, counts new user or updates existing user active. second time when session ends , event data sent in 1 batch. in cases not receive second report refer "incomplete session". arises in few scenarios mainly -no network connection when session ends -the app sent background >10 seconds , session continues running in these cases event data stored on device's disk , sent next time app launched.

prestodb - Build error while trying to install airpal -

i'm trying airpal going , have gotten to: git clone https://github.com/airbnb/airpal.git sudo apt-get install npm nodejs-legacy ./gradlew clean shadowjar and following message: :installassets > contextify@0.1.13 install /home/carl/presto/airpal/src/main/resources/assets/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify > node-gyp rebuild usage: gyp_main.py [options ...] [build_file ...] gyp_main.py: error: no such option: --no-parallel gyp err! configure error gyp err! stack error: `gyp` failed exit code: 2 gyp err! stack @ childprocess.oncpexit (/home/carl/.gradle/nodejs/node-v0.10.33-linux- gyp err! system linux 3.13.0-24-generic gyp err! command "node" "/home/carl/.gradle/nodejs/node-v0.10.33-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp err! cwd /home/carl/presto/airpal/src/main/resources/assets/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify gyp err! no

java - How to use a generic editor for database access in tapestry 5? -

i have tapestry 5 project contains following: an abstract entity in entities package inherited other concrete entities import java.io.serializable; import javax.persistence.basic; import javax.persistence.column; import javax.persistence.generatedvalue; import javax.persistence.generationtype; import javax.persistence.id; import javax.persistence.mappedsuperclass; @mappedsuperclass public class abstractentity implements serializable, comparable<abstractentity> { private static final long serialversionuid = 1l; @id @generatedvalue(strategy = generationtype.identity) @basic(optional = false) @column(name = "id") protected integer id; @override public int compareto(abstractentity o) { return this.tostring().compareto(o.tostring()); } } several concrete entities (i omit of bodies since believe it's irrelevant question, simple entity data classes) inherit abstractentity. example of 1 such entity class: //imports go here @entity @table(name = "r

.net - Windows Form sound file does not exist and how to retrieve embedded sound (C++) -

Image
the sound file located on project folder , added sound file resource files. don't error when run debugger within visual studio 2012. error when run application located in debug folder. however, don't errors when include file location directory path. namespace formv2 { //omitted code private: system::void form1_load(system::object^ sender, system::eventargs^ e) { player = gcnew soundplayer; //no error //player->soundlocation = "c/<path goes here>/soundbit.wav"; // error player->soundlocation = "soundbit.wav"; player->playlooping(); } private: system::void checkboxenable_checkedchanged(system::object^ sender, system::eventargs^ e) { if (checkboxenable->checked) { player->stop(); } else { player->play(); }

dataframe - Compute values relative to specific factor in R data frame -

i have data frame in r of following form: bc solvopt istrng tsolv epb 1 10 1 0 0.10 -78.1450 2 10 1 1 0.15 -78.7174 3 10 1 10 0.14 -78.7175 4 10 1 100 0.12 -78.7184 5 10 1 1000 0.09 -78.7232 6 10 1 2 0.15 -78.7175 7 10 1 20 0.14 -78.7176 8 10 1 200 0.12 -78.7192 30 10 2 0 0.10 -78.1450 31 10 2 1 0.11 -78.7174 32 10 2 10 0.11 -78.7175 33 10 2 100 0.10 -78.7184 34 10 2 1000 0.13 -78.7232 35 10 2 2 0.11 -78.7174 36 10 2 20 0.10 -78.7176 37 10 2 200 0.10 -78.7192 59 10 3 0 0.16 -78.1450 60 10 3 1 0.23 -78.7174 61 10 3 10 0.21 -78.7175 62 10 3 100 0.19 -78.7184 63 10 3 1000 0.17 -78.7232 64 10 3 2 0.22 -78.7175 65 1

Database design 3rd Normal Form -

i have database many tables, 4 of these payment credit card paypal bitcoin credit card attributes: cardid (pk) type number expiredate ... paypal attributes: paypalid (pk) account ... bitcoin attributes: bitcoinid (pk) ... payment table attributes: amount ... ... cardid (fk) paypalid (fk) bitcoinid (fk) a payment can paid either card/paypal/bitcoin breaking 3rd normal form because if client uses card know didnt use paypal or bitcoin. how can fix not breaking 3rd normal form. there isn't completely clean way today in sql, because sql platforms don't support assertions. (create assertion in sql standards) can design tables support sensible constraints, without support assertions. push attributes common scheduled payments "up" table "scheduled_payments". create table scheduled_payments ( pmt_id integer primary key, pmt_amount numeric(14, 2) not null check (pmt_amount > 0), pmt_type char

OpenCV with standalone python executable (py2exe/pyinstaller) -

i have python program uses opencv frames video file processing. create standalone executable using py2exe (also tried pyinstaller , got same error). computer , target computer both windows 7, target computer not have python installed. use opencv read frame rate , individual images video file. problem: when run executable on target computer frame rate returned 0.0 , cannot read frames. if python installed on target machine executable runs expected, otherwise produces error. seems missing in executable, no errors when creating executable indicate might missing. others have reported similar issues have not included numpy dependency (and error indicating this), have included numpy. have tried including entire pyqt4 module since listed dependency on python xy site opencv (i have parts of pyqt4 other parts of code) , not solve problem either. i guess go ahead , post answer this, solution provided @otterb in comments question. pasting text here: "py2exe not perfect m

html5 video - Force .webm instead of .mp4 -

i have video slider .webm,.mp4 & .ogv media formats. webm smaller size, want force use of .webm if browser/device can support format. you can specify priority of formats way arrange source tags video. if browser supports first format listed use that, if not continue next , on. example: this try webm format first, if browser cannot play theora version tried , mp4 if didn't work either (finally fallback if none supported) (borrowed wikipedia ) - <video poster="movie.jpg" controls> <source src="movie.webm" type='video/webm; codecs="vp8.0, vorbis"'> <source src="movie.ogv" type='video/ogg; codecs="theora, vorbis"'> <source src="movie.mp4" type='video/mp4; codecs="avc1.4d401e, mp4a.40.2"'> <p>this fallback content display user agents not support video tag.</p> </video>

ipv6 - Does Openstack support dual-stack implementation? -

currently investigating , still don't understand if openstack support dual-stack implementation. what have done far following: created "net1" network created ipv6-subnet "net1" created ipv4-subnet "net1" created "router1" , added ipv6-subnet , ipv4-subnet interface router. created vm using "net1" --nic net-id result: vm boots. only ipv6 link-local found in eth0 ipv6 link-local cannot pinged i new this. if have ideas, please advise. p.s. controller machine info = centos7 which openstack version using? juno seems quite close full ipv6 support although need fine-tune it. http://www.thewhir.com/blog/journey-ipv6-openstack i found useful preso: http://www.socallinuxexpo.org/sites/default/files/presentations/ipv6%20and%20neutron.pdf

64bit - x64 instruction encoding (r/m, reg vs reg, r/m) -

what's difference in encoding (modrm:r/m, modrm:reg) vs (modrm:reg, modrm:r/m)? instruction cmpxchg vs divpd. thought register , address encoded in first byte , sib , displacement in second byte if needed? here's code: static void writeregistertomemory(icollection<byte> bytes, iregistertomemoryinstruction instruction, byte rex) { iaddress address = instruction.address; byte register = instruction.register; if (address.needsrex) { rex |= 0x40; if (address.rexb) rex |= 1; if (address.rexx) rex |= 1 << 1; } if (register > 7) rex |= 0x44; // rex.r if (rex != 0) bytes.add(rex); bytes.addrange(instruction.opcode); byte modrm = (byte)((register % 8) << 3); modrm |= address.getmodrmaddressbyte(); bytes.add(modrm); address.writescaledindexbyteanddisplacem

css - jQuery class selector "class_name" vs ".class_name" -

when looking through jquery examples, see css classes referred prepending "." , other times without. example, in snippet codecademy: else if(event.which === 110) { var currentarticle = $('.current'); var nextarticle = currentarticle.next(); currentarticle.removeclass('current'); why selector $('.current') needed in 2nd line, ('current') required in 4th line? that convention. on 2nd line $('.current') telling jquery search called "current" , dot specifies class. need call ".current" on 4th line, you're telling jquery going select class using "removeclass" don't need use dot there. because "removeclass current being class"

c - Random number generation code not working [Probably a stack overflow] -

this c code should generate 1 million random numbers. used srand() t aid pseudrandom generation problem when compiling code multiple times. think theoretically code should work seems misses might causing overflow. idea why stop working during execution process? #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { file *ofp; int k=0, i=1000000;; int array[i]; ofp=fopen("output.txt","w"); while (ofp==null) { printf("file corrupted or not exist, \nplease create or fix file , press enter proceed"); getchar(); } srand(time(null)); rand(); (k=0; k<1000000; k++) { array[k] = rand()%100; fprintf(ofp, "%d\n", array[k]); } return 0; } fix code following: // ... #define max 1000000 // ... int main() { int array[max]; // proper static allocation // ... if (ofp == null) { // while loop has no meaning in here

javascript - React JS view not re-rendering on setState() -

using react js 0.13.1 , es6 babel: i have file input , textarea, want user able select text files , have text append textarea. when onchange event fires, uses filereader api read file text, calls setstate({text: <text file>}) . that's working fine. the problem when select , open file, nothing happens text in textarea... keeps whatever text initialized with. seems react either isn't updating view after setstate() , or maybe misspelled something. not sure yet, appreciated! here's (simplified) code: 'use strict'; class textapp extends react.component { constructor() { this.state = { text: 'wow' }; } readfile(e) { var self = this; var files = e.target.files; (var = 0, len = files.length; < len; i++) { var reader = new filereader(); reader.onload = function(upload) { var textstate = (self.state.text || '') + upload.target.result; self.setstate({ text: textsta

javascript - Unexpected output of checked checkboxes -

Image
i have these codes when user select checkbox checked appear in , code work result not expected appear arr rather value of checkbox. tt.php: <?php session_start(); if (! empty($_session['logged_in'])) { ?> <!doctype html> <html> <head> <title>home</title> <meta charset="utf-8"> <link href="style111.css" rel="stylesheet" type="text/css"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" /> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script src="script.js"></script> </head> <body> <div id="background"> <div id="page"> <div class="header"> <div class="footer"> <div class="body"> <div id="sidebar"> <a h

Do I need mysql-client for PHP/Python etc interactions? -

i setting production server first time , make sure have need security prepress. by "interactions" since i'm new programming, think mean "api calls". do need mysql-client on linux (debian) server able 'talk' mysql programming language? think there isn't point installing client on production server if can remotely send commands mysql-client on mac. if expect code running on production server connect mysql db, yes.

PowerDesigner 16.5 - Can't create new or update existing models -

i using sap/sybase powerdesigner 16.5. have used on , off years. whilst haven't opened few months, find cannot update existing model (i can open ok); nor can create new model (pdm or ldm - , nothing else either) have tried both opening blank workspace, , create new model; , open existing model. in simple terms, appears reduced read-only status. my question this: known issue, , how resolve? i running 64bit windows 7 professional (v6.1 sp1) , office 2010 - neither has changed although download , install regular windows updates.we have not downloaded updates powerdesigner since downloading , installing 16.5 may last year. have tried uninstalling powerdesigner , re-installing.

java - 18x18 Board Array Index Out of Bounds -

// counts neighbors of alive or dead cells in boolean grid. public static int countneighbors ( final boolean[][] grid, final int row, final int col ) { // finds neighbors in top row. int count = 0; (int = 1; > -1; --i) { if (grid[row - 1][col + i] == true) count += 1; else if (grid[row - 1][col + i] == false) count += 0; } // finds neighbors in same row. (int = 1; > -1; --i) { if (grid[row][col + i] == true) count += 1; else if (grid[row][col + i] == false) count += 0; } // finds neighbors in bottom row. (int = 1; > -1; --i) { if (grid[row + 1][col + i] == true) count += 1; else if (grid[row + 1][col + i] == false) count += 0; } return count; } getting array out of bounds exception when attempt find true ne

java - Does shorthand for loop cache the iterable's reference? -

i trying over-efficient, have been wondering of following 2 code samples execute more quickly. assume have reference object contains arraylist of strings , want iterate through list. of following more efficient (even if marginally so)? for(string s : foo.getstringlist()) system.out.println(s); or arraylist<string> stringarray = foo.getstringlist(); for(string s : stringarray) system.out.println(s); as can see, second loop initializes reference list instead of calling every iteration, seems first sample does. unless notion incorrect , both function same way because inner workings of java create own reference variable. so question is, it? there's no difference, because both loops end getting , maintaining reference iterator expression @ start of loop. here's excerpt java language specification : the enhanced statement equivalent basic statement of form: for (i #i = expression.iterator(); #i.hasnext(); ) { variablemodifiersopt t

xlrd dynamic variables python -

i can make work this: book = xlrd.open_workbook(path+'infile') sheet = book.sheet_by_index(0) a, b, c, d = ([] in range (4)) = sheet.col_values(0) b = sheet.col_values(1) c = sheet.col_values(2) d = sheet.col_values(3) but want make work this: dyn_var_list = [a, b, c, d] assert(len(sheet.row_values(0))==len(dyn_var_list)) index, col in enumerate(sheet.row_values(0)): dyn_var_list[index].append(col) however, far can 1 value in lists, using code above, due usage of "(0)" after row_values guess, don't know how resolve of yet. try for c in range(sheet.ncols): r in range(sheet.nrows): dyn_var_list[c].append(sheet.cell(r,c).value) here sheet.nrows gives number of rows in sheet.

javascript - how to get texture in webgl?without Canvas.toDataUrl() -

i want texture webgl can use getimagedata() when canvas context 2d. how can texture form webgl context? i know 3 possibilities. important! for these methods must set preservedrawingbuffer = true webgl . to data url first 1 high level method todataurl , origin javascript canvas.todataurl(type, encoderoptions); you can use example if want allow client app "screenshot" following 2 methods low level , origin webgl. can use them if want example modify texture or calculate new texture (shadows). 5.14.12 reading pixels pixels in current framebuffer can read arraybufferview object. void readpixels(glint x, glint y, glsizei width, glsizei height, glenum format, glenum type, arraybufferview? pixels) 5.14.8 texture objects texture objects provide storage , state texturing operations ... void teximage2d(glenum target, glint level, glenum internalformat, glint border, glenum format, glenum type, htmlcanvaselement element)

xslt - Increase XSL stack size in MSXML -

in xsl processor in msxml, i'm getting error while running recursive template on "larger" dataset. recursion terminates correctly, , works fine "smaller" datasets well, know it's not infinite loop. there way jack stack size quick fix, opposed recoding shoot lower stack usage (which useful longer term goal). msxml3.dll error '80004005' xsl processor stack has overflowed - probable cause infinite template recursion. thank you, stack overflow readers! i not aware of such setting or property , documentation https://msdn.microsoft.com/en-us/library/ms766391%28v=vs.85%29.aspx has security related properties maxelementdepth , maxxmlsize no settings on xslt processor https://msdn.microsoft.com/en-us/library/ms757015%28v=vs.85%29.aspx . so based on looks need rewrite code , use techniques divide , conquer reduce recursion depth.

reactjs - update brothers objects from react -

i'm learning react , want implement basic nav side bar has items, want make last 1 clicked have classname active , others not. in following code cannot remove classname in resetall item.setstate (yeah read doc understand doesn't work), tried manipulate dom directly using jquery. works on first click second click has no effect. there react native way this? thanks. $(document).ready(function(){ var navitem = react.createclass({ getinitialstate: function() { return this.props.item; }, handleclick: function() { react.render(<span>{this.props.item.description}</span>, document.getelementbyid('main')); this.props.resetall(); console.log("this", this); this.setstate({active: true}); }, render: function() { var classname = this.state.active ? "active" : "";

sql server - SQL condition in join statement -

i have use conditional statement in join (sql server) select * inner join b on a.id = b.id if b.id null or b.id = '' should a.id2 = b.id2 instead of a.id = b.id is correct if this: select * inner join b on (b.id not null , b.id <> '' , a.id = b.id) or ((b.id null or b.id = '') , a.id2 = b.id2) i think not best way solve problem, useful, simple: select * inner join b on a.id = b.id union select * inner join b on a.id2 = b.id2 b.id null or b.id = ''

python - What is wrong with my dictionary (mapping values to cards) -

so game blackjack , have snippets of code make deck , make hand. deck, list, i'm trying build dictionary each card (a tuple deck) have value mapped it, per rules of blackjack. from random import randint def make_deck(): deck = [] suit in suits: rank in ranks: deck.append((suit,rank)) return deck suits = ['spades','hearts','diamonds','clubs'] ranks = ['ace','two','three','four','five','six','seven','eight','nine','ten','jack','queen','king'] deck = make_deck() def make_hand(): hand = [] k in range(2): card = deck.pop(randint(0,51)) hand.append(card) return hand hand = make_hand() values = {} #empty dictionary card in deck: rank = [card[1] card in deck] if rank == 'ace': values[card] = 1 elif rank == 'two': values[card] = 2 elif ran

random - Does the rand function ever produce values of 0 or 1 in MATLAB/Octave? -

i'm looking function generate random values between 0 , 1 , inclusive. have generated 120,000 random values using rand() function in octave, haven't once got values 0 or 1 output. rand() ever produce such values? if not, there other function can use achieve desired result? if read documentation of rand in both octave , matlab , open interval between (0,1) , no, shouldn't generate numbers 0 or 1. however, can perhaps generate set of random integers , normalize values lie between [0,1] . perhaps use randi ( matlab docs , octave docs ) generates integer values 1 given maximum. this, define maximum number, subtract 1 , divide offset maximum values between [0,1] inclusive: max_num = 10000; %// define maximum number n = 1000; %// define size of vector out = (randi(max_num, n, 1) - 1) / (max_num - 1); %// output if want act more rand including 0 , 1, make max_num variable quite large.

angularjs - Code pen with jQuery to ionic project -

i'm veery new ionic , angularjs. how go taking this codepen enter code here and using in blank ionic project. put css in ionic project css sheet , html part in ion-content js of codepen?? thanks, since code pen's js not angularjs code. can 2 things, make separate file called javascript.js , reference index.html put script tag in index.html , place code there. ps: should warn css have put , may not work on real device.

asp.net mvc - Null error when passing checkbox value from view to controller MVC 4 -

i'm trying pass values of checkboxs view controller. here code in model: public partial class order_header_info { //many other fields public bool checkexport { get; set; } } in controller: [httppost] public void exportcsv(list<models.order_header_info> model) { foreach (models.order_header_info item in model) { if (item.checkexport) { //do somethings } } in view: @model ienumerable<tis.models.order_header_info> @using (html.beginform("exportcsv", "mkp_004", formmethod.post)){ <input type="submit" value="exportcsv" /> @foreach (var item in model) {datetime deadline = new datetime(2015, 04, 12); var classname = (item.product_start_date >= deadline) ? "selected" : null; <tr class="@classname"> <td> @html.actionlink(item.order_no, "mkp_003", "

How do render data as indented list in html using jquery? -

i have json data in second page. how display data indented list? do have use accordion widget jquery ? i newbie in ui development. please excuse simple query this. please show me direction on how proceed in implementing this. in advance. $.ajax({ url: "data/widgetdata.json", datatype: "text", success: function(data) { var jsondata = $.parsejson(data); $.each(jsondata, function(i, item) { $.each(this, function(k, v) { childelements = v['children'] $('.header span').text(v.title) $.each(childelements,function(key,value) { // $('#parent1').text(childelements[key].label + '('+childelements[key].devicename+')') if(childelements[key].children){

Extract Image from PDF using Java -

Image
i need extract bar-code pdf (using rectangle), not converting whole pdf image. the image format can jpg/png. with pdf box , without coding: "$java_home/bin/java" -jar pdfbox-app-1.8.2.jar pdftoimage foo.pdf to batch processing: import java.io.file; import java.io.filenamefilter; import java.util.arrays; import java.util.list; import java.util.observer; import org.apache.pdfbox.pdftoimage; public class main { static { system.setproperty( "org.apache.commons.logging.log", "org.apache.commons.logging.impl.nooplog" ); } public static int extract( list< file > files, file jpegdir, observer observer ) { jpegdir.mkdirs(); int done = 0; for( final file file : files ) { try { final file target = new file( jpegdir, file.getname()); final string trgtpath = target.getpath(); final string prefix = trgtpath.substring( 0, trgtpath.lastindex

Ruby On Rails and Routes file structure -

i wondering if following acceptable structure routes in route file. have not seen example of being done way, seem logical. if not please let me know why. rails.application.routes.draw ### begin /some_base_route/ namespace :some_base_route ### begin /some_base_route/lead_vendor namespace :lead_vendor 'import' 'results' end ### end /some_base_route/lead_vendor ### begin /some_base_route/sales/ namespace :sales 'view_lead' 'edit_lead' post 'edit_lead' 'create_contact_log' 'login' 'dashboard' end ### end /some_base_route/sales/ ### begin /some_base_route/admin/ namespace :admin 'admin/login' 'admin/dashboard' end ### end /some_base_route/admin/ ### begin /some_base_route/process/ namespace :process ### begin /some_base_route/process/sales namespace :sales ### begin /some_base_route/process/sales/leads namespace :leads 'create' 'ed

Making a web API assessible from a Mobile App -

looking design/architectural inputs here. our company uses web chat customers chat end agents. have mobile app , want bring chat experience within our app native or close possible. don't want redirect them browser when initiate chat. the chat software use, not have rest apis @ moment. have make use of existing apis web application using. these hosted on same tomcat server web application. my question is: 1. needs done in order access these apis mobile? understand need exposed in someway? 2. exposing them on internet way? in internal network @ moment. 3. if hosted on internet - how done? 4. how ensure security? some questions might not clear have limited understanding around a=subject try provide details. thanks in advance, cheers without knowing api or application, hard give full answer questions. there whole topics of security , best practices securing internet-facing applications & restful calls should covered; however, short answer question #2 'yes&

android - Does AsyncTask run the doInBackground accordingly to each of its parameter order or randomly? -

for example there asynctask of string... parameters , if make call : asynctask<string, void, void> sometask = new mytask(myactivity.this); sometask.execute(string1 , string2 , string3); what internal order of execution of doinbackground inside task : treat string1 first string2 , on sequencely provided when called , or treat parameters randomly ? string... " vararg ", in example converts individual parameters string[] , entries array in order got passed method. so using example, (string[]) param[0] == string1 , param[1] == string2 , param[2] == string3 , forth. ordering of param entries, how each entry in param used, depends entirely on code.

c# - Remove all metadata from common image formats? -

i'm writing service project that's going handle our image processing. 1 such process supposed strip metadata byte[] provided , return same image byte[] . the method i'm working on involves converting image bitmap , converting original format , returning data memorystream . i haven't been able test yet tells me i'm going experience quality loss. how can remove metadata image common format? (bmp, gif, png, jpg, icon, tiff) not sure how can narrow down further. nice if got feedback regarding downvotes. for lossless formats (except jpeg), idea of loading bitmap , re-saving fine. not sure if .net natively supports tiffs (i doubt does). for jpegs, suggested there may quality loss if you're re-compressing file after decompressing it. that, might try exiflibrary , see if has anything. if not, there command line tools (like imagemagick) can strip metadata. (if use imagemagick, you're set, since supports of required formats. command want con

ajax - PropertyNotFoundException when using bean's method's result for <h:selectBooleanCheckbox/> -

environment : primefaces 5.1 mojarra 2.2.2 spring 4.0.2 current code : i have following xhtml page: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core" template="/web-inf/pages/main/admin.xhtml"> <ui:define name="contentbody"> <p:datatable widgetvar="weekdaytable" value="#{weekdaylist.countries}" var="ctr" styleclass="weekdaysmanagementdatatable"> <p:column width="100" sortby="#{ctr.desc}"

PHP Dropbox integration with dynamic redirect uri -

i working on php app in need integrate dropbox. following code: require_once ("../dropbox-sdk/dropbox/autoload.php"); use \dropbox dbx; $appinfo = dbx\appinfo::loadfromjsonfile("../dropbox-config.json"); $csrftokenstore = new dbx\arrayentrystore($_session, 'dropbox-auth-csrf-token'); $redirect_uri = "https://www.myapp.com/redirecturi.php"; $webauth = new dbx\webauth($appinfo, "myapp", $redirect_uri, $csrftokenstore); $authorizeurl = $webauth->start(); this working fine static redirect uri. in app, redirect uri different different sub domains, like, https://abc.myapp.com/redirecturi.php , https://xyz.myapp.com/redirecturi.php etc. but dropbox not allowing dynamic redirect uris. solution use static redirect uri , send parameters can create uri. dont know how send parameters. you'll need use static redirect uri. but when call start , can pass parameter returned when call finish after authorization. pass informat

android - How to use returned arraylist?How to retrieve data from arraylist? -

in following code,i saving 3 values fun_id,fun_logo,fun_req of class use.in code arraylist returned,now want retrieve fun_id,fun_logo,fun_req.i want add fun_logo imagearray.i know how use class use retreving data.i learning small idea bout android. arraylist<use> stringarraylist = null; arraylist<use> res = null; arraylist<string> linklist = null; string getdetailsurl; string link []; string[] ar; use[] getalldet; public string imagearray[]; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); new getdetailsfromweb().execute(); list=(listview)findviewbyid(r.id.listview1); // adapter=new myadpter(this, imagearray); list.setadapter(adapter); } public class getdetailsfromweb extends asynctask<string,void,string> { string result = ""; @override protec