Posts

Showing posts from April, 2011

hadoop - Doing multiple mapreduce jobs in Python -

i writing codes run on hadoop streaming in python. however, trying 1 mapping , 2 reducing jobs. when try run code using following command, 1 reducer - first 1 - working. i using command: hadoop jar /usr/hdp/2.2.0.0-2041/hadoop-mapreduce/hadoop-streaming.jar -dmapreduce.job.queuename=user -dmapreduce.map.memory.mb=4096 -dmapreduce.map.java.opts=-xmx3276m -dmapred.output.compress=false -file mapper.py -file reducer_tf_hcuot.py -mapper mapper.py -reducer reducer_tf_hcuot.py -input text -output o_text can please tell me how work on it? in hadoop streaming, can run 1 map , 1 reduce job @ time (at present). you can run 2 mappers (or number of mappers) in 1 job piping output of first map function second map function. hadoop jar $hadoop_jar -mapper 'map1.py | map2.py | map3.py' -reducer 'reduce.py' ... however multiple reducers, ned rockson said, you'll have 2 independent jobs using identity mapper in second job hadoop jar $hadoop_jar -mapper ...

dataframe - how to add specific row and columns from pandas -

i have data set below when tried sum column sum year. want sum jan dec. the code tried is data.sum(axis=0) out[64]: year jan feb mar apr may jun jul aug sep oct nov dec 0 1981 32 26 62 22 23 98 80 163 13 122 144 109 1 1982 42 30 54 50 192 37 52 77 48 46 74 52 2 1983 78 10 107 46 36 105 80 25 188 58 36 78 3 1984 72 29 34 11 29 97 67 51 145 114 51 51 4 1985 83 37 42 69 23 25 104 50 76 53 74 63 5 1986 50 12 69 51 77 39 121 234 56 45 54 89 6 1987 23 28 22 4 55 77 92 122 65 34 54 24 7 1988 72 64 40 37 41 51 106 173 36 69 38 66 8 1989 9 28 51 55 38 42 11 68 23 74 55 59 9 1990 74 79 56 46 30 25 128 42 153 79 60 42 10 1991 59 29 41 24 78 142 54 124 71 27 47 37 filter columns first , sum : in [2...

android - Aligning an image to the right of RelativeLayout without streatching -

i have relative layout has background image. set height , width wrap_content. works fine. want place image @ topright corner of relative layout. use alignparentright = true. problem relative layout stretches horizontally fill screen. i have done reading , came across "circular dependency pitfall" from relativelayout doc: class overview a layout positions of children can described in relation each other or parent. note cannot have circular dependency between size of relativelayout , position of children. example, cannot have relativelayout height set wrap_content , child set align_parent_bottom here xml sample <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/popup_b" android:layout_width="wrap_content" android:layout_height="wrap_content" > <imagebutton android:id="@+id/ibclosedialog" and...

go - How to create many http servers into one app? -

i want create 2 http servers 1 golang app. example: package main import ( "io" "net/http" ) func helloone(w http.responsewriter, r *http.request) { io.writestring(w, "hello world one!") } func hellotwo(w http.responsewriter, r *http.request) { io.writestring(w, "hello world two!") } func main() { // how create 2 http server instatce? http.handlefunc("/", helloone) http.handlefunc("/", hellotwo) go http.listenandserve(":8001", nil) http.listenandserve(":8002", nil) } how create 2 http server instance , add handlers them? you'll need create separate http.servemux instances. calling http.listenandserve(port, nil) uses defaultservemux (i.e. shared). docs here: http://golang.org/pkg/net/http/#newservemux example: func main() { r1 := http.newservemux() r1.handlefunc("/", helloone) r2 := http.newservemux() r2.ha...

javascript - How ready for Web Development will you be after you complete Codeacademy's web developer program? -

i'm beginner programmer decided work computers in order fulfill lifetime passion have had them. many others, stumbled across codeacademy , have embarked on "web developer skills" program start off with. my question is, prepare web development point paid professional, or best supplement in-depth html, java, angularjs etc.. courses? aspirations, naive may be, cutting edge in computer systems , programming, pushing forward rather making career based on selling templates. any feedback regarding appreciated! it not prepare point paid professional. , courses on html, js, angularjs beforehand if have no experience @ all. codecademy solid start, that's is. start. covers absolute basics of various languages/development methods contains, , includes basic projects work on idea of do. however, point enough people pay develop them, need show project work have done. whether it's did on own, or group project worked on, people see finished product. by means...

java ee - How To Do Pagination In JSP..? -

this question has answer here: resultset pagination 5 answers please not down rate question, because i'm new jsp/javaee.. i looked many tutorials jstl, pagination, cannot proper idea pagination.. there esay way perform pagination..? in program, retrieve records of search results database using java class , put them arraylist , returns arraylist servlet. assigns received arraylist object application attribute this request.setattribute("results", results_list); then using request dispatcher, i'm loading result showing jsp page this. requestdispatcher rd = request.getrequestdispatcher("searchresults.jsp"); rd.forward(request, response); so tell me next step pagination search reslts.. in servlet, first getting value of ‘page’ parameter , storing in ‘page’ variable. wanted display 5 (5) records per page passing argument vie...

Integrate VAST compliant video player into a windows application -

we play videos in our windows application using flash.ocx need change vast compliant solution... can make recommendations? thanks there plenty if video players supporting vast (both html , flash), of them have native support of vast1/2/3 , vpaid1/2, , need plugins: veeplay jwplayer projekktor flowplayer and free , open source video.js they design web, anyway if need play vast compliant ad goes web, can implement players anywhere.

linux - Apply shell script to strings inside a file and replace string inside quotes -

suppose have file greeting.txt (double quotes inside file, 1 line): "hello world!" and file names.txt (no double quotes, many lines, show 2 here example): tom mary then want create bash script create files greeting_to_tom.txt : "hello tom!" and greeting_to_mary.txt : "hello mary!" i'm quite newbie in shell script, after piece searched, tried: greetingtoall.sh : #!/bin/bash filename="greeting_to_"$1".txt" cp greeting.txt $filename sed -i 's/world/$1/' $filename and @ command line type: cat names.txt | xargs ./greetingtoall.sh but tom recognized , it's wrongly replaced $1 . can me task? if create greetingtoall below: greeting=$(cat greeting.txt) while read -r name; echo "$greeting" | sed "s/world/$name/" > "greeting_to_$name.txt" done < "$1" you can call as: ./greetingtoall names.txt depending on you're doing, might better...

c# - why crystal report viewer control toolbar is not working over web browser after report display on web browser -

i able display report on web browser.my problem is, when use toolbar(such export button,print button,find button , on) of crystal report facing parameter missing error on web browser.please me how shut out issue in asp.net platform using c#. in advance. you need store/persist reportdocument object in session variables if (!page.ispostback) { rpt = new reportdocument(); session["report"] = rprt; // store report in session } else { rpt = (reportdocument)session["report"]; } and here explanation http://scn.sap.com/community/crystal-reports-for-visual-studio/blog/2011/04/25/why-should-i-store-reports-object-in-httpsession

node.js - Stylesheet (CSS) is not loading in my Sails application -

i've placed style sheet style.css inside /assets/styles -folder , embedded via <link rel="stylesheet" href="style.css" type="text/css"> in something.ejs file. but stylesheet not loading. has idea? use following give correct location of style sheet: <link rel="stylesheet" href="../../assets/styles/style.css" type="text/css"> the first .. take views folder, next .. take parent folder employees , can give path stylesheet. this because path must relative current .ejs or other current file's location in directory.

node.js - How could I handle timeout request in koa? -

for example: var app = require('koa')(); app.use(function *(next) { var start = new date(); yield next; }); app.use(function *(next) { var result = yield loaddata(); this.body = result; }); app.listen(8080); let's assume if loaddata returns data more 1 second, want this.body = 'there timeout' . how achieve this? don't think settimeout able deal this. , tried this.response.settimeout function, said settimeout undefined. suggestion you can convert promise instead. `loaddata().then((oncompletion) => { //take time here timeout = timeend - timestart; timeout >= 1sec ? this.body = 'there timeout' : this.body = oncompletion }).((onfailure) => { //do if fails });` of course not work unless loaddata returns promise

javascript - Gridstack undefined when calling $(".grid-stack").data("gridstack") in global context -

gridstack javascript library can found here . don't know whether need define grid within original function created, can't seem call gridstack , defined. how call gridstack in context want below? thank in advance. $("#button").click(function(){ //var el ='<div class="grid-stack-item-content" />test<div/>'; var grid = $(".grid-stack").data("gridstack"); alert(grid); //this undefined }); $(function () { var options = { cell_height: 80, vertical_margin: 10 }; $('.grid-stack').gridstack(options); });

ios - How to design a mechanism to manage viewcontrollers transitions, like route -

i want design routing mechanism management view controller transitions in objective-c. two view controllers, without reference other side of pointer, transition controlled route. how achieve route? thanks help. i hope think this. route = segue (in xcode) take 2 view controller make 1st embed in navigation controller (which must initial view controller) put 1 button in 1st vc press ctrl + drag mouse button 2nd vc (one popup show, select push) run project press button lol

angularjs - how to navigate to page without angular in protractor? -

this question has answer here: how use protractor on non angularjs website? 6 answers how can go page not contain angular protractor? test looks this: browser.driver.get('https://www.mysitewithlogin.com'); the result is: message:error while waiting protractor sync page: "angular not found on window" so site starts login page , not contain angular. uberhaupt possible? use below line of code before launching application. browser.ignoresynchronization=true; by writing above line, wont wait angular. considers app normal app.

r - Preventing ggplot2 from cutting off charts in a Sweave PDF -

Image
when generating list of charts using ggplot2, how make sure each chart printed on own page in pdf? i'm creating script in r sweave (.rnw) file. in script, i'm creating list of on thirty charts using ggplot2 , knitr. second chart code creates 30+ charts using loop. how write each new chart prints on new page? here's examples of 2 different codes use create charts: <<benchmarks1,echo=false, results=true, message=false, warning=false>>= library(ggplot2) library(data.table) versions<-unique(testdf[order(testdf$number), ][,2]) testdf <- testdf[complete.cases(testdf),] setdt(testdf) testdf <- testdf[, benchmark := value[category== "time"][which.min(number[category == "time"])], = filename] testdf$version<-factor(testdf$version, levels = versions) testdf$deviation<-testdf$value- testdf$benchmark testdf$deviationp<-(testdf$value- testdf$benchmark)/testdf$benchmark g <-ggplot(subset(testdf, category == 'time'...

eclipse - Java: reading configuration: Unable to create lock manager -

i getting following error. have eclipse mars , jre v 1.7 (i had installed v1.8 not compatible uninstalled , installed version.) i facing issue when invoking eclipse itself. eclipse.buildid=4.5.0.i20150603-2000 java.version=1.7.0_80 java.vendor=oracle corporation bootloader constants: os=win32, arch=x86_64, ws=win32, nl=en_us !entry org.eclipse.osgi 4 0 2015-07-14 11:20:39.006 !message error reading configuration: unable create lock manager. !stack 0 java.io.ioexception: unable create lock manager. @ org.eclipse.osgi.storagemanager.storagemanager.open(storagemanager.java:698) @ org.eclipse.osgi.storage.storage.getchildstoragemanager(storage.java:1750) @ org.eclipse.osgi.storage.storage.getinfoinputstream(storage.java:1767) @ org.eclipse.osgi.storage.storage.<init>(storage.java:127) @ org.eclipse.osgi.storage.storage.createstorage(storage.java:86) @ org.eclipse.osgi.internal.framework.equinoxcontainer.<init>(equinoxcontainer.java:75) @ org...

logistic regression - Error in glm() in R -

i perform logistic regression errors - don't know mistake might be. the structure of data: 'data.frame': 3911 obs. of 29 variables: $ vn1 : factor w/ 2 levels "maennlich","weiblich": 1 1 2 1 1 2 1 1 1 1 ... $ vn2c : int 1976 1943 1927 1949 1965 1977 1986 1976 1944 1994 ... $ vn35 : factor w/ 7 levels "keine angabe",..: 6 4 5 3 3 5 7 6 5 5 ... $ v39 : factor w/ 8 levels "keine angabe",..: 8 4 5 8 7 7 5 6 6 6 ... $ n39 : factor w/ 9 levels "keine angabe",..: 4 4 4 4 4 4 4 4 4 4 ... $ v41 : factor w/ 7 levels "keine angabe",..: 6 5 5 2 7 7 5 5 6 6 ... $ n41 : factor w/ 7 levels "keine angabe",..: 4 4 4 4 4 4 4 4 4 4 ... $ vn42a : factor w/ 8 levels "keine angabe",..: 8 4 8 8 5 5 6 6 6 4 ... $ vn42b : factor w/ 8 levels "keine angabe",..: 5 4 7 5 5 5 6 7 6 5 ....

php - form in symfony does not exist -

i'm testing simple page of contact symfony when want display contact.html.twig doesn't appear , have error form not exist there controller public function sendaction() { $contact = new contact(); $form = $this->createform(new contacttype(),$contact); $_request = $this->getrequest(); if($_request->ismethod('post')){ $form->bind($_request); if($form->isvalid()){ $contact = $form->getdata(); $em = $this->getdoctrine()->getmanager(); $em->persist($contact); $em.flush(); return $this->redirect($this->generateurl('front_office_send')); } } return $this->render('frontofficebundle:contact:contact.html.twig', array('form' => $form->createview())); } and page contact.html.twig: {% extends"frontofficebundle::layoutheader.html.twig" %} {% block container %} <form id="form" class=...

android - CustomListView OnItemClickListener not working -

i used local database fetch records , create custom list view using that. custom list view gets displayed perfectly. problem onitemclicklistener. doesn't on click. aim send position of clicked item activity. implemented it's not working. screenshot of list view - https://www.dropbox.com/s/pz83i162sxdv2b0/untitled.png?dl=0 here mainactivity.java : public class mainactivity extends actionbaractivity { listview lv; textview tv1,tv2,tv3; arraylist<string> a=new arraylist<string>(); string mydata,name,name1; public string[] s1 = new string[50]; public int[] img = {r.drawable.rty, r.drawable.sf, r.drawable.rty}; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); tv1=(textview)findviewbyid(r.id.textview); lv = (listview) findviewbyid(r.id.listview); new mydata().execute(); lv.setonitemclicklistener(new adapterview.onitemclicklistener() { @o...

javascript - how can append db values to a href (phonegap) -

this html page nextpage.html im lookig display db values category_id , category_name php controller in html page. clicking on category_name want go next html page , category_id passed page pls me.....pls </div> <div data-role="main" class="ui-content"> <form id="nextform" > <ul data-role="listview" data-inset="true" id="category"> <li> <a></a> </li> </ul> </form> </div> my js nextpage.js var base_url = "http://dev.edfutura.com/nithin/jps/edfuturamob/"; $(document).on("pageinit", "#catlist", function() { var submiturl = base_url + "categorylist/get_categorylist"; //$("#loading").css("display", "block"); $.ajax({ ...

css - Transition-delay not working in Chrome and Safari -

Image
edit i've got working now, i'm still not sure how did fixed it. if understands happening i'd love hear it. i'm making animated menu icon , it's working great...except middle bar's transition. it's supposed disappear using transition-delay after top , bottom bars come during first animation, , appear after top , bottom ones meet again second 1 (one third of way through in both instances). there no animation on middle bar, transition on background-color property. i've tried both shorthand transition , explicit transition-delay properties. both give exact same results. whole process works great in ie , firefox, fails in chrome , safari, makes me think it's possible webkit issue. i'm going post relevant code here (since there's 2 hundred lines whole thing). rest available @ codepen . if think should add more code let me know , add more. css: #menu label span.icon, #menu.lightbox label span.icon { height: 5em; widt...

oracle - ORA-00934: group function is not allowed here -

i have written stored procedure expecting add 2 count values collection, below code: procedure generate(code_in in varchar2 , value_1 out number , value_2 out number) begin select count(case when type = 'a' 1 else null end) value_1 , count(case when type in ('b','d') 1 else null end) value_2 table code = code_in; end generate; but when running code following error: ora-00934: group function not allowed here if remove second count stored procedure compiles fine, when add second line error. can explain why happening? please note experience oracle minimal. into single clause may receive multiple variables, not clause append each select item: procedure generate(code_in in varchar2 , value_1 out number , value_2 out number) begin select count(case when type = 'a' 1 else null end), count(case when type in ('b...

python - how to enable firefox addons in Ghost.py -

is possible run imacro firefox script inside ghost.py? want automate heavy ajax sites. i'm trying this: from ghost import ghost ghost = ghost(plugins_enabled=true,plugin_path=['c:\documents , settings\my\desktop\addons\addon-3863-latest.xpi'],) within ghost.py find code snippet: if plugin_path: p in plugin_path: ghost._app.addlibrarypath(p) from of things, it's expecting path ( addlibrarypath ) , discoveries itself. so, give path containing .xpi note : isn't tested. on windows 10, typed windows address bar: %appdata%\mozilla\firefox\profiles i saw folder named " kswjuot9.default " (it might named things on pc) , clicked it. finally, found folder named " extensions ". try give ghost.py full address of " extensions " folder. recommend use forward slashes e.g. c:/users/ichux/appdata/roaming/mozilla/firefox/profiles/kswjuot9.default/extensions i saw online link on dealing how extract .xpi f...

javascript - accordion toggle not change icon in bootstrap 3 -

i have code multiple/dynamic accordion toggle using bootstrap 3 , jquery: $('div.accordion-body').on('shown', function () { $(this).parent("div").find(".fa").removeclass("fa fa fa-plus").addclass("fa fa-minus"); }); $('div.accordion-body').on('hidden', function () { $(this).parent("div").find(".fa").removeclass("fa fa-minus").addclass("fa fa fa-plus"); }); but in bootstrap 3 change icon( fa-plus fa-minus ) not work. how fix ?! bootstrap 3 demo beacuse in bootstrap 3 events shown , hidden have been changed show.bs.collapse , hide.bs.collapse : $('div.accordion-body').on('show.bs.collapse', function () { $(this).parent("div").find(".fa").removeclass("fa fa fa-plus").addclass("fa fa-minus"); }); $('div.accordion-body').on('hide.bs.collapse', function () { $(thi...

excel vba - VBA code to select the first visible column in a dynamic range -

Image
i couldn't find exact answer query. need code access first unhidden column in range..the columns hidden or unhidden dynamically , each time code has select first column in unhidden range..any thoughts? my current attempt: private sub test1_click() application.enablecancelkey = xldisabled on error resume next dim answer string 'activesheet.unprotect "" dim rw range each rw in sheet1.range("$c$30:$e$39") if sheet1.range("b27").text <> "" or sheet1.range("b30:b39").text <> "" rw.formula = rw.offset(0, -1).value * sheet1.range("b27").value + rw.offset(0, -1).value else answer = msgbox("eh!!! there no data copy..please fill first column , try again", vbokonly, "alert") exit sub end if next rw 'activesheet.protect "" end sub given arbitrary rang...

ios - I need an API to plot waypoints and give me a route through them, and to give me city population. Which API should I use? -

i'm making ios app needs able find populated cities within radius point, , calculate route passes through number of cities, satisfy time constraint. i'm planning use google give me polylines can put directly on apple map in mapkit xcode. i've looked google maps sdk ios, , google places. google has directions api, , distance matrix api. many api's, i'm confused 1 should use, , what. additionally, google api's provide city population, or should find via database? you can use google maps url scheme directions google maps ios. if ever confused api use google maps, can use api picker . there no google api give city population, need find database.

Change canvas color onTouchEvent Android -

i'm trying make activity in canvas color changes when tap canvas. with code have, error: attempt invoke virtual method 'void android.graphics.canvas.drawrect(float, float, float, float, android.graphics.paint)' on null object reference this part of activity code. public class coloractivity extends activity { private float x = 0; private float y = 0; public canvas canvas; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_color); setcontentview(new myview(this)); } public class myview extends view { public myview(context context) { super(context); // todo auto-generated constructor stub setfocusableintouchmode(true); } @override protected void ondraw(canvas canvas) { super.ondraw(canvas); int x = getwidth(); int y = g...

asp.net mvc 5 - AuthenticationManager.GetExternalLoginInfoAsync() in Facebook -

i created default mvc5 project , add facebook api keys; startup.auth.cs using microsoft.owin.security.facebook; app.usefacebookauthentication( appid: "id-here", appsecret: "secret-id-here"); then set breakpoint @ externallogincallback method @ accountcontroller. [allowanonymous] public async task<actionresult> externallogincallback(string returnurl) { var logininfo = await authenticationmanager.getexternallogininfoasync(); if (logininfo == null) { return redirecttoaction("login"); } but, authenticationmanager.getexternallogininfoasync() returns username , email empty. how set owin include facebook email? my problem solve after install-package microsoft.owin.security.facebook -pre. so install package console manager install-package microsoft.owin.security.facebook -pre , facebook login info.

playframework - Play2 Framework - Scala - Silhouette check token manually -

i'm using play framework scala build restful api. implement authentication i'm using play-silhouette plugin, use of bearertokenauthenticator . works perfectly. the problem must implement service use websocket push real-time updates, can't manage setup user authentication method. silhouette provides support ( doc ), problem can't find way put token in header of websocket handshake requests. did lot of research, without result. i thought pass token in query string, instead of passing in request header. my question is, how can validate token manually silhouette? this not possible. i've created issue fix of request extractor . in meantime override retrieve method of bearertokenauthenticatorservice , use value query string instead of header.

python - Non-primary foreign keys in Django -

i have 2 tables legacy database want access django site. this: table id (int, primary key) name (string, unique) ... table b id (int, primary key) name record_date (name, record_date unique together) ... how tell django model table a has one-to-many relationship b on a.name=b.name ? regular foreignkey relationship require b use a.id instead of name , can't modify structure of existing legacy database. use to_field , db_column options. class b(models.model): name = models.foreignkeyfield(a, to_field="name", db_column="name") once have created foreign key, can access value , related instance follows: >>> b = b.objects.get(id=1) >>> b.name_id # value stored in 'name' database column >>> b.name # related 'a' instance

echo - Text in Batch file -

i need batch file make batch file , doing using @echo[ text >> e\1.bat instead output text , batch file empty here code: @echo off (@echo[ if "%!c!%" == "" (set c=) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == " " (set c= ) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0011." (set c=z) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0100." (set c=y) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0110." (set c=x) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "100." (set c=w) && @echo[ %c% >...

c# - Deleting the last Instantiated GameObject from a List and Scene -

so i'm missing that's pretty straightforward some, i'm having trouble it. i've created list (msgsymbols) gets populated new gameobject every time button gets pressed (it's custom keyboard) gets instantiated grid layout. but how delete last gameobject on list , update grid layout reflect change? (like hitting backspace button on keyboard)? delete key code have throwing error: argumentoutofrangeexception: argument out of range. parameter name: index how resolve this? public string prefabpath; list<gameobject> msgsymbols = new list<gameobject>(); vector3 symbolpos = new vector3(0, 0, 0); gameobject currentchar; gameobject msgpanel; vector3 symbolscale = new vector3(1.0f, 1.0f, 1.0f); gameobject[] charkeys; gameobject deletekey; private int index = 0; void start() { msgpanel = gameobject.findgameobjectwithtag("messagepanel"); charkeys = gameobject.findgameobjectswithtag("symbolkey"); deletekey = gameobject.findga...

reporting services - Nested Parent Grouping with RDLC -

Image
i'm trying add groupings tablix. able add parent grouping , add in new header , works fine table long i'm trying nest grouping value ontop of collection. current grouping settings before groupings date description jan description feb description jan description b feb description b with parent grouping client date description jan description feb description b jan description b feb description b what like date description client - jan description feb description client - b jan description b feb description b i wondering rdlc support type of grouping, if may ask how that? you have modify default layout of tablix achieve want. dataset different yours in i'm showing value instead of description technique same. select tablix , @ bottom of design window in visual studio find "row groups" box. select drop-down arrow on details group , add pare...

visual studio 2013 - Is enabling Hyper-V is requisite to run the emulator for Windows Phone 8? -

is not possible run emulator windows phone 8 installing windows phone sdk 8.0 visual studio 2013 without enabling hyper-v emulator? no. yes hyper-v required, reason needed buy new laptop. uses virtual machine system / setup run vm phone. in fact, cannot start ms virtual machine manager on pc without hyper-v see: https://msdn.microsoft.com/en-us/library/windows/apps/ff626524(v=vs.105).aspx system requirements •in bios, following features must supported: ◦hardware-assisted virtualization. hyper-v requirements •in bios, following features must enabled: ◦hardware-assisted virtualization. ◦second level address translation (slat). ◦hardware-based data execution prevention (dep). •in windows, hyper-v must enabled , running. •you have member of local hyper-v administrators group.

Create Array From Current Array using PHP -

this result of array after build using array_push function mssql result. array ( [0] => array ( [sticker] => falcon [month] => 1 [jum] => 65826210.00 ) [1] => array ( [sticker] => falcon [month] => 2 [jum] => 68070573.00 ) [2] => array ( [sticker] => falcon [month] => 3 [jum] => 99053067.60 ) [3] => [4] => array ( [sticker] => hrd [month] => 2 [jum] => 1521400.00 ) [5] => array ( [sticker] => hrd [month] => 3 [jum] => 2093200.00 ) ) i need convert array above structure: array ( [0] => array ( [0] => [1] => 1 [2] => 2 [3] => 3 ) [1] => array ...

Calling a specific C++ method from Objective C with no object -

i need calculate moon phase calling method truephase. problem work in objective c , need call method c++ source don't understand much. tell me how call c++ truephase method objective c? moon.h #if _msc_ver > 1000 #pragma once #endif #ifndef __aamoonphases_h__ #define __aamoonphases_h__ #ifndef aaplus_ext_class #define aaplus_ext_class #endif class aaplus_ext_class caamoonphases { public: //static methods static double k(double year); static double meanphase(double k); static double truephase(double k); }; #endif //__aamoonphases_h__ moon.cpp (moon.mm) #include "stdafx.h" #include "aamoonphases.h" #include "aacoordinatetransformation.h" #include <cmath> #include <cassert> using namespace std; double caamoonphases::k(double year) { return 12.3685*(year - 2000); } double caamoonphases::meanphase(double k) { //convert k t double t = k/1236.85; double t2 = t*t; double t3 = t2*t; double t4 = t3*t; return ...

get application version in windows application c# -

i use code application version private string currentversion { { return applicationdeployment.isnetworkdeployed ? applicationdeployment.currentdeployment.currentversion.tostring() : assembly.getexecutingassembly().getname().version.tostring(); } } but in debug mode , when publish , install application 1.0.0.0. how can fix problem? in line of code trying obtain assembly version. return assembly.getexecutingassembly().getname().version.tostring(); you need set assembly version in properties -> application -> assembly information .

vba - Generate Excel file to .txt file and do some looping -

i want generate excel file .txt file , looping. example this: in excel: a | b | c | d --+---+---+--- 1 | 5 | 9 | 1 | h | u | will generate .txt this: "a", "1" "b", "5" "c", "9" "d", "1" "a", "a" "b", "h" "c", "u" "d", "i" edited: coding private sub commandbutton1_click() dim sfirst string dim ssecond string dim sthird string dim sfourth string dim sfname string dim intfnumber integer dim lheader long dim llastrow long sheet1.activate range("a1").select sheet1 llastrow = .cells(.rows.count, "a").end(xlup).row end sfname = thisworkbook.path & "\date" & format(now(), "yyyymmddhhmmss") & ".xls" 'get unused file number intfnumber = freefile 'create new file (or overwrite existing one) open sfname output #intfnumber lheader = 1 llastrow ...

ios - TTTAttributedLabel links are being styled but not clickable -

i've been looking solution getting clickable links working. can working when using uitextview + nsattributedstring doesn't autolayout when it's uitableviewcell. now i've added tttattributedlabel project , styles views perfectly. links turn blue , underlined. however clicking them nothing. did implement tttattributedlabeldelegate on controller, made label in storyboard implement mylabel (which extends tttattributedlabel , has delegate options since want them fire inside same function). i've set controller delegate thinking might not work pointing itself. but none of these functions fired, got breakpoints , logs in it. i implemented didselectlinkwithurl , didlongpresslinkwithurl. func attributedlabel(label: tttattributedlabel!, didselectlinkwithurl url: nsurl!) { debug.log("link clicked") } func attributedlabel(label: tttattributedlabel!, didlongpresslinkwithurl url: nsurl!, atpoint point: cgpoint) { debug.log("lin...

eclipse - I get errors when typing the @SidedProxy. What happened? -

i making minecraft mod eclipse mars , got errors when typing following: @sidedproxy(clientside = reference.client_proxy_class, serverside = reference.server_proxy_class) what did wrong? said "the attribute clientside/serverside undefined annotation type sidedproxy" . i cannot run minecraft test mod without it, need fix error. for definitive answer need give more information. version of minecraft forge using? have correctly imported sidedproxy? in eclipse, hold ctrl , click on @sidedproxy open declared, , check using correct attribute names (it may have changed between versions, may need put different)

REST Hateoas, managing CRUD on a ressource -

context i m developping simple application in need use rest level 3 hateoas. i m having 2 entities : user billing i need, when add billing, reference user inside of it. questions what informations should send backend, frontend app, add hateoas reference, inside billing ressource, concerning user ? i mean, inside body of request, should send url of user ressource ? or should send id of user, , making url discovering real user url ?

ios - Calling custom delegate from AppDelegate in Swift -

i have delegate in appdelegate.swift fires once app opens app url scheme. appdelegate.swift func application(application: uiapplication, openurl url: nsurl, sourceapplication: string?, annotation: anyobject) -> bool { return true } it fires fine when app opens app url scheme, when function fires, want notify viewcontroller. thought custom made delegate, , let appdelegate notify ever implements delegate has opened app. mydelegate.swift protocol mydelegate { func opened(hasbeenopened: bool!) } then viewcontroller implements delegate loginviewcontroller.swift import uikit /* class has more code , other functions, illustration of problem, removed other unrelated things.*/ class loginviewcontroller: uiviewcontroller, mydelegate { func opened(hasbeenopened: bool!) { print(hasbeenopened) } } so far good, let's return openurl() function in appdelegate.swift , try call mydelegate.opened(). lost. appdelegate.swift func application...

c# - Foreach loop show value's only once if repeated -

i have foreach loop in values repeated , group value's , out put values once. code looks this foreach (loopitem in getloop("product.prices")){ var pricequantity = ""; if(i.getinteger("ecom:product.prices.quantity") == 0){ pricequantity = "1"; } else if(i.getinteger("ecom:product.prices.quantity") >= 1){ pricequantity = i.getstring("ecom:product.prices.quantity"); } <!--@translate(ved, "ved")--> @pricequantity <!--@translate(count, "stk")-->. - <!--@translate(count, "stk")-->. <!--@translate(price, "pris")-->. @i.getvalue("ecom:product.prices.amountformatted")<br/> } which gives following out put 1 stk, 1 stk, 1 stk, 12 stk, 8 stk, 8 stk, 1 stk i output 1 stk, 12 stk, 8 stk how can achieve output please help var result = getloop("product.pric...