Posts

Showing posts from January, 2011

navigation on a textmate page, front of line, end of line, up page etc -

navigation on a textmate page, front of line, end of line, up page etc - in textmate, when editing .rb page (or page), how jump start/end of line? , top/bottom of page? you can utilize emacs key bindings in cocoa text fields: c-a origin of line c-e end of line c-v page down c-p previous line c-n next line there others, these ones commonly use. textmate

html - Would iframes improve performance of sites with very large numbers of dom elements? -

html - Would iframes improve performance of sites with very large numbers of dom elements? - for sites big numbers of dom elements, there performance benefit presenting of content within iframe? example, application i'm working on has big html-based tree contain tens of thousands of nodes @ 1 time (albeit not loaded @ once). putting aside usability problems tree size presents, there benefit placing content within iframe, rather within main page? browsers handle memory differently content embedded within iframes? improve jquery selector performance isolating content? i'm interested in how applied ie 7, although curious if differs between browsers. +1 question. i'm not aware of differences in memory handling between frames , non-frames based content; i've written few xhtml parsers , memory memory; nodes take memory regardless of stored. id lookups done keys (hashtable), collections can quite big non-linear impact. that's parsing , memory side; ho...

ruby on rails - ActiveRecord changed? flag doesn't report changes in associated children -

ruby on rails - ActiveRecord changed? flag doesn't report changes in associated children - i've got next situation activerecord (in rails 2.3.8): class order < activerecord::base has_many :documents accepts_nested_attributes_for :documents end class document <activerecord::base belongs_to :order end now, in controller want direct user differently depending on whether or not made changes existing records, e.g. @order.attributes = params[:order] if @order.changed? # save order # redirect 1 place else # redirect place end for want utilize changed? flag. turns out @order.changed? not query children. i tried implement via association proxy method on has_many :documents association, so: has_many :documents def changed? any? {|doc| doc.changed?} end end but has unintended side-effect loads associated documents disk, apparently wipes out changes made in nested attributes assignment in @order.attributes = params[:order] e...

javascript - What is a good regular expression to match a URL? -

javascript - What is a good regular expression to match a URL? - this question has reply here: what best regular look check if string valid url? 36 answers currently have input box observe url , parse data. so right now, using: var urlr = /^(?:([a-za-z]+):)?(\/{0,3})([0-9.\-a-za-z]+) (?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; var url= content.match(urlr); the problem is, when come in url www.google.com , not working. when entered http://www.google.com , working. i not fluent in regular expressions. can help me? regex if want ensure url starts https https?:\/\/(www\.)?[-a-za-z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-za-z0-9@:%_\+.~#?&//=]*) if not require https validation [-a-za-z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-za-z0-9@:%_\+.~#?&//=]*) to trial out see http://regexr.com?37i6s or version less restrictive htt...

c# - Programmatically add rules to "Windows Firewall with Advanced Security snap-in"? -

c# - Programmatically add rules to "Windows Firewall with Advanced Security snap-in"? - is there library in .net allow me manipulate windows firewall advanced security in windows 7? the reason inquire because, want able add together program/port exceptions programmatically. for example, want add together program.exe inbound rules section , program, want allow tcp port 5660 , udp port 5660. other ports should blocked programme alone; i reasoned comfortably set in inbound rules section in windows firewall advanced security; hope best way of doing it? however, how accomplish programmatically? i have seen illustration here, think 1 talks "allow programme through windows firewall snap-in", not have port information. greg's reply in question helped me. http://stackoverflow.com/questions/1242566/any-way-to-turn-the-internet-off-in-windows-using-c c# windows-7 firewall

azure - How can I create two DS series virtual machines within the same cloud service? -

azure - How can I create two DS series virtual machines within the same cloud service? - i need create 2 ds virtual machines within same cloud service. in existing portal easy, in preview portal there appears no options set cloud service when creating vm. the problem existing portal cannot create ds virtual machines, or virtual machines premium storage. whilst preview portal can create ds virtual machines, cannot create virtual machines within cloud service. i have tried create virtual machines in existing portal d series vm, , upgrade preview portal ds vm alternative not available. i hoping missing obvious. a central feature of cloud service shared dns name provides vip , load balancer. in preview portal capability exposed through shared dns name. give sec vm same dns name first vm. azure windows-azure-storage azure-virtual-machine azure-cloud-services

xml - Custom tab Excel -

xml - Custom tab Excel - i using custom xml editor ms office create new tab add-in. i've added next code within xlam file: <customui xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <ribbon startfromscratch="false"> <tabs> <tab id="comdinheiro" label="comdinheiro"> <group id="comdinheirologinbutton" label=" "> <button id="comdinheiro_login" label="login" image="login.png" size="large" onaction="onactionlogin"/> <button id="comdinheiro_configuracoes" label="config" image="config.png" size="large" onaction="onactionconfiguracao"/> <button id="comdinheiro_url_import" label="dados" image="dados.png" size="large" onaction=...

objective c - iOS: is it possible to create a matrix of NSObjects? -

objective c - iOS: is it possible to create a matrix of NSObjects? - since objective c superset of c it' possible utilize malloc/free primitive types create matrix of nxm elements. wouldn't because may cause bugs , memory leaks. lastly point still true? arc provide releasing of c types? int** matrix=(int**)malloc(n*sizeof(int*)); for(int i=0; i<n; i++) matrix[i]=(int*)malloc(m*sizeof(int)); is possible objective-c way? found nsmatrix it's mac, not ios. do arc provide releasing of c types? no, not. arc stands automated reference counting, meaning works reference-counted objects. since malloc / free deals "plain" freestore allocations, memory blocks receive malloc not eligible arc. this not mean, however, couldn't accomplish grade of automation in managing malloc -allocated memory "piggybacking" on arc: make own class has instance variable pointing matrix, , allocate matrix in designated initializer. add ...

c# - Can I do an MX record lookup on a domain name behind a proxy? -

c# - Can I do an MX record lookup on a domain name behind a proxy? - i'm doing mx record lookup on domain names using api statdns.com. however, websites blocked company's proxy cannot looked using api either. is there way around this? c# api networking dns mx-record

XML conversion using XSLT -

XML conversion using XSLT - i trying convert xml using xslt. below construction of xml: <?xml version="1.0" encoding="utf-8"?> <getinvoicelist> <request> <billstatuscode typecode="1">type description</billstatuscode> <ebillprocessstatuscode typecode="2">type description</ebillprocessstatuscode> </request> </getinvoicelist> i tried xslt code: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="node()"> <xsl:copy> <xsl:element name="{name()}"> <xsl:apply-templates select="node()"/> </xsl:element> <xsl:apply-templates select="@*"/> </xsl:copy> </xsl:template> <xsl:template match="@*...

performance - How to access asp.net application faster for First request? -

performance - How to access asp.net application faster for First request? - we having approximately 100 virtual directories in server , 100 virtual directories pointing single physical path. every update, taking lot of time access url's first request only. there way access first request of asp.net application faster or explicit way process first request. beginning iis 7.5, there extension available designed address you're looking for. http://www.iis.net/downloads/microsoft/application-initialization asp.net performance powershell iis web-farm

javascript - Shaded bootbox dialog -

javascript - Shaded bootbox dialog - i'm using bootbox create bootstrap modals. here how i'm creating sample one: bootbox.dialog({message: "hello"}); my problem rendered dialog kind of disabled (all screen shaded), can't click on , esc cannot create modal disappear! when inspect dialog element in browser see: <div class="bootbox modal fade in" tabindex="-1" role="dialog" style="display: block;" aria-hidden="false"> <div class="modal-backdrop fade in" style="height: 321px;"></div> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="bootbox-close-button close" data-dismiss="modal" aria-hidden="true" style="margin-top: -10px;">×</button> <div class="bootbox-body...

bash - Search recursively text from each line in file using standard cmd line commands -

bash - Search recursively text from each line in file using standard cmd line commands - i have file variables names prepared grep call. now want following: grep directory recursively , search in each file each variable entries (from prepared file). how accomplish via awk/sed or other console utility? know how with, example, python script, i'd utilize pure console solution. i stuck on applying command data: awk '{ print $0}' rs="/" settings_vars.txt right? how phone call command instead of print line content? you can utilize recursive grep -f option: grep -rhf settings_vars.txt . options used are: -f # read 1 or more newline separated patterns file. -h # print filename headers output lines. -r # read files under each directory, recursively, next symbolic links if on command line. bash awk sed grep

javascript - update scope variable from a promise inside a directive controller -

javascript - update scope variable from a promise inside a directive controller - i newbie angular. trying populate map.markers array existing in controller controller of directive(from promise within it).. , having hard time figuring out. help appreciated var locationcontroller = function ($scope, $http, appmodesservice, limittofilter, uigmapgooglemapapi) { // var latestmasteryear = appmodesservice.getlatestmasteryear(); uigmapgooglemapapi.then(function (maps) { $scope.googleversion = maps.version; }); $scope.map = { center: { latitude: 40.0000, longitude: -98.0000, }, zoom: 7, bounds: {}, markers : [] }; directive code: app.directive('referencepoints', function () { homecoming { restrict: 'e', scope: { routeid: '@routeid', ...

perl while loop iterates through a variable. -

perl while loop iterates through a variable. - this little snippet first chapter of lwp perl oreilly book. line $count++ while $catalog =~ m/perl/gi; perplexes me i not understand how while statement iterates through lines in $catalog variable find matched, don't know how explain line in english language much less perl #!/usr/bin/perl -w utilize strict ; utilize lwp::simple ; $catalog = get("http://www.oreilly.com/catalog"); $count = 0; $count++ while $catalog =~ m/perl/gi; print "$count\n"; so have tried writing out long hand no avail. #!/usr/bin/perl -w utilize strict ; utilize lwp::simple ; $catalog = get("http://www.oreilly.com/catalog"); open( $fh_catalog ,"<" , $catalog) || die "cant open $!"; while (<$fh_catalog>) { print $_ ; sleep 1; } i tried #!/usr/bin/perl -w utilize strict ; utilize lwp::simple ; $catalog = get("http://www.oreilly.com/catalog"); while (...

How to pass structure from C# to ActiveX function created in C++ (MFC) -

How to pass structure from C# to ActiveX function created in C++ (MFC) - i've unusual problem: the mfc construction #define sensor_desc_len 30 #define cam_id_len 20 typedef struct { unsigned int sensortype; char desc[sensor_desc_len]; unsigned int commtype; // usb or tcp - comm_type float firmwareversion; float hardwareversion; int width; int height; int activestartx; int activestarty; char cameraid[cam_id_len]; unsigned int pcam; char color; } camera_cap_api; the corresponding c# construction is: [structlayout(layoutkind.sequential)] public struct camera_cap_api { public uint sensortype; [marshalas(unmanagedtype.byvalarray, sizeconst = 30)] public byte[] desc; public uint commtype; public float firmwareversion; public float hardwareversion; public int width; public int height; public int activestartx; public int activesta...

general questions about using mongodb -

general questions about using mongodb - i'm thinking trying mongodb utilize storing our stats have general questions whether i'm understanding correctly before start learning it. i understand concept of using documents, i'm not clear how much info can stored within each document. next diagram explains layout i'm thinking of: website (document) - keys/values particular document - statistics (tree) - millions of rows each record inserted pageview (key/value array containing info such timestamp, ip, browser, etc) what got me excited mongodb grouping functions such as: http://www.mongodb.org/display/docs/aggregation db.test.group( { cond: {"invoked_at.d": {$gte: "2009-11", $lt: "2009-12"}} , key: {http_action: true} , initial: {count: 0, total_time:0} , reduce: function(doc, out){ out.count++; out.total_time+=doc.response_time } , finalize: function(out){ out.avg_time = out.total_time / out.count } } ); but main c...

c# - Style Trigger on sub-property of a DependencyProperty -

c# - Style Trigger on sub-property of a DependencyProperty - i have command want style depending on set messagetype of custom message type dependencyproperty of control. custom type: public class message : observableobject { public messagetypes messagetype { { homecoming _messagetype; } set { raisepropertychanged(() => messagetype); _messagetype = value; } } public string text { ... } ... } control: public class messagecontrol : command { public static readonly dependencyproperty messageproperty = dependencyproperty.register( "message", typeof(message), typeof(messagecontrol), new frameworkpropertymetadata(null, frameworkpropertymetadataoptions.bindstwowaybydefault)); public message message { { homecoming (message)getvalue(messageproperty); } set ...

Is there any feature/API of sendgrid that is not offered in its integration with Google App Engine? -

Is there any feature/API of sendgrid that is not offered in its integration with Google App Engine? - sendgrid standalone product. there sendgrid integrated google app engine. there feature or api available in standalone sendgrid (e.g. event api / webhooks) not available in sendgrid integrated google app engine? sendgrid isn't integrated app engine. utilize same sendgrid apis regardless of whether calling them app engine or somewhere else. sendgrid have several pricing plans (bronze, silver, etc.) , 1 of pricing plans specific app engine because of marketing understanding google. sendgrid has detailed explanation of features each plan here. it isn't clear me whether "app engine" plan explicitly restricted utilize app engine. ip address filtering expect not utilize app engine plan. google-app-engine sendgrid

validation - IconStyle defintion not accepted by KML validator -

validation - IconStyle defintion not accepted by KML validator - i have kml file used display correctly in both google maps , google earth. google maps rejects file, while earth still accepts , displays content. here file: http://www.skiforeningen.no/marka/kml/milorg.kml the galdos validator @ http://www.kmlvalidator.com/ indicates next error on line 19: cvc-complex-type.2.4.a: invalid content found starting element 'iconstyle'. 1 of '{"http://www.opengis.net/kml/2.2":polystyle, "http://www.opengis.net/kml/2.2":balloonstyle, "http://www.opengis.net/kml/2.2":liststyle, "http://www.opengis.net/kml/2.2":stylesimpleextensiongroup, "http://www.opengis.net/kml/2.2":styleobjectextensiongroup}' expected. but when reading documentation at https://developers.google.com/kml/documentation/kmlreference#style i can't see why iconstyle not allowed her? also, validator @ http://feedvalidator.org/...

how to use valence api from a native application -

how to use valence api from a native application - we have native application (ibm cast iron) able create http request, phone call web services, etc. know, after calling valence api through software, how response because application has no public address. parameters have set middle-ware phone call ? should set in target url ? thanks lot in advance answers. api native valence

sql - MySQL: How can this UNION be improved? -

sql - MySQL: How can this UNION be improved? - i have 2 tables, access , p provider. have 3rd table joining tables together, standard normalization. however, provider table parent/child table, , joining table has alternative whether access should granted provider children or not. create table p ( p_id int primary key, name varchar(32), parent_id int, foreign key (parent_id) references p(p_id) ); create table ( a_id int primary key, name varchar(32) ); create table ap ( a_id int, p_id int, sub tinyint, foreign key (a_id) references a(a_id), foreign key (p_id) references p(p_id) ); some sample data, 1 provider 2 kid providers. 2 access users, 1 no kid access , kid access. insert p values(1, 'a', null); insert p values(2, 'a.a', 1); insert p values(3, 'a.b', 1); insert values(1, 'user 1'); insert values(2, 'user 2'); insert ap values(1, 1, 0); insert ap values(2, 1, 1); the result...

python - What does `features['contains(%s)' % word.lower()] = True` mean in NLTK? -

python - What does `features['contains(%s)' % word.lower()] = True` mean in NLTK? - i've been reading nltk document recently.and don't understand next code. def dialogue_act_features(post): features = {} word in nltk.word_tokenize(post): features['contains(%s)' % word.lower()] = true homecoming features this feature extractor naivebayesclassifier,but does features['contains(%s)' % word.lower()] = true mean? i think line of code way generate dict,but have no thought how works. thanks in code: >>> import nltk >>> def word_features(sentence): ... features = {} ... word in nltk.word_tokenize(sentence): ... features['contains(%s)' % word.lower()] = true ... homecoming features ... ... ... >>> sent = 'this foobar word extractor function' >>> word_features(sent) {'contains(a)': true, 'contains(word)': true, ...

c# - File.Create() can't be executed because file is still used by another process -

c# - File.Create() can't be executed because file is still used by another process - i seek create file after checking if directory exists, , if file exists. but when programme gets line error can't create file because it's beingness used process. weird thing shouldn't. when file doesn't exist. file.create(directory.getcurrentdirectory() + "\\channels\\" + savefile).close() the error occurs in part of code, grab not included. know should have used using() should work too. don't fancy redo part way untill works way. if (!system.io.directory.exists(system.io.directory.getcurrentdirectory() + "\\channels")) { connection.logger.log("making " + system.io.directory.getcurrentdirectory() + "\\channels", false, logmode.info); system.io.directory.createdirectory(system.io.directory.getcurrentdirectory() + "\\channels"); } ...

java - How to communicate with jvmti agent attached on a running JVM -

java - How to communicate with jvmti agent attached on a running JVM - i wanted know how communicate jvmti agent attached on running jvm using attach api. when communicate ,here's meant : want phone call native functions located on jvmti agent , theses function homecoming me info (like field values) of running jvm "infected" before agent. here's agent; did not add together native functions yet: #include <jvmti.h> jniexport jint jnicall agent_onattach(javavm* vm, char* options, void* reserved); jvmtienv* create_jvmti_env(javavm* vm); jnienv* create_jni_env(javavm* vm); void init_jvmti_capabilities(jvmtienv* env); jniexport jint jnicall agent_onattach(javavm* vm, char* options, void* reserved) { jvmtienv* jvmti = create_jvmti_env(vm); init_jvmti_capabilities(jvmti); jnienv* jni = create_jni_env(vm); homecoming jni_ok; } jvmtienv* create_jvmti_env(javavm* vm) { jvmtienv* env; vm->getenv((void **) &env, jvmti_versi...

Left outer join null using VB.NET and LINQ -

Left outer join null using VB.NET and LINQ - i've got think working left outer bring together linq query, i'm having problems select because of null values in right hand side of join. here have far dim os = e in oexcel grouping bring together c in oclassindexs on c.tclasscode equals mid(e.classcode, 1, 4) right1 = grouping _ c in right1.defaultifempty i want homecoming of e , 1 column c called tclasscode . wondering syntax be. can see, i'm using vb.net. update... here query doing bring together error: _message = "object reference not set instance of object." dim os = e in oexcel grouping bring together c in oclassindexs on c.tclasscode equals mid(e.classcode, 1, 4) right1 = grouping _ c in right1.defaultifempty select e, c.tclasscode if remove c.tclasscode select, query runs without error. thought perhaps needed select new, don't think doing correctly ...

vb.net - How to Disable DropShadow of a ToolTip in Visual Basic? -

vb.net - How to Disable DropShadow of a ToolTip in Visual Basic? - recently developing software needed add together shadowless tooltip. while developing discovered there's no 'dropshadow' property tooltip. so, started searching , grace of google found that, customize command needed ownerdrawn. hence, changed tooltip's 'ownerdraw' property 'true' , drew tooltip using next code: private sub tooltip1_draw(byval sender object, byval e system.windows.forms.drawtooltipeventargs) handles tooltip1.draw e.drawbackground() e.graphics.fillrectangle(brushes.white, e.bounds) e.drawborder() e.drawtext() end sub but still couldn't find way disable dropshadow. so, grateful if help me thing. for improve understanding : want picture#1's tooltip picture#2's tooltip view image programing language: visual basic ide: visual studio 2010 vb.net visual-studio-2010 tooltip dropshadow ownerdraw

Open Facebook Profile in Android SDK -

Open Facebook Profile in Android SDK - note: issue arises when facebook app installed. i'm trying open user's facebook profile page when imagebutton clicked. after looking @ this suggested method more recent facebook app versions, it's working, exception of users friends logged in user (in app), or logged in user themselves. the process is: image button clicked call facebook graph api made link user's profile via facebook id (stored in our database) a new intent created checking see if facebook app installed, , generating right uri a new activity started generated intent because we're using facebook graph api v2.0, username field removed graphuser object in json. problem facebook link ( graphuser.getlink() ) either: an app-scoped (protected) link if user (logged app) not friends user profile trying view; format : https://www.facebook.com/app_scoped_user_id/{protected-id} a 'normal' facebook link user's real id (unprotected); form...

c++ - How give random value for Template variable? -

c++ - How give random value for Template variable? - i building matrix class , lets user specify type of info be. ie using template. want able assign random values each position in matrix based on template. if template double , want double random value , , if int , want int random value. there way ? code : template <class t> void matrix<t>::randfill(t start , t end ){ std::srand(time(0)); for(size_t = 1; <= _rows ;i++){ for(size_t j = 1; j <= _cols l i++){ _matrix[(i-1)*_cols + (j-1)] = static_cast<t>(std::rand % (end - start) + 1) } } } my question how can know template t @ runtime , alter result accordingly? there way switch statement matches type of template predefined types , gives appropriate values ? naive way set this, there feature in c++ ? know typeid operator, couldn't figure out how it. give me heuristic this? point me in right direction , rest. on side note. in future want matrix class abl...

actionscript 3 - spark Combobox selection is not visible if list changes -

actionscript 3 - spark Combobox selection is not visible if list changes - i using spark combobox , filter function filter characters in firstname , lastname . when user types "a" drop downwards list showing filtered items selecting "aram,babu" in drop downwards , showing text "aram,babu" in textinput. if user presses "r", text input displays "aram,babu", drop downwards list selection disappears. hitting come in or clicking mouse outside drop downwards results in wrong item (last item, i.e. "armu,babu") beingness selected. <?xml version="1.0"?> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*"> <fx:script><![cdata[ import mx.collections.arraycollection; private function labelfield(item:object):str...

graph - neo4j - How to use push null values in 'order by' DESC to the bottom? -

graph - neo4j - How to use push null values in 'order by' DESC to the bottom? - i have bunch of items property "updated" tells when item updated. bunch of timestamps null. when do: match (item) homecoming item order item.updated desc , w/ null values returned @ top. i tried coalesce , which seems work in v2.2 not in v2.1.6: match (item) homecoming item order coalesce(product.updated?,"0") desc in v2.1.6, get: this syntax no longer supported (missing properties returned null). please utilize (not(has(.updated)) or .updated=) if need old behavior. is there alternative solution work irrespective of neo4j version? have tried case statement? match (item:item) homecoming case when has(item.updated) item.updated else 0 end updated order updated desc graph neo4j cypher

php - Cron job report error -

php - Cron job report error - i got cron job next code: <?php require "config.php"; $truncate = $mysqli->query("truncate rss_feed"); $cars = $mysqli->query("select *,(select title companies companies.company_id = cars.company_id) car_company,(select car_model models models.model_id = cars.model_id) car_model cars, companies cars.company_id = companies.company_id , car_active = 'active' , rsspost null order datetime desc"); $result = $cars->num_rows; if ($result > 0) { while ($row_cars = $cars->fetch_array()) { $title = $row_cars['car_company'] . ' ' . $row_cars['car_model'] . ' ' . $row_cars['car_cc']; $link = '/car.php?id=' . $row_cars['car_id']; $description = $row_cars['car_description']; $datetime = $row_cars['datetime']; $row_car_id = $row_cars['car_id']; $insert = $mysqli->query(...

xmpp unable to receive / transfer files using gloox library -

xmpp unable to receive / transfer files using gloox library - i'm writing xmpp client ios, didn't manage compile swiften library objective-c, went gloox, implementing single , multiuser-chat, far good. now i'm trying implement file transfer functionality no success. gloox has pretty basic samples si file transfer (i guess protocol bit deprecated, though). given these lines // should obtain using disco, really: // f->addstreamhost( jid( "proxy.jabber.org" ), "208.245.212.98", 7777 ); i'm guessing need utilize disco service find out stream host, not sure how proceed. i'm calling.- j->disco()->getdiscoinfo(j->jid(), "", this, 0); which calling virtual void handlediscoinfo( const jid& /*iq*/, const disco::info& info, int /*context*/ ) but list of enabled features. when seek send file adium client, complains of client "not connected" (it's connected indeed, , has text conver...

asp.net mvc 4 - Update path of SAP report dataset -

asp.net mvc 4 - Update path of SAP report dataset - i created 1 study in sap web application. after alter pc , done changes in info set created. **now want update info set new path in sap report. seek alter path of info set in . not working (not show class below ).** asp.net-mvc-4 sap crystal-reports-2010

c++ - Override function that return base type -

c++ - Override function that return base type - i have 2 classes. base of operations class parent , derived class child . class parent has pure virtual function returns class type. how can override in derived class? class parent { public: virtual parent* overrideme(parent* func) = 0; }; class kid : public parent { public: child* overrideme(child* func) override; }; i tried child* overrideme(child* func) override; end error not override base of operations class member. if c++ had total covariance , contravariance support, right relationship contravariant in input , covariant in output. namely: struct organism { }; struct animal : organism { virtual animal* overrideme(animal* ) = 0; }; struct dog : aniaml { dog* overrideme(organism* ) override { ... } ↑↑↑ ↑↑↑↑↑↑↑↑ covariant contravariant }; it seems little unintuitive, create sense. if expecting animal* , should able handle animal* (of dog* qu...

excel - VBA SendKey Events Happening Out of Order -

excel - VBA SendKey Events Happening Out of Order - i'm writing simple script re-create , paste cell values manually. know can other means, utilize sendkeys. here script re-create cell a1 a2: public declare sub sleep lib "kernel32" (byval dwmilliseconds long) sub my_copy() range("a1").select sendkeys "^c" sleep 10 range("a2").select sendkeys "~" sleep 10 end sub i can't seem figure out how right issue i'm having. selects cell a1, waits, a2, copies , pastes. (instead of copying after a1 selected) am missing here? why not: range("a2") = range("a1") where a2 re-create of a1. if want utilize sendkeys, i'd this: range("a1").select sendkeys "^c", true range("a2").select sendkeys "^v", true 'i'm windows user the true means wait, that's format excel vba. excel vba excel-vba

php - Why is IntlDateFormatter not found? -

php - Why is IntlDateFormatter not found? - the php-intl extension loaded since can utilize intldateformatter::short in view script no issue. bit in viewhelper <?php namespace common\view\helper; utilize zend\view\helper\abstracthelper; class dateformat extends abstracthelper { public function __invoke($datefield) { $dateformatter=$this->getview()->plugin('dateformat'); homecoming $dateformatter(strtotime($datefield), intldateformatter::short); } } ?> i error fatal error: class 'common\view\helper\intldateformatter' not found in c:\temp\zf2ad\client\module\common\src\common\view\helper\dateformat.php on line 12 please advise ephraim since you're working in namespace context, looks class in actual namespace common\view\helper . have add together backslash in front end of class if it's in global namespace. return $dateformatter(strtotime($datefield), \intldateformatt...

xamarin - Calabash Error - superclass mismatch for class AuthenticationPage -

xamarin - Calabash Error - superclass mismatch for class AuthenticationPage - i new ruby/calabash , managed set dedicated calabash automation framework ios page object model pattern , running successfully. i want extend same framework android too. created dedicated folder ios , android within features folder , thought of having respective page objects within folder. but when ran calabash-android, calabash finds similar page class exists in ios folder , started throwing error message. want follow same naming convention ios , android pages without having name-clash. possible? superclass mismatch class authenticationpage (typeerror) /users/macuser/documents/automation/features/ios/pages/authentication_page. rb:5:in `<top (required)>' /library/ruby/gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/rb_support/rb_language.rb:95:in `load' /library/ruby/gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file' /li...

python - Updating .bashrc and environment variables during Vagrant provisioning -

python - Updating .bashrc and environment variables during Vagrant provisioning - i'm using vagrant set box python, pip, virtualenv, virtualenvwrapper , requirements. provisioning shell script adds the required lines virtualenvwrapper .bashrc . basic check they're not there, doesn't duplicate them every provision: if ! grep -fq "workon_home" /home/vagrant/.bashrc; echo 'export workon_home=/home/vagrant/.virtualenvs' >> /home/vagrant/.bashrc echo 'export project_home=/home/vagrant/devel' >> /home/vagrant/.bashrc echo 'source /usr/local/bin/virtualenvwrapper.sh' >> /home/vagrant/.bashrc source /home/vagrant/.bashrc fi that seems work fine; after provisioning finished, lines in .bashrc , , can ssh box , utilize virtualenvwrapper. however, virtualenvwrapper doesn't work during provisioning. after section above, next checks pip requirements file , tries install virtualenvwrapper: if [[ -f /...

node.js - Communicating with a background task in node -

node.js - Communicating with a background task in node - i have task running in background (downloading big file somewhere). i need client able create http request , wait till status of task gets updated (for example, when percent completion of download changes). right i'm using hack - i'm using require() singleton keeps track of background downloads, , background downloads store promises resolved when status changes, request can downloads[id].promise.then(res.json.bind(res)). is there way without global singleton, without using external service redis pubsub? @jonathanr, you're question pretty vague on accounts, might able started. if provide more info i'm sure help out. (what's process? simplified code snippet of now?) i'm not sure if you're familiar child processes, should allow want. can run command can phone call shell (if utilize one), spinning other node programs/processes. lots of options, lots learn, super useful. why thin...

DFS algorithm implementation at Objective C -

DFS algorithm implementation at Objective C - i trying implement objective c realization of algorithm. here implementation of it: @implementation dfsalgorithm -(void)dfs:(graph*)g andstartingposition:(int)s{ [self performdfs:g andposition:s]; } -(void)markedarrayinit:(int)capacity{ //0 unmarked vertices //1 form marked ones self.marked=[[nsmutablearray alloc]initwithcapacity:capacity]; for(int i=0;i<[self.marked count];i++) [self.marked replaceobjectatindex:i withobject:[nsnumber numberwithint:0]]; } -(void)performdfs:(graph *)g andposition:(int)v{ [self markedarrayinit:(int)[g numberofvertices]]; [self.marked replaceobjectatindex:v withobject:[nsnumber numberwithint:1]]; (nsnumber *vertex in [g.vertices objectatindex:v]){ if(1==[self ismarked:v atgraph:g]){ nslog(@"%d",(int)vertex); [self performdfs:g andpos...

Selenium chrome webdriver c# clicking on plug ins icon on addressbar -

Selenium chrome webdriver c# clicking on plug ins icon on addressbar - when opening chrome browser url, wanted click on plug in blocked icon on addressbar, know it's out of scope selenium, tried using ms uiautomation did not succeed automationelement baseelement = automationelement.rootelement.findfirst(treescope.descendants, new propertycondition(automationelement.nameproperty, "plug-ins blocked on page.")); any workaround please. c# google-chrome webdriver

oracle11g - Bulk collect in Oracle running slow -

oracle11g - Bulk collect in Oracle running slow - i trying load 90k info source table manipulations in target table .i have created procedure uses bulk collect limit whenever execute throws: ora-02395: exceeded phone call limit on io usage ora-06512: @ "insert_extract_table", line 46 ora-06512: @ line 1 02395. 00000 - "exceeded phone call limit on io usage" *cause: *action: my code create or replace procedure insert_extract_table( v_array_size in pls_integer default 100) pls_integer; type array table of miscdh_mig_party_list%rowtype; v_data array; cursor v_cur select p1 orig_party_id, p2 orig_party_number, p3 orig_party_name, l_id, l_rel_code , s_id, s_rel_code, case when l_rel_code='partent' p1 when l_rel_code='child' (select p1 mapping b b.s_rel_code='parent' , b.s_id...

android - How to set the initial zoom/width for a webview -

android - How to set the initial zoom/width for a webview - i trying webview have similar behavior android browser. browser opens pages in way tries fit width screen. however, default behavior of webview start @ 100% pixel scale starts zoomed in on top left corner. i have spent lastly couple hours trying find way webview scale page screen in browser i'm not having luck. has found way accomplish this? i see setting called setloadwithoverviewmode, didn't appear @ all. experimented setinitialscale on different screen sizes , web page sizes won't graceful browsers scaling. any 1 have leads? thanks edit: brian's method seems work when phone in landscape not in portrait. in portrait close still not fit whole screen in page. starting bounty hope there sure-fire way initial zoom fit page width of page in orientation or screen size. the next code loads desktop version of google homepage zoomed out fit within webview me in android 2.2 on 854x480 p...

dictionary - .NET class for quickly find out Value based on Key and vice versa -

dictionary - .NET class for quickly find out Value based on Key and vice versa - very utilize dictionary<tkey, tvalue> type store ehh...dictionary type of values, e.g. key = 1, value ="canada" . in many cases, values in dictionary info unique, keys. , find dictionary<tkey, tvalue> type, not convenient key value based on value. my question is, class in .net, suitable in scenario? find out value based on key , vice versa. this pretty trivial using linq: int key = new dictionary<int,string>().where((kv)=>kv.value == "somevalue").select(kv=>kv.key).firstordefault(); and extension method if fancy: static class dictionaryextensions { public static bool tryfindbyvalue<tkey, tvalue>(this idictionary<tkey, tvalue> dict, tvalue value, out tkey key) { var keys = dict.where((kv) => kv.value.equals(value)).select(kv => kv.key); bool retvalue = keys.any(); key = keys.firstordefault()...

Changing the string format of the WPF DatePicker -

Changing the string format of the WPF DatePicker - i need alter string format of datepickertextbox in wpf toolkit datepicker, utilize hyphens instead of slashes seperators. is there way override default civilization or display string format? 01-01-2010 i have solved problem help of code. hope help well. <style targettype="{x:type datepickertextbox}"> <setter property="control.template"> <setter.value> <controltemplate> <textbox x:name="part_textbox" text="{binding path=selecteddate, stringformat='dd mmm yyyy', relativesource={relativesource ancestortype={x:type datepicker}}}" /> </controltemplate> </setter.value> </setter> </style> wpf datepicker wpftoolkit

django - Getting a username and uploading files -

django - Getting a username and uploading files - i'm using django upload files user. when user uploads file, need grab username well, , add together model. initially, doing hidden value of username, can changed (i'm looking @ you, inspect element!) so, tried setting initial value i've read on here already. def upload(request): if request.method == 'post': username = {'uploader': request.user.username} form = uploadform(request.post, request.files, initial=username) however, maintain getting error returned uploader field wasn't set. form: class uploadform(forms.modelform): title = forms.charfield(max_length=55) uploader = forms.charfield(widget=forms.hiddeninput(), max_length=25) description = forms.textinput() image = forms.imagefield() file = forms.filefield() class meta: model = packs fields = ('title', 'uploader', 'description', 'image',...

json - Javascript - Stratified Sampling -

json - Javascript - Stratified Sampling - i have json info source this: var ds=[{"id":1,"group":"a"},{"id":2,"group":"c"},{"id":3,"group":"b"},{"id":4,"group":"a"},{"id":5,"group":"c"},{"id":6,"group":"b"},{"id":7,"group":"a"},{"id":8,"group":"c"},{"id":9,"group":"b"},{"id":10,"group":"a"},{"id":11,"group":"c"}]; suppose every grouping has @ to the lowest degree m records(here m=3),i randomly pick n(n<=m) records each grouping , merge samples new array this: var output=[{"id":1,"group":"a"},{"id":7,"group":"a"},{"id":3,"group":"b"},{"id":6,...

How to calculate CBO and LCOM for a class using Python and SciTools Understand API -

How to calculate CBO and LCOM for a class using Python and SciTools Understand API - in python, how can calculate lcom (lack of cohesion) c++ files (or other file types) using scitools understand api? for assignment, we're asked calculate lcom ourselves instead of using scitools's understand. to calculate lcom4, need next metrics, number of functions/methods in class (given understand "countdeclfunction") number of method pairs in class @ to the lowest degree 1 instance variable commonly utilize or define in body. number of method pairs in class have @ to the lowest degree 1 instance method commonly phone call in body. any suggestion much appreciated. from metrics listed on https://scitools.com/support/metrics-reports/, believe have develop own metrics complement understand provides. python scitools

r - Initializing multiple data frames -

r - Initializing multiple data frames - i have made multiple lists using split: mylists <- split (df, interaction(df$age, df$nation) from it, got 1000 lists, mylists[[1]] , mylists[[2]] , ... mylists[[1000]] how can create (corresponding) 1000 info frames hold info of 1000 lists it? (as when seek converting list info frame in loop, not work need initialize vector of 1000 info frames.) if i'm understanding question fully, don't see need @ since what's in list already dataframes. let's little demonstration using iris dataframe we'll modify slightly. iris2 <- iris iris2$species2 <- rev(iris2$species) mylists <- split(iris2, interaction(iris2$species, iris2$species2)) length(mylists) # [1] 9 sapply(mylists, class) # setosa.setosa versicolor.setosa virginica.setosa # "data.frame" "data.frame" "data.frame" # setosa.versicolor versicolor.versicolor virgini...

python - Django static text model -

python - Django static text model - so have surveys application , there's main user dashboard. there can see surveys, new surveys, etc , there's static text. what want create text not static - allow administrator edit it. options here. thought using flatpages app mean have write custom middleware pass context flatpages overload , writing custom app 2 static texts seems much work. python django django-models django-middleware django-flatpages

office365 - Using office 365 API without Aceess directory -

office365 - Using office 365 API without Aceess directory - i interested in integrating office365 application. possible add together user office 365 business relationship via office365 api without utilize of active directory? want phone call api method create user on office 365 business relationship without adding same user office 365. thanks active directory authentication method o365 application integration. no way around really. its not bad. integrate o365 azure ad, add together app ad, token , go. labs in free microsoft virtual academy class great job walking through it. pay attending lab#5, introduction o365 dev apis. http://www.microsoftvirtualacademy.com/training-courses/introduction-to-office-365-development office365

css3 - 3D transform doesn't work on ie -

css3 - 3D transform doesn't work on ie - i 3d transformation , on browsers works fine on ie doesn't work. if have time please see illustration first in normal browser see transform after on ie. on illustration need click on image. css. write sass .item { width: 388px; height: 273px; position: relative; float: left; margin: 0 0 2px 2px; cursor: pointer; outline: 1px solid transparent; -webkit-transition: .5s; -moz-transition: .5s; -ms-transition: .5s; transition: .5s; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; transform-style: preserve-3d; img { display: block; width: 388px; height: 273px; } } .top { width: 1170px; margin: 0 auto; .item { .button { content: attr(data-title); top: 100%; width: 100%; height: 50px; position: abso...

Spring-boot serving content outside context root and getting content as resources -

Spring-boot serving content outside context root and getting content as resources - i've added new resources handler "outside context root" next configureradapter: @configuration public class dynamicassetsconfigurer extends webmvcconfigureradapter { @override public void addresourcehandlers(resourcehandlerregistry registry) { registry.addresourcehandler("/dynamicassets/**") .addresourcelocations("file:/var/dynamicassets/"); super.addresourcehandlers(registry); } } handler works fine when making requests server, access content of "/dynamicassets/**" resources. can access "static assets" (assets directory within context root): @inject private webapplicationcontext webcontext; public resource[] getstaticassetresources() { // returns array of servletresource objects homecoming webcontext.getresources( "/assets/*.*"); } public resource[] getdynamicassetresou...