Posts

Showing posts from January, 2012

css - Control the dashed border stroke length and distance between strokes -

Image
is possible control length , distance between dashed border strokes in css? this example below displays differently between browsers: div { border: dashed 4px #000; padding: 20px; display: inline-block; } <div>i have dashed border!</div> big differences: ie 11 / firefox / chrome are there methods can provide greater control of dashed borders appearance? css render browser specific , don't know fine tuning on it, should work images recommended ham. reference: http://www.w3.org/tr/css2/box.html#border-style-properties

java - Apache spark in memory caching -

spark caches working dataset memory , performs computations @ memory speeds. there way control how long working set resides in ram? i have huge amount of data accessed through job. takes time load job ram , when next job arrives, has load data again ram time consuming. there way cache data forever(or specified time) ram using spark? to uncache explicitly, can use rdd.unpersist() if want share cached rdds across multiple jobs can try following: cache rdd using same context , re-use context other jobs. way cache once , use many times there 'spark job servers' exist above mentioned functionality. checkout spark job server open sourced ooyala. use external caching solution tachyon i have been experimenting caching options in spark. can read more here : http://sujee.net/understanding-spark-caching/

c3p0 - hibernate 4 session connection remains open -

i use hibernate mysql database in java application migrate hibernate 3 hibernate 4 in new hibernate number of busy thread increased , use of connections application stop working , can not give connection more. hibernate.cfg configuration bellow: <property name="dialect">org.hibernate.dialect.mysqldialect</property> <!-- enable hibernate's automatic session context management --> <property name="current_session_context_class">thread</property> <property name="hibernate.current_session_context_class">thread</property> <!-- disable second-level cache --> <property name="hibernate.cache.use_second_level_cache">true</property> <!--<property name="hibernate.cache.provider_class"> net.sf.ehcache.hibernate.ehcacheprovider </property>--> <property name="hibernate.cache...

ruby on rails - how to put an URL as a parameter in another URL for successful parsing -

say want set url: www.a.com?str1=12&str2=67 parameter in url can parsed properly. problem : set parameter in url as- www.a.com?redirect_to=www.a.com?str1=12&str2=67 then happens when parse url value of redirect_to www.a.com?str1=12 because strt2 considered parameter. can www.a.com?str1=12&str2=67 value of redirect_to ? try escaping redirect url cgi.escape: require 'cgi' my_url = "www.a.com?redirect_to=#{cgi.escape('www.a.com?str1=12&str2=67')}" # my_url => "www.a.com?redirect_to=www.a.com%3fstr1%3d12%26str2%3d67"

unix - UART 0x0D's becoming 0x0A's -

Image
the following code configures 2 uart ports on beaglebone black. // open given file read/write, don't become controlling terminal, don't block int filedescriptor = open(filename, o_rdwr | o_noctty | o_sync); if(filedescriptor == -1) { cerr << "open_port: unable open " << filename << " " << strerror(errno) << endl; return false; } struct termios tty; memset(&tty, 0, sizeof tty); if(tcgetattr(filedescriptor, &tty) != 0) { cerr << strerror(errno) << endl; return false; } // baud cfsetispeed(&tty, b115200); cfsetospeed(&tty, b115200); // 8-bit chars tty.c_cflag = (tty.c_cflag & ~csize) | cs8; // disable ignbrk mismatched speed tests; otherwise receive break // \000 chars tty.c_iflag &= ~ignbrk; // disable break processing tty.c_lflag = 0; // no signaling chars, no echo...

Recording Mobile browser operations using Jmeter tool -

i need record mobile browser operations using jmeter tool. how do this? and need record file download scenario 1 of website using mobile browser under different network conditions (wifi, 3g , 2g) can record file downloading scenario? if yes, please let me know how do that. i need run file downloading scenario 20 times 1 user. possible? pls me out for mobile browser recording - make sure host running jmeter , mobile device on same network , device configured use jmeter host proxy. step-by-step guide see load testing mobile apps. made easy guide. to simulate different network types can change httpclient.socket.http.cps property value in jmeter.properties file. see how simulate network bandwidth in jmeter? wiki page details , values different network types simulation of downloading file 20 times possible loop controller , save responses file test elements combination. see performance testing: upload , download scenarios apache jmeter post instructions

matlab - the fastest way to replicate a vector in two direction -

i have vector want replicate elements in both row , column directions. have found using ones built-in function faster m-file functions repmat , kron . have seen examples replicating vector in 1 direction, not find how in both direction. consider following example: a = [1 2 3]; i want create these matrices: b = [1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3]; and c = [1 2 3 1 2 3 1 2 3 1 2 3]; how can ones ? there faster way? in code, vectors replicated bigger , have many vectors in for loop. looking faster way. how if had matrix replicated? example: d = [1 2 3 4 5 6]; and want have: e = [1 2 3 1 2 3 4 5 6 4 5 6 1 2 3 1 2 3 4 5 6 4 5 6]; c , e straightforward cases repmat . b different, common suggestion use kron(a', ones(2,3)) here alternatives: a similar function r's rep in matlab according many answers in link, fastest possibly reshape(repmat(a, 6, 1), 3, 6)'

windows store apps - accessing files and folders other than sharepoint site's default shared documents using office365 api -

working on windows store apps: trying access files , folders of office365 documents library. can access 1 drive documents described in link common file tasks using office 365 client library but not provide way access files , folders in other onedrive document library. e.g [ https://my-office365-tenant.sharepoint.com/mysite/mydocumentslibrary] however had tried way , files , folders other onedrive. had not used capability created sharepointclient given below: var client = new sharepointclient(new uri("https://my-office365-tenant.sharepoint.com/mysite"), async () => await acquiretokenasync(authenticationcontext, "https://my-office365-tenant.sharepoint.com")); ipagedcollection<iitem> items = await client.files.executeasync(); in way files of default "shared documents" document library inside "mysite", want files , folders of documents library "mydocumentslibrary" inside same site "mysite". can p...

php - I do not want a child to inherit parent's css -

i have project built this: index page full layout separate php files including index page in index page use bootstrap in separate php files use jqgrid, not go along bootstrap well. combination of these 2 makes jqgrid's shrinktofit or autowidth disfunction. is there way exclude whole bootstrap css being inherited in separate php files? yes can exclude whole bootstrap functionality , using php regular expression comment link bootstrap file loading, bootstrap functionality not affect page.

PHP XML data missing custom attribute data -

i have custom xml of following format: <xml> <data> <node index='0.04, 0.17, 0.30, 0.43, 1.48, 2.01, 4.23, 4.36'> node data#1 </node> <node index='0.07, 0.20, 0.33, 0.46, 1.51, 2.04, 4.27, 4.40'> node data#2 </node> <node index='0.11, 0.24, 0.37, 0.50, 1.55, 2.08, 4.30, 4.43'> node data#3 </node> </data> </xml> i'm using following simple php code read xml file: $file = 'test1.xml'; if(file_exists($file) ){ print "xml file found!"; $xml = file_get_contents($file) or die('<br>error loading xml file'); $xml = simplexml_load_string($xml) or die('<br>error loading xml file'); }else{ print "no xml file found!"; } if($xml){ print "<pre>"; print_r($xml); print ...

json - javascript recursive validation -

i want validate json tree conditions (and, not, or) , id keys. that: { "or": [ { "and": [ { "not": [ { "id": 2 } ] }, { "id": 2 } ] }, { "and": [ { "id": 3 }, { "id": 3 } ] } ] } this valid tree. if json contains other operations or has empty ([], {}) invalid. example, { "x": [ //invalid tag { "and": [ { "not": [ { //empty } ] ...

netezza nzsql script INSERT output -

if output terminal nzsql insert command being read file: insert 0 1 what 0 mean? thanks. the 0 indicates insert ran no error. this documented in reference material here

python - How to have multiple django requirements file mentioned in fig file for docker deployment across dev, staging and prod servers? -

i wrote first fig file. makes working docker awesome. i want fig launch local, staging, , prod containers well. wrote 3 different fig files. fig-dev.yml, fig-stage.yml , fig-prod.yml. the 3 yml files contain images needs pulled per requirements of 3 servers. in django applications, have 3 different requirements file(local requirements, staging requirements, , production). wanted specify each of 3 in yml files. since can run pip install *-requirements.txt in dockerfile. there no way, can pull code different servers, , while building it, can pass flags requirements file install things from. there issue on fig , asks support multiple dockerfiles. there way, can pull code, pass flag specify, requirements install from? thanks!

Is it possible to upload a file to a website, only by modifying the HTML and CSS code? -

i'm trying upload file website, can download later location. there way solely modifying html/css code of website? no. neither html nor css programming languages (meaning allow interact server , files) and, if allowed, upload files site's server.

javascript - {{> yield}} causes a blank page when Router.route(uri, {name: templateName }) -

i'm new meteorjs. reading discover meteor while trying build app of own (instead of demo app microscope ). when setting router.js encountered problem. {{> yield}} in layout template causing blank page on / when tried using name routing: router.route('/', {name: 'home' }) (where home template defined in client repository.) conclusion: i checked iron-router's version in .meteor/versions , realized 0.9.3, while 1 in demo app 1.0.0. i tried updating meteor update iron:router but can updated 0.9.4 due other packages have. 0.9.4 latest compatible version. so appears backward-compatibility issue. somehow function router.route(uri, {name: templatename }); doesn't seem work {{> yield}} , why i'm getting blank page. (although using {{yield}} output string [object object] ). solution: i used different function route instead router.route(templatename, {path: uri}); together map : router.map -> @route ...

oracle - ORA-02051: another session or branch in same transaction failed or finalized -

Image
i have problem xa transaction. if @ picture, xa transaction flow order numbered. call number 3 half-workaround have found far half-solve problem. mean, if don't make select 1 query database 2 before accesing ejb 2, transaction fails. i half-solves problem, because when put select 1 query, servlet doesn't crash , can complete transaction. workaround not applicable in other scenarios example external b2b client don't have , shouldn't have access our internal database 2 , can't make select 1 query fix it. the concrete exception point in hibernate beforecomplete synchronization . crashes when hibernate flushing cache database 2 oracle throws error: ora-02051: session or branch in same transaction failed or finalized after spending days making proves , reading omg "transaction service specification" , chapter 10 of book "mastering ejb" cannot understand why xa transaction fails ;) i grateful if can me in either way. ...

sdl - SDL2 libs in Debian Wheezy -

debian 7.6.0. i'm try install sdl2 libraries aptitude install libsdl2-image-2.0-0 libsdl2-2.0-0 but aptitude can't find packages. my sources.list: deb http://ftp.ru.debian.org/debian/ wheezy main deb-src http://ftp.ru.debian.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main online packages.debian.org says these packages in unstable, possible somehow install these packages without using unstable branch? (when try install unstable pile appears neudvoletvorennyh dependencies , offers delete 100+ packages, including gcc)

c# - IP/name resolve conflict -

i have weird problem: ip & name resolve conflicts, here code: string hostname = system.net.dns.gethostentry("192.168.x.y").hostname; // output:laptop03 system.net.ipaddress[] addresslist = system.net.dns.gethostaddresses("laptop3"); //output:192.168.x.y2 you can see, 192.168.x.y resolved laptop03, laptop03 resolved 192.168.x.y2. why 2 addresses different? it causing tcp connection failure while using ip address, tcp connection succeeded using name

JavaScript function argument auto-increments -

i building nodejs web scraper has loop on data in table row. have found following 2 code snippets somehow exhibit same behavior. in first scenario how i getting incremented? i have searched auto-incrementing variables or arguments in javascript , found nothing far. if matters, code inside request callback, , using cheerio parse html. snippet 1 $(this).find('td span').each(function(i) { console.log(i); }); snippet 2 $(this).find('td span').each(function(i) { console.log(i); i++; }); as the documentation .each points out, argument function index. jquery calling function appropriate index every time — and jquery 1 keeping track of index. in second example when i++ has no effect on jquery's original counter jquery keeping track of because getting passed again function when next item iterated over. more generally, if have function being called primitive datatype argument (like number, string, etc.) function f(x) { // ch...

jquery mobile rangeslider when it hit max value add + sign -

i wondering how add plus (+) sign jquery mobile range slider higher value when max value selected/hit. example on price top range, has + when max value selected. i tried changing max value <input type="range" name="range-1b" id="range-1b" min="400" max="2000+" value="1500" step="50"> didnt work, tried change script, didnt work either. not sure if possible so. <script> $(document).on('pageshow',function(){ var value = document.getelementbyid("range-1b").value; if(value =2000){ document.getelementbyid("range-1b").value="2000+"; } }); </script> when jqm enhances rangeslider, inputs set type="number". type accepts numbers, text '100+' cannot set value of input. one workaround position '+' next 100: in rangeslider markup, add <span> class of labelplus: <div data-role="rangesl...

javascript - How to get text value from radio button and assign value to a specific div -

if using 1 text box , 3 div, how can set entered value in div? here code. have div value radio button selected. likewise, how can text box value? here code. <form id="myform"> <div>choose option:</div> <div> <input type="radio" name="user_options" value="456"/> </div> <div name="deff" id="val1" x>123</div> <span>css</span> <br></br> <div> <input type="radio" name="user_options" value="456" /> </div> <div name="deff" id="val2" >456</div> <span>html</span> <br></br> <div> <input type="radio" name="user_options" value="678" /> </div> <div name="deff" id="val3" >678</div> <span>jquery</span> <br></br> <div name="deff" id="val4...

html - How do I center a menu option under it's heading option in a drop down menu? -

my menu comes as: menu item 1 | menu item 2 | menu item 3 ..........menu stuff | ....menu stuff | menu stuff and on. i want show: menu item 1 | menu item 2 | menu item 3 menu stuff.....| menu stuff .. | menu stuff how center under heading option? it's bit of mess, think of coding relates menu. html <ul id="menu"> <li>home</li> <li>about</li> <li>menu 1 <ul> <li>stuff</li> <li>more stuff</li> <li>and more</li> </ul></li> <li>things <ul> <li>more</li> <li>today</li> <li>ideas</li> </ul></li> css ul#menu { list-style: none; margin-top: -50px; text-align: right; margin-left: 420px; } ul#menu li { float: left; text-align: right; display: inline; } li { width: 110px; } ul#menu li a{ display: ...

linux kernel - how to init rwlock_t -

i writing linux kernel module, , can't find way initialise read-write lock. prefer static init. when try using rw_lock_unlocked, compiler tells me not defined. rwlock_t lock = rw_lock_unlocked; use the source , luke: define_rwlock(lock);

how to change a php variable into a int then add 50 to it for reuse -

how change height variable numeric value can add 50 , reuse it? list($width,$height) = getimagesize($img); have @ php documentation . getimagesize() returns array of values, index 0 , 1 contain numeric representations of width , height of image.

ios - EXC_BAD_ACCESS on setMask -

i'm trying apply mask both base layer , background layer, solutions below blows when setting mask on either layer. please let me know i'm doing wrong? self.backlayer = [[calayer alloc] init]; [self.backlayer setbounds:[self bounds]]; [self.backlayer setposition:cgpointmake([self bounds].size.width/2, [self bounds].size.height/2)]; self.backlayer.opacity = 0.3f; [[self layer] insertsublayer:self.backlayer atindex:0]; [[self layer] setmaskstobounds:yes]; [[self layer] setborderwidth:0.0f]; uibezierpath* path = [uibezierpath bezierpathwithovalinrect:[self bounds]]; self.backlayer2 = [cashapelayer layer]; self.backlayer2.path = path.cgpath; self.layer.mask = self.backlayer2; self.backlayer.mask = self.backlayer2; cgpathrelease(path.cgpath); seems code posted perfect. there no problem code. exc_bad_access occur if perform action on deallocated object. please make sure self object/view not deallocated arc . check place declared view still alive in stack/memory . do...

PHP DOMDocument output HTML page code -

i've made web application in user inputs data , xml generated values ms sql server database, since users going using locally being hosted on server, need trigger downloads instead of saving location, , while that, output includes html in page, code if(isset($_post['enviar'])) { $dia = $_post['dia']; $mes = $_post['mes']; $anio = $_post['anio']; $fechao = $dia.'/'.$mes.'/'.$anio; $rifr = 'j'.$_post['rifr']; $cod = $_post['cod']; $xml = new domdocument('1.0', 'iso-8859-1'); $sql = "select replace(replace(replace(dbo.saprov.id3, '-', ''), '.', ''), ' ', '') rif, right(replace(replace(replace(saacxp_1.numerod, '-', ''), 'a', ''), ' ', ''), 8) n_factura, right(replace(replace(saacxp_1.nroctrol, '-', ''), ' ...

r - Find the maximum and minimum value of every column and then find the maximum and minimum value of every row -

i've got matrix: a <- matrix(rnorm(1000 * 18, mean = 100, sd = sqrt(10)), 1000, 18) i find maximum , minimum value of every column , maximum , minimum value of every row. figured out. minimum , maximum of every column: apply(a,2,min) apply(a,2,max) minimum , maximum of every row: apply(a,1,min) apply(a,1,max) found information here http://www.personality-project.org/r/r.commands.html

windows - Error in compilation : undefined reference to 'clGetPlatformInfo@20' -

i'm such newby concerning opencl programming, , want run simple program in "opencl parallel programming development cookbook". in fact, want query opencl platforms simple prog: #include <stdio.h> #include <stdlib.h> #include <cl/cl.h> void displayplatforminfo(cl_platform_id id, cl_platform_info param_name, const char* paramnameasstr) { cl_int error = 0; size_t paramsize = 0; error = clgetplatforminfo( id, param_name, 0, null, &paramsize ); char* moreinfo = (char*)malloc( sizeof(char) * paramsize); error = clgetplatforminfo( id, param_name, paramsize,moreinfo, null ); if (error != cl_success ) { perror("unable find opencl platform information"); return; } printf("%s: %s\n", paramnameasstr, moreinfo); } int main() { /* opencl 1.2 data structures */ cl_platform_id* platforms; /* opencl 1.1 scalar data types */ cl_uint ...

Forward http request to other server that will respond to the original requester using java servlets -

i have problem have several servers sending httprequests (using round robin decide server send to) several servers process requests , return response. i have broker in middle examines request , decides server forward responses can big response sent original requester , not passed through broker. kind of proxy way understand proxy data sent through proxy. possible? i'm working legacy code , rather not change way requests , responses processed put in middle can smarter routing of requests. all done using httpservletrequest/response , servlets running on embedded jetty web servers. thank you! what you're after broker component using client's ip address when connecting target server. called ip spoofing . sure want implement yourself? intricacies of network implementation of such solution quite daunting. consider using software has option builtin, such haproxy. see these blog posts.

Sqoop returns "response status of 404 Not Found" -

i have installed latest hadoop 2.5.1 , sqoop 1.99.3 (from tarball files) on centos 7. sqoop installed according instructions here: http://sqoop.apache.org/docs/1.99.3/installation.html i wanted test sqoop server according page: http://sqoop.apache.org/docs/1.99.3/sqoop5minutesdemo.html i ran following command: show version --all and got following error message: exception: com.sun.jersey.api.client.uniforminterfaceexception message: http://localhost:12000/sqoop/version returned response status of 404 not found this config , log files contain after tried start sqoop server (by running sqoop.sh server start ): sqoop variables in /etc/bashrc: export sqoop_home="/usr/local/sqoop" export sqoop_conf_dir=$sqoop_home/server/conf /usr/local/sqoop/server/conf/catalina.properties: /usr/local/hadoop/share/hadoop/common/*.jar, /usr/local/hadoop/share/hadoop/common/lib/*.jar, /usr/local/hadoop/share/hadoop/hdfs/*.jar, /usr/local/hadoop/share/hadoop/hdfs/lib/*.jar, /u...

asp.net mvc - Getting key from new record before calling SaveChanges in MVC not using EF -

i using mvc5 without entity framework, , want retrieve key newly inserted record before calling savechanges. because need key work foreign key in different record. here's pseudo code better explain want do: 1) create record person 2) var newpersonid = newly created personid person record 3) create record employee, set personid (foreign key) equal newpersonid 4) person.savechanges emplyee.savechanges thus, problem step 2. i read way when using entity framework setup relationsship in model [foreignkey("xxx")], , entity framework take of things. don't use entity framework, how can this? if not using ef how come have savechanges. ok, way can use transactionscope. using (transactionscope transactionscope = new transactionscope()){ //some other code.... person.savechanges(); employee.personid = person.id; employee.savechanges() //if exception rised here, save changes reverted transactionscope.complete(); } ...

c - Connecting 2 singly linked lists by using a dummy node -

a little background info, doing huge project , part of merging 2 singly linked lists. linked lists both have different dummy node end , next field pointing node before, have access tail of list , able merge 2 lists in o(1) print both lists, try merge them, when print merged list, see 2 data adresses , cant find out why. list1 = 500,501,502, list2 = 600,601, list3 = 500,501,502,address,adress,600,601 the node has *next field , int id field. dummynode *next shows last valid node of list1 , dummynode of list2 respectively board[i].ptr , board[k].ptr starting points of each list and here code: board[i].dummynode->next->next = board[k].ptr; free(board[i].dummynode); board[i].dummynode= board[k].dummynode; node * u = board[i].ptr; while(u!=board[k].dummynode) { printf("%d ",u->id); u = u->next; } my guess board[i].dummynode->next wasn't pointing @ tail of board[i] . can print board[i].dummynode->next->id before combine 2 list...

taskmanager - How to set priority of another application in c# -

how should set priority of different application running on computer in c# win form. i'm little new website , coding together. system.diagnostics.process.start("cmd.exe","wmic process name=\"hd-frontend.exe\" call setpriority 32"); is i've tried far. didn't work... :( setpriority 32 appears linux call what need process handle start process myprocess = process.start("cmd.exe", "wmic process name=\"hd-frontend.exe\""); then play priority once have handle myprocess.priorityclass = realtime; alternatively, define process before starting , edit priority before has started myprocess.startinfo.useshellexecute = false; myprocess.startinfo.filename = "c:\\helloworld.exe"; myprocess.startinfo.createnowindow = true; myprocess.priorityclass = realtime; myprocess.start(); look @ processpriority property of process

java date format with 6 digit micro/milli second -

from postgres database getting 6 digit microsecond (its ) e.g. 2014-11-10 04:05:06. 999999 now when apply date format of "yyyy-mm-dd hh:mm:ss.sss" converts 999999 corresponding seconds/minutes resulting in incorrect date. see code snippet below string dt = "2014-11-10 04:05:06.999999"; string timeseriesformat = "yyyy-mm-dd hh:mm:ss.sss"; simpledateformat dateformat = new simpledateformat(timeseriesformat); date date = dateformat.parse(dt); system.out.println(dateformat.format(date)); results in 2014-11-10 04:21:45.999 i want rather truncate last 3 digits , keep date of 2014-11-10 04:05:06.999 . how truncate it? not want use framework joda etc. duplicate 1 custom date format cannot parsed. conculsion simpeldateformat not support microsecond, , you'll need own parser try this system.out.println( new simpledateformat("yyyy-mm-dd hh:mm:ss.").format(microseconds/100...

javascript - Creating Controls Dynamically with JQuery .Clone() Method and then Accessing them on Button Click in asp.net -

i trying create controls of asp.net dynamically. have placed few checkboxes controls textbox, label, checkbox , when these checkboxes checked, div opened in user can set properties of these controls , add multiple controls of type on button click( jquery .clone() method ). , @ last when user clicks on "create form" button new webform opens , controls displayed on specified properties. i having trouble accessing these dynamically created controls. mycontrol = findcontrol("txttextboxtext_0"+i); in line, getting first control id "txtttextboxtext_00" not getting other controls ids "txtttextboxtext_01,txtttextboxtext_02,txtttextboxtext_03,...." i not getting doing wrong , problem. please guide. here code of jquery. //duplicate divs var current_id = 0; var id = 0; $("#btn_atxt").click(function () { $('#textboxdiv').css({ height: '+=77' }, 500); id =...

c# - Long-untouched ASP.NET app throws "Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll'" after Server 2008 security updates -

i have app has been running years on .net 3.5 targeted asp.net application. last night slew of overdue updates hit web server (windows 2008, iis7), , app doesn't work. the app fails when trying connect access database (via standard built in libraries; nothing third party in play here), , error message is: could not load file or assembly 'system.enterpriseservices.wrapper.dll i've googled extensively , advice same: repair/reinstall .net framework. i have done this; did full uninstall , re-install of framework 3.5 , 4.5. no help. copying 2 enterpriseservices dlls web site app's bin folder did not either. i did digging in process explorer not expert in app. any suggestions? not viable long term solution, wanted update rolling security patches resulted in app working again. 1 of these four: security update microsoft .net framework 3.5 sp1 on windows xp, server 2003, vista , server 2008 x64 (kb2861697) security update microsoft .net framework...

c# 6.0 - Getting Build Error Creating Android Application using Xamarin Extension for Visual Studio 2015 Preview -

Image
i'm using released visual studio 2015 preview along xamarian studio 5.6.3(or 5.6.2) extension visual studio. after hours of downloading , installing required software (all done successfully), started developing android application in vs2015p, every time create blank android application, error, no error code: the "mergeapkrecipelists" task not given value required parameter "recipefiles". figured out looking @ xamarin's .targets files. short version you can either: create android c++ library project , reference xamarin android project or comment out import element defined in %programfiles(x86)%\msbuild\xamarin\android\xamarin.android.common.after.targets. note disable support adding c++ project references xamarin android projects. once 1 of those, xamarin android project should build , run. long version first, note error in vs output window: c:\program files (x86)\msbuild\xamarin\android\xamarin.android.common\im...

ios - Can't submit app with in-app purchases -

Image
i try submit app in-app purchases apple-people reject it. thank submitting new binary. however, still found while have submitted in app purchase products app, in app purchase functionality not present in binary. please see attached screenshot/s more information. if utilize in app purchase in app, need upload new binary incorporates in app purchase api enable users make purchase. once revise , resubmit binary, need resubmit in app purchases review since in state developer action required. each iap product submitted, please sure edit detail information or cancel request change detail information in app purchases using itunes connect. for more information on how implement in app purchase in application, please refer in-app purchase programming guide. you can learn more submitting in app purchases review in in-app purchase configuration guide itunes connect. they show screenshot without products. but tested on test user ac...

angularjs - Why does the URL in UI-Router keep resetting? -

i'm using angularjs framework of web application, , ui-router nested states. while i'm changing states in ui-router, long i'm changing between sibling states, url gets updated correctly, when change parent state, url becomes: http://{domain}:{port}/#/ what causing it? this won't common problem others, i'll post solved issue in hopes no 1 gets stuck long did. the common url address states (ui-router concept) in application xttp://domain.com/#/{siteid}/state1/state1a (where {siteid} variable integer) the problem here when changing between states, siteid cannot passed along top level. means when link takes user state 1a state 2a, siteid not passed along, , routing fail. i solved issue putting siteid in cookie rather in url path variable. common url address after solving issue became: xttp://domain.com/#/state1/state1a simon s.

c# - Pass parameter to UserControl in XAML -

i'm using syncfusion's dockingmanager adapter mvvm list of viewmodels implement idockelement can bound. i'm using way: <dm:dockingadapter grid.row="1" itemssource="{binding dockingitems}" /> in addition i'm using latest version of catel , custom controls . the mvvm adapter of dockingmanager needs these entries, create view viewmodel: <datatemplate datatype="{x:type local:eventeditorviewmodel}"> <grid> <events:eventeditorcontrol/> </grid> </datatemplate> the problem is, eventeditorcontrol has parameter in constructor needs viewmodel. how pass correct viewmodel? you cannot pass parameters constructors using xaml. make parameter dependency property: <events:eventeditorcontrol myparameterasdependencyproperty="{binding someproperty}" />

vb.net - Passing the value from curElement to another private sub -

hi have each inside private sub , want pass value of cuelement private sub. dim theanchorscollection htmlelementcollection = nothing theanchorscollection = webbrowser1.document.getelementsbytagname("a") each curelement htmlelement in theanchorscollection curelement.style = "style code here" addhandler curelement.click, addressof onaclick next and want pass value other sub: private sub onaclick(sender object, e htmlelementeventargs) dim endereco string endereco = curelement.getattribute("href").tostring() 'do other things end sub i want know if in sub can use value of other's curelement. never mind, found answer (sender) variable wanted. as found in msdn forums as use addhandler subscribe given event, pass required arguments of event procedure addressof delegates , argument signature "must" same event's. a demo: public class form1 private sub form1_load(byval sender...

In Unity3d using the FPS Controller, how can I keep a constant player speed when auto-walk forward using transform.forward? -

using unity3d first person controller, want player move forward automatically in direction camera looking at. should behave same using arrow keys, except keep arrow key "pressed". have working in script below, player slows down rotates first-person camera away 0 degrees on y-axis. when looking towards 0 degrees on y-axis, player speed normal again. how can modify script below player moves @ constant speed, no matter camera rotation? i set script on first person controller parent node: public var head : gameobject; private var motor : charactermotor; // use initialization function awake () { motor = getcomponent(charactermotor); } // update called once per frame function update () { // retrieve forward direction based on camera rotation var directionvector = transform.forward; directionvector.y = 0; directionvector.normalize(); // apply direction charactermotor motor.inputmovedirection = transform.rotation * directionvector; motor....

html - Text (div) pushes image(div) down -

title says here's css: #content_container { width: 930px; padding: 3px; margin: 10px; } #text_container { width: 490px; } p { font-size: 14px; font-family: tahoma, geneva, sans-serif; text-align: left; } #side_img { background-image: url(../resources/side_img.jpg); width:250px; height:250px; margin-left: 500px; } and here's html: <div id=content_container> <h2> welkom op de site voor echte stroopwafel liefhebbers! </h2> <div id=text_container> <p id=main_text> </p> </div> <div id=side_img> </div> </div> i tried adding float: left; , float: right; suggested in other threads alike pushes content out of main divs. if understand trying do, floats work, need clear them stop them "pushing content out of main divs". add clearfix div , float image. #text_container{ width: 490px; } p{ font-size: 14px; ...

vb.net - Vb. net, input inside textbox -

i can't use backspace button in keyboard in changing or editing being inputted user when he/she commits mistake inputting series of integers...help me please... private sub tbx3_keypress(sender object, e keypresseventargs) handles tbx3.keypress if cint(val(e.keychar)) = 8 return end if dim allowedchar string = "1234567890" if not (allowedchar.contains(e.keychar)) e.keychar = cchar(e.keychar) e.handled = true end if end sub try this if (microsoft.visualbasic.asc(e.keychar) < 48) _ or (microsoft.visualbasic.asc(e.keychar) > 57) e.handled = true end if if (microsoft.visualbasic.asc(e.keychar) = 8) e.handled = false end if

Eclipse RCP/Eclipselink: persing data not working when setting configurer.setSaveAndRestore(true) -

i using eclipse rcp , eclipselink create application: problem related persisting data eclipselink. situation : application composed of main rcp , plugin uses eclipselink manage data (mysql database). - in file applicationworkbenchadvisor" (in main pluion) when set configurer.setsaveandrestore(false); , persist data em.persist(entity) , works fine. when change configurer.setsaveandrestore(false) true don't persist changes!, if change again false works ! idea problem. in advance. i think mixing ui persistence layer, 2 totally separate things. the setsaveandrestore applicationworkbenchadvisor reads: sets whether workbench state should saved on close , restored on subsequent open. and has nothing entity manager, or persistence layer. the best way convince of create simple small java app (no rcp) , try persist stuff db. you'll notice using rcp or not has no effect.

less - Set "min-width" or "max-width" in a media query passing a parameter to a mixin -

i make dynamic min/max suffix in properties defined in less mediaquery. i wrote code not compile: @screen-md: 800px; .mediaquery(@min-max, @size) { @media screen , (@{min-max}-width: @size) { @{min-max}-width:100px; } } header { background-color: blue; .mediaquery ( @min-max: max, @size: @screen-md ); } while @{min-max}-width:100px; correct syntax, equivalent applied in mediaquery definition not allowed, need set sometime "max-width" value, , others "min-width" value in media queries. how obtain this? option 1: (using variable , interpolation) you can below .mediaquery(@min-max, @size) { @mediaquery: ~"screen , (@{min-max}-width: @{size})"; @media @mediaquery { @{min-max}-width:100px; } } option 2: (using guards) you can use guards in mixin below check value passed @min-max parameter , output appropriate css based on it. .mediaquery(@min-max, @size){ & when (@min-m...

c# - how to save the data into sharepoint application from .net using CSOM -

i want save data c# application sharepoint using csom. if did kind of thing please help. there form in asp.net , when submit form should connect sharepoint application , save data. know can done using csom not more. as far understand you. want save kind of data of sharepoint object, example librabry, list, propertybag for start please read how to: create, update, , delete list items using sharepoint foundation 2010 managed client object model there few differences sharepoint 2010 / 2013 / local / office365, future have more specific

java - Android cannot finish activity -

i'm writing app using opencv android library. i've created cameraactivity want call, , return image. public class cameraactivity extends activity implements cvcameraviewlistener2 { private baseloadercallback mloadercallback = new baseloadercallback(this) { @override public void onmanagerconnected(int status) { switch (status) { case loadercallbackinterface.success: { log.i(tag, "opencv loaded successfully"); mopencvcameraview.enableview(); } break; default: { super.onmanagerconnected(status); } break; } } }; @override public void oncreate(bundle savedinstancestate) { ... button snap = (button) findviewbyid(r.id.snap); snap.setonclicklistener(new onclicklistener() { public void onclick(view v) { processvideo(); } }); snap.setonlongclicklistener(new onlongclicklistener() { @override ...

sql server - Append tables in SQL -

if have 2 following tables, table1 itemno desc order number qty s_date location aa aa aaa aa/aa/aaaa aaaa bb bb bbb b bb/bb/bbbb bbbb cc cc ccc c cc/cc/cccc cccc table 2 m_order item m_date total xxx x xx/xx/xxxx xx yyy y yy/yy/yyyy yy can advice me how following table please. result table itemno desc order number qty s_date location m_date total aa aa aaa aa/aa/aaaa aaaa bb bb bbb b bb/bb/bbbb bbbb cc cc ccc c cc/cc/cccc cccc x xxx xx/xx/xxxx xx y yyy yy/yy/yyyy yy thanks you can full outer join trick: select t1.*, t2.* table1 t1 full outer join table2 t2 on 1 = 0;...