Posts

Showing posts from September, 2010

java - JUnit Testing for User Interface with Database Integration in Eclipse -

i've been told test user interface via junit testing. however, how can go testing aspects of user interface such login credentials? example, want test happens if enters in wrong password. right now, password verified comparing entered password hashed password in database. unsure how test different password parameters. can done using junit testing? i suggest junit + dbunit + spring-test the testing problem can resolved mocking database. in point of view, it's little complex explain here, can example? https://bitbucket.org/dperezcabrera/fest-swing-test i think can help.

excel - Define a cell as a variable to be used in workbook reference -

i attempting define cell variable can use when calling upon workbook. cell changes daily , before running macro create brand new workbook cell title. this have won't work: dim wbk workbook set wbk = "x:\myname\testocd\&"sheets("mockuphelp").range("d29")""" the cell referencing changes daily in sheet mockuphelp d29 . try, set wbk = workbooks.open("x:\myname\testocd\" & sheets("mockuphelp").range("d29").value & ".xlsx") not sure if need .xlsx thrown on tail end should give general idea.

javascript - How to save PHP variable in loop after AJAX requests more posts? -

i have been looking @ code far long , getting can me! i building wordpress site, , main blog page, want display content tiles, every 3 or 7, want display promo content post-type. can fine, when add load more posts button, resets counter have keeping track of promo content 0, therefore showing first 2 promo pieces on , on each new load. i appreciate help. i'm going in circles now. the important parts of home.php file : <div class="blog-post-tiles"> <?php //variables $counter = 0; $promo_counter = 0; $args = array( 'post_type' => 'promo', ); //$postlist = new wp_query( $args ); $postlist = get_posts($args); $posts = array(); foreach ( $postlist $post ) { $promo_posts_array[] += $post->id; } ?> <?php if ( hav

what does this error mean in android studio?, how to solve this issue? -

error:the supplied javahome seems invalid. i cannot find java executable. tried location: c:\users\abhi pattar\appdata\local\android\sdk\bin\java.exe" try eliminating space in "abhi pattar". run errors if have spaces in pathname. try renaming folder "abhipattar" or "abhi_pattar".

makefile - Make runs target with variable name regardless of whether file exists -

i'm using gnu make work data. when try run target variable name, make run target, regardless of whether target file exists . consider following makefile : include config.mk .phony : all : $(pg_db).db $(pg_db).db : createdb $(pg_db) -u $(pg_user) touch $@ where config.mk contains: makeflags += --warn-undefined-variables shell := bash .shellflags := -eu -o pipefail .default_goal := .delete_on_error: .suffixes: pg_user="foo" pg_db="foo" when run make , make creates postgres database, , touches file foo.db . however, when run make again, output is: createdb "foo" -u foo createdb: database creation failed: error: database "foo" exists make : *** ["foo".db] error 1 this shouldn't have happened! expect make , in situation, check prerequisites phony target all , see foo.db exists, , exit without doing anything. strangely, happens when rid of variables in target names: include config.mk .phony : all : f

How to take selected value from option field in html using node.js code? -

i working on node.js new me stucked here..how take selected value option field in html using node.js here html code : <select name="selectedvalue" class="form-control hidden"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option selected="selected">6</option> <option>7</option> </select> so how selected option value through node.js here node.js code: var _numberofpass=req.body.selectedvalue; but got output undefined didn't success ed take selected option value html please tell me solution above problem.

PHP - using a namespace in another namespace -

i'm trying use files namespace inside 1 of own namespaces, it's not recognising exceptions defuse\crypto namespace. i've checked files, , there stored in directory. can include autoloader no exceptions too. what can cleanly use both namespaces in same file? here's code: namespace defuse\crypto; $path = '/my/path/to/defusecrypto/autoloader'; require_once $path; use \defuse\crypto\crypto; use \defuse\crypto\exception ex; namespace mynamespace; class myclass { static function encrypt_key($key) { try { $ciphertext = crypto::encrypt($key, $privatekey); return $ciphertext; } catch (ex\cryptotestfailedexception $ex) { return false; } catch (ex\cannotperformoperationexception $ex) { return false; } } static function decrypt_key($key) { try { $decryptedkey = crypto::decrypt($key, $private

Android _ redirect from a service class to another Activity? -

can redirect service class activity ? i need when process finish in service redirect me activity . did try ? intent in=new intent().setclass(myalarmservice.this,reminder.class); in.setflags(intent.flag_activity_new_task); startactivity(in); edit : if using broadcastreceiver try this intent ialarm = new intent( mcontext, youractivity.class ); ialarm.addflags(intent.flag_from_background); ialarm.addflags(intent.flag_activity_new_task); mcontext.startactivity(ialarm);

javascript - Regex to wrap in an anchor matched hashtags in description -

Image
data model: var sample = {desc: "i #cool #cool1234 hello world", tags:["cool", "cool1234"]} so able come function: return sample.desc.replace(/#[a-z]+/g, "<a class=\"tags-in-details\" href=\"#/tab/myprofile-hashtags/$&\">$&</a>"); the problem function doesn't replace capitals "#cool" not linked , doesn't include numbers "#cool" linked without "1234".. in href desired url href"#/tab/myprofile-hashtags/cool" instead of href="#/tab/myprofile-hashtags/#cool" questions what should regex upper case letters , numbers linked how remove '#sign' in url (..url/cool instead of ..url/#cool) screenshot app: var sample = {desc: "i #cool #cool1234 hello world #notatag", tags:["cool", "cool1234"]}; var result = sample.desc.replace(/#(?:([a-za-z0-9]+))/g, function() { var tag = regexp

android - OpenGL- Render to texture- whole rendered scene -

Image
i implemented fbo on opengl game. , im rendering rendered screen texture, problem rendering texture starts lower left corner. look: what rendered default frame buffer: what rendered texture attached fbo: but want rendered texture is: i have calculated hypothetical rectangle (red dots) positions. dont know how render area, how can this? here renderer calass (the fbo operation done in ondrawframe function): public class curlrenderer implements glsurfaceview.renderer { // constant requesting right page rect. public static final int page = 1; // set true checking how perspective projection looks. private static final boolean use_perspective_projection = false; // background fill color. private int mbackgroundcolor; // curl meshes used static , dynamic rendering. private curlmesh mcurlmesh; private rectf mmargins = new rectf(); private curlrenderer.observer mobserver; // page rectangles. private rectf mpagerect; // view mode. // screen size. private int mviewportwidt

php - How to select data based on search result clicked mysql? -

title little hard write let me explain. using php , have made scripts search database , output data in html table using loop. http://imgur.com/89orrv9 example there. all here not sure how go following. i want set global variables such searchfname based on link click on table. i add hyperlink tag id section how upon clicking link set global variables value of other columns such first name , surname. can somehow grab value of link , use in query find details? any appreciated in advance. luke.

orientation - graphviz rows of nodes -

i'm trying use graphviz create branching diagram based on time line. however, when try connect rows of nodes show have branched row of nodes, order gets mixed around. there way specify order of rows? i've tried used various rank settings nodes nothing seems work. i've tried invisible nodes , edges well, doesn't either. i'd able stack rows, when new branch created off of old one, appear above row branched off of. code stands right now, branches appear in right order, when try connect branches show relationship, that's when order gets messed up. have experience similar? digraph g{ ranksep = 0.05; rankdir="lr"; node[width=0.5, height=0.5, shape=plaintext]; edge[weight=10, arrowhead=none]; "7/2014" -> "8/2014" -> "9/2014" -> "10/2014" -> "11/2014" -> "12/2014" -> "1/2015" -> "2/2015" -> "3/2015" -> "4/2015" -> "5/

How to retrieve an XML Value using R and the XML library -

i want retrieve xml value "business object" using r the xml file yed diagram[1]. file shown below <?xml version="1.0" encoding="utf-8" standalone="no"?> <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemalocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd"> <!--created yed 3.14.2--> <key attr.name="description" attr.type="string" for="graph" id="d0"/> <key for="port" id="d1&

html - How to make a table scrollable with fixed header? -

i have table gets added dynamically webpage. table, th, td { border: 1px solid black; border-collapse: collapse; } th, td { padding: 5px; text-align: center; } table#appraisertable th { background-color: black; color: white; } i want make scrollable header fixed. i can make whole table scrollable adding code in css- tbody { display:block; overflow-y:scroll; height:100px; } but makes whole table scrollable; header doesn't stay fixed. also, table has border, how can rid of it? here go jsfiddle <body> <table cellspacing="0" cellpadding="0"> <thead> <tr> <th>month</th> <th>savings</th> </tr> </thead> </table> <div class="tb"> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td>01</td> <td>$100</td> </tr> <tr> <td>02</td> <t

c++ - Advantages of 2D vector array -

previously, i've been creating 2d arrays of class object using pointer, in following syntax: object** myarray = new object*[row_num]; (int = 0; < row_num; i++) { myarray[i] = new object[col_num]; [skip] } however, many people have been recommending me use vector<vector<object>> rather using object** . as far i'm concerned, vector requires more memories trade-off easier change in array size. however, since 2d array need used backtracking algorithm of grid (which never change dimension once it's determined), not feel necessity of changing them. are there other advantages of vector i'm unaware of? automatic deallocation as @nathanoliver mentioned, never need call delete (often customized recursive deletion) multi-dimensional vectors, objects inside released when fall out of scope automatically. can reduce amount of code need write , maintain. obviously, if vectors contain objects allocated new or malloc , you'll ne

c# - Windows Universal App windows 10 menu -

i creating windows universal app can't find out how create menu can find in groove music app on windows phone 10. you can create menus these splitview control. introduced windows 10. see docs here: https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.splitview.aspx little hint: button on upper left show , hide menu not part of splitview control , has created manually. you can find menu in several samples including mine on github: github.com/danielmeixner/w10demoking/

javascript - Trying to do a release build with react-native, fails? -

i know why react-native build fails in release scheme , works fine in debug scheme? i'm using react-native-side-menu , react-native-navbar . here code. 'use strict'; var react = require('react-native'); var { appregistry, stylesheet, text, view, navigator, scrollview, touchablehighlight, alertios, } = react; var fluxxor = require('fluxxor'); var flux = require('./flux'); var sidemenu = require('react-native-side-menu'); var mainstyles = require('./styles/main'); var navigationbarview = react.createclass({ render: function() { return ( <view> <text style={{ fontsize: 36 }}>hello world</text> <text style={{ fontsize: 36 }}>hello world</text> <text style={{ fontsize: 36 }}>hello world</text> <text style={{ fontsize: 36 }}>hello world</text> </view> ); } }); var menu = react.createclass({ ab

android - I updated an App but its failed. Missing type parameter in ProGuard -

i updated application had same code, in version didn't have problems in proguard. when launch app since androidstudio don't have problems, when launch signed app in parts of app can show error: 07-21 14:45:02.156 24372-24372/pe.gob.devida e/androidruntime﹕ fatal exception: main java.lang.runtimeexception: missing type parameter. @ com.google.a.c.a.a(unknown source) @ com.google.a.c.a.<init>(unknown source) @ pe.gob.devida.fragments.c.<init>(unknown source) @ pe.gob.devida.fragments.b.a(unknown source) @ pe.gob.devida.fragments.b.a(unknown source) @ com.a.a.a.o.c(unknown source) @ com.a.a.a.o.b(unknown source) @ com.a.a.i.run(unknown source) @ android.os.handler.handlecallback(handler.java:730) @ android.os.handler.dispatchmessage(handler.java:92) @ android.os.looper.loop(looper.java:137) @ android.app.activitythre

r - Replace NA by row with the row mean -

i have following data-frame: i1<-c(5,4,3,4,5) i2<-c(4,na,na,5,3) i3<-c(na,4,4,4,5) i4<-c(3,5,5,na,2) dat<-as.data.frame(cbind(i1,i2,i3,i4)) dat i1 i2 i3 i4 1 5 4 na 3 2 4 na 4 5 3 3 na 4 5 4 4 5 4 na 5 5 3 5 2 my goal replace na row mean get: > dat i1 i2 i3 i4 1 5 4.0000 4 3.0000 2 4 4.3333 4 5.0000 3 3 4.0000 4 5.0000 4 4 5.0000 4 4.3333 5 5 3.0000 5 2.0000 i have following code: dat1<- which(is.na(dat), arr.ind=true) dat[dat1] <- rowmeans(dat, na.rm=true)[dat1[,1]] which yield desired result; however, wondering if there better way this, , keep both row , column names (rows have names in final product). thank you. try (is.na(dat))*rowmeans(dat, na.rm=true)[row(dat)] + replace(dat, is.na(dat), 0) # i1 i2 i3 i4 #1 5 4.000000 4 3.000000 #2 4 4.333333 4 5.000000 #3 3 4.000000 4 5.000000 #4 4 5.000000 4 4.333333 #5 5 3.000000 5 2.000000

elasticsearch service fails to start after installation -

i installed elastic search using deb package here . service fails start , throws below error. how can fix this? $ sudo service elasticsearch restart * stopping elasticsearch server [ ok ] * starting elasticsearch server chown: invalid group: `elasticsearch:elasticsearch' chown: invalid group: `elasticsearch:elasticsearch' [fail] maybe don't have user/group set in system: for security reasons, running server unprivileged user , group encouraged. create user , group elasticsearch: groupadd elasticsearch useradd -s /sbin/nologin -d /usr/local/elasticsearch -c "elasticsearch user"

linux - Starting database: mongod failed -

i fail install mongodb on server (ssh; linux-gnu). following trace: reading package lists... done building dependency tree reading state information... done following packages installed: mongodb-org-mongos mongodb-org-server mongodb-org-tools following new packages installed: mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-tools 0 upgraded, 4 newly installed, 0 remove , 47 not upgraded. need 0 b/46.7 mb of archives. after operation, 149 mb of additional disk space used. selecting deselected package mongodb-org-server. (reading database ... 73280 files , directories installed.) unpacking mongodb-org-server (from .../mongodb-org-server_3.0.5_amd64.deb) ... selecting deselected package mongodb-org-mongos. unpacking mongodb-org-mongos (from .../mongodb-org-mongos_3.0.5_amd64.deb) ... selecting deselected package mongodb-org-tools. unpacking mongodb-org-tools (from .../mongodb-org-tools_3.0.5_amd64.deb) ... selecting deselected package mongodb-org. unpacking m

php - laravel 5 edit elequent not working -

i trying edit data field following elequent not picking data, appreciated. following data controller using: public function edit($name) { $category = category::where('name', $name)->get()->all(); dd($category); return view('/editcategory')->with('category', $category); } while checking output not picking data db output: array:1 [▼ 0 => category {#190 ▼ #table: "category" #connection: null #primarykey: "id" #perpage: 15 +incrementing: true +timestamps: true #attributes: array:5 [▶] #original: array:5 [▶] #relations: [] #hidden: [] #visible: [] #appends: [] #fillable: [] #guarded: array:1 [▶] #dates: [] #dateformat: null #casts: [] #touches: [] #observables: [] #with: [] #morphclass: null +exists: true } ] don't use both get() , all() in same time. should be: public function edit($name) { $c

c# - nclam anti virus is not working with .net application -

i getting issue: no connection made because target machine actively refused 127.0.0.1:3310. using system; using system.linq; using nclam; class program { static void main(string[] args) { var clam = new clamclient("localhost", 3310); var scanresult = clam.scanfileonserver(@"c:\inetpub\wwwroot\rarextract\parts\eicar_com.zip"); //any file like! switch(scanresult.result) { case clamscanresults.clean: console.writeline("the file clean!"); break; case clamscanresults.virusdetected: console.writeline("virus found!"); console.writeline("virus name: {0}", scanresult.infectedfiles.first().virusname); break; case clamscanresults.error: console.writeline("woah error occured! error: {0}", scanresult.rawresult); break; } } }

axapta - Error: The cursor is invalid for instantiating recordViewCache -

i trying re-use class , run in job prove out. here job code: inventquarantineorder_scrap scrap = new inventquarantineorder_scrap(); ; scrap.parminventquarantineid('00016749_077'); scrap.parmscrapqty(360); scrap.parmtransdate(today()); scrap.run(); when run code, error: the cursor invalid instantiating recordviewcache researching error led me link , tried implement got syntax errors i'm not sure how fix. copied class , created new runonserver method. validate method doesn't work. modify validate method run on server: static server boolean validate() { inventquarantineorder inventquarantineorder = inventquarantineorder::find(inventquarantineid); ; .... } which gave me error: variable inventquarantineid has not been declared. if comment out validate() call runonserver method, same error/problem inventquarentineid variable not being declared (it's used in run method). from here, not sure how continue. doing wr

ios - WKWebView download zip file from an indirect link -

Image
i trying capture downloading of zip file wkwebview in ios. after logging in, going link , requesting archive , clicking download button, zip file not downloaded. however, wkwebview display file in web browser, or appears (see screenshots below). when trying download file web view, i'm pulling html file. can provide direction here, regarding right approach catch , download zip file? note, zip file has no direct link. code wkwebview delegate method, , download handler below. webview didfinishnavigation - (void)webview:(wkwebview *)webview didfinishnavigation:(wknavigation *)navigation { nsurlcomponents *comps = [[nsurlcomponents alloc] initwithurl:webview.url resolvingagainstbaseurl:no]; comps.query = nil; nslog(@"did finish nav url: %@", webview.url); if ([webview.url.absolutestring isequaltostring:li_download_url]) { dispatch_after(dispatch_time(dispatch_time_now, 1.0 * nsec_per_sec), disp

c++ - Random Integers Appear When Deleting Element in Linked List -

when attempt delete element linked list, of elements end somehow obtaining random values in place of originals. problem? void removespaceshippower(spaceship *x, int y) { spaceship *current = x; spaceship *todelete = null; spaceship *next = null; while(current != null) { if(current->nextship->power == y) { next = current->nextship->nextship; current->nextship = next; todelete = current->nextship; free(todelete); return; } current = current->nextship; } } main: int main() { spaceship *freelist = new spaceship; freelist->power = 50; freelist->health = 100; spaceship *freelist2 = new spaceship; freelist2->power = 25; freelist2->health = 100; spaceship *freelist3 = new spaceship; freelist3->power = 75; freelist3->health = 100; spaceship *freelist4 = new spaceship; freelist4->power =

Unable to get "Microsoft Dynamics CRM Fetch" in Data Source options for SSRS reports project for CRM 2015 -

Image
i have problem similar this post i have installed "microsoft dynamics crm report authoring extension" dynamics crm 2015. installed bids sql server 2012 , working vs 2013 community edition. windows live sign-in assistant installed. i created new project business intelligence/report server project , went on add new data source see following list no option "microsoft dynamics crm fetch" apparently, there seems no errors. can give me ideas or suggestions on resolve issue? thanks, microsoft dynamics crm 2015 report authoring extension (with sql server data tools support) doesn't support vs 2013. here part of system requirements: the following components required: microsoft visual studio 2012 , microsoft sql server data tools - business intelligence visual studio 2012 -- or -- visual studio 2010 , sql server data tools install sql server data tools, on pc running visual studio 2010 go microsoft sql server 2012 express download page,

html - Skewed Text is getting blurred in Chrome -

i have skewed popup , text in quick view of products. not rendering correctly in chrome. tried translate 3d(0,0,0) , changes skew deg odd doesn't resolved problem. can please me this. blurring minor issue while skewing making items smoother. if need make blurring gone, skew background div , leave foreground div untouched. .background { width: 300px; height: 100px; background: lightgrey; position: absolute; top: 60px; -webkit-transform: skewy(-5deg); } .foreground { width: 280px; height: 100px; position: absolute; top: 60px; padding: 10px; text-align: center; } .dialog { width: 300px; margin: 0 auto; } <div class="dialog"> <div class="background"> </div> <div class="foreground"> <p>here goes foreground text.</p> </div> </div>

What is the difference between the javascript errors "Cannot read property 'foo' of null" and "null is not an object" -

we're logging javascript errors , 1 error message has come lot null not object , example typeerror: null not object (evaluating 'foo[bar]') . in searches error , trying replicate error, continually cannot read property 'foo' of null error instead. cannot figure out way results in null not object error. what difference between 2 errors , examples when 1 called instead of other? one example is here when assign null value object , try access of it's properties null not object. so, if try call function on object has null value give error: null not object in safari cannot read property of null in chrome typeerror: obj[1] null in firefox

php - Always executes else clause even if value present in database -

$sql="select * manifest (awb_no = '$var')"; $result=mysql_query($sql); if($result==$var) { echo "tracking id present in manifest</br>"; } else { echo "trackingid not present<br>"; exit(0); } when retrieve data database , check against data have entered,even though data entered correct , present in database executes else clause.where going wrong? please help! try count rows query try this: $sql = "select * manifest (awb_no = '$var')"; $result = mysql_query($sql); if(mysql_num_rows($result) > 0) { echo "tracking id present in manifest</br>"; } else { echo "trackingid not present<br>"; exit(0); } btw mysql depricated use pdo or mysqli

passing a url as a param in a Laravel 4 Route -

i want pass url part of route: i.e http://example.com/param1/url_param or http://example.com/param1/?url_param=http://example1.com/56474 route::get('/{param1}/{url_param?}', function($param1, $url_param){}); i'm on ubuntu, nginx, laravel 4. you should not pass url without encoding via parameter. furthermore, cannot pass in first example (appending segment of url) have segment delimiter char inside url ('/') define protocol. the second example right though, although i'd recommend encode url using url_encode(). another approach encode url using b64, producing string can appended url segment. like: $urltobeappended = base64_encode( 'http://example1.com/564740' ); and final route like: http://example.com/param1/ahr0cdovl2v4yw1wbguxlmnvbs81njq3nda= in controller responsible handling route can decode b64 string.

python, search file between two dates -

i make script in python , search files recursive in linux , between 2 dates? import os dirname, dirnames, filenames in os.walk('.'): subdirname in dirnames: print(os.path.join(dirname, subdirname)) # print path filenames. filename in filenames: print(os.path.join(dirname, filename)) like this? import os, datetime dt # define epoch time t0 = dt.datetime.utcfromtimestamp(0) # define time ranges d1 = (dt.datetime(2015,1,1) - t0).total_seconds() d2 = (dt.datetime(2015,1,31) - t0).total_seconds() (dirpath, dirnames, filenames) in os.walk(path): filename in filenames: f = '/'.join([dirpath,filename]) ctime = os.stat(f)[-1] if ctime>=d1 , ctime <=d2: print f

parsing - python: how to delete row and modify specific list string from CSV -

this first time posting question apologise in advance if make mistakes. i attempting create custom python program (pretty parser) takes in data such: junk junk junk junk junk junk fields title title title data_type d_type d_type d_type data1 data2 data 3 data4 data 5 data6 data7 data8 data9 junk where desired output is: title title title data1 data2 data3 data4 data5 data6 data7 data8 data9 here working portion of code have far: import csv import itertools open('file.log','rb') csvfile: rowlist = csv.reader(csvfile, delimiter = '\t') row in itertools.islice(rowlist,6,12): print row whenever above code run produces series of lists seen here ['fields','title1', 'title2', 'title3'] ['data_type','d_type','d_type', 'd_type'] ['data1', 'data2', 'data3'] ['data4', 'data5', 'data6']

c# - How to make a byte array with an image from solution. (Windows Phone 8.1 runtime) -

Image
i need make byte[] image, first think have save image file storagefile or something, , pass method, job: private async task<byte[]> storagefiletobytearray(storagefile file) { byte[] bytearray = new byte[0]; if (null != file) { irandomaccessstream filestream = await file.openasync(fileaccessmode.read); var reader = new datareader(filestream.getinputstreamat(0)); await reader.loadasync((uint)filestream.size); bytearray = new byte[filestream.size]; } return bytearray; } but how save storagefile? this how load in bitmapimage: bitmapimage bitmapimage = new bitmapimage(new uri("ms-appx:///assets/no_capture_receipt.png", urikind.absolute)); then how save image in storagefile it's easier think. private async task<byte[]> storagefiletobytearray(string filename) //filename = "no_capture_receipt.png" { var folder = await windows.ap

android - show name of the month -

i making app have show last update fitness band, date: sqlitedatabase sql2 = new savedatabase.savedatebasehelp(this).getwritabledatabase(); cursor select = sql2.rawquery("select pedometer_year, pedometer_month, pedometer_day db_pedometer_info _id = (select _id db_pedometer_info order _id desc limit 1); ", null); try { if(select != null && select.getcount() == 1) { select.movetolast(); string year = select.getstring(select.getcolumnindex("pedometer_year")); string month = select.getstring(select.getcolumnindex("pedometer_month")); string day = select.getstring(select.getcolumnindex("pedometer_day")); globals.lastupdatedate = day + "-" + month + "-" +year; } } this show me "11-07-2015" , want "11-jul-2015" string[] months = new string[] { "jan", "feb&q

ios - GoogleMaps without CocoaPods -

i add googlemaps ios project don't want use cocoapods . there way achieve that? sure there is: immediate answer: https://www.gstatic.com/cpdc/0646cf0bd434ed77-googlemaps-1.10.1.tar.gz (download , unzip it) how did (useful library need) go pod need, in case: https://cocoapods.org/pods/googlemaps click on "see podspec" link below library on bottom right corner you gonna taken podspec.json at end of json, find key "source" , use url provided download sdk. if need instructions on how install manually, can use waybackmachine websitea , put corresponding url, setting earlier date. i'll save time: adding google maps old way: launch xcode , either open existing project, or create new project. if you're new ios, create a single view application, , ensure that use automatic reference counting is on. drag the googlemaps.framework bundle project. when prompted, select copy items destination group's folder. right-click goog

php - how can i add one column in table wp_post in wordpress and add data into column? -

i want add field resume_code table posts in wordpress , add data field. have add field call 'resume_code' already. cannot add data field. please me solve. edit: $post_information = array( 'id' => $current_post, 'post_title' => $_post['fullname'], 'post_content' => strip_tags($_post['postcontent']), 'post_type' => 'resume', 'comment_status' => 'open', 'ping_status' => 'open', 'post_status' => 'publish' 'resume_code' => $_get['resume'] ); $post_id = wp_insert_post($post_information);

Jquery Mobile Filterable Select Long List -

i'm trying create custom select menu filter on demo page: http://demos.jquerymobile.com/1.4.5/selectmenu-custom-filter/ it works fine short list: http://jsfiddle.net/dw1c1439/ but it's not working long lists: https://jsfiddle.net/pppzlbfu/ i keep getting error: script5007: unable property 'jqmdata' of undefined or null reference my full code is <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>filterable inside custom select - jquery mobile demos</title> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=open+sans:300,400,700"> <link rel="stylesheet" href="jquery.mobile/css/themes/default/jquery.mobile-1.4.5.min.css"> <link rel="stylesheet" href=

java - Android: captured image not showing up in gallery (Media Scanner intent not working) -

i have following problem: working on app user can take picture (to attach post) , picture saved external storage. want photo show in pictures gallery , using media scanner intent that, not seem work. following official android developer guide when writing code, don't know what's going wrong. parts of code: intent capturing image: private void dispatchtakepictureintent() { intent takepictureintent = new intent(mediastore.action_image_capture); // ensure there's camera activity handle intent if (takepictureintent.resolveactivity(getactivity().getpackagemanager()) != null) { // create file photo should go file photofile = null; try { photofile = createimagefile(); } catch (ioexception ex) { // error occurred while creating file toast.maketext(getactivity(), ex.getmessage(), toast.length_short).show(); } // continue if file created if (photofile != null) {