Posts

Showing posts from April, 2013

javascript - Running a serverside PHP with JQuery slider -

i've been looking new project further learn php after finishing codecademy course... however, i've run dead end , think has ajax-part of it, can't figure out what/where , how it's going wrong. the code: <html> <head> <meta charset="utf-8"> <script src="https://cdn.jsdelivr.net/jquery/1.11.3/jquery.min.js"></script> <link href="https://cdn.jsdelivr.net/jquery.roundslider/1.3/roundslider.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/jquery.roundslider/1.3/roundslider.min.js"></script> </head> <body> <div id="slider"></div> <!-- use roundsliderui documentation this: http://roundsliderui.com/ --> <script type="text/javascript"> $("#slider").roundslider({ radius: 80, min: 0,

How to combine two different Parameter arrays into a single array using Loadrunner? -

i using loadrunner vugen script. in script use web_reg_save_param saving array. instance; web_reg_save_param("timeslot","lb={\"datetime\":\"","rb=\",\"status\"", "ord=all",last); web_reg_save_param("timeslot1","lb={\"datetime\":\"","rb=\",\"status\"", "ord=all",last); we different timeslots in each request. need combine these 2 arrays single array values. any pointers help. here code should (roughly) like, assuming go loadrunner array called alltimeslots. code directly head keyboard without execution in loadrunner, take small defects par course type of on paper draft. int index, timeslot_limit, timeslot1_limit; char arrayname[20]="", sourcename[20]=""; ... timeslot_limit=atoi( lr_eval_string("{timeslot_count}") ); timeslot1_limit=atoi( lr_eval_string("{timeslot1_count}&

GAS: How to use UrlFetchApp to search private repo via GitHub API, with authentication? -

am trying scrape data private repo using github's api via google apps script (gas). i have accesstoken seems work normal things, when comes doing searches issues , accesstoken not accepted. https://api.github.com/search/issues?q=repo:esaruoho/ztracker_mac+state:open (+at) i'm trying access private repo (not 1 linked here, public, , link works) , attach ?access_token=token at end, reason not seem work. there other way of authentication? i'm trying figure out how modify urlfetchapp.fetch input required headers authenticate, i'm not figuring out kind of stuff github authenticates with here's trying do: https://api.github.com/search/issues?q=repo:esaruoho/ztracker_mac+state:open?access_token=yourtoken notice how have question mark (?) in url, can't put 2 in, have change question mark ampersand (&) https://api.github.com/search/issues?q=repo:esaruoho/ztracker_mac+state:open&access_token=yourtoken

ibm - Android Intent Service Class cast exception while doing App upgrade -

i have used intent service schedule service calls interval. service declared in androidmanifest file. , have created new intent service different name. then commented out intentservice1 , declared intentservice2 in manifest. problem starts here, when doing app upgrade test app upgrade scenario app getting crashed. have removed intentservice1 class project folder still crashing class cast exception. caused by: java.lang.classcastexception: com.xtify.sdk.alarm.metricsintentservice cannot cast com.ibm.mce.sdk.wi.alarmlistener @ com.ibm.mce.sdk.wi.abstractalarmscheduler.ensurealive(unknown source) @ com.ibm.mce.sdk.api.mceapplication$mceactivitylifecyclecallbacks.onactivityresumed(unknown source) @ android.app.application.dispatchactivityresumed(application.java:238) @ android.app.activity.onresume(activity.java:1372) @ android.support.v4.app.fragmentactivity.onresume(fragmentactivity.java:480) @ com.android.app.common.ui.activity.baseactivity.onresume(baseactivity.java:561) @

c# - For loop only writing to my mssql stored procedure once? -

i have loop collects data c# web form , writes each item finds database via stored procedure. the problem i'm having it's writing database once. have stepped through code in visual studio , inserted test variables check data there , being captured, is. because stored procedure executing correctly first time know it's working. so think problem might how i've got try catch in loop? or possibly else entirely - fresh pair of eyes , point me in right direction! protected void log_hd_number() { ////write results db. sqlconnection conn = new sqlconnection("data source=;initial catalog=;integrated security=true"); sqlcommand cmd = conn.createcommand(); sqldatareader reader; cmd.commandtype = commandtype.storedprocedure; cmd.commandtext = "insert_requested_hd"; dictionary<string, string> hdsize = new dictionary<string, string>(); hdsize.add("harddisksizedata1", harddisksizedata1.text); hds

pandas - Python: Sorting pivot table (multi index) -

i'm trying sort pivot table's values in descending order after putting 2 "row labels" (excel term) on pivot. to create pivot, i'm using following function: pt = pd.pivot_table(x, index = ['col1', 'col2'], values = 'col3', aggfunc = np.sum) i'm unable paste in table, in words, variable pt first sort col1 , values of col2 within col1 col3 within of those. great, sort col3 (the values) while keeping groups broken out in col2 (this column can order , shuffled around). the target output ( col3 in descending order order in col2 group of col1 ): col3 col1 col2 1 1.67 2 0.75 3 0.50 b 2 2.25 3 2.00 1 0.50 c 3 2.75 1 2.65 2 2.50 i have tried code below, sorts entire pivot table values , loses grouping (i'm looking sorting within group).

php - Thujohn\Twitter\Twitter::__construct() must be an instance of Illuminate\Config\Repository, instance of October\Rain\Config\Repository given -

how can pass illuminate\config\repository sentence instead of october\rain\config\repository . i'm try use thujohn twitter library. thujohn\twitter constructor has reference illuminate\config\repository in plugin.php, boot() method, have: app::register(\thujohn\twitter\twitterserviceprovider::class); $alias = aliasloader::getinstance(); $alias->alias('twitter', \thujohn\twitter\facades\twitter::class); thanks

ejb - java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection -

environment - ejb 3.1, struts 2.2, wildfly-10.1.0 from struts 2.2 action class, doing remote calls method of stateless session bean. method returning java.sql.connection object. 15:09:40,934 error [stderr] (default task-8) java.lang.runtimeexception: wflyejb0054: failed marshal ejb parameters 15:09:40,935 error [stderr] (default task-8) @ org.jboss.as.ejb3.remote.localejbreceiver.clone(localejbreceiver.java:338) 15:09:40,935 error [stderr] (default task-8) @ org.jboss.as.ejb3.remote.localejbreceiver.clone(localejbreceiver.java:318) 15:09:40,935 error [stderr] (default task-8) @ org.jboss.as.ejb3.remote.localejbreceiver.processinvocation(localejbreceiver.java:275) 15:09:40,935 error [stderr] (default task-8) @ org.jboss.ejb.client.ejbclientinvocationcontext.sendrequest(ejbclientinvocationcontext.java:184) 15:09:40,935 error [stderr] (default task-8) @ org.jboss.ejb.client.ejbobjectinterceptor.handleinvocation(ejbobjectinterceptor.java:58

symfony - Avoid duplicated services in dependecy injection -

i need advices avoid duplicating services in symfony dependecy injection project. the project goal create symfony console commands manage objects of remote service. service exposes api manage objects. the remote service gives me 2 different instance work with: production instance , sandbox instance. examples of commands execute are: create user on instance x create group on instance x show difference between users of 2 instances sync users between 2 instances i started creating class wrap service api , creating 2 services using same class different authentication data 2 instances: services: sandbox_instance: class: apiclient arguments: ["sandbox_account", "sandbox_user", "sandbox_password"] prod_instance: class: apiclient arguments: ["prod_account", "prod_user", "prod_password"] but then, created "managers" have logic of different operations. example, c

javascript - Why I get different results? use name.property and name[property] -

/*enumeration the in statement can loop on of property names in object. enumeration include functions , prototype properties. */ //the first code write var fruit = { apple: 2, orange: 5, pear:1 }, sentence = 'i have', quantity; (kind in fruit) { quantity = fruit[kind]; sentence += quantity + '' + kind + (quantity === 1?'': 's') + ', '; } sentence = sentence.substr(0,sentence.length-2) + '.'; alert(sentence); //the second code write var fruit = { apple: 2, orange: 5, pear:1 }, sentence = 'i have', quantity;// (kind in fruit) { quantity = fruit.kind; sentence += quantity + '' + kind + (quantity === 1?'': 's') + ', '; } sentence = sentence.substr(0,sentence.length-2) + '.'; alert(sentence); the root of problem difference between accessing properties in dot ( obj.prop

swift - Code not working for dismissing Keyboard -

i trying create code dismissing keyboard when touching outside keyboard or when pressing return button. ofcourse not working :d why asking here. how can make work? doesn't give error not responding. if there simpler solution, welcome provide. thank time , answer! here full code: import uikit class entryviewcontroller: uiviewcontroller, uitextfielddelegate { @iboutlet weak var useremailadresinput: uitextfield! @iboutlet weak var userpasswordinput: uitextfield! @iboutlet weak var userpasswordinputrepeated: uitextfield! @iboutlet weak var usersignup: uibutton! override func viewdidload() { super.viewdidload() self.useremailadresinput.delegate = self self.userpasswordinput.delegate = self self.userpasswordinputrepeated.delegate = self } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } @ibaction func signup(_ sender:

python - cmd + a not working in tkinter entry -

i've being building basic ui using tkinter, , noticed cmd + a (or select command) not enabled. how enable shortcuts in tkinter entry text field. this code : entry1 = ttk.entry(root, width = 60) entry1.pack() @goyo answered question. want share contribution not see interest in selecting text of entry widget's text , not doing else it. going provide dirty mcve show how going use selected text: a) either delete or b) copy it. for a) , following function job: def select_text_or_select_and_copy_text(e): e.widget.select_range(0, 'end') it work under condition bind corresponding events described function's name entry widget: entry.bind('<control-a>', select_text_or_select_and_copy_text) entry.bind('<control-c>', select_text_or_select_and_copy_text) for b) , can use function: def delete_text(e): e.widget.delete('0', 'end') and bind delete event entry widget: entry.bind('<de

java - ConstrainLayout not respecting the hierarchy -

Image
i have layout .................... <checkbox android:id="@+id/cb_remember_login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textinput2" android:text="@string/keep_login" android:textcolor="@android:color/holo_red_dark" android:textsize="18sp" android:layout_margintop="14dp" app:layout_constrainttop_tobottomof="@+id/textinput2" app:layout_constraintbottom_totopof="@+id/btn_signin_login" /> <button android:id="@+id/btn_signin_login" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_alignparentstart="true" android:layout_below="@+id/cb_remember_login" android:backgroundtint="@color/coloraccent"

Enable remote control in custom TV launcher in Android -

i faced problem in custom tv launcher in android. i have created custom android launcher onenuts device tv , installed launcher it. have used mouse or remote control act device. when using mouse there no problem, launcher work perfectly, when using remote control, not work.

How to proxy http request to another https server with nginx -

i have 2 systems: 1 can send http request ip (not domain don't ask why) 2 can receive http s request (has dynamic ip) i need middleware in between transfer request http://middleware_ip/?my_get_request_with_data https://dest_server/dest_server_path/?my_get_request_with_data i tried nginx newbie. config doesn't work. says "too many redirections" upstream dest_server { server subdomain.domain.com; } # define parameters specific virtual host/server server { # configure nginx proxy http requests upstream server location / { # define location of proxy server send request rewrite ^(.*)$ /dest_server_path/$1; proxy_pass https://dest_server; } }

javascript - Node csv-stringify format timestamp column -

i'm converting list of objects csv using node csv-stringify package. one of columns contains time-stamp , stringify method converting epoch date. var stringify = require('csv-stringify'); ... input = [ {'field1':'val1', 'timemodified':'2016-08-16t23:00:00.000z'}, ... ] stringify(input, function(err, output){ console.log(output); }) the timemodified in output formatted as: 1471388400000 how can maintain original time stamp formatting in output? i tried using formatters option had no effect: http://csv.adaltas.com/stringify/examples/ stringify(input, {formatters: { "timemodified": function(value){ return value.format("yyyy/mm/dd hh:mm:ss"); } }},function(err, output) { fs.writefile('userupload.csv', output, 'utf8', function(err) { if (err) { console.log('error - file either not saved or corrupted file saved.'); } else {

javascript - TypeError: (0 , _typography.scale) is not a function -

i use project next.js , typography. i receive error typeerror: (0, _typography.scale) not function and, unfortunately, don't understand why. import link 'next/link' import typography, { rhythm, scale } '../utils/typography'; import colors '../utils/colors'; const headerlink = { ...scale(-1/4), marginright: rhythm(1), color: colors.gunsmoke } export default () => ( <header> <a style={headerlink} href="/#top">home</a> </header> )

c# - Routing migration from ASP.NET WebAPI to ASP.NET Core WebAPI, ambiguous method issue -

i have existing asp.net webapi want migrate asp.net core webapi, facing issues in routing. the apis consumed many clients , cannot change routes (or urls). have controller (say valuescontroller) 2 methods different parameters: public async task<ienumerable<string>> get(int xid, int yid) public async task<ienumerable<string>> get(int xid, int yid, int aid, int bid) in current scenario (asp.net webapi), clients able call both methods on basis of different parameters like: for calling method first, 1 can request url: http://localhost:4040/api/values?xid=1&yid=2 , second one, can request url: http://localhost:4040/api/values?xid=1&yid=2&aid=3&bid=4 . , automatically decided current routing available asp.net webapi but in case of asp.net core, if request same url, throws microsoft.aspnetcore.mvc.internal.ambiguousactionexception: multiple actions matched exception. any possible solution without changing request call every client ap

python - Matplotlib 2.0 stripes in histogram -

Image
i vertical stripes between bins when creating histogram matplotlib 2.0.2, python2.7, win7,64bit, visible both in pdf , png created. usig pgf latex create pdf use includegraphics in pdflatex document. png created quick check. this not case in matplotlib 1.5.3. how rid of these white lines separating individual bins? things tried: switching antialiasing on/off (aa=true/false in hist command) drawing line (ls="-"/ls="none" in hist command) one thing kind of work giving width bins (width=2.3), not work pdf in zoom values. code produce image import matplotlib mpl mpl.use('pgf') pgf_with_latex = { # setup matplotlib use latex output "pgf.texsystem": "pdflatex", # change if using xetex or lautex "text.usetex": true, # use latex write text "font.family": "serif", "font.serif": [], # blank entries should cause plo

azure - Application Insights Dependency Tracking no more working -

Image
hi use in webapi project application insights log events , errors. after update 2.3.0 2.4.1 don't see logs of dependencies db or http calls. after googling found out need have dependencytrackingtelemetrymodule in config file included in config. has ideas? here config file: <?xml version="1.0" encoding="utf-8"?> <applicationinsights schemaversion="2014-05-30" xmlns="http://schemas.microsoft.com/applicationinsights/2013/settings"> <telemetrymodules> <add type="microsoft.applicationinsights.extensibility.runtimetelemetry.remotedependencymodule, microsoft.applicationinsights.extensibility.runtimetelemetry"/> <add type="microsoft.applicationinsights.extensibility.perfcollector.performancecollectormodule, microsoft.applicationinsights.extensibility.perfcollector"/> <add type="microsoft.applicationinsights.dependencycollector.dependencytrackingtelemetrymodule, microsoft

go - Get struct tag without pointer -

i creating simple marshaler fixed text struct in go, detailed here . the marshaler functions expected now, albeit still lacking features. got stuck in in marshal function. the relevant code follow func marshal(obj interface{}) (str string, err error) { ... elemstype := reflect.typeof(obj).elem() as can see, tried mimic json package's marshal signature. problem when tried pass value marshal function, reflect.typeof returns different type 1 pass it. function can executed if i'm passing pointer marshal function. this works user := user{"johnjohnjohn", "the", "doe", "smart", 26} res, err := marshal(&user) this doesn't user := user{"johnjohnjohn", "the", "doe", "smart", 26} res, err := marshal(user) is there way pass value, , struct tag inside marshal function? if want work on values, don't call type.elem() on reflect type. handle both (pointers , non-poin

powershell - Job Runner service unable to start due to logon failure -

i'm working powershell , need start job runner automatically once script run getting exception "unable start service due logon failure". can me how can resolve error? function servicestart($servicename){ try { write-host $("starting service " + $servicename) $timeout = [system.timespan]::fromminutes(5) $arrservice = get-service -name $servicename if ($arrservice -eq $null) { write-host $("**error** no service named '" + $servicename + "' found") return $false } if ($arrservice.status -eq [serviceprocess.servicecontrollerstatus]::running) { return $true } $arrservice.start() try { $arrservice.waitforstatus([serviceprocess.servicecontrollerstatus] ::running, $timeout) } catch [serviceprocess.timeoutexception] { write-verbose "timeout starting service $($arrservice.name)" throw "time

python - Save Pyspark dataframe to Hbase -

hi have referred below this link write pyspark dataframe hbase. getting below error not sure doing wrong, seems missing thing on configuration side/ missing jar below code trying use: df = sc.parallelize([('a', '1.0'), ('b', '2.0')]).todf(schema=['col0', 'col1']) catalog = ''.join("""{ "table":{"namespace":"default", "name":"testtable"}, "rowkey":"key", "columns":{ "col0":{"cf":"rowkey", "col":"key", "type":"string"}, "col1":{"cf":"cf", "col":"col1", "type":"string"} } }""".split()) #write hbase df.write \ .options(catalog=catalog) \ .format('org.apache.spark.sql.execution.datasources.hbase') \ .mode("overwrite") \ .option("zkurl","ho

linux - Environment variable is not setting globally -

i using csh terminal. .cshrc setenv $files /home/ec2-user/files .login if [ -f ~/.cshrc ]; . ~/.cshrc fi i trying echo $files values plink. showing error files: undefined variable you don't use dollar sign when setting variable, use when refer variable. setenv files /home/ec2-user/files the test command should built-in in csh/tcsh implementations, , has of same functionality you'll see listed under man test . test -f ~/.cshrc && source ~/.cshrc note normally, csh/tcsh run .cshrc or .tcshrc file automatically, before runs .login .

ng2 file upload - Angular 2: Can't bind to 'uploader' since it isn't a known property of 'input' -

im trying integrate ng2-file-upload module application. and im getting template error: can't bind 'uploader' since isn't known property of 'input' update folder str: /src/app/app.module.ts /src/app/components/layout/ layout.module.ts other layout components files /category-items category-items.module.ts category-items.component.ts in layout.module.ts import { layoutcomponent } './layout.component'; declarations: [ layoutcomponent, in category-items.module.ts import { categoryitemscomponent } './category-items.component'; import {fileuploadmodule} "ng2-file-upload"; imports: [ ...fileuploadmodule ... ] app\app.module.ts import {fileuploadmodule} "ng2-file-upload"; imports: [ ...fileuploadmodule ... ] app\components\layout\category-items\category-items.co

c# BitmapData implementation in android -

i developing oil painting application.i got following c# code. public static bitmap oilpaintfilter(this bitmap sourcebitmap, int levels, int filtersize) { bitmapdata sourcedata = sourcebitmap.lockbits(new rectangle(0, 0, sourcebitmap.width, sourcebitmap.height), imagelockmode.readonly, pixelformat.format32bppargb); byte[] pixelbuffer = new byte[sourcedata.stride * sourcedata.height]; byte[] resultbuffer = new byte[sourcedata.stride * sourcedata.height]; marshal.copy(sourcedata.scan0, pixelbuffer, 0, pixelbuffer.length); sourcebitmap.unlockbits(sourcedata); int[] intensitybin = new int [levels]; int[] bluebin = new int [levels]; int[] greenbin = new int [levels]; int[] redbin = new int [levels]; levels = levels - 1; int filteroffset = (filte

beagleboneblack - Using Beaglebone black in Window 10 -

i want using beaglebone black in iot. os window, use "putty" connecting debian. ip address 192.168.7.2, port 22 , connection type ssh. i want confirm networking state enter "ping 192.168.7.1". then, putty not working. adjust entering "ping -c 2 192.168.7.1". output receive 0 , loss 100%. i don't know reason why output that. connect computer ethernet, , beagle connecting p4. bbb configured default use dynamic host configuration protocol dhcp, ti random ip address if using ethernet , not usb. however, have options find out: you can attach display , check ip address asigned bbb; you can connect bbb via serial console (although need specail cable it); you can connect bbb via usb first time , configure static address described here , here

what is the activator command to publish sbt project to nexus release repository from jenkins -

this gitlab repository configuration i sent snapshot nexus repository ./activator clean stage ./activator publish then activator command send release nexus jenkins

nessus - How to create .audit file to upload a custom amazon AWS audit for Audit Cloud Infrastructure -

Image
i new nessus audit cloud infrastructure. have infrastructure on aws cloud unix based machine. audit cloud infrastructure requires audit file without error coming below :- error (400): @ least 1 audit must added policy in 'compliance' section. i have tried search sample .audit file can import policy haven't anything. as per slide below, there tool i2a haven't able , neither able contact support portal(may because using trial version now) :- https://www.slideshare.net/jderienzo/create-a-nessus-audit-file-30230893 if have source of .audit file please share it. specially unix one. or please atleast provide link/video etc can create own .audit file. i have tried below link didn't work me:- https://www.tenable.com/blog/version-2-of-windows-compliance-checks-available-for-testing any appreciated in advance!!

oracle - -bash: sqlplus: command not found -

i wanted in sqlplus run sqlfiles,i ran these lines , when give sqlplus enetr in sqlplus, err, have not downloded , installed anythng otherthan running these commands, 1 plese me?? [root@localhost instances]# export oracle_home=/u01/app/oracle/product/11.2.0/xe [root@localhost instances]# export oracle_sid=xe [root@localhost instances]# export nls_lang=$oracle_home/bin/nls_lang.sh [root@localhost instances]# export path=$oracle_home/bin:$path [root@localhost instances]# sqlplus -bash: sqlplus: command not found export nls_lang=$oracle_home/bin/nls_lang.sh seems wrong. nls_lang string of format language_territory.charset , see nls_lang faq in case $oracle_home/bin/nls_lang.sh provides nls_lang value dynamically should export nls_lang=`$oracle_home/bin/nls_lang.sh`

perl - How to dereference entries in a hash of arrays of hashes -

i have data structure built so:- $icvdwkey = "($llx $lly) ($urx $ury)"; ... push @{$icvdwstats{$icvdwkey}}, { icvdensity=>$density, icvlayerarea=>$layerarea, icvwindowarea=>$windowarea }; i can dereference contents so... foreach $icvdwkey (@allicvdwcoords) { foreach (@{$icvdwstats{$icvdwkey}}) { $icvdensity = $_->{icvdensity}; $icvlayerarea = $_->{icvlayerarea}; $icvwindowarea = $_->{icvwindowarea}; ... } } ...and good. however, running problems when data structure built same way , need check contents when looping through original data structure, above. here example... foreach $icvdwkey (@allicvdwcoords) { foreach (@{$icvdwstats{$icvdwkey}}) { $icvdensity = $_->{icvdensity}; $icvlayerarea = $_->{icvlayerarea}; $icvwindowarea = $_->{icvwindowarea}; ... if (exists ($icc2dwstats{$icvdwkey})) { $icc2density = $_->{icc2density};

javascript - Is there a way to merge two arrays into one single array in MongoDB? -

i'm kinda new in mongodb , i'm having trouble achieve task. i'll try explain it. here collection: 'workers': [ { _id: objectid(...), name: 'john', skills: [ { id: objectid('111'), value: 2 }, { id: objectid('222'), value: 3 }, { id: objectid('333'), value: 4 }, ] }, { _id: objectid(...), name: 'mary', skills: [ { id: objectid('222'), value: 5 }, { id: objectid('333'), value: 2 }, { id: objectid('444'), value: 3 }, ] }, ... ] what i'm trying achieve this: result: [ allskills: [ { id: objectid('111'), value: 2 }, { id: objectid('222'), value: 5 }, { id: objectid('333'), value: 4 }, { id: objectid('444'), value: 3 } ] ] my result should single array skills inside w

sql - SAS Enterprise Guide: How to get Oracle table indexes -

i using sas enterprise guide (eg) 6.1 , want know indexes of our oracle tables. there way write program information? i tried do: libname dw oracle user='username' password='password' path='path.world' schema='schema'; data _null_ ; dsid = open(dw.some_table) ; isindexed = attrn(dsid,"isindex") ; put isindexed = ; run ; some_table name of (my table), error: error: data step component object failure. aborted during compilation phase. error 557-185: variable some_table not object. reference: https://communities.sas.com/t5/ods-and-base-reporting/check-if-index-exists/td-p/1966 open takes string or value resolves string. need dsid= open('dw.some_dataset'); i don't know if can use oracle or not, , don't know whether attrn useful particular purpose or not. these work sas datasets, it's libname engine (and whatever middleware uses) implement functionality attrn use. for example, don't use oracle

ruby on rails - Unable to convert url params string to hash and then back to url string -

input params string (input format cannot changed) something=1,2,3,4,5&something_else=6,7,8 expected output: something=1,2,3,4,5&something_else=6,7,8 what doing: params = 'something=1,2,3,4,5' cgi::parse(params) cgi.unescape(cgi.parse(params).to_query) and getting output: something[]=1,2,3,4,5 when did cgi::parse(params) getting : {"something"=>["1,2,3,4,5"]} which wrong because not array, string "1,2,3,4,5" being converted array when did cgi parse. the reason need cgi parse because need manipulate url params. is there other possible way can convert in right way , maintain params format? the cgi module complete dinosaur , should thrown in garbage because of how bad is, reason persists in ruby core. maybe day refactor , make workable. until then, skip , use better uri, built-in. given irregular, non-compliant query string: query_string = 'something=1,2,3,4,5&something_else=6,7,8' you ca

ios - compile error with rows.next() in GRDB and Swift 3 -

i developing ios app using swift 3 , grdb sqlite library. following code fragment causes compile error of "value of type '[row]' has no member 'next'" let rows = try row.fetchall(db, sql, arguments:arguments) while let row = try rows.next() { <--- line error ... } as far can tell following example in docs correctly. can tell me doing wrong? the fetchall method returns regular swift array, iterate other arrays: let rows = try row.fetchall(db, sql, arguments:arguments) // [row] row in rows { // use row } the next method belongs cursors , fetchcursor method. cursors not arrays because don't load database results in 1 step. instead, cursors iterated row after row: let rows = try row.fetchcursor(db, sql, arguments:arguments) // databasecursor<row> while let row = try rows.next() { // use row } you see both arrays , cursors can iterate database results. how choose 1 or other? @ differences: array

ios - Cordova app not shows iframe (VS TACO) -

i'm using visual studio tools apache cordova (vs taco) cordova 7.0.1 engine , trying build ios application. application wrapper website. works fine except iframe within website (from external domain). here how app loads site config.xml: <content src="http://mysite.example.com/" /> i have installed inappbrowser plugin , here there thing i've tried: added allow-navigation parameters config.xml: <allow-navigation href="http://mysite.example.com/*" /> <allow-navigation href="https://iframe-server.example.com/*" /> , <allow-navigation href="https://*.com" /> <allow-navigation href="http://*.com" /> added allow-intent , access parameters config.xml: <allow-intent href="*" /> <access origin="*" /> added content-security-policy meta tag both website , cordova's index.hml (not sure if makes sense): <meta http-equiv="

ios - Enable landscape orientation in didFinish function WKWebView -

i'm big noob when comes swift , ios app implementation. so im trying , not sure if possible. so created wkwebview , added uiimage , progressview viewdidload() function. once webiste finishes loading remove both views in didfinish function. once didfinish called able enable screen rotate, not force enable it. if user in landscape website can used in landscape. in general created loader screen wkwebview , want in portrait mode once site loaded flexible change portrait landscape normal. thanks in advance in function "supportedinterfaceorientations", can return required orientation after checking whether webview loading or not. then, after webview finished loading , device in landscape, should change orientation programmatically ( how programmatically set device orientation in ios7? )

javascript - ScrollTop bug jquery On chrome -

in website made sticky header. it works on every browsers when test on macbook on chrome there's bug scrolltop i've main header , sticky header : i code : $(document).on('scroll',function() { if ($(document).scrolltop() >= 150) { $('header:not(.sticky)').hide(); $('header.sticky').show(); } else { $('header:not(.sticky)').show(); $('header.sticky').hide(); } }); when scroll 150px jumps top of page. thanks ! this works fine in chrome in mac machine $(document).scroll(()=> { if($(this).scrolltop()>= 150) { //your actions } else { //your actions } });

javascript - Child Component not updating when parent updates vuejs -

Image
i have vue instance passes object child component. child component has checkbox when clicked calls event vue instance handles update object on parent passed child component. based on vue documentation thought cause child component update related fields. however, date field not updating expect when click on checkbox. in image below, when check management name checkbox, expect current day appear, not seeing date. missing here? design parent instance new vue({ el: "#evaluations-app", data: { evaluation: new evaluation() }, methods: { updateemployeeso: function (newso, newsodate) { this.evaluation.employeeso = newso; this.evaluation.employeesodate = newsodate; }, updatereviewerso: function (newso, newsodate) { this.evaluation.reviewerso = newso; this.evaluation.reviewersodate = newsodate; }, updatemanagementso: function (newso, newsodat