Posts

Showing posts from January, 2011

c++ - Retrieve ID2D1DeviceContext from IDirect3DDevice9 -

i using source reader read video samples video file, , decode them using decoder rendering these samples using directx9. i using idirect3ddevice9 rendering video frames, , working expected. now want add in chroma-key effect, described in below like: https://msdn.microsoft.com/en-us/library/windows/desktop/dn890715(v=vs.85).aspx so how id2d1devicecontext idirect3ddevice9 , add chorma-key effect , render video frame? id2d1devicecontext requires directx11 device , can not used obsolete idirect3ddevice9. typically create objects in following order: dxgi factory, d2d1 factory, d3d11 device, dxgi device, d2d1 device , d2d1 device context. may want check d2d getting starting guide , samples . there no real point in dealing directx9 anymore, unless forced provide backward compatibility windows xp. chroma-key sample posted requires windows 10.

Running multiple instances of same program in Visual Studio -

Image
i using microsoft visual studio 2012 coupled intel fortran. running large third party software working on. currently set working directory software using configuration>debug properties. command arguments contain inputting in command line if compiling program shell. circled in red box below. the question is, if have multiple files in working directory (inputvalues\v2017.1i\test\test1, test2 , test3) run simultaneously. depend on loaded solution. how go doing this?

Selenium - Multiple anchor - Same ID - Not able to fetch -

i want click on anchor tag class id clsarrowclick , same id on anchor tag. <td class="text-center" style="width: 25% !important;"> <td class="arrow" data-toggle="tooltip" data-container="body" title="" style="width: 25% !important; text-align:center" data-original- title="select/show data"> **<a id="clsarrowclick" class="clsarrowclick" href="#" onclick="javascript:openaddnewwellpopup(this);"> <i class="fa fa-arrow-right"/> </a>** <input id="hdnissaved0" class="hdnisarrowsaved" value="0" type="hidden"/> </td> </tr> <tr id="2"> <td style="width:50%; class=" '="" data-container="body" data- toggle="tooltip" title="" data-original-title="abcd">abcd</td> <td class="text-

python - Accessing class variables from a list comprehension in the class definition -

how access other class variables list comprehension within class definition? following works in python 2 fails in python 3: class foo: x = 5 y = [x in range(1)] python 3.2 gives error: nameerror: global name 'x' not defined trying foo.x doesn't work either. ideas on how in python 3? a more complicated motivating example: from collections import namedtuple class statedatabase: state = namedtuple('state', ['name', 'capital']) db = [state(*args) args in [ ['alabama', 'montgomery'], ['alaska', 'juneau'], # ... ]] in example, apply() have been decent workaround, sadly removed python 3. class scope , list, set or dictionary comprehensions, generator expressions not mix. the why; or, official word on this in python 3, list comprehensions given proper scope (local namespace) of own, prevent local variables bleeding on surrounding scope (see python l

sorting - Sort a list of objects by parameters in c# -

i have list of users. i'd sort list few parameters. case 0: //date (work) int example: 0 osu_ve.userlist.sort((e1, e2) => e1.index.compareto(e2.index)); break; case 1: //name (work) string example: vectis osu_ve.userlist.sort((e1, e2) => e1.udata.username.compareto(e2.udata.username)); break; case 2: //pp (doesn't work) string example: 14688.76 osu_ve.userlist.sort((e1, e2) => convert.todouble(e2.udata.pp_raw).compareto(convert.todouble(e1.udata.pp_raw))); break; case 3: // best pp (doesn't work) string example: 820.545 osu_ve.userlist.sort((e1, e2) => convert.todouble(e2.ubestscore[0].pp).compareto(convert.todouble(e1.ubestscore[0].pp))); break; case 4: //rank (work)

html - Edit User page in PHP and PHPMYSQL using Array Drop Down Selection -

Image
i ask why every time try call programme doesn't show results? i'm trying create edit user page means call database mine doesn't show up. here's edit user code have problem row4 // retrieve user's information: $q = "select first_name, last_name, phone, email , programme users user_id=$id"; $r = @mysql_query ($q); if (mysql_num_rows($r) == 1) { // valid user id, show form. // user's information: $row = mysql_fetch_array ($r, mysql_num); // create form: echo '<div align="center"/div><form action="edit_user.php" method="post"> <p>first name: <input type="text" name="first_name" size="15" maxlength="15" value="' . $row[0] . '" /></p> <p>last name: <input type="text" name="last_name" size="15" maxlength="30" value="' . $row[1] . '" /><

C++ Custom exception throw () in constructor -

so read aren't supposed have other basic types in custom exception class because otherwise might throw exception within exception (like dream within dream). , should throw value , catch ref. i have exception class header: class deepthroatexception : public std::runtime_error { public: deepthroatexception(const char* err); // set err member err private: // error description const char* err; }; but dont since introduces issue memory management, invisible naked eye , need use mine detector. change std::string if possible. but there issue in first paragraph above, thought doing this: #include <string> class deepthroatexception : public std::runtime_error { public: deepthroatexception(std::string err) throw(); // set err member err, no throw private: // error description std::string err; }; is ok do? using std::string can give bad time std::bad_alloc . problem inherent std::runtime_error , constructors can take std::string argument

sql server - SQL: Display "01 Mar 2017" instead of "2017-03-01" ISSUE WITH GROUP -

i have code below works fine, i change shape of dates "01 mar 2017" instead of "2017-03-01" select * ( select [messagetype].[name], case when ( format([occuredatutc], 'yyyy-mm-dd') '2017-03%' ) format([occuredatutc], 'yyyy-mm-dd') else null end [time], count(*) [count] @table inner join @table on group format([occuredatutc], 'yyyy-mm-dd'), [messagetype].[name] ) s ( [time] not null ) order [time] asc outuput : name_______time______count____ http 2017-03-01 21 http 2017-03-02 37 http 2017-03-03 42 . . http 2017-03-31 29 but if use convert(varchar(11), [occuredatutc], 106) after then in code, there problem group ing don't dates counted right anymore what happens if try use convert(varchar(11), [occuredatutc], 106) in code: // changed comented

junit - Mocking HTTPSURLConnection class throws java.lang.AbstractMethodError -

i want mock following lines static void processremotetolocal(string srcurl, string destfile) { url fileurl = new url(srcurl); httpsurlconnection.setdefaultsslsocketfactory(foo.getsslcontext().getsocketfactory()); httpsurlconnection.setdefaulthostnameverifier(foo.gethostnameverifier()); httpsurlconnection connection = (httpsurlconnection) fileurl.openconnection(); } for above code updated test class using powermockito below @test @preparefortest({foo.class,sslsocketfactory.class}) public void shouldsettestmockservefield() throws exception { hostnameverifier hnamemock = powermockito.mock(hostnameverifier.class); sslsocketfactory mocksocfac = powermockito.mock(sslsocketfactory.class); httpsurlconnection huc = powermockito.mock(httpsurlconnection.class); foo mockcert = powermockito.mock(foo.class); sslcontext sslmock = powermockito.mock(sslcontext.class); final sslsocketfactory sslfac = null; url u

android - ImageVIew Thumbnail setVisibility GONE not working inside onPrepared -

i want hide imageview thumbnail after remote video ready play, means when onprepared execute imageview.setvisibility(view.gone) doesn't works @ all. i have seen answers one , two , think cause surfaceview or videoview . per answers i have tried using both mediaplayer , videoview code using mediaplayer , surfaceview mmediaplayer = new mediaplayer(); holder.surfaceview.setdrawingcacheenabled(true); try { mmediaplayer.setaudiostreamtype(audiomanager.stream_music); mmediaplayer.setdatasource(mcontext, uri.parse(video_url)); mmediaplayer.setonpreparedlistener(new mediaplayer.onpreparedlistener() { @override public void onprepared(mediaplayer mp) { mp.start(); ((activity)mcontext).runonuithread(new runnable() { @override public void run() { holder.imgthumbnail.getparent().re

java - Using a low pass filter to calculate average? -

Image
if want calculate average of 400 data points (noise values accelerometer sensor), can use low pass function such 1 that? private float lowpass(float alpha, float input, float previousoutput) { return alpha * previousoutput + (1 - alpha) * input; } i'm comparing storing 400 data points in list<float> , summing them , dividing 400. i'm getting quite different results high values alpha . doing wrong? can use low pass filter calculate average, or better calculate "real" average? edit my low pass function took float[] input , output, since data comes 3-axis accelerometer. changed float , removed internal for loop avoid confusion. means input/output passed primitive values, method returns float instead of operating directly on output array. if can afford compute arithmetic mean (which doesn't require storage if keep running sum) better option in cases reasons described bellow. warning: maths ahead for sake of comparing arithmetic

json - PHP cURL multiple calls based on id's from database -

i'm trying automate 150 curls request based on different id's. every curl generates output in json. i've these id's in mysql database. i think there following steps: 1.) id's database 2.) construct, load en save output every curl based on id. (www.domain.com//string) 3.) repeat step 2 each id. i don't have experience in field question begin? yes, that's right flow. let me give code think work. ok, first, assume have class db (i use meekrodb ); $dataid = db::queryonecolumn('id', "select * your_table_data order some_column limit 150"); db::starttransaction(); foreach($dataid $id){ $response = requestwithcurl($id); db::insert('your_table', array('json_column' => $response)); } db::commit(); below function execute curl, please see php curl example function requestwithcurl($id){ # initiate curl # define host/url # execute curl data contain $id # return curl response, assume

c# - List of values to list of strings -

how convert it: var values = new list<object> { 1, 5, "eee", myenum.value }; to var stringvalues = new list<object> { "1", "5", "eee", myenum.value.tostring() }; but in fast way? first, it's not clear whether question different convert list(of object) list(of string) ; if is, should clarify particular situation. the straight-forward solution use linq: var stringvalues = values.select(v => (object) v.tostring()).tolist(); note cast object match code above. it's not clear why you'd want result list<object> instead of list<string> . also, should prefer work ienumerable<> instead of converting list<> . preferred code be var stringvalues = values.select(v => v.tostring()); if you're doing type of thing lot, might find extension method useful static class listextensions { public static ienumerable<string> asstrings(this list<object> values)

java - Error message 'else' without 'if' when for looping -

basically, trying nest loop , output around lines this: * ** *** // (and on) unfortunately keep getting error message when coding, here code (i documented place have error): for (int = 0; i< 9; = + 2) { system.out.print(i + " "); (int j = 1; j<=3; j = j + 1) { if (i==8); break; } else //this else statement underlined { system.out.print("*" + " "); } } i using java netbeans ide 8.0 if interested. the problem in semicolon in end of if : if (i==8); //-------^ break; so when make semi-colon in end of if mean statement end start new statement break; to understand more, did have do, mean : if (i==8);//end of statement break;start new statement the above equivalent of : if(i==8){ //do nothing } break; to solve problem need use instead : if(i==8){ break; }

css - Can I add style class on sap.m.objectnumber? -

i have decimal number displaying objectnumber element. number in bold , don't want that. can add css class element? if not how can solve this? this element: <objectnumber number="{ path: 'priceibtw', formatter: '.formatter.moneyformatter' }" unit="{valuta}"/> i have tried looking style or class attribute don't seem have either 1 of them. as nistv4n said before, emphasized property availablein objectnuber. solve bold styling. then if want add custom css can set class property explained in api documentation . here functional snippet: <!doctype html> <html> <head> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta charset="utf-8"> <title></title> <script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap

c - fseek() and ftell() fail in a loop -

i need loop trough directory, data , read each file, meets conditions, in string , it. reason fails after fseek call (the output name of first file in directory). any idea doing wrong? #include <stdio.h> #include <stdlib.h> #include <dirent.h> #include <string.h> void doalgorithm(char *input) { printf("%s\n", input); } int main(int argc, char** argv) { struct dirent *dir; dir *d = opendir("data"); file *file; while ((dir = readdir(d)) != null) { if (strlen(dir->d_name) > 6 && dir->d_name[6] == 'i') { printf("filename: %s\n", dir->d_name); file = fopen(dir->d_name, "r"); fseek(file, 0, seek_end); long length = ftell(file); fseek(file, 0, seek_set); printf(", filesize: %ld\n", length); char *buffer = malloc(length + 1); fread(buffer, 1, length, file)

apache kafka - Issue while including enum type in unions within avro schema -

i working apache kafka send messages kafka topics. trying use unions in avro schemas including enum types message validation. facing issue usage of enum types within union. using kafka rest api through postman tool post record/message topic schema validation. below request payload including schema , records inline - { "key_schema": "{\"type\": \"record\", \"name\": \"key\", \"fields\": [{\"name\": \"keyinput\", \"type\": \"string\"}]}", "value_schema": "{\"type\": \"record\", \"name\": \"value\", \"fields\": [{\"name\": \"valueinput1\", \"type\": \"string\"},{\"name\": \"valueinput2\",\"type\":[{\"type\":\"enum\",\"name\":\"actorobjtype\",\"symbols\":[\"agent\",\"grou

Syntax error in Python 3.6 using ,end"" -

my code reads: print("please key in word: ",end" ") first=input() print("and key in another: ",end" ") second=input() print("you have typed: "+first+" "+second) but result "syntaxerror: invalid syntax" , ^ pointing second " following end. using python 3.6, end notation should correct. have tried , without space between "" after end. can see i'm going wrong? keywords need assigned values using = : print("please key in word: ", end=" ") first = input() however, better way use input() directly: first = input("please key in word: ")

javascript - tablesorter with custom sorter's rules -

i use table connected tablesorter library ( http://tablesorter.com/docs ). $('#mytable').tablesorter({ dateformat: 'yyyy-mm-dd', widthfixed: false, widgets: ['zebra'], }); all columns sorted correctly, except containing html code (such columns not sorted @ all). <tr> <td>text - sorting correct</td> <td>text <span>new text</span> - srting incorrect</td> </tr> how fix error? i thought write means of tablesorter (if any) sorting function, contents of tabith cell perceived text, without tags

database - Finding duplicate rows in two tables in SQL Server -

i have database 2 tables material , mandatory . mandatory table contains 2 columns class , characteristic_name . material table contains 4 columns material_name , class , characteristic_name , , characteristic_value . i want show material_name has same class , characteristic_name , characteristic_value class, characteristic_name same in mandatory table. for example material table contain data material_name class characteristic_name characteristic_value ----------------------------------------------------------------- 000000001 class1 model 12 000000001 class1 size 1 000000001 class1 type 000000002 class1 model 12 000000002 class1 size 1 000000002 class1 type 000000003 class2 type b 000000003 class2 weight 55 mandatory ta

Telerik Grid - Trap on cell leave event -

i have grid (mvc) following set: .editable(editable => editable.mode(grideditmode.inline)) .navigatable() .selectable(selectable => selectable .mode(gridselectionmode.single) .type(gridselectiontype.row)) when user creates new row, or when editing existing row, need able trap when user changes value in cell , moves out of cell. need able take new contents of cell changed , processing on it. how can this?

scala - Using toString on case classes to generate a value is a good or bad practice? -

i have case class let's say: case class offset(a:string, b:int, c: uuid) { override def tostring: string = productiterator.mkstring(",") } val offset: string = offset("some_string", 2, java.util.uuid.randomuuid).tostring is fine override tostring method on case class or shall implement different method let's generateoffset same thing like: case class offset(a:string, b:int, c: uuid) { def generateoffset: string = productiterator.mkstring(",") } val offset: string = offset("some_string", 2, java.util.uuid.randomuuid).generateoffset tostring used people , debugging tools. should contain concise human readable information. should not base logic on tostring second version more clear, @ least me.

c# - VSIX project : Can't access to a custom command file template -

i'm trying implement first vs extension microsoft tutorial : https://msdn.microsoft.com/en-us/library/cc138589.aspx at begining, speak creating new custom command (with "add new item" menu of visual studio). , i've got same problem mentionned in thread : don't find item template named "custom command". i've created vsix project without problem before. , i've installed sdk project. could me please ?

How can I install profiling libraries in Haskell when using cabal, in Ubuntu 14.04.5? -

i have haskell project obtain stack trace when exception thrown. using ghc 8.0.2 , module graphics.ui.glut , version of glut 2.7.0.11. i have installed module using cabal. this page official website suggests compile using -prof flag. however, following error failed load interface ‘graphics.ui.glut’ perhaps haven't installed profiling libraries package ‘glut-2.7.0.11’? use -v see list of files searched for. i using ubuntu 14.04.5 lts. using this link , decided run sudo apt-get install libghc-glut-prof however, did not solve problem. how can solve this? thank you. running sudo apt-get install libghc-glut-prof is right thing if indeed use debian package graphics.ui.glut . if have installed glut package cabal yourself, e.g. with cabal install glut or other package pulls in glut , can run cabal install --enable-library-profiling --force-reinstall glut (or whatever other package installed pulled in glut ) rebuild profiling enabled. none o

angularjs - How to send data from Html File To another one Using angular? -

i try sample project take data in form in html file .. pass spring service .. return object .. want pass object html fie display form's html file : <!doctype html> <html ng-app="phase2"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <head> <title>sign page</title> <script src="rigesterationcontroller.js"></script> </head> <body > <center> <p>enter user name : <input type="text" , name="username" id ="uname" required /> </p> <p>enter email : <input type="text" , name="email" id ="email" required /> </p> <p>enter password : <input type="password" , name="pass" id ="pass" required/> </p> <p>choose gender : <br> male<input type="radio" name=&q

webpack - How to use noParse in Create-React-App? -

i'm seeing warning in npm start output , can't seem past regardless of put in package.json . i'm beginning webpack , don't understand put in module.noparse pass without raising warning. warning in ./~/ajv/dist/ajv.bundle.js critical dependencies: 1:476-483 seems pre-built javascript file. though possible, it's not recommended. try require original source better results. @ ./~/ajv/dist/ajv.bundle.js 1:476-483 this package.json { "name": "name", "version": "0.1.0", "private": true, "dependencies": { "axios": "^0.16.1", "react": "^15.5.4", "react-dom": "^15.5.4" }, "devdependencies": { "react-scripts": "0.9.5" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build"

angularjs - Not able to connect to Websockets on Heroku -

i have been working on php laravel application have been using redis , node.js connected websocket. so in order achieve have been trying run node server on port 3000 heroku dynamically allocating port. because of unable correct port no on client side. what should in order fix ? client side config : var socket = io.connect('http://app-around.herokuapp.com:3000'); note: host name app-around.herokuapp.com backend running fine shown below: c:\xampp\htdocs\around-us>heroku run node socket.jsrunning node socket.js on app-around... up, run.5567 (free) // randomly generated port number is.. message recieved: {"event":"app\\events\\newmessage","data":{"data": {"message":"question posted"}},"socket":null} so events getting generated on server side not able receive them on client side. tried several things on front end none of them working: eg: 1) var socket = io.connec

python - Theano 'Expected an array-like object, but found a Variable': Using scan & categorical_crossentropy -

i'm trying sum multiple loss in theano can't make work. i'm using categorical crossentroy. here code: import numpy np import theano import theano.tensor t answers = t.ivector() temp = t.scalar() predictions = t.matrix() def loss_acc(curr_ans,curr_pred, loss): temp= t.nnet.categorical_crossentropy(curr_pred.dimshuffle('x',0), t.stack([curr_ans]))[0] return temp + loss outputs, updates = theano.scan(fn = loss_acc, sequences = [answers, predictions], outputs_info = [np.float64(0.0)], n_steps = 5) loss = outputs[-1] loss_cal = theano.function(inputs = [answers, predictions], outputs = [loss]) #here i'm generating random data see if can make code work max_nbr = 5 pred = [] in range(0, max_nbr): temp = np.ones(8) temp[i] = temp[i] + 5 temp = temp/sum(temp) pred.append(temp) answers = [] in range(0, max_nbr):

Closing all open streams in GRPC-Java from client end cleanly -

i using grpc-java 1.1.2. in active grpc session, have few bidirectional streams open. there way clean them client end when client disconnecting? when try disconnect, run following fixed number of times , disconnect can see following error on server side (not sure if caused issue though): disconnect client while (!channel.awaittermination(3, timeunit.seconds)) { // check upper bound , break if } channel.shutdown().awaittermination(3, timeunit.seconds); error on server e0414 11:26:48.787276000 140735121084416 ssl_transport_security.c:439] ssl_read returned 0 unexpectedly. e0414 11:26:48.787345000 140735121084416 secure_endpoint.c:185] decryption error: tsi_internal_error if use shutdownnow() more aggressively shutdown rpc streams have. also, need call shutdown() or shutdownnow() before calling awaittermination() . that said, better solution end rpcs gracefully before closing channel.

Jenkins build trigger not showing -

Image
this question has answer here: “build when change pushed github” missing 1 answer i've installed jenkins server on aws ec2 instance. and i've added new item on jenkins. i wanted build trigger "build when change pushed github". but can see, doesn't not showing. it's weired. am missing something? i've installed git plugin. any opinion appreciated. tia. that feature renamed "build when change pushed github" "github hook trigger gitscm polling". instructions hooking @ https://wiki.jenkins-ci.org/display/jenkins/github+plugin .

Connect Azure Search Service to SQL Server on Azure VM -

i'm in azure portal ui attempting connect our new azure search service our sql server on our azure vm. ui asks me connection string, username , password. started using exact connection string used in our .net config files, there no issue connecting. no matter how tweak connection string based on many threads i've read here @ s/o (set encrypt false, set trustservercertificate true) error testing connection: "a connection established server, error occurred during login process. (provider: ssl provider, error: 0 - certificate chain issued authority not trusted.) learn more connecting azure sql vms, http://go.microsoft.com/fwlink/?linkid=826562 " i must admit info in ms link foreign language me. none of steps have ever been required me connect sql server, continued research lead me different aforementioned tweaks connection string. as none of these tweaks worked, seems answer lies in ms article - able provide step-by-step new certificates. i'd still f

php - SQL data within the last year -

i have created query seems execute no errors. getting total of 2 columns in 2 different fields related 1 customer, want retrieve data within past year. i have used seems throw data stored. $yearago = (date('y')-1).date('-m-d'); $sumtotal = $adb->pquery("select sum(currentamount), sum(newcurrentamount), (sum(currentamount) + sum(newcurrentamount)) 'total' vtiger_addisa, vtiger_isa vtiger_addisa.addrelatedclient = $relatedclient , vtiger_isa.relatedclient = $relatedclient , vtiger_isa.startdate >= $yearago "); $sumtotal->fetchinto($row); $clientotal = $row['total']; echo $clientotal; //print_r($sumtotal);

it fails when git-receive-pack has new line in return -

i trying response git-receive-pack request, if program return 009c0000000000000000000000000000000000000000 capabilities^{}report-status delete-refs side-band-64k quiet atomic ofs-delta agent=git/2.10.1.(apple.git-78) it works , git clients smartgit work when return value has new line (\n) 0000 in response standard 009c0000000000000000000000000000000000000000 capabilities^{}report-status delete-refs side-band-64k quiet atomic ofs-delta agent=git/2.10.1.(apple.git-78) 0000 it not work , client show me /test.git/info/refs not valid: git repository what problem? https://git-scm.com/book/en/v2/git-internals-transfer-protocols says. thanks in advance from document link to: the git-receive-pack command responds 1 line each reference has – in case, master branch , sha-1. first line has list of server’s capabilities (here, report-status, delete-refs, , others, including client identifier). where getting capabilities ref name from? error message seeing sugges

javascript - get multiple bundles from webpack depending on parameters -

hi using webpack create bundles of application. depending on parameter passed in node console, want application output multiple bundles. for example lets have main folder , other sub folders c1,c2,c3 contain pieces of code. now pass params webpack sub folders , output should c1.bundles.js,c2.bundles.js,c3.bundles.js (combination of main , sub folders). have managed alias part. need in outputting multiple folders. should call bundler process multiple times output different folders or there other novel way?

r - Remove rows in data set based on multiple criteria -

Image
my data set contains animal id, date, year, month, , day. need remove animal ids have less 40 locations (in case 40 rows in r) in given year. in other words, animal id = 1 has 20 locations in 2001; therefore, remove individual data set. need calculate how many months worth of data there remaining set of records. in other words, need have >= 40 locations per animal id per year spanned across @ least 6 months. example: animal id 2 had > 40 rows of data in 2001 met first criteria mentioned above 40 rows of data in 2001 span 3 months; therefore, individual needs removed data set. can't seem figure out quick way in r subset data set address 2 aforementioned questions. initial coding i've started working on: newdata<-data[as.character(ave(data$animal_id, data$animal_id, fun=length)) >= 40, ] but know isn't correct. dput(dataset) structure(list(animal_id = c(1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l, 4l,

android - How to design screens in react native compatible for all devices -

Image
i trying design design react-native . have coded not want. works on 1 screen only, if change screen size things not working. this looks absolute layout. changes should make make in such way work on screen sizes. /** * sample react native app * https://github.com/facebook/react-native * @flow */ import react, { component } "react"; import { appregistry, image, view, text, button, stylesheet } "react-native"; class splashscreen extends component { render() { console.disableyellowbox = true; return ( <view style={styles.container}> <image source={require("./img/talk_people.png")} style={{ width: 300, height: 300 }} /> <text style={{ fontsize: 22, textalign: "center", margintop: 30 }}> never forget stay in touch people matter you. </text> <view style={{ margintop: 60, width: 240 }}> <button title=&

node.js - Whether or not my PayPal subscription system is working like it's supposed to -

Image
i have integrated paypal subscription system using express checkout offered paypal in node app, because don't want send card details server , , stay pci compliant. everything in code works , it's supposed to. no errors. however, when log sandbox account, can't see subscription details. transaction details like: payment initialized , executed. billing plans created , finally, billing agreement completed. also, correct amount of money deducted sandbox balance. the issue have when portion of code run: paypal.billingplan.update(billingplan.id, billingplanupdateattributes, (err, updatedplan) => { if(err) { console.log(err); } else { console.log(updatedplan); }}); when run in callback after creating plan, displayed (this updatedplan object above): { httpstatuscode: 200 } essentially, printed status code no other json data. rest of functions call return nice, full json object id's can save things canceling subscriptions in future. does ready

php - How to hide header on specific page in wordpress -

i trying hide header on specific page in wordpress. know can using css. the page id displayed in dashboard is: wp-admin/post.php?post=31221&action=edit the page has header without id or class (not sure built it). can hide header with: header {display: none;} i can't seem hide header on specific page. have tried: .page-id-31221 header {display:none;} .pageid-31221 header {display:none;} i have tried same # , postid etc etc. there way hide header on page? failing there way can hide header after has been called in template? have created custom template page im not sure of php use hide it. if remove <?php get_header();?> template whole page disapears. the website here: website you have created template specific page. in case can use jquery hide header. add end (or start) of page template. <script>jquery('header').hide();</script> you want wrap inside jquery( document ).ready(function() { ensure page loaded before scr

selector - CSS Select Sibling of An Element with A Specific Sub-Element? -

this 1 trippy. leaning think it's impossible :-( any idea appreciated. the snippet below part of larger structure many .step elements. i need match .steptext elements next .steptitleandimages ul.standard in other words, match .steptext elements have .step parent has .steptitleandimages child has .stepimages.standard child <div class="step"> <div class="steptitleandimages"> <h3 class="steptitle"></h3> <ul class="stepimages standard"></ul> <div class="clearer"></div> </div> <div class="steptext "></div> **how select elements one?** <div class="clearer"></div> </div> <div class="step"> <div class="steptitleandimages"> <h3 class="steptitle"></h3> <ul class="stepimages medium"></ul> <div class="clea