Posts

Showing posts from July, 2011

ios - Slide in UITableViewCells while scrolling -

i have uitableview , animate rows appear again. want switch between animations, cells should uitableviewrowanimationleft , others uitableviewrowanimationright . don't know how implement feature uitableviewcontroller . tried insert following lines of code cellforrowatindexpath : [self.tableview beginupdates]; nsarray *updatepath = [nsarray arraywithobject:indexpath]; [self.tableview reloadrowsatindexpaths:updatepath withrowanimation:uitableviewrowanimationleft]; [self.tableview endupdates]; instead of sliding in cell, order of cells changed or of them appeared twice. tried insert these lines after cell creation. if (cell == nil) { ... } else { [self.tableview beginupdates]; nsarray *updatepath = [nsarray arraywithobject:indexpath]; [self.tableview reloadrowsatindexpaths:updatepath withrowanimation:uitableviewrowanimationleft]; [self.tableview endupdates]; i don't think you're going have su...

javascript - Cannot read property 'childNodes' of undefined error but only in chrome -

i'm using knockout.js create drag/drop diary customer, , i've switched testing in chrome mysterious error "cannot read property 'childnodes' of undefined" in parsebindingstring function of knockout template tested , working in firefox/ife10. the error thrown on css: { blackout: workinghours($parent.daysarray(0), $parents[1].viewdate()).starttime.gettime() == workinghours($parent.daysarray(0), $parents[1].viewdate()).finishtime.gettime() } binding, in debugger context node local variable has 4 registered child nodes expected knockout must trying serious tree navigation here, isn't necessary workinghours() function or add blackout class current node. i presume has arisen in chrome due minor differences in way dom constructed between browsers, offer advice on how can resolve kind of issue? or things check? <td data-bind=" css: { blackout: workinghours($parent.daysarray(0), $parents[1].viewdate()).starttime.gettime() == wor...

Add Classpath for jdbc driver under windows 7 -

i read out manual here , not find string should set under environment variables , not find mysql-connector-java-5.1.26-bin.jar file after installing driver via mysql-connector-java-gpl-5.1.26. tried set classpath=%classpath%;path\mysql-connector-java-5.1.26-bin.jar but have no idea how replace path , cant find jar in computer.

javascript - Jquery click only work once on toggle -

i using following script show different background depending on state of div. when not expanded shows "plus (+)" sign, while when expanded not have background image (does not shows anything). the problem there work once, , dont know why. here's code: edit (added html)! html: <body> <section> <div class="wrapper wf"> <ul id="parks" class="just"> <!--------------- product --> <li class="mix" href="#therapy_vital" > <div class="meta name"> <div class="img_wrapper"> <img src="images/spa/masaje/.jpg" onload="imgloaded(this)"/> </div> <div class="titles"> <h2>title</h2> </div> ...

reporting services - SSRS How to hide the first five records -

how can hide first 5 records in tablix? Ä° using top n filtering. have 2 tablixes. first 1 displays top 5 records. second 1 must display top (6-10). how can achieve this? you can set visibility of row based on rownumber function. for example, set visibility of row like: =iif(rownumber(nothing) >= 6 , rownumber(nothing) <= 10, false, true) should hide rows other 6-10.

Codeigniter Form Helper - How to add additional parameters to "select" control? -

i need modify site written in codeigniter i'm no expert. one thing i'd modify select control in form use ms-dropdown drop-down list including pictures. however, can't work out how make codeigniter form helper render parameters other id , value in each option. in case, make ms-dropdown work, need render data-image="..." in each option. the current code looks like: $dropdown = array( 'name'=>'mydropdown', 'options' => array('op1'=>'first option', 'op2' =>'second option') ); echo form_dropdown($dropdown['name'],$dropdown['options']); this renders as <select name="mydropdown"> <option value='op1'>first option</option> <option value='op2'>second option</option> </select> is there way me make codeigniter render <select name="mydropdown"> <option value='op1' data-image="fi...

Is it possible to determine the type of a pattern variable in a Scala macro? -

as part of macro need inspect patterns of case definitions. is there way determine type of pattern variable, or whole pattern? consider polymorphic class data , , macro uses transformer inspect , transform patterns on data values: case class data[a](x: string, data: a) def macroimpl(c: context)(...) = { val transformer = new transformer { override def transformcasedefs(trees: list[casedef]) = trees map { case casedef(pattern, guard , body) => pattern match { case pq"data($string, $data)" => { // type of $data, i.e., how // type parameter instantiated? ... } } } } ... transformer.transform(...) } is there way determine type of pattern variable $data, i.e., way determine how type parameter has been instantiated? another question discusses problem trees of values , suggests use of c.typecheck function. unfortunately, doesn't seem work patterns, since typecheck method throws t...

entity framework - How to update an object in the object context including its relationships -

i update object in object context data data source using code: public class project { public string id{get;set;} public string name{get;set;} } public class people { public string id{get;set;} public string name{get;set;} public ilist<project> projectlist{get;set;} } ((system.data.entity.infrastructure.iobjectcontextadapter)orm).objectcontext.refresh( system.data.objects.refreshmode.storewins, people); it updates people not projectlist(navigation properties),so question is: how update object including relationships? as far know can't automatically that, refresh works on primitive properties of single object. if need additional refreshes need loop through objects , refresh each one. naturally better approach reload entire graph eager loading, if don't need keep objects since you're refreshing them.

wsdl java classes generation to specific package -

which option have use in wsimport tool generate wsdl based java classes in selected package? suppose have wsdl file, want run wsimport on generate classes selected package. -p specifying target package via command-line option, overrides wsdl , schema binding customization package name , default package name algorithm defined in specification http://docs.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html

regex - renaming files using regular expression with linux -

i have read quite few questions here , on interwebz, file renaming still doesn't work. i've got bunch of files starts follows: libraryvce_km_library_sumary_s... i want remove first instance of library, run command in linux: rename -v '/\blibrary/' * however no files renamed. why not? i tried this: rename library '' * and seems work.

Way to define id or class for options_for_select in rails? -

how can define id rails select statement , have tried doing in way like <%= f.select :state, options_for_select(contact::states), :id=>"state_job" %> but not showing id when inspect in browser. please me out <%= f.select :state, options_for_select(contact::states) %> the select tag helper looks options , html_options , need make sure id in right place ( html_options ) passing options parameter: <%= f.select :state, options_for_select(contact::states), {}, {:id=>"state_job"} %>

html - How to align horizontally a jQuery UI button to a div? -

Image
i have following html structure (this structure important me): <div> <div class="element"> <div contenteditable="true" class="inputdiv"></div> </div> <div class="element" id="zbtn">ok</div> </div> and css: .inputdiv { width: 100px; height: 16px; overflow: hidden; padding: 3px 3px 2px; white-space: nowrap; border: 1px solid #aaa; border-radius: 2px; } .element { font-size: 11px; font-family: helvetica,arial; display: inline-block; } i create simple jquery ui button div (this important): $('#zbtn').button(); the button aligned in chrome, but not in firefox , ie . please see image: and jsfiddle: http://jsfiddle.net/grigur/spllw/ add vertical-align:middle .element , updated fiddle http://jsfiddle.net/spllw/1/

java - Spring Bean not found for Spring Security RememberMe? -

in grails app spring security want initialize following spring bean in conf/spring/resource.groovy: beans = { if (grailsapplication.config.grails.plugins.springsecurity.rememberme.persistent) { remembermeservices(mypersistenttokenbasedremembermeservice) { userdetailsservice = ref('userdetailsservice') key = grailsapplication.config.grails.plugins.springsecurity.rememberme.key cookiename = grailsapplication.config.grails.plugins.springsecurity.rememberme.cookiename alwaysremember = grailsapplication.config.grails.plugins.springsecurity.rememberme.alwaysremember tokenvalidityseconds = grailsapplication.config.grails.plugins.springsecurity.rememberme.tokenvalidityseconds parameter = grailsapplication.config.grails.plugins.springsecurity.rememberme.parameter usesecurecookie = grailsapplication.config.grails.plugins.springsecurity.rememberme.usesecurecookie // false t...

multiple resolution in android Unity3D -

i have been creating android game, need create more devices. now, try game on smartphone samsung galaxy s (with resolution 480 x 800), when try start on tablet samsung galaxy tab 10.1, stretches pictures, not full screen, have same free space. plese, how can stretch full screen? creat game more devices, not 1 :d for thanks, andrew. what can make different version each screen, can set game view different screen sizes , depending on size of screen, create bigger or smaller gui elements. in gameview can see how different gui elements placed while change them.

c# - Screens using LongListSelector shared between WP7 and WP8 -

in project have library shared between wp7 , wp8 clients. library contains views, view models , other interesting data. i want use latest version of windows phone toolkit. the problem run while xaml code compatible, runtime error, because longlistselector exists in different assemblies in windows phone toolkit wp7 , in framework code wp8. in wp7: xmlns:toolkit="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls.toolkit" in wp8: xmlns:controls="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" how can solve conundrum without needing duplicate xamls both platforms? after solution decided implement: i decided library contains views wp7 wp8 not right place views in fact different in respective platforms. created 2 copies of problematic views , placed them in respective application projects wp7 , wp8. this created duplication in xaml - fortunately me xamls not complex - handful of controls, styled. creat...

ruby on rails - passing array parameters to path -

i need pass parameters path path looks following: http://localhost/submission_app/submissions?search_submission_type=ish&submission_status_arr[]=51 i tried submissions_path(:search_submission_type => "ish", :submission_status_arr[] => 51 ) but getting wrong number of arguments (0 1..2) error message on view page. i tried: submissions_path("search_submission_type=ish&submission_status_arr[]=51") but 1 gives me following url (note dot instead of &amp before argument) http://localhost/submission_app/submissions.search_submission_type=ish&submission_status_arr[]=51 how need pass parameters correct format url? your suggestions appreciated. thank you rails uses parameter[]=value signify parameter should considered array. you need pass array path helper rails generate path you. submissions_path(:search_submission_type => "ish", :submission_status_arr => [51] )

javascript - How do print specific content inside the iframe -

<script type="text/javascript"> function printdoc() { document.getelementbyid("frame_singlecheque").contentwindow.print(); } </script> <iframe style ="height:400px; width: 750px; overflow:scroll;" id="frame_singlecheque" src="http://www.w3schools.com"></iframe> <input type="button" id = "btncprint" value = "print" onclick="javascript:printdoc()" /> error [16:41:44.054] error: permission denied access property 'print' @ http://localhost/pdf/print.php:3 i have verified lot of stack suggested threads print iframe content. me not worked. exactly above code present in print.php file. want print iframe content. also want know, how print specific div present inside iframe. example in iframe " class = 'example_code notranslate' " . you can print cross-domain iframe page nesting cross domain iframe in locally hosted iframe...

android - How to find value which includes Semicolon(;) sign in SQLite? -

i searching values semicolon(;) sign. have: select * table value match '; "+lookingfor+"*' it giving logic error in sqlite. how explain program ";" not break code piece? doing wrong? ps. value column example: apple; orange; banana pineapple; watermelon this query: query = "select id _id, entry_id , re_value, ke_value, g_value search_eng_fts g_value match '" + lookingfor+ "* or ; "+lookingfor+"*' order length(g_value) limit 100"; the following sql works: select * list value '%; banana%' sql fiddle although might want take steps avoid sql injection

Git pull aborts itself, local file changes will be overwritten by merge -

i have changed file friend working @ same time. did changes , want push says should pull first. when git pull , says: error: local changes following files overwritten merge: please, commit changes or stash them before can merge. aborting how can merge file? if file friend change? sure has added stuff , have added stuff. how our changes handled? one approach commit file first pull. git add filename git commit //enter commit message , save git pull another approach stash changes pull. apply stash. git stash git pull git stash apply stash@{0}

transfer - With Asterisk, how to make a call between 2 externals then hangup? -

my problem following. i want: to called a read code (ex. 15334# ) retrieve phone number of b database code readed a call b once in communication b, hangup after 3 seconds for now, works, but when hangup (after 3 seconds), communication between , b closed . a , b external numbers. how hangup server without closing communication between & b? thanks lot, doing way did called "bridged call". when close bridge,it hangup. need transfer call. unfortanly require transfer support provider side. sure no 1 of providers 0 cost. provider can organize using other asterisk(at provider side) or special hardware pbx or other hardware/softswitch solution. if provider can feature you, provider inform how do. example provider allow transfer using flash+dtmf command(on analog lines).

oracle - Inconsistency in sql query output using OR after WHERE -

i'm doing query on complex db: select * table1, table2, table3, table4, table5, table6, table7, table8 = b , c = d , e = d , ( (strfldvar = 'broken_arrow' , x = g) or (strfldvar = 'broken_box' , y = g) ) , f = h , = j only works when strfldvar = 'broken_box' , not when strfldvar = 'broken_arrow' . when replace ( (strfldvar = 'broken_arrow' , x = g) or (strfldvar = 'broken_box' , y = g) ) , with either x = g and or y = g and works fine in 2 seperate queries runs that. error message case strfldvar = 'broken_arrow' is: ora-01013: user requested cancel of current operation before error message comes computer goes deep thought guess 2 minutes. what doing wrong here? f.y.i. looked @ names of fields of of 2 seperate runs , appear idendical. mean scema of output looks same both. i'm not 100% sure same, if matters i.e. thanks when strfldvar = 'broken_arrow' , x = g (or if strfld...

javascript - Getting data from mongodb/mongoose using predefined functions -

this how getting data mongodb: users.get(base_url, (req, res) => { usermodel.find({}, (err, docs) => { res.render("users/index", { title: "all users here", user_list: docs }); }); }); now, can see express application. like, simple call function can value docs variable inside mongodb model callback. how do this, ideally, want see this: users.get(base_url, (req, res) => { res.render('<some_jade_file_here>', { title: "yes, got right", user_list: getallusers(); }); }); ideally, want call function. how can this, since having put render inside of mongodb call problem, since may want query bunch of things database, , might not 1 database. i'm struggling little since i'm not used callbacks. any appreciated. if you're wondering syntax () => {} , thats anonymous function in typescript. you can't without callbacks, can ...

python - How to get the cumulative sum of numpy array in-place -

i want compute integral image. example a=array([(1,2,3),(4,5,6)]) b = a.cumsum(axis=0) this generate array b.can execute cumsum in-place. if not . there other methods that you have pass argument out : np.cumsum(a, axis=1, out=a) obs: array 2-d array, can use axis=0 sum along rows , axis=1 sum along columns.

php - Usage of Node js calling socket.io functions -

in nodeclient.js, having 1 function socket.emit( 'message', { name: nameval, message: msg } ); and socket.on( 'message', function( data ) { var actualcontent = $( "#messages" ).html(); var newmsgcontent = '<li> <strong>' + data.name + '</strong> : ' + data.message + '</li>'; var content = newmsgcontent + actualcontent; $( "#messages" ).html( content ); }); it visible here that, socket.on() function using here push data particular id, but, if check id in html <ul id="messages"> <?php $query = $pdo->prepare( 'select * message order msgid desc' ); $query->execute(); $messages = $query->fetchall( pdo::fetch_obj ); foreach( $messages $message ): ?> <li> <strong><?php echo $message->name; ?></strong> : <?php echo $message->message; ?> </li> <?php en...

applescript - Automator replacing character with apple script or shell script -

i creating automator process need take string , replace "\" characters character "/". working buddy decided use shell script open this. line wrote, error. set input (do shell script "echo \"" & input & "\" | sed 's/\\\\//g'") thanks try: set mystring "this\\is\\my\\string" -- this\is\my\string set {tid, text item delimiters} {text item delimiters, "\\"} set mystring text items of mystring set text item delimiters "/" set mystring mystring text set text item delimiters tid return mystring or set input "this\\is\\my\\string" -- this\is\my\string set output shell script "echo " & quoted form of input & " | sed 's/[\\]/\\//g'"

c# - The differences between a normal map with dynamic map - automapper -

what differences between codes below; list<ogrenci> ogrenci = automapper.mapper.dynamicmap<idatareader, list<ogrenci>>((dt.createdatareader())); var ogr = automapper.mapper.map<idatareader, ilist<ogrenci>>(dt.createdatareader()); when try use code below; automapper.mapper.createmap<idatareader, ogrenci>().formember(dest => dest.numarasi, opt => opt.mapfrom(src => convert.toint32(src["numara"]))) .formember(dest => dest.adi, opt => opt.mapfrom(src => convert.tostring(src["ad"]))) .formember(dest => dest.soyadi, opt => opt.mapfrom(src => convert.tostring(src["soyad"]))); list<ogrenci> ogrenci = automapper.mapper.dynamicmap<idatareader, list<ogrenci>>((dt.createdatareader())); var ogr = automapper.mapper.map<idatareader, ilist<ogrenci>>(dt.createdatareader()); i can not use use code below; list<og...

use field value as a variable in sas -

wonder if can me i’ve got dataset value in column field name of column. want able use value of column call applicable field in formula. for instance … have columns… merch_no v01 m02 v08 m08 amount plan a record …and want calc field do… merch_no v01 m02 v08 m08 amount plan calc 123456 2 2 1 1 100.00 v01 value of v01 * amount 456789 4 4 4 4 250.00 m08 value of m08 * amount if plan field record says v01 , value of v01 column must used in calc field. if plan field says, m08 , m08 value should used. there 40 plans. a static example of how use vvaluex() function that. data result; v01 = 2; amount=100; calc = 'value of v01 * amount'; length arg1 arg2 $32; arg1 = scan(compress(calc, 'value of'), 1); arg2 = scan(compress(calc, 'value of'), 2); put arg1 arg2; result = input(vvaluex(arg1), 16.) * input(vvaluex(arg2), 16.); run; for situation, you'd have create logic ...

ruby on rails - How to turn off Rspec's verbose logging? -

when running our rspec suite of tests bundle exec rspec spec/ the logs cluttered far many log statements. in particular, controller specs show things multiple times: {"controller"=>"mycontroller", "action"=>"create"} i rid of these can't find source. there no puts statements match nor there rails.logger calls. i'm assuming log level issue wrong. setting config.log_level in environment/test.rb has no effect. the current rspec configuration looks this rspec.configure |config| config.include devise::testhelpers, :type => :controller config.mock_with :rspec config.before(:suite) databasecleaner.strategy = :truncation databasecleaner.orm = "mongoid" end config.before(:each) databasecleaner.clean end config.color_enabled = true config.tty = true config.formatter = :documentation # :progress, :html, :textmate end any thoughts on how might disable these type of logs? side n...

java - Why do I need to get the JCE to be able to handle keys larger than 128 bit? -

why need java cryptography extension (jce) unlimited strength jurisdiction policy files able handle keys larger 128 bit? why not bundled java se? this due export laws, repealed during clinton administration. due import laws of various other countries.

How to send SMS by GSM modem in PDU mode? -

i want send smss in pdu mode. have checked spec modem, , supports pdu mode. i have developed pdu encoder , decoder, not know how send data modem. tried these @ commands: at at+cmgf=0 after sending these commands sent pdu data this: at+cmgw="16079189390500410011000c918939050000000000aa02e834" i have checked correctness of pdu using online tool : http://www.twit88.com/home/utility/sms-pdu-encode-decode but after sending via @ command, modem hangs. is right way send sms pdus? searched on google , can not find useful information. first of all, send sms when modem in pdu mode, must send these commands: at+cmgs=<length> <cr>, length (length of pdu binary string - 2) / 2. when '>' symbol appears must send pdu , ctrl+z character (char.convertfromutf32(26)). here resources may useful: http://www.developershome.com/sms/ sms tutorial http://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-deliver-pdu-decoder/ onlin...

android - Access data from proc file within kernel module -

i need access proc files in module on android kernel. need info shown in cat command, cat /proc/uptime . need programmatically. i tried work proc_fs functions, little fuzzy me, examples create proc file read , it. need use data proc files. i tred fopen , not seems work on modules. how can that? i'm newbie on this. i'm working on goldfish android kernel. thanks. procfs in-memory file system. interface userspace fetch info , put (config) info kernel data structures. in other words, procfs enables userspace interact , kernel data structures way exist during runtime. hence, file inside /proc not meant read inside kernel or kernel module. , why 1 want that? in monolithic kernel linux, can access data structures of 1 subsystem in kernel through directly or through pre-defined function. the following function call might help: struct timespec uptime; do_posix_clock_monotonic_gettime(&uptime); you can refer /proc/uptime implementation @ link below, s...

android - OutOfMemory when having many images in the screen -

Image
i have activity in android application image below: legend: gray: background image covering whole screen; blue: 5 different sized circles; green: arbitrary image; i animating circles using view animation ( http://developer.android.com/guide/topics/graphics/view-animation.html ) show 1 @ time. but got outofmemory exception in devices , emulators used test. i changed layout use 3 imageview instead, 1 one image of 3 inner circles, , others 1 outer circle each using same image file different sizes, , animating them enabling , disabling visibility property. i'm using 2 images instead of 5. with approach stopped getting outofmemory exception, guess because loading , displaying less images before. fyi, have different image sizes placed in folders: drawable-hdpi drawable-ldpi drawable-mdpi drawable-xhdpi is memory limited? has have better solution suggest can keep using 5 circle images? the application small there no point in going path of using opengl. ...

apache - open source GUI tool for hadoop? -

is there open source gui tool hadoop? "hue" looks 1 appears need install hadoop cdh (so in sense tied cloudera's hadoop implementations?) perspective, "hue" doesn't "real" open-source gui tool... correct? has been used hue on apache hadoop? thanks! this incorrect, hue open source ( http://gethue.com ) , works vanilla hadoop, bigtop , cloudera competitors distributions. hue view on top of hadoop apis. obviously, integration/testing/support better cdh.

ruby on rails - CSS and Images on Heroku broken after push -

i started rails app on heroku working fine, including pictures , css. when tried update app , add pictures , new links tied existing css class, none of new assets worked. strange part changed things old links in program , acted expected. seemed @ first weren't precompiled ran rake assets:precompile both locally (and pushed) , on server, nothing changed. new images still aren't showing up. rule out few other dumb mistakes, have made sure image file exists , valid image tag running locally (everything fine locally) , sure pushes git working. the problem you've got images in css going static (image1.jpg), whereas in pre-compiled production environment, they'll called (image-05d983ce1986aa481e03729fca7a493a.jpg) a way see if case go onto view source -> application-05d983ce1986aa481e03729fca7a493a.css , images app needs. if static, that's problem. you may wish try resolve it, feel it's css issue (i have problem too, we're seeing how fix it)...

java - Does `jar` have a flag to set the default class for the .jar file to be created? -

or still need write manifest.mf file manually this? you can invoke jar command -e parameter. not have manually add manifest then. jar -help -e specify application entry point stand-alone application bundled executable jar file an example here jar cfe main.jar foo.main foo/main.class

c# 4.0 - mvc 4 hosted in classic asp authentication -

we have site in classic asp. we in process of converting pieces of site mvc4. there areas require authentication. there authentication process in main site. how can check in mvc4 areas if user authenticated in main site? how store in classic asp part user authenticated? when stored in cookie check cookie. checking classic asp session variable asp.net possible not easys check client side cookie...

c++ - Mexopencv mex file not found -

i have called mex file compiled using mexopencv matlab. program runs in matlab , gives no problem when convert matlab c++ shared library using matlab deploytool , compile exe application while running exe error mexfile not found or not valid filepath or directory. reason behind this??should add additional libraries or path in makefile or should change system path?? using linux , matlab r2012a,mexopencv. note mex file can called matlab , gives output can't called exe. trying run facedetection module in mexopencv samples.it requires xml file input. why isn't able detect mex file , xml file? the deploytool should bring in mex files, have guess dependencies of mexopencv files not being included in generated library or accessible via ld_library_path or ld_preload . these opencv libraries (e.g. libopencv_core.so.2.4, libopencv_imgproc.so.2.4, etc.). check additional dependencies of mexopencv mex files ldd (for windows folks, use dependency walker ). edit : add th...

android - Gstreamer smb link for playbin2 uri -

i trying play video file located in windows pc using gstreamer playbin2 on android. uri follows "smb://xxxxx-pc/share/1.mp4" the error says : error code element uridecodebin0: no uri handler implemented smb. is smb uri support not provided android , if , there work around. thanks in advance.

python 2.7 - wxPython Password, TextCtrol(TE_PASSWORD) isn't allowing ID_OK -

trying password application process here, way can id_ok , cancel buttons display in frame make dialog. have no problem doing this, think looks nicer, can't dialog accept te_password or otherwise hide characters typed. here i'm doing: dlg = wx.textentrydialog(self, 'please enter password.','password prompt') if dlg.showmodal() == wx.id_ok: password = dlg.getvalue() msg = "please enter password." title = 'request email verification' password = password dlg.destroy() if add te_password dlg = wx.id_ok ignored. toughts? create wx.dialog instead. can put text control on using wx.te_password style mentioned. can add button , set id wx.id_ok. following should work: import wx ######################################################################## class logindialog(wx.dialog): """""" #--------------------------------------------------------------...

bind - (fscanf(file, "%lf", &num) > 0) and segmentation fault in C -

i'm modifying piece of source code of bind, random order section of rdataset.c file, below: for (i = 0; < count; i++) { dns_rdata_t rdata; isc_uint32_t val; isc_random_get(&val); choice = + (val % (count - i)); rdata = shuffled[i]; shuffled[i] = shuffled[choice]; shuffled[choice] = rdata; if (order != null) sorted[i].key = (*order)(&shuffled[i], order_arg); else sorted[i].key = 0; /* unused */ sorted[i].rdata = &shuffled[i]; } i change line choice , let variable taken function choice=weightcal(); and code of function unsigned int weightcal() { file *file = fopen("weight.txt", "r"); double integers[10],prob[10]; unsigned int i=0,j=0,k=0; double sum=0,subsum=0,num; unsigned int result=0; while(fscanf(file, "%lf", &num) > 0) { integers[i] =num; sum+=num; i++; } rewind(file); while(fscanf(file...

javascript - How to highlight an entire div based on search -

i have sample jsfiddle here . you'll see have several div classes created. can search text , highlighted answer, want able search value of div , have entire div (a square box in case) highlight or fill color. here's javascript have isolating text, can't above issue work... function dosearch(text) { if (window.find && window.getselection) { document.designmode = "on"; var sel = window.getselection(); sel.collapse(document.body, 0); while (window.find(text)) { document.getelementbyid("button").blur(); document.execcommand("hilitecolor", false, "yellow"); sel.collapsetoend(); } document.designmode = "off"; } else if (document.body.createtextrange) { var textrange = document.body.createtextrange(); while (textrange.findtext(text)) { textrange.execcommand("backcolor", false, "ye...

curl - SSL certificate verification fails -

in going through api tutorials, i'm getting following error: "ssl certificate problem, verify ca cert ok." the ca certificate not in build of libcurl. there anyway can docusign in pem format? docusign not create or provide ssl certificates, platform uses them needed. it's client's responsibility handle certs. to resolve think you'll need proper certificate whomever cert authority is, if testing in demo (i.e. demo.docusign.net) believe can test https (port 443) or http (port 80). might able around testing http://demo.docusign.net , give try...

php - needing to make only 2 decimal points instead of 4 -

i trying have 2 decimal points on if statement right shows 4 places after decimal point depending if subtotal * .45 = out be. if ($paymethod == $paypal) { echo "shipping & handling = ".($grandtotal * .045); $grandtotal = $grandtotal * 1.045; } elseif ($paymethod == $check) { echo "shipping & handling = 0"; } ?><br /> this if statement needing .$$ <two decimal places only> right shows 4 places number_format rounding you; use floatval() turn float after being converted string. <?php $paymethod = "paypal"; $grandtotal = 45; if ($paymethod == "paypal") { echo "shipping & handling = " . number_format(($grandtotal * .045), 2); $grandtotal = floatval(number_format(($grandtotal * 1.045), 2)); } elseif ($paymethod == "check") { echo "shipping & handling = 0"; } ?><br />

google app engine - High Database Instance Uptime for no queries -

Image
i have set wordpress site on google appengine php according instructions @ https://developers.google.com/appengine/articles/wordpress i have cdn sitting in front of site load on google app engine instance tiny. cron jobs , cdn updating it's cache. here access logs fro last 7 hours example. 2013-08-29 06:09:12.829 /post-sitemap.xml 200 6793ms 0kb amazon cloudfront 2013-08-29 06:09:05.727 /robots.txt 200 4ms 0kb amazon cloudfront 2013-08-29 04:55:07.937 /wp-cron.php 200 7206ms 0kb appengine-google; (+http://code.google.com/appengine) 2013-08-29 04:33:59.915 /tag/javascript/ 200 8822ms 37kb amazon cloudfront 2013-08-29 04:33:59.914 request caused new process started application, , caused application code loaded first time. requ 2013-08-29 01:12:03.214 / 200 8751ms 39kb amazon cloudfront 2013-08-29 01:12:03.214 request caused new process started application, , caused application code loaded first time. requ 2013-08-29 01:11:50.755 /robots.txt 200 64ms 0kb amazon cloudfront 2013...

android - how to show previousmonth dates in calender -

this ccalender code below work fine problem is not display date before first day of month see http://imgur.com/inl1gze , after lastday of month full source code here https://www.zeta-uploader.com/1699876023 want sun mon tues wed thur fri sat 29 30 31 1 2 3 4 public class hoyahcalendar extends activity { public static int myear; public static int currentindex = -1; public static int mmonth; public static int mday; public static string[][] = new string[6][7]; calendar mcalendar = calendar.getinstance(); myear = mcalendar.get(calendar.year); mmonth = mcalendar.get(calendar.month) + 1; mday = mcalendar.get(calendar.day_of_month); last_week.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { if (mmonth == 1) { myear -= 1; mmonth = 12; new showcalendar(myear, mmonth, mday, "las...

excel - Error in formula.py in xlwt3 python -

i'm trying write in xls or xlsx, trying use xlwt3 gives me following error message when import: traceback (most recent call last): file "/users/tcp/documents/python/working/menu.py", line 6, in <module> import xlwt3 file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/xlwt3/__init__.py", line 3, in <module> .workbook import workbook file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/xlwt3/workbook.py", line 5, in <module> .worksheet import worksheet file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/xlwt3/worksheet.py", line 7, in <module> .row import row file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/xlwt3/row.py", line 8, in <module> . import formula file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/xlwt3/formula.py", li...

Lua: How to get string captures containing a specific substring? -

in lua, in want captures string containing specific substring. e.g. in string test = "<item>foo</item> <item>bar</item>" i want items containing "a", in case "bar". tried this: print(string.find(test, "<item>(.-a.-)</item>")) but result is: 1 34 foo</item> <item>bar so .- more greedy expected. correct pattern? try print(string.find(test, "<item>([^<]-a.-)</item>")) .

python - scipy.interpolate.griddata: cut z-value and get area inside it -

Image
regarding this: analogy scipy.interpolate.griddata? have additional question: output looks this: it's pyramid noise (and without ground side). there possibility in scipy.interpolate.griddata enter/choose z-value points aren't equal z-values gets deleted? in example: e.g. enter high z-value -> points red-value (= z-value) should stay alive , show me non-filled, noised, red triangle. goal area inside noised triangle. edit: tldr: learned, it's isoline looking , area inside it. edit2: found out example http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html "grid_z1.t" returns me array z-values. in loop eliminate values not equal z-value -> got isoline. problem is, it's not rellay iso line grid iso-values. it's quite ok, maybe there better solutions? there other methods grid_z.t fit needs? this best done before transform data grid form: >>> x = [0,4,17] >>> y = [-7,25,116] >>...

xcode - Where to get iOS system symbols for other iOS versions -

please note: asking place can download symbols, or conclusive answer such site prohibited apple. "duplicate" question similar 1 linked in question: suggested answer access physical device or find developer has one. i've symbolicated crashdump, lines in application code symbolicated; system code not. looks this: thread 0 crashed: 0 libobjc.a.dylib 0x39c195d0 0x39c16000 + 13776 1 quartzcore 0x33aefcad 0x33ade000 + 72877 2 quartzcore 0x33af3105 0x33ade000 + 86277 <snip> 13 uikit 0x33d862b9 0x33d2f000 + 357049 14 myapp 0x0005ef87 main (main.m:14) ... thread 7: 0 libsystem_kernel.dylib 0x3a101e30 0x3a101000 + 3632 1 corefoundation 0x31ef82bb 0x31e61000 + 619195 2 corefoundation 0x31ef7031 0x31e61000 + 614449 3 corefoundation 0x31e6a23d 0x31e...

.htaccess - 'View Full Site' add ?m=0 to all inside pages -

rewriterule ^(.*)\.php$ ^(.*)\.php$?m=0 [r=301,l] i want inside pages rewritten ?m=0 coming sitedotcom?m=0 so if lands comes full site using trailing ? want links ?m=0 ?? reason: mobile redirect full site button works once. not work if user clicks on something. returns mobile site. my code looks this rewriteengine on rewritebase / # check if mobile=1 set , set cookie 'mobile' equal 1 rewritecond %{query_string} (^|&)mobile=1(&|$) rewriterule ^ - [co=mobile:1:%{http_host}] # check if mobile=0 set , set cookie 'mobile' equal 0 rewritecond %{query_string} (^|&)mobile=0(&|$) rewriterule ^ - [co=mobile:0:%{http_host}] # cookie can't set , read in same request check rewritecond %{query_string} (^|&)mobile=0(&|$) rewriterule ^ - [s=1] # check if looks mobile device rewritecond %{http:x-wap-profile} !^$ [or] rewritecond %{http_user_agent} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile...

c# - Error when run my programe using GPDomain object -

i have library: microsoft.grouppolicy; and code: gpdomain domain = new gpdomain("mydomain"); console.writeline(domain.domainname); i message error when run code: could not load file or assembly 'microsoft.grouppolicy.serveradmintools.gpmgmtlib, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. system cannot find file specified. any idea on how solve problem? missing microsoft.grouppolicy.serveradmintools.gpmgmtlib.dll installing gpmc class library and try on win8 install gpmc

oracle - compare to_char with float -

i'm trying compare hour , min dual actual data saved in tables . the to_char(sysdate,'hh.mi') returns char data contains float number but says no data found . i'm trying : create or replace function getsystime return char hhhh intervals.interval_end%type; v_interval_start intervals.interval_start%type; v_interval_end intervals.interval_end%type; v_interval_id intervals.interval_id%type; begin select interval_start ,interval_end , interval_id , to_char(sysdate,'hh.mi') v_interval_start , v_interval_end , v_interval_id , hhhh intervals hhhh = interval_start ; return v_interval_id; end; solved : sloved using cast char float . cast (to_char(sysdate,'hh.mi') float) between interval_start , interval_end ; welcome stack overflow! your where clause used limit select statement rows satisfy condition (i.e. where mytable.favoritenumber = 5 ). a...

css3 - CSS Layout shifts to Right on iPhone/iPad? -

Image
super weird: reason, site's front page layout (css) shifts right on mobile device when it's supposed centered? see: http://www.stylerepublicmagazine.com does know why is? i've seen error on other forums, no 1 seems have solid fix it. here's main portion of stylesheet template: #wrapper { position:absolute; width:100%; margin: 0, auto; margin-top:60px; } #socialmedia { float:right; } #topbanner { margin-left:180px; width:990px; } #magnavigation { position:absolute; margin-top:150px; margin-left:150px; } #featureslides { position:absolute; margin-top:240px; margin-left:190px; width:1000px; } div.img { padding-top:40px; margin: 0px; height: 150px; width: 150px; float: left; text-align: left; vertical-align:top; padding-right:62px; } div.imglast { padding-top:40px; margin: 0px; height: 150px; width: 150px; float: left; text-align: left; vertical-align:top; ...

Does OpenCL always zero-initialize device memory? -

i've noticed often, global , constant device memory initialized 0. universal rule? wasn't able find in standard . no doesn't. instance had small kernel test atomic add: kernel void atomicadd(volatile global int *result){ atomic_add(&result[0], 1); } calling host code (pyopencl + unittest): def test_atomic_add(self): ndrange = (4, 4) result = np.zeros(1, dtype=np.int32) out_buf = cl.buffer(self.ctx, self.mf.write_only, size=result.nbytes) self.prog.atomicadd(self.queue, ndrange, ndrange, out_buf) cl.enqueue_copy(self.queue, result, out_buf).wait() self.assertequal(result, 16) was returning correct value when using cpu. on ati hd 5450 returned value junk. and if recall, on nvidia first run returning correct value, i.e. 16, following run, values 32, 48, etc. reusing same location old value still stored there. when corrected host code line (copying 0 value buffer): out_buf = cl.buffer(self.ctx, self.mf.writ...