Posts

Showing posts from September, 2013

"Navigate to file" from favorite window in IntelliJ -

in our project have several files same name, when try open file( ctrl + shift + n ), lists out files in project matches given name. thought of adding required files "favorite" , open window. is there settings can done, when try navigate file, first show files stored under favorite , followed other directories? no, there no such setting. note can enter part of path in goto file dialog. example, if need navigate index.html in "shop" directory, can enter "sh/in". show index.html files under "shop" directory or other directories have "sh" in path, , not of index.html files in project.

Adding my DLL into a Visual Studio project in C++ -

i working on project involves making dynamic link library, want test in console app in visual studio. the dll made in visual studio, doesn't have much, few functions in it. i'm not sure if i'm supposed include librarys header in include directories panel in properties , or else a lot of people i'm supposed add corresponding .lib file in library or reference directory, i'm not sure vs generates .lib file alongside dll. i'm using vs 2015. i don't have vs in front of me moment, these should general steps set up: properties->linker->input: your.lib properties->linker->additional library directories: ../your/bin properties->general->compiler->additional include directories: ../your/include to build app, dll's api headers must in include compile-time, it's lib files in bin link-time. once have app exe, need dll in same folder exe when executes. you might want add dll project , app project common solution in vs...

c# - GridView throw eventArgument parameter is too long when Selecting all rows -

Image
i have 1 gridview control on asp page. based on requirement pagination not enabled on grid in production environment there lots of records available. load on grid. click on select check box. error message. an unexpected error has occurred. eventargument parameter long please check event log or contact administrator. is there memory setting can tweak handle large data. website hosted on sharepoint.

java - SMTP not getting connected -

here java code send email, whenever run code shows javax.mail.messagingexception: not connect smtp host: ipaddress, port: 25; tried changing port number, still same error.. can me.. (i have included mail.jar , activation.jar project) public static void main(string arfs[]) throws unknownhostexception { inetaddress address = inetaddress.getlocalhost(); string to="gggg@gmail.com"; string from="vvvvv@gmail.com"; string host=address.gethostaddress(); properties properties = system.getproperties(); properties.setproperty("mail.smtp.host",host); properties.setproperty("mail.smtp.port", "25"); session session = session.getdefaultinstance(properties); try{ mimemessage message = new mimemessage(session); message.setfrom(new internetaddress("vvvv@gmail.c...

c# - How does ASP.NET know to create the ASP.NET_SessionId cookie if Session_Start is defined? -

i've done quite bit of testing on this, , i'm thoroughly confused. seems asp.net generate asp.net_sessionid cookie if session_start method in mvcapplication class defined, if i'm not using session variable anywhere. seems odd, considering there doesn't have in method's body. example (global.asax.cs): using system.web.mvc; using system.web.optimization; using system.web.routing; namespace myapplication { public class mvcapplication : system.web.httpapplication { protected void application_start() { arearegistration.registerallareas(); filterconfig.registerglobalfilters(globalfilters.filters); routeconfig.registerroutes(routetable.routes); bundleconfig.registerbundles(bundletable.bundles); } private void session_start() { } // takes generate sessionid (?) } } now, i'm confused multiple reasons: how mere presence of session_start function enough generate ...

database - how to find an amount of certain duplicates in mysql table? -

so have table persons. table connects vehicles manytomany. need find how many times id appear on table person_vehicle. how can this? asking here 2 suggestion. for names: gives number of times names repeated. select count(name) persons group name; specifically jake: select count(name) persons name = "jake";

php - Return custom image size in ACF -

good evening, i working on wordpress site uses acf (advanced custom fields) display custom slider gallery. problem is, can't seem display custom image sizes within slider. in acf field type being used content -> gallery, using following code within theme files: <?php $images = get_field( 'slider' ); $size = "archive-slider"; if( ! empty( $images ) ) : ?> <ul class="rslides"> <?php foreach( $images $key => $value ) { echo '<li><img src="' . $value['url'] . '" /></li>'; } ?> </ul> <?php endif; ?> i have defined custom image size in functions file , regenerated thumbnails can't size attribute work. can kindly me? update: i updated code (this works): <li> <img src="<?php echo $image['sizes']['archive-slider']; ?>" alt="<?php echo $image['a...

Understanding Java code and make it jQuery. (loginpage) -

i'm trying understand login-procedure balance-only login page @ bank. there project has procedure in java, i'm not familiar cant understand it. ( https://github.com/liato/android-bankdroid/blob/master/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/okq8.java ) i make in jquery. my attempt is: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <script> var user_id="8312345678"; var password="secret"; var pemurl="https://nettbank.edb.com/logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8"; var loginurl="https://nettbank.edb.com/logon/logon/step1"; var epochtime=date.now(); $.ajax({ async: false, cache: false, type: 'post', data: ({ 'p_tranid':epochtime, 'p_errorscreen':...

python - HTML Parsing: Get elements between two elements? -

i'm parsing lxml on python 2.7 i have html looks this: <tr height="45" valign="bottom"> <td colspan="2" class="date">wednesday, aug 5 2015 </td> </tr> <tr> <td/> </tr> <tr> <td> </td> <td/> </tr> <tr> <td/> <td> - no calendar matters set<br/></td> </tr> <tr height="45" valign="bottom"> <td colspan="2" class="date">thursday, aug 6 2015 </td> </tr> is there way me list of td element objects in between 2 elements of class="date" ? basically, need info associated with, aug 5, since other elements before next date aren't children i'm struggling figure out how them. write want: elements td[@class="date"] ahead , before //td[following::td[@class="date"] , preceding...

Failed to load class for data source: com.databricks.spark.csv -

my build.sbt file has this: scalaversion := "2.10.3" librarydependencies += "com.databricks" % "spark-csv_2.10" % "1.1.0" i running spark in standalone cluster mode , sparkconf sparkconf().setmaster("spark://ec2-[ip].compute-1.amazonaws.com:7077").setappname("simple application") (i not using method setjars , not sure whether need it). i package jar using command sbt package . command use run application ./bin/spark-submit --master spark://ec2-[ip].compute-1.amazonaws.com:7077 --class "[classname]" target/scala-2.10/[jarname]_2.10-1.0.jar . on running this, error: java.lang.runtimeexception: failed load class data source: com.databricks.spark.csv what's issue? use dependencies accordingly. example: <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-core_2.10</artifactid> <version>1.6.1</version> </dependenc...

sql - How to debug an intemittent error using Progress OpenEdge database -

i have program fails intermittently in complex query. the error reads: system.data.sqlclient.sqlexception: cannot fetch row ole db provider "msdasql" linked server "linkedserver". the query looks this: select replace([job-no],'m0','') keytaskid, dbo.sfget_uniquetaskid([client-code],replace([job-no], 'm0', ''), 0, [trade-code]) hmsuniquetaskid, [latest-priority] prioritycode, [keyproperty] keyproperty, replace([job-no],'m0','') keyjob, [job-type] tasksubtype, convert(varchar(6),[maint-officer]) officer, left(forename + ' ' + surnam...

ruby on rails - How to change md fab speed dial to show on click? Angular material -

how change md-fab-speed-dial open , activate speed dial menu click, not hover. , how can remove whitespace (on picture)? here view md-fab-speed-dial md-open="demo.isopen" md-direction="{{ demo.selecteddirection }}" ng-class="demo.selectedmode" md-fab-trigger.actions-icon-menu md-button.md-icon-button aria-label="menu" md-icon.more-icon md-svg-src="#{asset_path('icons/more_icon.svg')}" md-fab-actions.actions-menu section.actions_icons layout="row" layout-align="center center" md-button.md-primary aria-label="edit icon" md-icon md-svg-src="#{asset_path('actions_icons/edit.svg')}" md-button.md-primary aria-label="remove icon" md-icon md-svg-src="#{asset_path('actions_icons/remove.svg')}" md-button.md-primary aria-label="download icon" md-icon md-svg-src=...

sql - How to improve select with not in on firebird -

select mid aplicacao mid not in ( select distinct mid aplicacao inner join prod_app on prod_app.mid=aplicacao.mid prod_app.coditem=1 ) i try search solution on firebird improve query unfortunatelly didn´t have success. please me? the common solution in (and not in ) performance problems use exists (or not exists ) instead: select mid aplicacao not exists ( select 1 prod_app prod_app.mid = aplicacao.mid , prod_app.coditem=1 ) another solution use left join , filter on non-existence of right side: select mid aplicacao left join prod_app on prod_app.mid = aplicacao.mid , prod_app.coditem=1 prod.app.coditem null note additional filter conditions on prod_app (like prod_app.coditem=1 ) need part of join condition, not of where clause.

ruby - How to join nested char array to string -

i have following code: def caesar_cipher(text, move_by) move_by %= 26 chars = hash[('a'..'z').map.with_index.to_a] converted = text.split.map |word| word.chars.map |char| if (chars[char.downcase] + move_by) <= 26 chars.key(chars[char.downcase] + move_by) else chars.key(chars[char.downcase] + move_by - 26) end end end end print caesar_cipher("what string", 5) it converts string variable text integer. here output when run it: [["b", "m", "f", "y"], ["f"], ["x", "y", "w", "n", "s", "l"]] , , i'd joined this "bmft f xywnsl" . i've tried .join method, gives me "bmftfxywnsl" if: arr = [["b", "m", "f", "y"], ["f"], ["x", "y", "w",...

Prebuilt Python Caffe for OSX -

is there pre-built pycaffe out there osx? see instructions on how build i'm sure i'll have lot of difficulties trying build of dependencies. so, i'd appreciate knows can prebuilt pycaffe module? or necessary gets built on machine? thanks in case you're familiar docker , try: https://github.com/ryankennedyio/deep-dream-generator on os x, you'll need have boot2docker or such. anyway, able , running in under 5 minutes or approach, after spending hour or (and giving up) downloading/building/installing dependencies directly.

javascript - Ember transition to route on parent dynamic segments (slugs) -

i have current router.js set up. this.resource('parent', {path:'parent/:id'},function() { this.route('child', {path:'child/:name'}); }); pages valid www.x.com/parent/5/child/jimmy , www.x.com/parent/5 using this.transitiontoroute('parent.child','jimmy'); me page www.x.com/parent/5/child/jimmy . using this.transitiontoroute('parent','5'); me page www.x.com/parent/5 . since route nested, :id parameter has effect on child route... how transition www.x.com/parent/100/child/jimmy ? update in parent's dynamic segment :id while maintaining child dynamic segments. this.transitiontoroute('parent.child', '100', 'jimmy'); see http://emberjs.com/api/classes/ember.controller.html#method_transitiontoroute "multiple models applied recursively last first resource tree."

Google Admin Directory API: how to OR query terms? -

i'm trying query organization's directory users, in case need match multiple possible incoming familyname , givenname combos. instance, know user has possible givenname or bill, , possible familyname gates or gates jr. it seems 1 of these queries should work, nothing far has been successful (familyname=gates or familyname='gates jr') (givenname=will or givenname=bill) familyname=[gates|'gates jr'] givenname=[will|bill] (familyname=gates || familyname='gates jr') && (givenname=will || givenname=bill) etc is or reason not possible, or missing silly?

php - apache basic auth breaks rewrite in .htaccess -

rewriting works fine until add auth htaccess. auth formatted correctly? why rewrite work before adding auth? request params @ site controller no auth: [id] => 433 [type] => city params after auth added , user authenticated: [site/query] sample query url works without auth: http://www.website.com/site/query?type=city&id=433 the .htaccess basic auth @ bottom: # visits not coming official url should rerouted; ajax cross-domain, www.website.com not same our.company.com rewriteengine on rewritecond %{http_host} !^www\.website\.com$ [nc] rewriterule ^(.*)$ http://www.website.com/$1 [r=301,l] # route requests not static files, through index.php make /nice/urls/ work rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?$1 [l] # disable file listings directories options -indexes # disable fetching of .phtm <files ~ "\.phtml$"> order allow,deny deny </files> # protect ...

r - Plot density with ggplot2 without line on x-axis -

Image
i use ggplot2::ggplot 2d plotting needs, including density plots, find when plotting number of overlapping densities extreme outliers on single space (in different colors) line on x-axis becomes little distracting. my question then, can remove bottom section of density plot being plotted? if so, how? you can use example: library(ggplot2) ggplot(movies, aes(x = rating)) + geom_density() should turn out this: how using stat_density directly ggplot(movies, aes(x = rating)) + stat_density(geom="line")

File uploaded to salesforce empty using python and simple_salesforce -

i'm trying upload file folder object in salesforce using python , simple_salesforce. file uploaded empty. can tell me why , how fix problem? thanks. import base64 import json simple_salesforce import salesforce username = 'username' password = 'password' securitytoken = 'securitytoken' sf=salesforce(username='username', password='password', security_token='securitytoken', sandbox = true) sessionid = sf.session_id body = "" open("info.txt", "r") f: body = base64.b64encode(f.read()) response = requests.post('https://cs17.my.salesforce.com/services/data/v23.0/sobjects/document/', headers = { 'content-type': 'application/json', 'authorization':'bearer %s' % sessionid}, data = json.dumps({ 'description':'information', 'keywords':'information', 'folderid': '00lg0000000mqykaag', 'name': ...

c# - Visual Studio Setup Project custom actions are not finding the correct registry keys in Current User -

our software requires user has either excel 2010 or 2013 installed before can finalize our installation. using visual studio setup project (vdproj) custom actions check hkey_current_user\software\microsoft\office either 14.0\excel or 15.0\excel ensure there. code looks this: registrykey currentuser = registry.currentuser.opensubkey(@"software\microsoft\office"); if (currentuser != null) { foreach (key in currentuser.getsubkeynames()) { if (key == "14.0") { // excel 2010 installed } else if (key == "15.0") { // excel 2013 installed } } } the current implementation has not been changed little on year , haven't had issues before. however, have seen machines not returning of sub key names. machines affecting returning "outlook" key , nothing else, despite fact there "15.0" key many others exist in location. this not issue x86 vs x64 since hkcu\...

c# - How to handle session in asp.net web application? -

i have mvc web application. have integrated application different different merchants, different merchants can have same users. lets same user has logged in 2 different merchants sites on same browser , redirects application. lets both users redirected our application. there 2 different sessions? if want implement session time-out, how should it? , if lets open new tab in same browser session acquire? if session.timeout, both session timed out?

hadoop - Excluding the partition field from select queries in Hive -

suppose have table definition follows in hive(the actual table has around 65 columns): create external table s.test ( col1 string, col2 string ) partitioned (extract_date string) row format delimited fields terminated '\007' location 'xxx'; once table created, when run hive -e "describe s.test" , see extract_date being 1 of columns on table. doing select * s.test returns extract_date column values. possible exclude virtual (?) column when running select queries in hive. change property set hive.support.quoted.identifiers=none; and run query as select `(extract_date)?+.+` <table_name>; i tested working fine.

javascript - How to force a redraw in d3 -

i'm building force directed diagram using d3.js. have 50 nodes, 49 nodes connect 1 in center. these nodes' distance dependent on how similar central node. problem: after click node, want d3 read csv file corresponding node , redraw graph node in center. can't figure out how force d3 perform redraw.

python - write numpy array to CSV with row indices and header -

i have numpy array. values = np.array([14, 21, 13, 56, 12]) i want write values in 1 column of csv file, row indices in column, , header. found function: numpy.savetxt("foo.csv", values, header="id,values", delimiter=",") i'm not sure how add indices (1, 2, 3, 4, 5) . also, header turns out # id,values . i'm not sure # came from. get: # id,values 14 21 13 56 12 i want this: id,values 1,14 2,21 3,13 4,56 5,12 there may better way don't think can directly numpy.savetxt: import numpy np arr = np.array([14 ,21, 13, 56, 12]) np.savetxt("foo.csv", np.dstack((np.arange(1, arr.size+1),arr))[0],"%d,%d",header="id,values") *the # default behaviour documented : string prepended header , footer strings, mark them comments. default: ‘# ‘, expected e.g. numpy.loadtxt.* you use comments="" there reason.

debian - genisoimage and UEFI -

how can create uefi iso image on debian jessie machine? when use follow command on kubuntu ok genisoimage -quiet -v "my-amd64" -j -r -r -l -cache-inodes -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o my-amd64.iso my-amd64/ isohybrid --uefi my-amd64.iso but when run command on debian jessie follow error: genisoimage: option '-e' ambiguous; possibilities: '--eltorito-boot' '--exchange' '--ethershare' '--exclude-list' '--exclude' '--eltorito-catalog' '--eltorito-alt-boot' usage: genisoimage [options] -o file directory ... it seems genisoimage on kubuntu (15.04) , debian jessie not have same options. on debian genisomage not support uefi. version on both system same: genisoimage 1.1.11 but must create iso image on debian jessie. workaround this? apparently there incompatible change in ...

html - Sort array of images with mootools and javascript -

i'm trying sort array of images dragging , dropping them. if dragged image (cur) comes before image drop on (next), want want images next move one. else, want images next cur-1 move forward one. as far can tell logic correct, dragging backwards (next < cur) doesn't work properly. places image on top of one, or @ end of array, or extends array one. my brain has gone numb, please... the html/javascript, <!doctype html> <html> <head> <title>ui test</title> <script type="text/javascript" src="mootools-core-1.5.1.js"></script> <script type="text/javascript" src="mootools-more-1.5.1.js"></script> <link rel="stylesheet" type="text/css" href="res/ui.css"/> </head> <body> <p id="debug_area">debug area</p> <script type="text/javascript"> //areas , placeholders ...

html - Switching image on hover in a button -

i'm trying change image placed in button on hover. far, have managed image change when hover on not when button hovered. here code. <style> .btn-large{ width: 300px; height: 350px; } .movie{ width: 90px; height: 90px; position: relative; margin-top: 25px; } #hardware:hover, #hardware:active{ background: #23c6c8; color: white; } </style> <a href="#" class="btn btn-large" id="hardware"> <figure> <img class="movie" alt="ticket" src="http://i.imgur.com/u8wsffl.png" onmouseover="this.src='http://i.imgur.com/buk26gd.png'" onmouseout="this.src='http://i.imgur.com/u8wsffl.png'" /> </figure> <div class="details"> <h2>all tickets</h2></br> ...

javascript - ng-model inside ng-repeat checkbox multiple selection -

i need edit "group" of elements in table. select elements in table checkbox , after select try group want. problem edit when check button can't send liftsideid need edit , appears undefined. simplify , example put in comments. http://plnkr.co/edit/vfwyrqorir0tqav6uyl7?p=preview <button class="btn btn-outline btn-default" ng-click="updategroup(selectedgroup, myliftsite)" ng-hide="edit"> añadir al grupo</button> when click of button, need selectedgroup it's work ok , in "myliftsite" need id.

Filemaker: how to parse a path? -

i can't figure out how directory of image filemaker calculation. eg, path: file://macintosh hd/users/user1/documents/clients/client1/project/phase/research/test6/images/subdir/090420/090422.jpg i need 090420 put in field. can explain how that? how directory of image to enclosing directory of file (i.e. next-to-last step of given path), try: let ( steps = substitute ( path ; "/", ¶ ) ; getvalue ( steps ; valuecount ( steps ) - 1 ) )

class - PHP Require file inside Static Method -

in class i've got method, includes diffrent files based on input. the files included correctly => var_dump shows "true". but!! if want access included variable, tells me, it's not defined.... the included file: <?php $cpucooler = array( array( "name" => "boxed cpu lüfter", "sockel" => "alle", "leistung" => 20, "rpm" => 2000, "preis" => 0 )); ?> the class method: /** * hardware classes * @param string $type hardware type * @return array */ public static function gethardware($type) { switch ($type) { case 'cpucooler': require_once "hardware/cpucooler.php"; var_dump($cpucooler); // undefined variable... return $cpucooler; break; } } hope can me file correctly included, problem was, used require_once $file; return $cpucooler; instead of requir...

Creating a Concatenated Code from another field value with unique number In Access VBA -

i generating supplier form, add supplier_name , supplier_code auto-generated taking first 2 characters of supplier_name , adding unique number when 2 suppliers have same first 2 characters e.g.: sundriessupplier 1 = su01; sugarsupplier 1 = su02 i new vba , tried following doesn't work: private sub supplier_name_afterupdate() dim db database dim rs recordset dim sql string dim var1 string var1 = left(me.supplier_name.value, 2) sql = "select supplier_id, left(supplier_name,2) charsupplier, count (supplier_name) countsupplier " _ & "from suppliers " _ & "where charsupplier = var1 " _ & "order supplier_id" set db = currentdb set rs = db.openrecordset(sql, dbopendynaset) me.supplier_code = var1 & format$(rs!countsupplier, "00") end sub if can or suggest alternative method great thanks. edit: think flaw in approach may if on new r...

vba - PowerPoint 2013 macro keeps file locked open after close command -

i have powerpoint vba function opens presentations, copies slides active presentation, closes source presentation. worked fine in 2010, fails in 2013 (all on windows 7) if tries open same presentation more once. appears me after presentation.close command issued, window closed, file remains locked open until vba code exits. if code attempts open file again returns error: "method 'open' of object 'presentations' failed" here's simplified form of function i'm running behaves same way. i've had colleague test again in powerpoint 2010 , runs fine. i've had colleague test under 2013 make sure it's not particular installation. sub testopen() dim ppfile presentation dim integer const fpath = "c:\test.pptx" = 1 2 set ppfile = application.presentations.open(fpath) ppfile.close set ppfile = nothing next end sub the file test.pptx blank presentation. in debug mode can see file opens , closes on first loop, on second...

c++ - Is it possible to add include path to visual studio from an FTP address? -

we have bunch of libraries , projects opencv, boost , etc. , have sharing space in our local network. can access libraries using ftp protocol , username , password. want know if can set visual studio additional include or library path ftp address? example adding include file of opencv have add $(opencv_dir)\include $(opencv_dir) address hard drive(c:\opencv\build). want address ftp such ( ftp://ipaddres/opencv/build ). want know if possible or not? , if can give me options purpose? can mount ftp server drive , use mounted drive dependency directory in visual studio? https://serverfault.com/questions/6079/how-can-i-mount-an-ftp-to-a-drive-letter-in-windows suggests tools webdrive, expandrive, ftpdrive, etc but take care, visual studio isn't happy network folders, afair. maybe libraries , header fine there.

mysql - How to keep normalized models when searching via ElasticSearch? -

when setting mysql / elasticsearch combo, better to: completely sync model information es (even non-search data), when result found, have information handy. only sync searchable fields, , when results back, use id field find actual data in mysql database? elasticsearch search engine. advise not use database system. suggest index search data , unique id database can retrieve results mysql using unique key returned elasticsearch. way you'll using both applications they're intended. elastic search not best querying relations , you'll have write lot more code operating on related data using mysql it. also, don't want tie persistence layer search layer. these should independent possible, , change in 1 should not affect other, as possible. otherwise, you'll have update both systems if either has change. querying mysql on ids fast, can use , leave slow part (querying on full text) elastic search.

Multiprocessing python 2.7 simple alternative -

i wondering regarding simple , popular alternative standard python 2.7 multiprocessing module. problem module huge memory consumption every child process has same amount of memory parent process. in case multi-threading isn't option because every child process heavy parsing. os type linux.

javascript - Can't get accordion to work properly in cshtml -

Image
i'm following example: http://jsfiddle.net/rniemeyer/mfegm/ javascript // using jquery-ui-1.11.4.js // , jquery-1.10.2.js // creates few tags loop through var tag = { userid: "muzzya", tagtext: "this text should collapsed in accordion" }; self.tags.push(new tag(tag, null)); self.tags.push(new tag(tag, null)); self.tags.push(new tag(tag, null)); var tag = function(tag, comments) { this.tag = ko.observable(tag); this.comments = ko.observablearray(comments); } cshtml <div class="panel-body" data-bind="foreach:tags,accordion: {}"> <h4> <a href="#" data-bind="text: tag().userid"></a> </h4> <div> // content here </div> </div> the result list, no accordion i'm not sure i'm doing wrong. edit: calling .accordion function init() { ko.applybindings(new viewmodel()); ko.bindinghandlers.accordion = { i...

internet explorer 11 - Redactor: image upload not being displayed in text editor -

i using redactor text editor giving me error. when try insert image clicking on 'browse' button in 'insert image' modal in internet explorer 11 image not inserted text area. i getting following errors: script65535: invalid calling object and: script5007: unable property '0' of undefined or null reference however, if drag , drop image in the 'drop file here' section of insert image modal image inserted text editor expected. the issue above occurs in ie 11. working fine in firefox, chrome , safari. i asking question on off chance has seen bug before. know going on here? thanks. i found simple solution issue. i using version 9.2.6 of redactor , updated latest version. error redactor.js file , not code. the second error message specified in question above may appear as: typeerror: rawstring.match(...) null in older or different browsers assume same solution applies.

Scrapy appears to be installed but can't be imported when in the python shell -

Image
i have used command: sudo pip install scrapy install scrapy inside of virtual environment. after having done so, used command: scrapy --version , got following screen: but when try import scrapy in python shell, import error. there specific way install scrapy within ubuntu 14.04 besides way provided in docs ? following guide: http://docs.python-guide.org/en/latest/dev/virtualenvs/ pip install virtualenv cd project_folder virtualenv venv source venv/bin/activate pip install scrapy deactivate #when ready leave if in virtual environment should see (venv) next command prompt. (i got in osx terminal bash) as mentioned others, running: which scrapy will tell binary is. should in under venv folder. tested on 2013 macbook pro

osx - Paste gif image into NSPasteboard -

i developing osx application. want paste gif image pasteboard. how can that? what have is nsimage nspasteboard what want paste image pasteboard. able paste png image need paste gif image. my existing code let imageurl = imageobject.imageurl! let filename = imageurl.lastpathcomponent var saveurl = nsurl(string: "file://" + nstemporarydirectory()) saveurl = saveurl?.urlbyappendingpathcomponent(filename!) // have data let data = nsdata(contentsofurl: imageurl) pasteboard.declaretypes([nstiffpboardtype], owner: nil) pasteboard.setdata(data!, fortype: "com.compuserve.gif") about 10 years ago same 1 asked how put gif onto nspasteboard? in apple discussion group , here answer. although 10 years old , nspasteboard methods changed since time answer still works. confess: advice bit dirty.

How Do I Write Text to a Google Doc using Drive API's Ruby Client? -

hello ruby/rails/google community! i'm looking correct way of making changes body of google doc stored in google drive using drive api ruby client. let's i've required 'google/api_client' , have authorized client , drive instance, , have starting template written in html. i have no trouble creating fresh templates , multipart-uploading them drive using @drive.files.insert to join file metadata: @file = @drive.files.insert.request_schema.new({ 'title' => "#{time.now.strftime('%m_%d_%y_')}eod", 'description' => "the end of day log #{time.now.strftime('%m_%d_%y')}", 'mimetype' => 'text/html', 'parents' => [{'id' => folder_id}] }) and html template represented by: @media = google::apiclient::uploadio.new('eod_template.html', 'text/html') having uploaded base template drive , capt...

java - Why is it possible to use these abstract methods? -

consider code page saving key - value sets sharedpreferences sharedpref = getactivity().getpreferences(context.mode_private); sharedpreferences.editor editor = sharedpref.edit(); editor.putint(getstring(r.string.saved_high_score), newhighscore); editor.commit(); why possibile use putint() method without providing implementation since it's abstract method? (see: sharedpreferences.editor ) shouldn't impossible do? kindly explain this? thanks. why possibile use putint() method without providing implementation since it's abstract method? editor instance of internal class implements sharedpreferences.editor interface. likely, instance of sharedpreferencesimpl.editorimpl .

python - How can I read inputs as integers? -

why code not input integers? on web says use raw_input() , read on stack overflow (on thread did not deal integer input) raw_input() renamed input() in python 3.x. play = true while play: x = input("enter number: ") y = input("enter number: ") print(x + y) print(x - y) print(x * y) print(x / y) print(x % y) if input("play again? ") == "no": play = false python 2.x there 2 functions user input, called input , raw_input . difference between them is, raw_input doesn't evaluate data , returns is, in string form. but, input evaluate whatever entered , result of evaluation returned. example, >>> import sys >>> sys.version '2.7.6 (default, mar 22 2014, 22:59:56) \n[gcc 4.8.2]' >>> data = input("enter number: ") enter number: 5 + 17 >>> data, type(data) (22, <type 'int'>) the data 5 + 17 evaluated , result 22 . w...

android - Cordova capture video feed from device camera. -

i trying make camera recording / editing app , installed https://github.com/apache/cordova-plugin-media-capture plugin , got working opens dialog , requires user pick platform record video , returns information. since want app recording looked into https://github.com/apache/cordova-plugin-camera this seems want images, there cordova video recording plugin? possible use either of above plugins?

java - Gradle test failed to find flowId on teamcity -

we using teamcity 9.0.3 , try run gradle build tests. but, failed following exception: [15:25:41][:test] failed find flowid [com.stub.apptest] [15:25:41][:test] java.lang.nullpointerexception: failed find flowid [com.stub.apptest] [15:25:41][:test] @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) [15:25:41][:test] @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:62) [15:25:41][:test] @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) [15:25:41][:test] @ java.lang.reflect.constructor.newinstance(constructor.java:422) i use gradle wrapper , 2.5 version of , teamcity agents build. how can fix this? well, found answer: bug of version. https://youtrack.jetbrains.com/issue/tw-42012 for fix may update version 9.0.4 or later.

C# Import from .NET DLL -

how import methods .net dll call c# code? i've tried both [dllimport...] approach , using reflection assembly. i'm inexperienced @ .net apologies if basic question. goal call lz4decompressor32().decompress(byte[]) . reflector shows lz4decompressor32 being derived type base type ilz4decompressor . of resides under exec guess parent namespace? screenshot: http://s0.uploads.im/keqxk.jpg i expect i'm messing namespace or type path i've tried every combination can think of. fyi old ctf challenge i'm doing learn. full challenge extracts next stage resource section calls lz4decompressor32().decompress() method on resource data. resourcemanager manager = new resourcemanager(name, assembly.getexecutingassembly()); byte[] compressed = (byte[]) manager.getobject("data"); return new lz4decompressor32().decompress(compressed); edit: more info, when debugging , breaking on assembly.loadfrom(...) following error: could not load file or assemb...

java - Eclipse error : button1 cannot be resolved or is not a field -

here mainactivity.java code : package com.dg.buttontest3; import android.os.bundle; import android.app.activity; import android.util.log; import android.view.menu; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; public class mainactivity extends activity implements onclicklistener{ button button; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); button = (button)findviewbyid(r.id.button1); button.setonclicklistener(this); } @override public void onclick(view v) { // todo auto-generated method stub log.d("dg","button clicked"); } } and here activity_main.xml code : <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" <button android:id="@+id/button1" ...

VB.net - Mousehover not sensitive -

i made picturebox change if mover on image takes long. can me please? here's code: private sub button2_mousehover(sender object, e eventargs) handles button2.mousehover button1.visible = true button2.visible = false end sub private sub button1_mouseleave(sender object, e eventargs) handles button1.mouseleave button1.visible = false button2.visible = true end sub thanking in advance if want adjust time mouse must pause on image, docs say; a typical use of mousehover display tool tip when mouse pauses on control within specified area around control (the "hover rectangle"). pause required event raised specified in milliseconds mousehovertime property. to achieve that, change value of systeminformation.mousehovertime in code. alternatively, has commented, use mouseenter event instead, trigger instantly.

In JGraphX, is the radius handled correctly in mxCircleLayout? -

in using mxcirclelayout, 1 can specify radius. seems, however, radius affects graph radius greater default based on graph bounds. in looking @ source code (jgraphx 3.3.1.1) mxcirclelayout, line 230 has: double r = math.max(vertexcount * max / math.pi, radius); where "r" used radius circle layout. shouldn't be double r = math.min(vertexcount * max / math.pi, radius); if want have smaller radius? perhaps i'm misunderstanding "radius" means, circle ought have natural meaning. , changing line gives me (smaller) circle want. the max used in order make sure vertices not overlap. see comment @ start of execute statement: // moves vertices build circle. makes sure // radius large enough vertices not // overlap however, seem use bounds of largest vertex, not useful if vertices have different sizes maximum larger average.

css - Resizable containers at the same level -

<div class="row container-row"> <div class="col-md-8 col-xs-12 no-padding-column"> <div class="video-container"> <img class="video-image" src="image.jpg"> <a href="#" class="js-play-video"> <img class="play-image" src="play.png"> </a> </div> </div> <div class="col-md-4 col-xs-12 no-padding-column"> <div class="text-content"> <h1>superious quality</h1> <p>sometext</p> </div> </div> </div> below style .panel-container { color: #fff; height: auto; position: relative; margin: 0px auto; } .panel-container .container-row { margin: 5%; } .panel-container .container-row .no-padding-column { padding-right: 0px; padding-left: 0px; } .panel-container .video-container { display: block; posit...

Mass Updating Database ASP.Net and C# -

i'm working on web page mass update table in database on sql server 2008 internship. stuck on how declare correct clause in commandtext. no where clause causes every row update same. clause where clauses stated where clli = @clli returns exception stating must declare scalar variable "@clli" . if add declare clause @clli no exceptions occur no updates occur either. have updated code 3 sql statements have tried commandtext @ bottom of post . appreciated, thank you. using system; using system.collections.generic; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols; using system.data.sqlclient; using system.collections; using system.componentmodel; using system.data; using system.drawing; using system.web.sessionstate; using system.web.ui.htmlcontrols; using system.web.ui.adapters; using transferobjects; using ccebusinessl; using system.io; using system.configuration; namespace webapplication3 { public partial class webform...