Posts

Showing posts from May, 2012

plsql - Oracle APEX validate Input during Data Load with Transformation Rule -

in apex , when performing data load (e.g. upload of csv file apex application), possible validate input data using transformation rule? for example, suppose upload data cars have been sold month. target table has column car_manufacturer , num_car_sold. the column car_manufacturer must accept 3 values, ('a1', 'a2', 'a3'). in pseudo plsql , give idea: if :car_manufacturer in ('a1, a2, a3') :car_manufacturer else <error> how can check in upload phase? possible use transformation rule, in order if fails, returns error message? other ways? thanks in advance. you put constraint on table definition per other answer, or if want error message when data load used, can use table lookup. go shared components -> data load definitions open data load definition want edit create table lookup select column (e.g. car_manufacturer) set table lookup attributes table contains list of valid values (you'll need either table or vi...

php - Laravel - How count daily accesses in app -

i need show chart show application accesses , think in create table save user , date access. but insert in table need know laravel did login authentication. don't know file , function. if has better solution appreciate that. thank you you can create global middleware in order log accesses. https://laravel.com/docs/5.5/middleware#global-middleware then if don't want have lot of logs same user, can use cache specific expire time. example: log user access once every 24hrs. another approach use login events log user accesses. https://laravel.com/docs/5.2/authentication#events illuminate\auth\events\login (this way every logins count access) there event added in laravel version 5.3 illuminate\auth\events\authenticated (i assume event fired every time user authenticated) you can create listener check of these events better purpose.

wordpress - WooCommerce page with products and product details on the same page -

by default when clicked on product woocommerce redirect user new page single product information. i need create page products on top half of page, , when clicked on product, product information along add cart button needs appear @ bottom half of page. clicking on product needs repopulate bottom half of page products' information. how go achieving this? understand i'll have override taxonomy_product-cat.php , use jquery disable default product on-click action, i'm unsure of how achieve this.

amazon ec2 - Deploying H2O-generated POJO to Jetty: /predict returns 404 -

i have generated pojo h2o model. on separate ec2 instance, want deploy model jetty servelet used api scoring endpoint. how can this? 1. example pojo here minimal example, demo_glm , predicting titanic passenger survival logistic regression on age, fare class, , sex: /* licensed under apache license, version 2.0 http://www.apache.org/licenses/license-2.0.html autogenerated h2o @ 2017-09-13t17:30:17.931z 3.13.0.3908 standalone prediction code sample test data glmmodel named demo_glm how download, compile , execute: mkdir tmpdir cd tmpdir curl http://xxx.xx.xx.xxx:54321/3/h2o-genmodel.jar > h2o-genmodel.jar curl http://xxx.xx.xx.xxx:54321/3/models.java/demo_glm > demo_glm.java javac -cp h2o-genmodel.jar -j-xmx2g -j-xx:maxpermsize=128m demo_glm.java (note: try java argument -xx:+printcompilation show runtime jit compiler behavior.) */ import java.util.map; import hex.genmodel.genmodel; import hex.genmodel.annotations....

iphone - Appcelerator iTunes Sync is dead. How do I share iOS app builds now? -

apple pushed out new itunes update (12.7) removed "apps" itunes. i'm unsure how send files people testing. would: add target's uuid development cert select "myappname" in project explorer run -> ios device -> itunes sync find "myappname.ipa" @ "music/itunes/itunes media/mobile applications/myappname.ipa" copy myappname.ipa dropbox my testers download dropbox, install, , test on device. process no longer works of itunes 12.7 update. how share test builds now? i'm desperate here. thanks! i've update itunes , i've same problem. find solution ipa : connect iphone , build project device before in build/iphone folder on project, open [app name].xcodeproj file, that's open xcode from xcode, in target build, choose generic ios device clic on product menu archive after compilation, window organizer open (the same window use send app itunesconnect from organizer window, select app, click on export...

Java Platform SE binary No Service available error -

Image
its been lot of days, keep getting notification in laptop. error java platform. any workarounds solve ? new java world, not locate causing error. below screenshot provided.

php - Use each row as a get variable for include? -

i'm working on notification system , want use kind of platform i've built viewing profiles id's found in database 'friendships' (which keeps track of sender, recipient , date of friendship request) i've been trying find way include profile module (which uses $_get variable fetch user information), every row, , need way set variable each row , include module using id, when try this, 1 appears instead of 4 requests have. while ($row = mysqli_fetch_assoc($result)) { echo "<div class='item friend'>"; $_get['user'] = $row['sender_id']; $path = $_server['document_root']; $path .= "/profile/module.php"; include_once($path); echo "</div>"; } i aware setting variable wrong, don't have clue how go doing this. update: after applying gautum rai's code, correct of divs showing, appear empty. this html generates once use original code (which echoes info o...

Looping over multiple lists with base R -

in python can this.. numbers = [1, 2, 3] characters = ['foo', 'bar', 'baz'] item in zip(numbers, characters): print(item[0], item[1]) (1, 'foo') (2, 'bar') (3, 'baz') we can unpack tuple rather using index. for num, char in zip(numbers, characters): print(num, char) (1, 'foo') (2, 'bar') (3, 'baz') how can same using base r? to in r-native way, you'd use idea of data frame. data frame has multiple variables can of different types, , each row observation of each variable. d <- data.frame(numbers = c(1, 2, 3), characters = c('foo', 'bar', 'baz')) d ## numbers characters ## 1 1 foo ## 2 2 bar ## 3 3 baz you access each row using matrix notation, leaving index blank includes everything. d[1,] ## numbers characters ## 1 1 foo you can loop on rows of data frame whatever want do, p...

Android : Scroll Screen when keyboard showing using ConstraintLayout -

i using android.support.constraint.constraintlayout with 4 edittext , 1 button . when clicked on first edittext , softinput keyboard visible edittext , button hidden. tried in manifeast.xml android:windowsoftinputmode="adjustresize" android:windowsoftinputmode="adjustpan" android:windowsoftinputmode="adjustresize|statevisible" but did work. suggestion make screen scrollable when not using scrollview its manifest.xml activity tag <application . . . <activity android:name=".mainactivity" android:windowsoftinputmode="adjustresize|statevisible" android:screenorientation="portrait"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> ...

Why to use iter_content and chunk_size in python requests -

why should use iter_content , specially i'm confused purpose using of chunk_size , have tried using , in every way file seems saved after downloading successfully. g = requests.get(url, stream=true) open('c:/users/andriken/desktop/tiger.jpg', 'wb') sav: chunk in g.iter_content(chunk_size=1000000): print (chunk) sav.write(chunk) help me understand use of iter_content , happen see using 1000000 bytes chunk_size , purpose , results? this prevent loading entire response memory @ once (it allows implement concurrency while stream response can work while waiting request finish). the purpose of setting streaming request media. try download 500 mb .mp4 file using requests, want stream response (and write stream in chunks of chunk_size ) instead of waiting 500mb loaded python @ once. if want implement ui feedback (such download progress "downloaded <chunk_size> bytes..."), need stream , chunk. if response contains ...

Integrating a custom launcher into the Visual Studio Debugger -

we're creating visual studio debugger extension needs launch application being debugged through custom launcher sets runtime (not clr or win32) , launch target application in new process. in other words, custom launcher in charge of creating new process. in vs debugger, 1 typically launches debugger calling vsshellutilities.launchdebugger() , supplying vsdebugtargetinfo object dlo field set debug_launch_operation.dlo_createprocess, along coordinates of exe file launched , debugged. doesn't conform our launching model. there dlo value debug_launch_operation.dlo_custom seems purpose (using clsidcustom field indicate launcher), current documentation says that's obsolete , directs debug_launch_operation.dlo_createprocess, not doesn't fit our model, clsidcustom used in case indicate debug engine (if it's single one). so, recommended way launch vs debugger , use our custom launcher configure , start our runtime (and application within it)? according vi...

Inno Setup - Hide "Additional shortcuts" label on tasks page -

Image
how can remove "additional shortcuts" installer? i tried make additionalicons= empty in language files think it's bad idea. there way hide text compiler? your script must like: [tasks] name: desktopicon; description: "create &desktop shortcut"; \ groupdescription: "additional shortcuts:" so remove groupdescription parameter : [tasks] name: desktopicon; description: "create &desktop shortcut"

node.js - Empty moongose result in nested query -

ok, here code: router.get('/',middleware.isloggedin, function(req, res){ var clave = req.query.id; students.findbyid(req.params.id).exec(function(err,foundstudent){ if(err){ console.log(err); }else{ var estudiante=foundstudent.matriculat0; var modelo=foundstudent.modelo; horarios.find({matricula:estudiante,clavemateria:clave}).exec(function(err,foundhorario){ if(err){ console.log(err) }else{ var grupo=foundhorario[0].crn; grades.find({crn:grupo}).exec(function(err,foundgrade){ if(err){ console.log(err); }else{ var pagina="grade/"+modelo+"/"+clave; res.render(pagina,{horario:foundhorario, student:foundstudent, grade:foundgrade}); }})}})}})}); basically i'm working 3 diferent models, students, schedule , grades. access grades of each subject per students first selected student , take school id number (m...

parsing - How do you parse and process HTML/XML in PHP? -

how can 1 parse html/xml , extract information it? native xml extensions i prefer using 1 of native xml extensions since come bundled php, faster 3rd party libs , give me control need on markup. dom the dom extension allows operate on xml documents through dom api php 5. implementation of w3c's document object model core level 3, platform- , language-neutral interface allows programs , scripts dynamically access , update content, structure , style of documents. dom capable of parsing , modifying real world (broken) html , can xpath queries . based on libxml . it takes time productive dom, time worth imo. since dom language-agnostic interface, you'll find implementations in many languages, if need change programming language, chances know how use language's dom api then. a basic usage example can found in grabbing href attribute of element , general conceptual overview can found @ domdocument in php how use dom extension has been covered exte...

hadoop - Pyspark es.query only works when default -

in pypspark way can data returned es leaving es.query default. why this? es_query = {"match" : {"key" : "value"}} es_conf = {"es.nodes" : "localhost", "es.resource" : "index/type", "es.query" : json.dumps(es_query)} rdd = sc.newapihadooprdd(inputformatclass="org.elasticsearch.hadoop.mr.esinputformat",keyclass="org.apache.hadoop.io.nullwritable",valueclass="org.elasticsearch.hadoop.mr.linkedmapwritable", conf=es_conf) ... rdd.count() 0 rdd.first() valueerror: rdd empty yet query (the default) seems work es_query = {"match_all" : {}} ... rdd.first() (u'2017-01-01 23:59:59) *i have tested queries directly querying elastic search , work wrong spark/es-hadoop.

scala.js - java.lang.NoSuchMethodError: sbt.package$.Zero()Lsbt/Global$; -

when using scala.js 0.6.20 ( addsbtplugin("org.scala-js" % "sbt-scalajs" % "0.6.20") in project/plugins.sbt ), following error happens when trying sbt import project using sbt 0.13.15: java.lang.nosuchmethoderror: sbt.package$.zero()lsbt/global$; @ org.scalajs.sbtplugin.scalajsplugininternal$.org$scalajs$sbtplugin$scalajsplugininternal$$scalajsstagesettings(scalajsplugininternal.scala:254) @ org.scalajs.sbtplugin.scalajsplugininternal$$anonfun$22.apply(scalajsplugininternal.scala:446) @ org.scalajs.sbtplugin.scalajsplugininternal$$anonfun$22.apply(scalajsplugininternal.scala:446) @ scala.function2$$anonfun$tupled$1.apply(function2.scala:54) @ scala.function2$$anonfun$tupled$1.apply(function2.scala:53) similar problem: https://gitter.im/scala-js/scala-js?at=59b53890b59d55b823db1dcd as release notes mention , scala.js 0.6.20 requires sbt 0.13.16 or above. achieve this, project/build.properties file s...

C++ how to align text to middle with color -

i looked how change text color std::cout in c++, , told use enum, don't know is. started learning few days ago. i need centering text while keeping color in. easier ways? i want center "what's name?" , keep colors. enum colors { blue = 1, green, cyan, red, purple, yellow, grey, dgrey, hblue, hgreen, hred, hpurple, hyellow, hwhite }; void coutc(int color, char* output) { handle handle = getstdhandle(std_output_handle); setconsoletextattribute(handle, color); cout << output; setconsoletextattribute(handle, color); } int main() { coutc(hred, "whats name?"); string name = ""; cin >> name; cout << "hi " << name << endl; }

The application could not be started Xamarin -

i using xamarin after run app in mobile dives huawei give me message error the application not started. ensure application has been installed target device , has launchable activity (mainlauncher = true). additionally, check build->configuration manager ensure project set deploy configuration. rename package name name right click project , select properties > android manifest > package name rename another. example: if old package name (com.xamarin.acquaintforms) changed new name (com.xamarin.acquaintforms.v2)

linux - How to get this bash script to work if the variable "fileName" contains space? -

#!/bin/bash -x echo "enter file name: " read filename filename=`pwd`"/$filename" if [ -f $filename ]; echo "file present" fi even if change value of filename adding quotes @ starting , end.. script still doesnt work. wrapping in double-quotes works me: #!/bin/bash -x echo "enter file name: " read filename filename=`pwd`"/$filename" if [ -f "$filename" ]; echo "file present" fi i believe take care of special characters, including quotes themselves.

routing - Angular 4 RouterLink does not work correctly -

my app.component.html consists of 3 componenets , looks follows: <app-menu></app-menu> <app-footer></app-footer> <app-control-sidebar></app-control-sidebar> inside app-menu.component i'm adding links dynamically: <li *ngfor="let statistic of statistics"><a [routerlink]="['/chart', statistic.appname]" ><i class="fa fa-pie-chart"></i>{{statistic.appname}}</a></li> routes definition: const routes: routes = [ { path: 'chart/:name', component: chartcomponent } ]; export const routing: modulewithproviders = routermodule.forroot(routes); chart.component implements oninit , ondestroy: ngondestroy() { this.sub.unsubscribe(); } ngoninit() { this.sub = this.route.params.subscribe(params => { this.urlname = params["name"]; setinterval(() => { this.performupdate...

database design - Disable delete permission for a user but allow read and update -

how add few users particular role allowed read , update object not perform delete operation. i have class a contains pointer class b . class a has 2 roles -- admins , moderators . class b has relation users class , adds above 2 roles acl . now, how make sure, users match admin role criteria can whole crud op on relation in class b, moderators can add , read relation not delete users relation via relation.remove(user)

windows - How can I configure Plastic SCM Cloud to store Jet databases on another drive? -

by default, plastic scm puts local repositories under program files. in situation c drive small ssd, , there secondary (let's assume d) drive larger, need in order move existing repositories and/or establish new repositories on d drive? you'll need create (if don't have yet) "jet.conf" file inside plastic scm server directory (typically "c:\program files\plasticscm5\server" on windows) , set "basepath" value path location want store jet database files. let me give example: jet.conf: basepath=d:\jetdbs you can configure following parameters: **prefix**: prefix added db files **suffix**: suffix added db files **maxcachedtrees**: max value of trees (changeset strucure) cached in ram. **datafilesize**: used split blob file (where revisions content stored) in pieces based on size set here (gb). (detailed info can found @ official doc: https://www.plasticscm.com/documentation/administration/plastic-scm-version-control-administr...

javascript - Get path from parent URL (current window URL) in ajax call looped inside another ajax call -

i have php page (client.php) contains script below. script performs ajax call. upon success, executes ajax call. i'm having issue second ajax call returns request_uri "sql/adminloademail.php" not parent path "/client.php". how tell php echo parent path "/client.php" appears in current window url? script $.ajax({ method:'post', url:'sql/adminaddclient.php', data:formdata, contenttype: false, processdata: false, success: function(data){ $.ajax({ type:'post', url:'sql/adminloademail.php', success: function(data){ $('#account_list').html(data); } }); } }); php(adminloademail.php) $page = parse_url(filter_input(input_server, 'request_uri' , filter_sanitize_string), php_url_path); echo $page; you can set parent url variable , send data param. var parenturl = window.location.href; $.ajax({ type:'post', url:'sql/adminad...

Laravel 5.4: attach custom service provider to a controller -

i created service provider named adminserviceprovider namespace app\providers; use modules\orders\models\orders; use illuminate\support\serviceprovider; use view; class adminserviceprovider extends serviceprovider { public function boot() { $comments = orders::get_new_comments(); view::share('comments', $comments); } public function register() { } } registered provider app\providers\adminserviceprovider::class, now try attach controller namespace app\http\controllers\admin; use illuminate\http\request; use app\http\controllers\controller; use app\providers\adminserviceprovider; class admincontroller extends controller { public $lang; public function __construct() { } public function index(){ return view('admin/dashboard'); } } now error message undefined variable: comments this first time try use custom service provider , don't kn...

encryption - AES How many bits should be ? (I'am learning) -

i'am research encryption aes find library , use that. , did crpyto data there things not understand edit(15 09 2017) : sorry.. english bad im using translator words not tell want ask.. mean i'am trying learning aes encryption , find code want ask question method sorry english , have not learned yet (: i sharing codes please tell me crypto method how many bits ? key random ? key how many bits ? how store generated key ? i'am new yet please explenatory thank ! private static byte[] encryptstringtobytes_aes(string plaintext, byte[] key) { byte[] encrypted; byte[] iv; using (aes aesalg = aes.create()) { aesalg.key = key; aesalg.generateiv(); iv = aesalg.iv; aesalg.mode = ciphermode.cbc; var encryptor = aesalg.createencryptor(aesalg.key, aesalg.iv); using (var msencrypt = new memorystream()) { using (var csencrypt = new ...

In HBase what does ColumnFamily TTL really mean? -

let's assume have 2 cf (cf1, cf2). let's assume cf2 has ttl of 1 day, , cf2 has 2 columnqualifiers. does mean during major compaction cells in cf2 older day automatically dropped (as long min-version == 0)? i'm confused because in documentation keep referring rows not sure mean... as per understanding docs, row refers version of particular rowkey in column family. versions - max no of versions rowkey maintained in column family. ttl - duration retain version of rowkey min_versions - minimum no of versions rowkey maintained @ point of time. i explain above 3 example. lets say, cf2 has been configured versions = 100, ttl = 1day, min_versions=3 so, max 100 versions maintained particular rowkey in cf2 , version older 1day removed major compaction if no of versions > 3. ensures 3 version of record there cf2.

java - Spring Boot - spring.jpa.hibernate - how to call with sudo? -

i working on project work , way setup mysql server able connect need do sudo myqsl -p when try launch spring boot app, fails connect mysql server.. how can tell jpa hibernate call mysql sudo rights? possible ? i have tried launching spring boot jar sudo , doesn't carry on mysql connection somehow my application.properties contain credentials spring.jpa.hibernate.ddl-auto=update spring.datasource.url=jdbc:mysql://localhost:3306/mood spring.datasource.username=user spring.datasource.password=password the database mood exists on server , user exist. can connect via ssh without issues, using sudo. any appreciated! no, it's not possible connect mysql in jpa sudo rights, should able connect using jdbc connection string: jdbc:mysql://localhost:portnumber:username:password as test, why don't code little class connect database, perform simple select statement , bring result set. you shouldn't have connect mysql client sudo, infer when "they ...

ios - save all app data Xcode -

i'm starting swift , wanted know how save data app. have text , photos in app. how can save using firebase or saving directly user's iphone? i want user terminate action , app save automatically. an example user added image in imageview using photos library closed , left app. when reopened did had left.

excel - Seach Column based on textbox value and display all results in Listbox -

i have listbox = firmlist; textbox = firmgroupid; worksheet = relatedfirms; columna = gid (id numbers); columnb = firmname i trying populate list box based on value of firmgroupid. have combobox populates gid number in firmgroupid depending on combobox selection. i firmlist populate list of firmnames based on firmgroupid. sheet relatedfirms contains assigned gid each firmname. this seems simple try doesn't seem work. not sure how show items in list box have value equals gid. private sub firmgroupid_change() dim rngname range dim ws worksheet dim integer set ws = worksheets("relatedfirms") = 1 ws.cells(ws.rows.count, 1).end(xlup).row step 1 if ws.cells(i, 1).value <> vbnullstring me.firmlist.additem ws.cells(i, 1).value next end sub please change code: if ws.cells(i, 1).value <> vbnullstring me.firmlist.additem ws.cells(i, 1).value to if ws.cells(i, 1).value = firmgroupid.val...

Apache server no more accessible from outside -

i've used apache through xampp more year, have access on simple site in htdocs folder in pc , worked. during last month no more accesible outside , can't understand why. has worked, while can see site going localhost/, or going public ip 93.xx.xx.xx/ on laptop, or other devices local network wifi, through public ip. if try access through 3g connection (or others) can't reach site (as did until july). tried disable both windows , router firewall nothing changed. netstat -a says port 80 listening this site says port 80 closed. i've tried change port (as did other times) without success suggestion? thanks

iphone - Use ARKit to add object to specific point in real world -

for example want put virtual shape on top of eiffel tower using arkit. when user stands in specified area - approximately 3 km tower , looking on tower through iphone can see shape. is possible? , if - how can theoretically done? sorry, not possible. apple's arkit has no support object persistence if catalogued interesting points on earth, still wouldn't able tell user's phone in relation point in 6dof (i.e. position+orientation) when ar session started up.

java - OptaPlanner vehicle routing ignore customers in solved problems -

i'm using optaplanner cvrp example, question ignoring customers enrolled in solution being part in solution, example, have customers a,b , c enrolled in solution s @ same time a,b , c eligible solution s2, here want optaplanner ignore a,b , c being part in s2 long part in s

indexing - How can I execute a Python Turtle script from my webhost? -

i'd python script run through webhost/domain. way maybe can put hyperlink on index leads little display? i played in tab import turtle bob = turtle.pen() in range(700): bob.forward(i) bob.left(80) bob.forward(50) bob.right(i) bob.back(50) bob.left(i)

ios - How to determine if the last cell of a UITableView is visible on the screen -

i'm using following code determine if last screen visible on screen user: override func tableview(_ tableview: uitableview, willdisplay cell: uitableviewcell, forrowat indexpath: indexpath) { if indexpath.row == collection.count - 1 { print("last cell seen!!") print(cell.frame) } } this works on small screens user has scroll desired cell. however, on large screens whole table visible, method doesn't work. there way determine distance between bottom of screen last cell in uitableview ? any appreciated. thank you. edit: i'm trying accomplish. if (last cell visible && more 100dp bottom of screen) { display fixed button on bottom of screen } else { add button footer view of tableview user can scroll down button } you can use method see if last cell visible or not func iscellvisible(section:int, row: int) -> bool { guard let indexes = self.indexpathsforvisiblerows else { return false } retu...

ecmascript 6 - Regex group matching parameters with parantheses -

my data like new abc(false, new g()), //success new cba(true, new fhhhhhfrrfr8()),//fail new bzx(false, new zzzz44d()) //success i'm trying match name of types, parameters , commentary. far tried new (.+)\((.+)\),? ?\/\/(success|fail) , yields group 1 abc(false, new g , group 2 ) , 3 success , however, desire abc first group match, false, new g() second , success third. new instanciation kills regex. you don't want character ( . ) in types, right? think can include letters, won't want spill on parameters. /new ([a-za-z]+)\((.+)\),? ?\/\/(success|fail)/i give go.

c++ - java.lang.UnsatisfiedLinkError: dlopen failed 64-bit instead of 32-bit while .so should be built in x86 -

i trying use jni in android studio, added jni function under sample native-lib.cpp created android studio default (after adding c++ support) however, facing error java.lang.unsatisfiedlinkerror: no implementation found boolean com.example.user.project.tracker.istracking_0(boolean) (tried java_com_example_user_project_tracker_istracking_10 , java_com_example_user_project_tracker_istracking_10__z) i tried add mainactivity static { system.loadlibrary("tracker"); } but exception java.lang.unsatisfiedlinkerror: dlopen failed: "/data/app/com.example.user.project/lib/x86/libtracker.so" 64-bit instead of 32-bit i can see library has been built successfully, track message shows when build build tracker x86 [1/5] building cxx object cmakefiles/tracker.dir/src/main/cpp/fhog.cpp.o [2/5] building cxx object cmakefiles/tracker.dir/src/main/cpp/tracker.cpp.o [3/5] building cxx object cmakefiles/tracker.dir/src/main/...

pdf - CASPERJS ajax binary response inside evaluate() -

in project have download pdf server filling post form. casper offers .download() - not working: have set several headers before send request. phantom offers .customheaders() - not working: have no idea. i have progress sending request ajax, emulating form fields. var =this.evaluate(function() { try{ var http = new xmlhttprequest(); var ok = false;//return var var form = document.forms.nameditem('atlform');//get form var data = {};//params for(var = 0; < form.elements.length; i++) {//params populated data[form.elements[i].name] = encodeuricomponent(form.elements[i].value); } var url = form.action;//self expl. var dataf = object.keys(data).map(function(key) { return key + '=' + data[key]; }).join('&');//param string format ...

matrix - How to do multiple wilcox.test in R? -

Image
i have matrix , aim wilxcon test in r (controls vs cases) not sure how put in matrix properly. thanks gene.name cont1 cont2 cont3 case1 case2 case3 10 2 3 21 18 8 b 14 8 7 12 34 22 c 16 9 19 21 2 8 d 32 81 17 29 43 25 .. you can try: # load data d <- read.table(text="gene.name cont1 cont2 cont3 case1 case2 case3 10 2 3 21 18 8 b 14 8 7 12 34 22 c 16 9 19 21 2 8 b 32 81 17 29 43 25", header=t) library(tidyverse) # transform long format using dplyr (included in tidyverse) dlong <- as.tbl(d) %>% gather(key, value,-gene.name) %>% mutate(group=ifelse(grepl("cont",key), "control", "case")) # plot data dlong %>% ggplot(aes(x=group, y=value)) + geom_bo...

Connecting Python Script with C# in real time -

i working on project, need run python script real time in c# front end. try using command line arguments, each time need arguments , slow procedure. basically using trained model of neural network in c# application. need use trained model in python because c# not support deep learning most. want that, there why such socket programming or else python script sent me value in real time. to value send python c# in real time need socket connection, yes. but don't need things that, use database interface data, influxdb, rethinkdb, mongo... another possibility worth checking https://grpc.io/ rpc frameworks

jquery - HTML form Textarea. Sending data to MySQL using PHP. Notice: Undefined index -

i trying send data form data base, keep on having same error @ textarea part. i not sure whether has data type in mysql, tried setting text, medium, text, long text , etc. the connection successful. other information input successful except of textarea thingy. using xampp. the reason why put form action link because want find file. below codes code html; <!doctype html> <html lang="en"> <head> <meta charset="utf-8"/> <title> competition organizer </title> <link rel="stylesheet" href="main.css"> </head> <body> <ul> <li><a href="">log out</a></li> <li><a>notification</a></li> <li><a href="report.html">generate report</a></li> <li><a href="admin.html">home</a>...

javascript - D3 scatterplot with viewbox not fitting to screen on resize -

Image
below scatterplot i've created d3 laptop's standard window size. issue #1: when screen small, box doesn't fit screen issue #2: when expand screen, chart becomes larger screen size , falls out-of-screen. example i start assigning padding relative window size based on looked on normal-sized window var width = window.innerwidth || document.documentelement.clientwidth || document.body.clientwidth; var height = window.innerheight || document.documentelement.clientheight || document.body.clientheight; //constants var w = .85 * width, h = .70* height, pad = .0078 * width, bottom_pad = .1*height left_pad = .08*width; then, create svg so var dim = "0 0 " + w + " " + h var svg = d3.select("#chart") .append("svg") //.attr("preserveaspectratio", "xmaxymax meet") .attr("viewbox", dim) to position various elements within chart, relied on paddings defined above. exa...

How to write cmd.exe output to console and clipboard at same time? -

in cmd.exe if run command, can see output on console, e.g, dir shows list of files on console. if use dir | clip , puts output on clipboard. how put output on console , clipboard @ same time? you use 3rd party program called paste display contents of clipboard, actual command's output: http://www.c3scripts.com/tutorials/msdos/paste.html the problem running command twice suggested in dinidu's answer if whatever reason output different on subsequent run not see same output on console on clipboard. so this: dir | clip & paste

devops - Unable to clone locally a repository from VS Team Services using any version of Visual Studio 2017 -

i'm having problem cloning repository locally visual studio team services when using version of visual studio 2017 . here's error i'm getting: error encountered while cloning remote repository: git failed fatal error. fatal: win32exception encountered. failed write credentials error: cannot spawn askpass: no such file or directory fatal: not read username 'https://xxx.visualstudio.com':terminal prompts disabled i have computer run visual studio 2015 , works fine. there reason i'm having problem?

python - tf.image.decode_png raise InvalidArgumentError -

my images this: train: -- 1.png -- 2.png -- 3.png ... -- m.png i created file_list contains paths these images. my code: filename_queue = tf.train.string_input_producer(file_list) reader = tf.wholefilereader() key, value = reader.read(filename_queue) image_png_grey = tf.image.decode_png(value, channels=1) image_std = tf.image.per_image_standardization(image_png_grey) img_resize = tf.image.resize_images(image_std,[28,28],method=tf.image.resizemethod.area) init_op = tf.global_variables_initializer() tf.session() sess: sess.run(init_op) # start populating filename queue. coord = tf.train.coordinator() threads = tf.train.start_queue_runners(coord=coord) in range(len(file_list)): image, i_key = sess.run([img_resize, key]) and console: 2017-09-14 11:34:37.434681: w tensorflow/core/platform/cpu_feature_guard.cc:45] tensorflow library wasn't compiled use sse4.2 instructions, these available on machine andcould speed cpu ...

c++ - Last line ouputs two combined outputs trouble? If else statements -

i'm having hard time trying find why program outputting twice in last output line. if try inputs of 5 , 500 works when try use bigger number second input 500000 2 different outputs combined in last output line. below code. i'm pretty sure last if else statements don't see problem. any appreciate. #include <iostream> using namespace std; int main() { double estimatedsales; double copyprice; double netmade; double firstop_net; double secondop_net; double thirdop_net; double cashbefore = 5000; double cashafter = 20000; const double first_rate = .125; const double second_rate1 = .10; const double second_rate2 = .14; double bestprice; cout << "enter price copy of novel\n"; cin >> copyprice; cout << "enter estimated number of copies sold\n"; cin >> estimatedsales; netmade = copyprice * estimatedsales; cout << "it estimated novel gen...

bash - Trying to write script for time zone difference -

This summary is not available. Please click here to view the post.

Remove or Make Clean URL .htaccess Pagination -

i gave time in exploring this. though there lot of examples, still couldn't able figure , found solution. my current url http://example.com/aptitude/problems-on-trains/?p=2 i want have http://example.com/aptitude/problems-on-trains/2 that particular part ?p= came via pagination. and, going have across other categories, need remove across site. and, couple of questions having/editing .htacess @ root level of website fine ? or should have individual folder level ? once worked, how should give internal links ?p= or without ?p=

How to add items to nativescript actionbar programmatically? -

how programmatically add items actionbar? i've been trying play around code below action items never update. public setactionbaritems(actionbar: actionbar) { let tab = tabfactory.gettab(this.currenttabindex); let actionitem = new actionitem(); actionitem.set("ios.systemicon", "12"); actionitem.set("ios.position", "right"); actionitem.set("android.systemicon", "ic_menu_search"); actionitem.set("android.position", "right"); actionbar.actionitems.additem(actionitem); // (let actionitem of tab.actionitems) { // actionbar.actionitems.additem(actionitem); // } } do perhaps need tell view somehow update itself? tried setting actionitems="{{actionbaritems}}" on actionbar itself, throws warning property read-only. not proud of right here possible solution. refactor in future. view model export...