Posts

Showing posts from March, 2012

caching - Why is the result cache always disabled in Oracle 11g -

i'm trying enable result cache in oracle 11g. have used enterprise manager change result_cache_max_size , result_cache_max_result values '1m' , '100' respectively (maybe these aren't optimal settings, i'm trying work!). after make these changes use following query see if changes have been made: select * v$parameter lower("name") '%result_cache%'; i can see both have been set correctly. however, when run queries result_cache hint, can see autotrace cache isn't being used. if run following query: select dbms_result_cache.status() dual; i can see it's status 'disabled'. restarting database makes result_cache_max_size parameter go 0 (disabled). how can enable result cache? as can see comments, it's because result cache enterprise edition feature , have standard edition.

objective c - Stream audio from Microphone in IOS -

i trying audio microphone , stream across data through socket node server. since haven't done before, confused on how properly. first of all, how stream data specific microphone? need audio streamed, not recorded sent. in other words, needs call, word automatically sent to recipient rather recorded, sent sort of recording. second of all, how specify audio comes in? have seen questions couldn't find solution how this, case, audio input lightening audio. i couldn't find example of how using avaudiosession. there resources (examples, tutorials) can use me? thanks!

javascript - Changing views in Vue -

i have 2 views (newuser-view , next-view) in main vue app. default newuser-view instantiated in main html page. i want change currentview next-view when user hits submit button in newuser-view. main vue app is: var vue = require('vue'); vue.use(require('vue-resource')); vue.http.headers.common['x-csrf-token'] = document.queryselector('#token').getattribute('value'); new vue({ el: '#seoinput', data: { currentview: 'newuser-view', zipdata2: {}, newuser: {}, }, components: { 'newuser-view': require('./views/inputdata'), 'next-view': require('./views/displaydata') }, methods: { refreshpage: function(zipdata1) { this.zipdata2 = zipdata1; if (zipdata1) { this.currentview = 'next-view'; } // change currentview value next-view // hit ro

javascript - How Different is an IDE like DreamWeaver and a CMS like Drupal when Developing a Website -

can explain difference between cms drupal , ide dreamweaver when developing website.when use them develop websites. a cms (content management system) pre-built framework makes process of creating webpages easier , focuses on allowing user edit content post-production. works blogs allows people barely technical knowledge write , manage blogs ease. an ide - integrated development environment mean dreamweaver, xcode (for ios app development) , eclipse(for android app development). includes text editor, built in automation tools , debugger. ide can refer simple text editors such sublime text or webstorm. so in conclusion use ide tool enables 1 build websites cms provides framework simplify build process , allow easier content management after website built.

ios - Relation between UICollectionView and layout object -

i new in ios , trying understand concept of uicollectionview. reading articles. article talk layout object. not understand relation between uicollectionview , layout object. please, can me understand concept. thanks. uicollectionviewlayout the uicollectionviewlayout class abstract base class subclass , use generate layout information collection view. job of layout object determine placement of cells, supplementary views, , decoration views inside collection view’s bounds , report information collection view when asked. collection view applies provided layout information corresponding views can presented onscreen. this base class uicollectionviewflowlayout , uicollectionviewtransitionlayout . when initializing uicollectionview have specify layout want use of 2 mentioned above. if want normal flow layout instagram or uitableview , choose uicollectionviewflowlayout . if want have specialized behavior layout create interactive transitions, gesture reco

php - how i get the information -

i have script , need result: numelem / title / elmposte foreach ( $jobprintinginfos $jobprinting_index => $jobprinting ) { $machine = $jobprinting ['elmposte']; //var_dump($machine); // var_dump($machine); } foreach ( $getjobresult->components->component $component_index => $component ) { $quote_support =''; $quote_impression = ''; $quote_title = ($component->numelem) . ' / ' . $component->title . ' ' .$machine. "\r\n"; var_dump($quote_title); } but when var_dump($quote_title) have last machine not machine :such 1/dessus /nesspresso 2/inter/nesspresso 3/assem/nesspresso thanks in advance i dont know idea behind script... if want $quote_title <-- 1 long string need add . like this: $quote_title .

ibm mq - WebSphere 8.5.6: MDB XAException method xa_start errorcode -7 -

we have upgraded 5 8.5.5.6. still using our ear application no problem, thing have changed jdbc provider, use microsoft sql server jdbc driver (xa). this ear, contains mdb used in message listener service mq 5 hosted in server. we put one, 2 , 4 hundred messages , received ok in , works fine. one day after, put same messages , error. message listener service in started state. here full message. we enable mq trace on , this error files. if restart message listener service messages consumed. any information can provide me appreciated. i had similar error xaer_rmfail in case problem communication between 2 ejbs each 1 on different was. solution set trusted realms between both servers (from server1 server2 , server2 server1). to find out problem recommend enabling mq trace on ( enabling java message service (jms) trace websphere application server ). check ffdc logs.

Stream webm to node.js from c# application in chunks -

Image
i in process of learning streaming between node.js socket.io , c#. i have code records screen ffmpeg, redirects standardoutput.basestream , stores memorybuffer, when click stop in application sends memorystream byte array node.js server storing file clients can play it. working fine , here setup that: c# bool ffworkerisworking = false; private void btnffmpeg_click(object sender, routedeventargs e) { backgroundworker ffworker = new backgroundworker(); ffworker.workersupportscancellation = true; ffworker.dowork += ((ffworkerobj,ffworkereventargs) => { ffworkerisworking = true; using (var ffprocess = new process()) { var processstartinfo = new processstartinfo { filename = "ffmpeg.exe", redirectstandardinput = true, redirectstandardoutput = true, useshellexecute = false, createnowindow = false, arguments = &q

java - How to set true or false if there is no record in table using hibernate -

i using spring rest hibernate , fetching particular record database table passing id method. method working if there no record in table want false in variable , if record exist want true in variable in json object. here entity class subscribe.java @entity @table(name="subscribe") @jsonignoreproperties({"hibernatelazyinitializer", "handler"}) public class subscribe implements serializable { private static final long serialversionuid = 1l; @id @generatedvalue @column(name="id") private long id; @column(name="subscribed_id") private string subid; @column(name="subscriber_id") private long subrid; public long getsubrid() { return subrid; } public void setsubrid(long subrid) { this.subrid = subrid; } public string getsubid() { return subid; } public void setsubid(string subid) { this.subid = subid; } public long getid() { return id; } public void setid(long id) { this.id = id; } } h

sql - Global revision without locking -

given set of rules, possible implement in sql? two transactions don't modify same rows should able run concurrently. no locks should occur (or @ least use should minimized as possible). transactions can read committed data. a revision defined integer value in system. a new transaction must able increment , query new revision. revision applied every rows transaction modifies. no 2 transactions can share same revision. a transaction x committed before transaction y must have revision lower 1 assigned transaction y. i want use integer revision in order optimize how query changes since specific revision. this: select * [dummytable] [dummytable].[revision] > clientrevision my current solution uses sql table [globalrevision] single row [lastrevision] keep latest revision. transactions' isolation level set snapshot. the problem solution [globalrevision] table single row [lastrevision] becomes point of contention. because must increment revision @ start of trans

java - Codility MissingInteger task, one case timeout -

the task found first positive integer not present in given array. i found correct solution, don't understand why solution has time "large" input , bad "medium". here solution: import java.util.arrays; import java.util.stream.*; class solution { public int solution(int[] a) { int[] = intstream.of(a).distinct().filter( s -> s > 0 ).toarray(); arrays.sort(a); int next = 1; (int = 0; < a.length; i++ ) { if( a[i] == next ) next++; else if ( a[i] > next) break; } return next; } } and link result: https://codility.com/demo/results/demo8f8ddw-9bk/ the problem specification says expected worst-case time complexity o(n), can't sort data. sorting o(n log n). if sorting solution got accepted anyway, apparently test isn't strict enough, or biggest test case isn't constructed properly. fortunate

powershell - Best practice for emailing a body of appended strings? -

i have powershell script automates process , emails report of happened. send-mailmessage -to $toaddress -from "no-reply@domain.org" -subject "automation status" -body $bodystr -smtpserver server1 -ea stop so $bodystr appended string throughout script report happened , has multiple lines. things like: $bodystr = $bodystr + "line found: 305`n" $bodystr = $bodystr + "moving line 305 574`n" the send-mailmessage command @ bottom of script outside function. other code in various different functions. the issue $bodystr not seem accessible inside functions, , email lacking lot of information. i believe use set-variable or passing arguments, there many arguments seems farther away best practice add new argument each function keep string updated. what's best practice handle this? as general rule, don't write data variables outside scope of function. if compiling email gathering data multiple sources, abstract away i

How to unlock the branch in clearcase -

there 1 branch , locked other user. need unlock branch doing check-in , check-out. i tried ui not allowing. option have unlock branch? i having administrative rights still getting error: unable unlock 'brtype:-----@\----- no permission perform operation "unlock" must 1 of "object owner, vob owner, member of cc group". unable unlock branch type : "-------" the normal command cleartool unlock : cleartool unlock brtype:abranch@\avob that using branch-type-selector (brtype:type-name[@vob-selector]). can check if locked a: cleartool lslock brtype:abranch@\avob however, mention (in cleartool lock ): restriction locking/unlocking branch: unix: branch creator, element owner, vob owner, root branch creator, element owner, vob owner, member of clearcase administrators group if owner of branch cannot unlock it, need ask clearcase admin.

wordpress - Display all post image gallery using the shortcode [gallery] -

i want display images post gallery "gallery". : <?php echo do_shortcode('[gallery]'); ?> after search, learned needed use "preg_match" function ids of images gallery. : $post_content = $post->post_content; preg_match('/\[gallery.*ids=.(.*).\]/', $post_content, $ids); $array_id = explode(",", $ids[1]); but don't know how use ... i'm newbie , it's quite difficult me use that. should put code in functions file ? if yes how can please ? the aim it's put final code : <?php echo do_shortcode( '[gallery ids="$array_id"]' ); ?> thank , sorry english !!! i found solution, share you. maybe interested that. i modified following code : $post_content = $post->post_content; preg_match('/\[gallery.*ids=.(.*).\]/', $post_content, $ids); $array_id = explode(",", $ids[1]); into : <?php global $post; $post_content = $post->post_content; preg_mat

javascript - Angularjs Dropdown OnChange Selected Text and Value -

i new angularjs , trying selected text , value dropdown . followed lot of tutorials still unable there. selectedvalue , selectedtext undefined . below code: html: <div ng-app="selectapp"> <div ng-controller="selectcontroller"> <select name="category-group" id="categorygroup" class="form-control" ng-model="itemselected" ng-change="oncategorychange(itemselected)"> <option value="0">select category...</option> <option ng-repeat="category in categories" value="{{category.id}}" ng-disabled="category.disabled" ng-class="{'maincategory' : category.disabled}"> {{category.name}} </option> </select> </div> js: 'use strict'; var app = angular.module('selectapp', [ ]); app.controller('selectcontroller', ['$scope'

regex - Is there a way to temporarily change an int to a string in mongodb db.find? -

in collection have there field may numbers or strings depending on trying categorize. each number measurement plus id measurement 400 id .01 put in 400.01. not have ability change database @ need change these doubles string can perform regex search on them. for example asked find ids 400 measurements. need collect numbers 400.01, 400.05, etc. so far have db.collection.find{field:{$regex:/^400/m}} which works not doubles , tried: db.collection.find{{$set:{dx:dx.tostring()}:{$regex:/^400/m}} but doesn't work. example: {"date":99-99-9999,"dx":400.1} {"date":99-99-9999,"dx":"400.056"} {"date":00-00-0000,"dx":"5n.05"} {"date":11-11-1111,"dx":400.03}

Creating an array of structs with macro in Systemverilog -

i've created module (example) 2 in , 2 out-puts. definition of every in , output delcared through macro. is possible create bit more elegant (later usability)? array of inputs , outputs (name(i), in(i), out(i))? it helpful, because later using more out , inputs , there possbility using later loops access in/outputs more elegant. top: `include "macro.sv" module top (in_0, in_1, out_0, out_1); `struct_i(in_0_temp, 10); `struct_i(in_1_temp, 22); `struct_i(out_0_temp, 55); `struct_i(out_1_temp, 99); input `struct(in_0_temp) in_0; input `struct(in_1_temp) in_1; output `struct(out_0_temp) out_0; output `struct(out_1_temp) out_1; ... endmodule macro.sv : `define struct(name) \ struct_i_``name`` `define struct_i(name, data) \ typedef struct packed { \ logic [data:0] info; \ logic test1; \ logic test2; \ } `struct(name) there n

amazon web services - Finding a TURN server VM image -

a webrtc google developer says: but thing recommend long name product: rfc5766-turn-server has amazon vm images can take, download , deploy cloud , you've got turn server provisioned users right there here tutorial makes statement. but unable find downloadable amazon vm image of rfc5766-turn-server , questions in google discussion groups did not answers. so if 1 knows download these amazon vm images, please give me link. as far can tell rfc-5766 project has moved couple of times . , developed here: https://github.com/coturn/coturn on downloads page under versions you'll find these instructions : current amazon turn server public ami: ami-65252855. image available in west (oregon) region: search "coturn" string or ami name. below readme.txt file included ami's ec2-user home directory, information.

ruby on rails - How to implement bootstrap datepicker with text_field? -

i want use bootstrap datepicker text_field inside form_for. how should rewrite <%= f.text_field :some_date %> line store selected date in some_date field? date time picker support input type direct integration. rails text_field create text area . can't directly. you can either integrate datetimepicker onclick or mousedown event. can div/span . if want need override datetimepicker code check supported html elements. code below should change : link here attachdatepickerelementevents = function () { input.on({ 'change': change, 'blur': options.debug ? '' : hide, 'keydown': keydown, 'keyup': keyup, 'focus': options.allowinputtoggle ? show : '' }); if (element.is('input')) { input.on({ 'focus': show }); } else if (component) { component.on('click', toggle); component.on('

twitter - Best Features for Term Level Clustering -

at moment, working on project related mining twitter data. aim of project find themes can used represent set of tweets. finding themes, came idea term level clustering. terms important concepts extracted using textmining tools. well, main question is, best features define term similarity? in project, due insufficient amount of data, doing unsupervised learning, clustering using k-means algorithm. have extracted features. understand, 1 way know semantic (not actually) meaning of term seeing context of term mentioned. therefore, have @ moment preceding , following word , pos of term. instance: i drink cup of xyz had spoon of abc yesterday. by seeing preceding word , pos - cup/nn , of/in xyz , spoon/nn , of/in abc - knew xyz , abc might liquid material or component. well, sounds naive, in fact, don't clusters. in addition previous features, have named entity types considered features. instance, entity type person, location, problem (in medical), medterm etc. so, common featu

c# - System.Linq.Dynamic.DynamicExpression parsing expressions with methods -

i need build system have number of expressions stored in file. these expressions read program, compiled linq expressions , evaluated functions on number of objects. however, these expressions contain references functions in code (i.e. not made of basic c# operators). i'm trying use dynamicexpression system.linq.dynamic , works, except functions code not recognized. basically, when have code below: public class geoobj { public int layer; public polygon poly; } class program { public static bool complicatedmethod(geoobj x, geoobj y) { bool result = // quite complicated computation on x , y, polygon intersection test return result; } static void main(string[] args) { geoobj o1 = new geoobj(); // here set o1 fields geoobj o2 = new geoobj(); // here set o2 fields string sexpr = @"(x.layer == y.layer) && (complicatedmethod(x,y))"; var xparam = expression.parameter(typeof(geoobj), &qu

Android xml button has a fine border to it -

first time having go @ android app. i added button interface using xml . set stlye standard widget.button . the xml button : <button android:id="@+id/button" android:layout_width="200dp" android:layout_height="wrap_content" style="@android:style/widget.button" android:text="help me !" android:layout_gravity="center" /> i can't post picture because of low reputation.* how can remove small lines surrounding button? the selected theme material black if helps . make own xml style file , place in drawable folder below...(for example style1.xml) <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#31b6e7" /> <stroke android:width="1.5dp" //this change surro

r - readr multiple columns' type at once -

i try handle readr function. mean, example readr github webpage: read_csv("iris.csv", col_types = list( sepal.length = col_double(), sepal.width = col_double(), petal.length = col_double(), petal.width = col_double(), species = col_factor(c("setosa", "versicolor", "virginica")) )) is there chance use within read_csv function can determine col_double several columns @ once e.g. grepl("length|witdh",col_names) = col_double() ? thanks,

partials - Is it bad practice to put elements below the </body></html> tags? -

sure following looks stupid: <!--partialpage.html--> <html> <head>a css file linked here...</head> <body> first piece of content </body> </html> blah after html ...and fixed moving blah after html body. turns out browser you, , appends end of body. (not reason stupid thing) i did find reason why want simplify partial layouts in template engines. <!--page1.html--> {{> partialpage}} <!--this partial/include--> content later teleported body. <!--page2.html--> {{> partialpage}} <!--this partial/include--> page using layout this of course simpler doing of following: //sendpartials.js { partialone: 'content later teleported body', partialtwo: 'another page using layout' } <!--page1.html--> <html> <head>a css file linked here...</head> <body> first piece of content

swift - Accessing properties of multiple SKShapeNodes -

in program have method called addobstacle, creates rectangular skshapenode skphysicsbody, , leftward velocity. func addobstacle(bottom: cgfloat, top: cgfloat, width: cgfloat){ let obstaclerect = cgrectmake(self.size.width + 100, bottom, width, (top - bottom)) let obstacle = skshapenode(rect: obstaclerect) obstacle.name = "obstaclenode" obstacle.fillcolor = uicolor.graycolor() obstacle.physicsbody = skphysicsbody(edgeloopfrompath: obstacle.path!) obstacle.physicsbody?.dynamic = false obstacle.physicsbody?.affectedbygravity = false obstacle.physicsbody?.contacttestbitmask = physicscatagory.ball obstacle.physicsbody?.categorybitmask = physicscatagory.obstacle obstacle.physicsbody?.usesprecisecollisiondetection = true self.addchild(obstacle) obstacle.runaction(skaction.moveby(obstaclevector, duration: obstaclespeed)) } in separate method, called endgame, want fade out obstacles in existence on screen. obstacle objects pri

jquery - Android web browser not writing cookie in desktop view -

okay, using cookie generate mobile content on different device widths. site looks 1 way on desktop , reveals post content on mobile under 800px. everything working except 1 little issue. when switch desktop view in mobile browser, seems happening in ios safari , android htc internet, cookie not being applied content isnt being generated. ive tried numerous searches , suggestions across web , havent found anything. amazing. script in header: <script type="text/javascript">var mql = window.matchmedia("screen , (max-width: 800px)") if (mql.matches){ var setcookie = function setcookie(name) { document.cookie = 'distancemobile=1; expires=0; path=/'; } setcookie('distancemobile');} else{ // else }</script> <script type="text/javascript"> var mql = window.matchmedia("screen , (min-width: 801px)") if (mql.matches){ var delete_cookie = function delete_cookie(name) { document.cookie = name +'=; path=/;

c# - WPF: Validate TextBox content immediately -

this question has answer here: enforce validation on texbox when text changes in wpf 1 answer is there way in wpf/xaml indicate validation should performed (after each character entered in textbox ) instead of when focus lost? you should detect event "keyup" or "keydown" , check if input correct. private void textbox_keyup(object sender, keyroutedeventargs e) { if (e.key == yourkey) { //do } }

Android- Terminal Window in Eclipse -

how can open terminal window in eclipse android? there plugin need install. android beginner. i'm not sure trying terminal. if want push commands android. can use terminal/command prompt , navigate adb.exe , push commands through that. like adb install *.apk and if you're talking logcat in eclipse, debug error messages. go top, under windows -> show view -> logcat , show system outputs , error messages.

java - How to show two PDFTables next to each other in iText -

i need in showing 2 pdftables next each other in itext. first table above second table need keep them next each other short space. here code: //first table dfptable table = new pdfptable(2); font earningstitlefont = new font(font.times_roman,12, font.bold); pdfpcell c1 = new pdfpcell(new phrase("earnings description",earningstitlefont)); table.addcell(c1); c1 = new pdfpcell(new phrase("earnings amount",earningstitlefont)); table.addcell(c1); (int = 0; < listearnings.size(); i++) { string temp1 = listearnings.get(i).getearningsdescriptionss(); string temp2 = listearnings.get(i).getearningsamountss(); table.addcell(temp1); table.addcell(temp2); } //second table dfptable tabledeductions = new pdfptable(2); font fonttitledeductions = new font(font.times_roman,12, font.bold); pdfpcell c2= new pdfpcell(new phrase("deductions description",fonttitledeductions )); tabledeductions.addcell(c2); c2 = new pdfpcell(new phrase("deduction

html - CSS/jQuery image grid layout -

i have read many threads image grid layouts using jquery or sole css, mine little bit different have read using columns differing widths. i purposely not pasting code @ point due fact have tried various different methods code seems no longer 'nice'. as can see page: http://tinyurl.com/poxn4un - trying acheive images (in our work section) laid out how bottom 2 slotting nicely between 2 edge images. i have tried masonry no success , tried flexbox in use @ point. appreciated wish learn other projects. thanks, adrian you use flex-box combination layout this. here's example: jsfiddle example and here's css , html powering it: * { box-sizing: border-box; } .bricks { display: flex; height: 450px; flex-direction: row; } .bricks > * { border: solid 1px #222; } .sidebar { flex: 0 0 220px; background-image: url(https://placehold.it/220x450/075883); } .center-contain { flex: 0 0 402px; font-s

c# 4.0 - Why am I unable to list all my accounts with this code? -

Image
this first foray google analytics. created service account , downloaded p12 file developer console. code works, in incomplete way. i have 2 accounts, code below returns 1 account list. how accounts listed? private static serviceaccountcredential run2() { const string keyfilepath = "file.p12"; const string serviceaccountmail = "notarealemailaddress@developer.gserviceaccount.com"; var certificate = new x509certificate2(keyfilepath, "notasecret", x509keystorageflags.exportable); var credential = new serviceaccountcredential(new serviceaccountcredential.initializer(serviceaccountmail) { scopes = new[] { analyticsservice.scope.analytics, analyticsservice.scope.analyticsreadonly, analyticsservice.scope.analyticsprovision } }.fromcertificate(certificate)); return credential; } static void main() { var cr = run2(); var service = new analyticsservice(new bas

android - custom SimpleCursorAdapter and BindView (buttons are randomly Invisible) -

i made custom simplecursoradapter can click on button inside listview (the button needs call someone) when there no phone number want button invisible, @ first code show correctly when scroll , down few times buttons randomly become invisible. edited: when of them visible it's fine when 1 (button inside item on listview) become invisible starts randomly become invisible. my code: public mycursoradapter(context context, int layout, cursor c, string[] from, int[] to, double lat, double lon) { super(context, layout, c, from, to); latc = lat; lonc = lon; } public mycursoradapter(context context, int layout, cursor c, string[] from, int[] to) { super(context, layout, c, from, to); } @override public view newview(context context, cursor cursor, viewgroup parent) { layoutinflater inflater = (layoutinflater) context.getsystemservice(context.layout_inflater_service); view view = inflater.inflate(r.layout.list_view_place_list, parent, false);

Set layout below navigationBar in coordinatorLayout android -

the question simple: how set (any) layout bellow navigation bar in coordinatorlayout? if use framelayout in relativelayout, relativelayout height fill whole screen include navigationbar. here code: <relativelayout android:id="@+id/drawer_container" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="false" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <framelayout android:id="@+id/framelayout" android:layout_width="match_parent" android:layout_height="match_parent" /> </relativelayout> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent&

trying to create a deep array in python, able to get the output below line is executed in shell, but not when I run from the Program -

my code: output =[] [[[output.append("") counter1 in range(0,len(total_columns)+16,1)]for counter2 in range(0,deprication_range,1)]for counter3 in range(0,len(total_data),1)] total_columns , total_data arrays have lengths 21 , 2 respectively , deprication_range integer 7 please let me know if making kind of silly mistake. beats me..i suppose doing fundamentally incorrect not able identify.. thanks in advance. cheers, ajay you wouldn't append output inside of list comprehension. can change output.append("") "" , run output = [[["" counter1 in range(0,len(total_columns)+16,1)]for counter2 in range(0,deprication_range,1)]for counter3 in range(0,len(total_data),1)]

javascript - Three.js imported obj incorrect shadow rendering -

i imported object blender, set every mesh of cast , receive shadows, shadows rendered incorrect. merged meshes of object thinking resolve problem, result same. problem seems resolved when using side: three.doubleside, makes materials darken. light settings light = new three.directionallight( 0x666666, 1 ); light.position.set( 2*400, 2*300.75, 2*400); light.position.multiplyscalar( 1.3 ); light.castshadow=true; light.shadowmapwidth = 2048; light.shadowmapheight =2048; var d = 1300; light.shadowcameraleft = -d; light.shadowcameraright = d; light.shadowcameratop = d; light.shadowcamerabottom = -d; light.shadowcamerafar = 10000; light.shadowbias = 0.0001; light.shadowdarkness = 0.5; material settings var childtilestexture = three.imageutils.loadtexture('texture/wood_t.jpg?v1'); childtilestexture.wraps = childtilestexture.wrapt = three.repeatwrapping; child.material = new three.meshphongmaterial( { map:childtilestexture, shininess:5, metal: false} ); screenshots ht

vba - Store MonthName() function in a string variable -

first question here go easy on me! i new visual basic (but not programming) , having trouble on project working on local organization. i have button runs query contains single "select ... ... " statement. statement looks every record field recievedboxtoday equal "yes" . here code working fine: select * rename_this_table [database zero] (([database zero].recievedboxtoday)=yes); now here problem (besides fact received spelled wrong): code ran every month, table ( rename_this_table ) over-written every time button clicked. have permanent data every month solution rename rename_this_table table monthname_year monthname name of month (january or december) , year current year (2015). thought go doing monthname() function, works fine, want able store month name string concatenated year (also string). afterwords string replace rename_this_table . my code doesn't seem work is: dim month string dim year string monthname(month(date()), fals

python - Numpy array, specifiyng what elements to return -

say have following 5x5 numpy array called a array([[6, 7, 7, 7, 8], [4, 2, 5, 5, 9], [1, 2, 4, 7, 4], [0, 7, 3, 6, 8], [4, 9, 6, 1, 6]]) and 5x5 array called f array([[1,0,0,0,0], [1,0,0,0,0], [1,0,0,0,0], [1,0,0,0,0], [0,0,0,0,0]]) i've been trying use np.copyto, can't wrap head around why not working/how works. valueerror: not broadcast input array shape (5,5) shape (2) is there easy way values of matching integers have corresponding 1 in f when laid on a? e.i return, 6,4,1,0 you can little trick: a[f==1] in [8]: a[f==1] out[8]: array([6, 4, 1, 0]) check out boolean indexing

php - Magento: Disabled admin configuration option -

i have created admin configuration option through system.xml. but, should disabled , cannot editable admin users. how possible? to show field disabled, try this: https://magento.stackexchange.com/questions/10460/showing-system-configuration-form-field-as-disabled if don't want show field @ all, use acl or configure in system.xml: 0 0 0

Google Analytics; creating a segment using multiple ids -

i google analytics on small set of pages, of thousands of pages, tracked google analytics. each of these page has unique id , hoping use these identify subset of pages. following examples of such ids. uda502aaf-3a8f-4aa5-9f49-00d2ac4c6545 ud5655462-c5f5-46c4-b807-d1a8527786d7 uceb1a469-0af9-499f-9608-42242a9f0c63 uc4b4d9e3-a558-4282-a009-e984e81364eb ubaf6e057-4cad-4b9b-a625-7b2ea11fa8c5 ub1c4cb68-bc41-476b-9e31-9b9800113236 uadb6c44d-792b-48ca-969d-ff1b638dd223 uaa17490f-11ff-4947-9841-9f744963fbc2 u9a60d135-64f7-4890-963f-8093b8cf1eaa i tried create filter on pages, using "contains", ids separated | shown below a) uf07f4d74-2239-4b4b-851f-d40e51ad5f9a | 125bd8a07b4c32917dae805c23ead087 | c65da9b1fcb588e64cb126fda78afee9 and b) (uf07f4d74-2239-4b4b-851f-d40e51ad5f9a) | (125bd8a07b4c32917dae805c23ead087) | (c65da9b1fcb588e64cb126fda78afee9) and "0". know users have visited these pages. how can create correct filter such ids? thx in advance

Get the distinct rows in an Excel table based on the latest modifiedDate -

following table have in excel. contains duplicate entries of tickets. need convert excel table table having unique rows having latest modified_date tket status modified_date ---- ------ ------------- 5184 active 20-07-2015 5184 active 22-07-2015 5184 closed 25-07-2015 5292 active 22-07-2015 5292 closed 23-07-2015 5480 active 23-07-2015 5480 closed 24-07-2015 do need write macro code achieve same or there other alternate in ms excel. using office 2013. it 2 simple step solution. (tried use concept of sql group-by clause) step 1: sort entire range on ticket id asc modified date desc then in new column besides modifieddate use below formula =if(a2 = a1,"","1") ticket status modified uniquerows 5184 closed 25-07-2015 1 5184 active 20-07-2015 5184 active 20-07-2015 5292 closed 23-07-2015 1 5292 active 22-07-2015 5480 closed 24-07-2015 1 5480 active 23-07-2015 my table starts @ a1 cell. since, after sor

php - Strange form reaction when file uploaded -

i have simple form : <form action="http://localhost/api2/users/teachers/imageupload" method="post" enctype="multipart/form-data" data-ajax="false"> <input type="hidden" name="x-api-key" value="21f5ba3c7ac34c81964f5e49b13b9b65914dhar2"> var1: <input type="number" name="var1" ></br> var2: <input type="number" name="var2" ></br> image: <input type="file" name="img" multiple></br> <input type="submit"> </form> all should send post request api-key, var1, var2 , image file. now long form doesn't try send file, works great. when try send image, if sent empty form. here of backend:(i made default response testing.) $var1 = $this->post("var1"); $var2 = $this->post("var2"); $this->res

python - Django - error message does not show on the form when submited -

hi have issue django form validation, here problem : when submit form , validation not respecting condition, validationerror() not raise message. here code : views.py def addarticle(request): if request.method == 'post': form = articleform(request.post, request.files) if form.is_valid(): save_it = form.save(commit=false) save_it.user = request.user save_it.save() form.save_m2m() return httpresponseredirect('/') else: form = articleform() context = {'form':form} return render(request, 'template.html', context, context_instance=requestcontext(request)) template.html <form class="form" action="{% url "article.views.addarticle" %}" method="post" enctype='multipart/form-data'> {% csrf_token %} {{ form.non_field_errors }} <div class="form-group fieldwrapper"> {{ for

python - Reduce Memory Usage Pandas -

i can't figure out way reduce memory usage program further. efficient implementation date: columns = ['eventname', 'sessionid', "eventtime", "items", "currentpage", "browsertype"] df = pd.dataframe(columns=columns) l=[] i, file in enumerate(glob.glob("*.log")): print("going through log file #%s named %s..." % (i+1, file)) open(file) myfile: l+=[json.loads(line) line in myfile] tempdata = pd.dataframe(l) column in tempdata.columns: if not column in columns: try: tempdata.drop(column, axis=1, inplace=true) except valueerror: print ("oh no! we've got problem %s column! don't exist!" % (badcolumn)) l = [] df = df.append(tempdata, ignore_index = true) # slow version, memory efficient # length = len(df) # length_temp = len(tempdata)

python - Flask api representation affects all the views -

i need have 2 logically identical views response same data in different content types. use flask restful. app = flask.flask(__name__) api = flask_restful.api(app) @api.representation('text/csv') def output_csv(data, code, headers=none): data_is_list = isinstance(data, types.listtype) keys = data[0].keys() if data_is_list else data.keys() output = io.bytesio() writer = csv.dictwriter(output, keys) writer.writeheader() encode = lambda v: v.encode('utf-8') if isinstance( v, types.unicodetype) else v if data_is_list: writer.writerows

How to type a pipe symbol on a Lenovo Thinkpad keyboard in linux -

my lenovo thinkpad misses 1 key: left space bar pipe/greater/smaller key. i want use in linux (understandably). how can remap keyboard, can access key? best me neat command line command. ;-) it can done command xmodmap -e "keycode 167 = bar" to determine keycode use 'xev' command , key names wiki.linuxquestions.org/wiki/list_of_keysyms . also read: https://askubuntu.com/questions/24916/how-do-i-remap-certain-keys-or-devices

jms - Spring Integration Inbound-Gateway Not creating producer quick enough or consisently -

i searched lot , couldnt find help. here problem facing. using spring integration inbound , outbound gateways synchronous request response experience. see work great not 100% of times. inbound gateway on server side (when in debug mode) seem sending message on channel should land in outbound queue client. can see pre-send , post-send debug logs of spring integration. problem client still times out. no not jmscorrelationid. populated fine , client responses of times. got tibco trace log. according see - - client create producer on q1. - client puts message on q1 - server pick , acknowledge - client creates consumer correlation id selector on q2 [in successful cases] - server creates producer on q2 - server produces message on q2 - client picks message q2 - client acks message on q2. [only in success cases above 4 steps] - in 10 seconds (client side gateway outbound timeout) times out.. - producer , consumer on both queues disconnect. we dont see 4 successful steps ab

excel - Advanced.Filter VBA -

i have code far, sheet 2, how can alter code include multiple sheets this? complete newb here. : sub extractuniquevalues() sheet1.range("c:c").advancedfilter xlfiltercopy, , sheet4.range("c1"), true sheet2.range("c:c").advancedfilter xlfiltercopy, , sheet4.range("c1"), true end sub you can that: filter data in place : sub extractuniquevalues() dim wks excel.worksheet each wks in excel.activeworkbook.worksheets call wks.range("c:c").advancedfilter(xlfilteraction.xlfilterinplace, , , true) next wks end sub filter data , paste them new worksheet: sub extractuniquevalues2() dim wks excel.worksheet dim wkssummary excel.worksheet '---------------------------------------------------------------------------------- on error resume next set wkssummary = excel.thisworkbook.worksheets("unique data") on error goto 0 if wkssummary nothing set

php - How to format 2 variables for 1 ajax call so I can use the data easily? -

i have click event... $('#save').on('click', function(){ var employee = $('#employee').serialize(); // form name, phone, email etc. var training = []; // empty array $('.entry').each(function(){ var tid = $(this).attr('id'); // number var start = $(this).find('#start').val(); // date var expiration = $(this).find('#expiration').val(); // date var entry = [tid, start, expiration]; // create array data training.push(entry); // push each entry array }); $.ajax({ method: 'post', url: 'brain.php', data: {'training':training, 'employee':employee}, success: function(results) { console.log(results) } }); }); the php receiving call looks this... $employee = $_post['employee']; // has string of input values $training = $_post['training']; // has array of