Posts

Showing posts from May, 2011

wpf - Explicit DataGrid CellStyle Setter is overridden by an implicit cellstyle in the same context? -

wpf - Explicit DataGrid CellStyle Setter is overridden by an implicit cellstyle in the same context? - i have weird issue datagrid in wpftoolkit (.net 3.5) , built in version in .net 4.0: when creating keyed datagrid -style explicit setter cellstyle keyed style works suspected. when creating keyless style datagridcell override explicit cellstyle -setter in datagrid -style. seems wrong. design or bug? <window.resources> <style targettype="datagridcell"> <setter property="background" value="blue" /> </style> <style x:key="cellstyle1" targettype="datagridcell"> <setter property="background" value="green" /> </style> <style targettype="datagrid"> <setter property="background" value="yellow" /> <setter property="cellstyle" value="{staticresource cellstyle1}...

Navigating back, forth and refreshing with WebBrowser class in Windows Phone 7 -

Navigating back, forth and refreshing with WebBrowser class in Windows Phone 7 - unless i'm beingness blind there appear no methods implemented in webbrowser class on windows phone 7 navigate backwards , forwards through pages within browser, nor refresh existing page? am right in assumption? can achieved way? i have tried using "javascript:history.go(-1)" uri , asking webbrowser object navigate it, didn't anything. you're right, webbrowser doesn't have back/forward/refresh methods. need invokescript javascript , there. invokescript works best pre-defined javascript functions you've defined on page. can this: webbrowser.invokescript("eval", "history.go(-1)"). that's not guaranteed work since eval not work if page has no tags or if eval has been overriden other script. windows-phone-7

sitecore8 - How to map to Sitecore Rules Field -

sitecore8 - How to map to Sitecore Rules Field - i'm having problem mapping rules info field in sitecore. i've got rendering parameters template has info field named "redirect rules." i'm using tds , glass map objects sitecore. in generated class, following: /// <summary> /// redirect rule field. /// <para></para> /// <para>field type: rules</para> /// <para>field id: 659373d6-c5c5-4851-aa1f-066f53218780</para> /// <para>custom data: </para> /// </summary> [global::system.codedom.compiler.generatedcodeattribute("team development sitecore - glassitem.tt", "1.0")] [sitecorefield(imy_name_rendering_parametersconstants.redirect_rulefieldname)] public virtual object /* unknown */ redirect_rule {get; set;} when effort value of "redirect rules" field in view rendering via getrenderingparameters<my_name_rendering_parameters>(); the...

zsh - GCC installed but command not found -

zsh - GCC installed but command not found - i'm new linux , i'm having hard time trying work. uninstalled , installed gcc few times. when run gcc --version , still says zsh: command not found . when go /usr/local/bin , run ls -l find multiple versions of gcc lrwxr-xr-x 1 ps032791 admin 33 jul 2 2014 c++-4.6 -> ../cellar/gcc46/4.6.4/bin/c++-4.6 lrwxr-xr-x 1 ps032791 admin 33 apr 6 11:58 c++-4.7 -> ../cellar/gcc47/4.7.3/bin/c++-4.7 lrwxr-xr-x 1 ps032791 admin 33 apr 6 15:27 c++-4.8 -> ../cellar/gcc/4.8.3_1/bin/c++-4.8 lrwxr-xr-x 1 ps032791 admin 32 apr 6 15:19 cloog -> ../cellar/cloog/0.18.1/bin/cloog lrwxr-xr-x 1 ps032791 admin 33 jul 2 2014 cpp-4.6 -> ../cellar/gcc46/4.6.4/bin/cpp-4.6 lrwxr-xr-x 1 ps032791 admin 33 apr 6 11:58 cpp-4.7 -> ../cellar/gcc47/4.7.3/bin/...

RichFaces FileUpload Add button tooltip different for Chrome and Firefox -

RichFaces FileUpload Add button tooltip different for Chrome and Firefox - the <rich:fileupload> add together button tooltip different when viewed in chrome , firefox. if hover mouse on add together button in showcase demo can see says "no files selected" in firefox , "no file chosen" in chrome. in application, utilize title attribute set tooltip text works chrome , not firefox. any ideas on might happening here? how tooltip beingness set in chrome/firefox? there way command it? google-chrome firefox richfaces

sql - SSRS: Need to group & sum items & sub items into one record -

sql - SSRS: Need to group & sum items & sub items into one record - i'm having ssrs issue creating study can grouping & sum similar items (i know in ways, requirement doesn't create sense, it's client wants). i have table of items (i.e. products). in cases, items can components of item (called "kits"). in scenario, consider kit itself, "parent item" , components within kit called "child items". in our items table, have field called "parent_item_id". records kid items contain item id of parent. sample of database following: itemid | parent_item_id | name | quantityavailable ---------------------------------------- 1 | null | kit | 10 2 | 1 | item 1 | 2 3 | 1 | item 2 | 3 4 | null | kit b | 4 5 | 4 | item 3 | 21 6 | null | item 4 | 100 item's 2 & 3 kid items of "kit a", item 5 kid i...

asp.net - Uncheck a radio button in case another one is checked in a ListView using jQuery -

asp.net - Uncheck a radio button in case another one is checked in a ListView using jQuery - i have list of radio buttons generated dynamically listview. each radio button refers id of different image. now instead of checking radio button want user able click on image instead , radio button checked automatically. far good. i've reached stage. however want user check 1 image, means if new image clicked radio button of previous ones must unchecked. tried many ways none worked. here script: $(document).ready(function () { $(function () { $(".smallsquarephoto").click(function () { var radiovalue = $(this).attr("myattribute"); //get value of myattribute $('input[myattribute=' + radiovalue + ']').attr('checked', 'checked'); //check radiobutton corresponds image clicked $("#smallsquarephoto" + radiovalue).css("border-color", "#51cf25"); //create...

sql - using MAX aggregate between two tables -

sql - using MAX aggregate between two tables - i have 2 tables, employer , position: employer eid ename position eid salary i need match eid between 2 tables, determine max salary is, , print ename. suggestions how can this? have tried multiple ways, nil seems work. i not sure set in max(salary) function: select ename employer, position employer.eid = position.eid to name(s) of people highest salary... using join: select e.name employer e bring together position x on x.eid = e.eid bring together (select max(salary) max_salary position) y on y.max_salary = x.salary using subquery: select e.name employer e bring together position p on p.eid = e.eid p.salary = (select max(salary) position) sql table aggregate max match

generics - How do I setup multiple ORed type bounds in Scala -

generics - How do I setup multiple ORed type bounds in Scala - is possible in scala: class mytest { def foo[a <: string _or_ <: int](p:list[a]) = {} } that is, type a string or int . possible? (similar question here) not possible set it, can using type class pattern. example, here: sealed abstract class acceptable[t] object acceptable { implicit object intok extends acceptable[int] implicit object longok extends acceptable[long] } def f[t: acceptable](t: t) = t scala> f(1) res0: int = 1 scala> f(1l) res1: long = 1 scala> f(1.0) <console>:8: error: not find implicit value parameter ev: acceptable[double] f(1.0) ^ edit this works if class , object companions. on repl, if type each on different line (ie, "result" appears between them), not companions. can type below, though: scala> sealed abstract class acceptable[t]; object acceptable { | implicit object intok extends acceptable[int] | implicit...

jQuery Ajax Call, give offline/ "not able to connect" message -

jQuery Ajax Call, give offline/ "not able to connect" message - yes, have normal ajax phone call calls imback.php, checks new stuff if have been blur 50 sec. now if disconnects internet, , when on focus, not able imback.php.(i think 404 error) create offline msg/timeout thing, alerts "you have no net connection or else went wrong". how can that? $.ajax({ url: 'imback.php', success:function(msg) { $('.newstuffsinceactive').prepend(msg); } }) you can utilize error callback this: $.ajax({ url: 'imback.php', success: function(msg) { $('.newstuffsinceactive').prepend(msg); }, error: function(xhr, status, error) { alert("an error occured: " + error); } }) ajax jquery

iphone - Memory warning level 1 due to UIImage -

iphone - Memory warning level 1 due to UIImage - i working on 1 component need scale , rotate image. next flow of component select image photo library -> show image in uiimageview -> scaling -> save image in document. this works fine image having low resolution. but 1 time select image high resolution first memory warning level 1. cann't release image, need proceed farther same image. i come know image unpacked ( width * height * 4 ) if select image of 1800 * 1200 memory consumed 8.6 mb [ checked instrument ] . can 1 help me come on issue? creates 2 queuestion can utilize images high resolution ? what 2 uiimageview 2 high resolution images? thanks, sagar you alter order of operations bit. select image photo library -> scale image -> save scaled image documents directory -> show scaled image in uiimageview. scaling , saving image takes time, user have bit of wait before see image in uiimageview. displaying activity indicator ca...

jboss - Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf.xml -

jboss - Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf.xml - hi getting error when seek run camel project in fuse container org.springframework.beans.factory.parsing.beandefinitionparsingexception: configuration problem: failed import bean definitions url location [classpath:quote-endpoints.xml] offending resource: url [bundle://251.0:0/meta-inf/spring/applicationcontext.xml]; nested exception org.springframework.beans.factory.parsing.beandefinitionparsingexception: configuration problem: failed import bean definitions url location [classpath:meta-inf/cxf/cxf.xml] offending resource: osgi resource[classpath:quote-endpoints.xml|bnd.id=251|bnd.sym=null]; nested exception org.springframework.beans.factory.beandefinitionstoreexception: ioexception parsing xml document osgi resource[classpath:meta-inf/cxf/cxf.xml|bnd.id=251|bnd.sym=null]; nested exception java.io.filenotfoundexception: osgi resource[classpath:meta-inf/cxf/cxf.xml|bnd.id=2...

java - Reading delimited data from text file into different RDDs -

java - Reading delimited data from text file into different RDDs - am new apache spark java have text file delimited space below 3,45.25,23.45 5,22.15,19.35 4,33.24,12.45 2,15.67,21.22 here columns mean: 1st column: index value 2nd column: latitude values 3rd column: longitude values am trying parse info 2 or 3 rdds (or pair rdds). code far: javardd<string> info = sc.textfile("hdfs://data.txt"); javardd<double> data1 = data.flatmap( new flatmapfunction<string, double>() { public iterable<double> call(double data) { homecoming arrays.aslist(data.split(",")); } }); something (use java 8 improve readability)? javardd<string> info = sc.textfile("hdfs://data.txt"); javardd<tuple3<integer, float, float>> parseddata = data.map((line) -> line.split(",")) .map((line) -> new tuple3<>(parseint(line[0]), parsefloat(line[1]), parse...

android - progressBar dialog not counting upwards from 0, just appears for a second -

android - progressBar dialog not counting upwards from 0, just appears for a second - i have progressbar dialog when click button, dialog appears , message appears progress sticks @ 0% , goes next activity instead of going 0%-100% expected. can see i'm going wrong? package win.jay.todo.list; import android.app.activity; import android.content.intent; import android.os.bundle; import android.view.view; import android.app.progressdialog; import android.view.menu; public class welcome extends activity { private progressdialog progress; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_welcome); progress = new progressdialog(this); } //onclick - go tasks public void dostuff(view view) { intent intent = new intent(welcome.this, tasks.class); startactivity(intent); progress.setmessage("finding tasks..."); ...

php - My API connection between Shipwire and Magento is giving "Internal server error" -

php - My API connection between Shipwire and Magento is giving "Internal server error" - i utilize shipwire.com stock inventory of products sell online on magento webshop. i setup api connection between magento , shipwire (like explain in tutorials). connection isn't working. contacted shipwire inquire going on , told me this: we receiving "internal server error" scheme when attempting send message (post) magento soap api. unfortunately beyond scope of shipwire can debug, , typically indicates configuration problem magento instance. they it's magento configuration problem or something. tried googling answers no reply found. contacted magento ignored question. does know cause of this? or should do? php api magento soap internal-server-error

VLookup Macro in Excel -

VLookup Macro in Excel - i have excel workbook 2 worksheets. worksheet has several names in each name in different column , worksheet b contains same names in worksheet , sec column containing dates. example: worksheet a. worksheet b. name. name. dates sean jake 11/13/15 jake sean 10/11/14 tom. chris 12/12/15 what trying set macro calls vlookup , passes name name column in worksheet search parameter on worksheet b. 1 time name found on worksheet b, returns date. manually having info pulled hard coding next vlookup in column on worksheet a. =vlookup(a2,'worksheet b'!a:b,2,false) any suggestions , help appreciated. thank you. you can utilize worksheet functions within vba. macro takes advantage of them returning values find appropriate cells. sub auto_vlookup() dim rw long, wsb worksheet set wsb = worksheets("worksheet b") worksheets("w...

css - Cannot scroll down to the end inside a tab panel in center layout -

css - Cannot scroll down to the end inside a tab panel in center layout - i struggling next problem, hint appreciated. in jquery ui layout in center panel set jquery ui tab, within tab set contents. contents taking more space available, have scroll bar on containing div , not on whole tab nor on center panel. indeed have tab headers visible. what did: setting center__contentselector jquery ui layout centre panel tab widget (so have header , footer displayed ok) setting overflow: hidden both on layout centre panel , tab widget setting overflow: auto on div of contents giving heights both tab widget , contents' div the final result looks fine, the scroll bar can't display lastly items, whatever tried. it's impossible scroll limit. here fiddle shows looks like: http://jsfiddle.net/mguijarr/288yaz15/ any ideas ? your div's height seems have 80 pixels each time, because of tab title part. subtract 80 pixels 100%: #tab_1 { height: calc...

php - Inserting multiple image names into database using an array -

php - Inserting multiple image names into database using an array - i have code - check below. code works fine realised adds files uploads folder , doesn't add together database. can help me fill out blank? i'd utilize array , have simple possible. please scroll downwards comment code executed , image goes folder. uploader.php <?php if (isset($_post['submit'])) { $j = 0; // variable indexing uploaded image. $target_path = "uploads/test/"; // declaring path uploaded images. ($i = 0; $i < count($_files['file']['name']); $i++) { // loop individual element array $validextensions = array("jpeg", "jpg", "png"); // extensions allowed. $ext = explode('.', basename($_files['file']['name'][$i])); // explode file name dot(.) $file_extension = end($ext); // store extensions in variable. $target_path = $target_path . md5(uniqid()) . "." . $ext[count(...

mysql - AmStockChart by json did not display -

mysql - AmStockChart by json did not display - i want utilize amchart , getting info charts mysql json. display not things. this js source: <script type="text/javascript"> var chart2; $(document).ready(function(){ $.getjson("data", function (data) { chart2.dataprovider = data; chart2.datadateformat = "yyyy-dd-mm"; chart2.validatedata(); }); }); var chart2 = amcharts.makechart("chartdiv2", { type: "stock", theme: "none", pathtoimages: "http://www.amcharts.com/lib/3/images/", datasets: [{ title: "participants", fieldmappings: [{ fromfield: "student", tofield: "student" }], categoryfield: "date" } ], datadateformat: "yyyy-mm-dd", panels: [...

android - JSON to Table in excel using javascript -

android - JSON to Table in excel using javascript - we need sqlite db info dump excel.excel placed sdcard in location.we did sqlite db info excel. sqlite db info convert json , passed excel it's we have code this function ondeviceready() { //alert("seeeeee1"); window.requestfilesystem(localfilesystem.persistent, 0, gotfs, fail); } function gotfs(filesystem) { //alert("seeeeee2"); filesystem.root.getfile("hitsabcapp.xls", {create: true, exclusive: false}, gotfileentry, fail); } function gotfileentry(fileentry) { //alert("seeeeee3"); fileentry.createwriter(gotfilewriter, fail); } function gotfilewriter(writer) { writer.onwriteend = function(evt) { }; writer.write(getallelementsjson); } but need please guide me .we need json info convert table , placed table in excel. javascript android cordova table import-from-excel

c++ 'undefined reference to' error -

c++ 'undefined reference to' error - i'm having 1 of "undefined reference " errors when compiling c++ program. know mutual pitfall, far unable figure out i'm doing wrong. here's relevant code. ex1two_sum.h: #ifndef ex1two_sum_h #define ex1two_sum_h #include <vector> using namespace std; namespace ddc { class ex1two_sum { public: void f(); protected: private: }; } #endif ex1two_sum.cpp: #include <vector> #include <cstddef> #include <iostream> using namespace std; namespace ddc { class ex1two_sum { public: void f(){ cout << "works" << endl; } }; } and finally, main.cpp: #include <iostream> #include "ex1two_sum.h" using namespace std; using namespace ddc; int main() { ex1two_sum ex1; ex1.f(); homecoming 0; } i compile follows: g++ -std=c++11 -c ex1two_sum.cpp g++ -std=c++11 -c main.cpp g++ ex1two_sum.o main.o yielding next ...

Debugging Qt program with Microsoft Visual Studio 2013 -

Debugging Qt program with Microsoft Visual Studio 2013 - i created complex programme based on different modules load after programme has started. programme construction similar qtcreator. frankly speaking i've taken part of code qtcreator. (plugin management system) i'm trying debug programme visual studio 2013. debugger doesn't show right values , skip lines of code or jump next line of code previous line. seems me pdb file doesn't correspond proper file. how may possible? should set specific or additional parameters debugging qt programs in msvs 2013? might reason of such behaviour of debugger? ps. installed qt 5.4.1 windows 32-bit (vs 2013, 705 mb) along visual studio add-in 1.2.4 qt5 (156 mb) properly. i've made cleanup , rebuild several times, tried delete related files after compilation - didn't help. go project property pages-> c/c++ ->optimization. set 'optimization' property 'disabled(/od)'. thanks saz! ...

html - css linear-gradient in Internet Explorer 9 or in old a version -

html - css linear-gradient in Internet Explorer 9 or in old a version - i utilize linear gradient tag making skewed line 1px width. in ie looks blurred. other browsers (opera, google chrome, firefox, safari) show line correctly. @media (min-width: 986px) { .issue .issue-descr { border-top: solid 1px #fff; } .issue .issue-descr:after { content: ""; background: -ms-linear-gradient(to top right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(50% - 1px), rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) calc(50% + 1px), rgba(255, 255, 255, 0) 100%); background: -webkit-linear-gradient(to top right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(50% - 1px), rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) calc(50% + 1px), rgba(255, 255, 255, 0) 100%); background: -moz-linear-gradient(to top right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(50% - 1px), rgba(255, 255, 255, 1) ...

javascript - dcDrilldown menu with angular not rendering correctly -

javascript - dcDrilldown menu with angular not rendering correctly - im using angular load menu object db , using dcdrilldown render menu. angular getting right menu object, , loading scope. top level displayed incorrectly, , none of sub objects displayed @ all. heres screenshot of wrong rendering: http://imgur.com/levdtve.png im not sure if problem angular code or dcdrilldown or what. index.html <body> <div ng-controller="menu" class="blue"> <ul id="drilldown-2"> <li> <a href="#0">&nbsp; {{menu.text}}</a> <ul> <li ng-repeat="mi in menu.items"> <ng-include src="static/menuitem.html"></ng-include> </li> </ul> </li> </ul> </div> </body> static/menuitem.html <a class="list-group-item" ng-href="{{mi.href}}"> <i class="{{mi....

php - What is the PDO equivalent of mysql_real_escape_string? -

php - What is the PDO equivalent of mysql_real_escape_string? - this question has reply here: how can prevent sql-injection in php? 28 answers how can security pdo or equivalent pdo secure function? function secure($string){ return(mysql_real_escape_string(htmlspecialchars(strip_tags($string)))); } man php: have utilize function pdo::quote() http://php.net/manual/en/pdo.quote.php php mysql security pdo

c# - Generics - Passing instances as a base type -

c# - Generics - Passing instances as a base type - i'm working on info access layer our new application, it's not big application i've decided go dao pattern, converting each model item dao item before storing database through stored queries. much possible of i've used generic interfaces , abstract classes remove repetitive operations i've nail bit of road block. have interface dao conversion classes looking following: internal interface idaoconverter<tmodel, tdao> tmodel : modelitem tdao : daoitem { todao(tmodel inmodel); indao); } this works fine far , fits it's function, specify model type , dao type converted (1-1 relationship) in class definition , functions created match these types. instances of these dao converters held in mill create retrieval easier. the next thing want create info access classes utilize , want design in generic way. what i'm after way inquire dao converter mill want dao converter ...

android - Get path of DCIM folder on both primary and secondary storage -

android - Get path of DCIM folder on both primary and secondary storage - i writing application should upload pictures taken photographic camera stored in dcim/camera folder on both internal memory , sd card. this means before every upload available storages have checked presence of images. i utilize environment.getexternalstoragepublicdirectory(environment.directory_dcim) access primary storage, can either sd card or internal memory (depends on device). from documentation: "note: don't confused word "external" here. directory can improve thought media/shared storage. filesystem can hold relatively big amount of info , shared across applications (does not enforce permissions). traditionally sd card, may implemented built-in storage in device distinct protected internal storage , can mounted filesystem on computer." my question is, how can access secondary storage check presence of images in dcim/camera folder without hard-coding path, not wor...

Does Anyone have: iCloud Core Data IOS8 WORKING sample code? -

Does Anyone have: iCloud Core Data IOS8 WORKING sample code? - does have: icloud core info ios8 working sample code? i've found pre ios8 , apple documentation doesn't address changes made. when migrating ios6 or ios7 ios8 moc can no longer found. core-data icloud nsmanagedobjectcontext

What's the best way to learn about how to develop macros (syntax, system libraries) in Visual Studio? -

What's the best way to learn about how to develop macros (syntax, system libraries) in Visual Studio? - i'm working on c# project has post-build event command line looks this: for /r "$(projectdir)testdata\goldfiles" %%f in ("*.csv") @xcopy "%%f" "r:\root\$(targetname)\1.0\testdata\goldfiles\" /y this first exposure visual studio macros. can understand plenty know it's doing. want extend macro re-create subdirectories , files. pretty basic stuff. should able figure out myself. thought find , crack open online macro development guilde, or that, can't find guide anywhere. what's best way larn syntax , development of macros visual studio? well, there's 2 parts you're doing here in example. the first $(macrovariable) variables visual studio uses. these substitute in appropriate values it's own settings , settings of project. best way utilize these imo go post-build event editor in pr...

mvvm - Question regarding missing RemoveHandler in WPF application function -

mvvm - Question regarding missing RemoveHandler in WPF application function - we have few scenarios in our wpf/mvvm application window beingness instanciated , opened within confines of method. simplistic example: private sub subopenwindow dim myviewmodel = new viewmodel1 'create viewmodel window1 utilize datacontext addhandler myviewmodel.someevent, addressof subhandlesomeevent dim mywindow = new window1(viewmodel1) mywindow.show end sub private sub subhandlesomeevent 'do stuff end sub now - debating whether or not utilize of addhandler without subsequent removehandler (normally big no-no) causing memory issues given addhandler declaration decalred , used within of subopenwindow method , there no obvious means of performing removehandler call. move viewmodel declaration more global level not seem clean. the question is: removehandler necessary in scenario? or garbage collection clean 1 time window has been closed? you handle window...

objective c - How to append two NSMutableArray's in Iphone sdk or append an NSArray With NSMutableArray? -

objective c - How to append two NSMutableArray's in Iphone sdk or append an NSArray With NSMutableArray? - i need append 2 nsmutablearray's can 1 suggest me how possible? my code is: nsmutablearray *array1 = [appdelegate gettextlist:1]; nsarray *array2 = [appdelegate gettextlist:2]; [array1 addobjectsfromarray:array2];//i getting exception here. anyone's help much appreciated. thanks all, lakshmi. what's happening, [appdelegate gettestlist:1] not returning nsmutablearray , nsarray . typecasting array mutable holding pointer not work in case, instead use: nsmutablearray *array1 = [[appdelegate gettextlist:1] mutablecopy]; nsarray *array2 = [appdelegate gettextlist:2]; [array1 addobjectsfromarray:array2]; or store 'textlist' variable have in appdelegate nsmutablearray in first place. assuming have nsarray of nsarrays (or mutable versions). eg. // in class interface nsmutablearray *textlists; // in function in add together lists a...

ruby - How to setup RHC for openshift? I encountered: `can't satisfy 'highline (~> 1.6.11)', already activated 'highline-1.7.1' (Gem::LoadError) -

ruby - How to setup RHC for openshift? I encountered: `can't satisfy 'highline (~> 1.6.11)', already activated 'highline-1.7.1' (Gem::LoadError) - i need utilize openshift deploy web application , modify files database connection , install rhc. cannot setup. installed rbenv, don't know how use. mac bought 1 week. basically, not many softwares installed. finish error message follows: /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1206:in `block in activate_dependencies': can't satisfy 'highline (~> 1.6.11)', activated 'highline-1.7.1' (gem::loaderror) /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `each' /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `activate_dependencies' /system/library/frameworks/ruby.framework/versions/2.0/usr/...

java - How to draw a line that spins around and around? -

java - How to draw a line that spins around and around? - i'm trying draw line spins around , around, unfortunately, i'm not managing right far. if know how wrong please point out me. thanks. oh, btw, paints out fine, line not managing spin around in finish circle. spins halfway, , spins backward. public class test2 extends drag { static int x1 = 200; static int x2 = 400; static int y1 = 250; static int y2 = 250; static int whichquad; static int initialx1 = 200; static int initialx2 = 400; static int initialy1 = 250; static int initialy2 = 250; public static void main(string args[]) throws interruptedexception { // maybe y1, , y2 have x2/2? yesssssssssssssssssss // okay given. initial y1 have equal initali y2; // x1+(x1/2) // if x1 == 0, quad == 1; // if x1 == 5, , y1 == 0, quad == 2; // if x1 == 10, quad == 3; // if x1 == 5, , y1 == 10, quad == 4; // if x1 == initialx1, quad == 1; // ******if x1 == (initialx1/2)+(initialx2...

In Excel, if no value needs to be selected from a listbox in a userform, how can I prevent the contents of a range from being cleared? -

In Excel, if no value needs to be selected from a listbox in a userform, how can I prevent the contents of a range from being cleared? - for example, there listbox select sample type if needs changed in spreadsheet existing data. have no code listbox, have made changes in properties identify source of list , leave single selection. there command button code behind send listbox , textbox values user entered active sheet. private sub cmdsendpiddata_click() cells.autofilter 'advance lastly row range("b1").end(xldown).offset(1, 0).select 'constants , user info range("b" & (activecell.row)).value = "'" & samplepointid range("j" & (activecell.row)).value = "'pid measurement" range("n" & (activecell.row)).value = "'ppb" range("f" & (activecell.row)).value = "'" & dtpsampledate.value range("g" & (activecell.row)).value = "...

java - IntelliJ IDEA complains about null check for @NotNull parameter -

java - IntelliJ IDEA complains about null check for @NotNull parameter - i want utilize jetbrains @nullable/@notnull annotations in project. i have class @notnull field. constructor naturally not take null throws exception instead. of course of study parameter of constructor annotated @notnull. why intellij thought complain null-check? documentation states: an element annotated notnull claims null value forbidden homecoming (for methods), pass (parameters) , hold (local variables , fields). but still have check null-values @ runtime in case build scheme not understand annotation , accepts statement new car(null) . wrong? if utilize jetbrains @notnull annotation, runtime assertions added compiled bytecode that'll guarantee null not passed there. makes no sense write same checks in source code. approach works quite us. if utilize other annotations or don't want instrument bytecode, can disable particular warning pressing alt+enter on it, ...

jsbin - Javascript output functions other than console.log -

jsbin - Javascript output functions other than console.log - am using js bin , starting study javascript. in book using output shown using console.log(function). not show anything, , beingness forced utilize alert(function) see output. there other ways can see output in js bin. console.log output it, cos command prompt not show anything. js bin has 'console' tab, alongside html, css, javascript , output tabs. typing console.log in javascript tab displays output in console tab. javascript jsbin

c# - XML error when trying to get all knowledge base articles (Kayako .NET API) -

c# - XML error when trying to get all knowledge base articles (Kayako .NET API) - i'm trying implement kayako knowledge base of operations on client portal using .net api asp.net mvc framework, , i'm trying articles, looks in backend-class: var articles = client.knowledgebase.getknowledgebasearticles(); when this, error says: "there error in xml-document (line, column)". i'm doing atm. getting tickets, users , departments work charm, know kayako client setup correctly. inner exception says: "when converting string datetime, parse string take date before putting each variable datetime object." and inner exception says: "make sure method arguments in right format." has seen error? i've looked xml-document error , seems have civilization during parsing of dates. live in sweden, don't know how handle since don't manually parse anything. method kayako api have no access actual code. want save articles knowledgebasea...

javascript - jQuery: Pause button to pause all other actions -

javascript - jQuery: Pause button to pause all other actions - i'm making little game , have button pause game. how can "pause" game doing actions, when clicking "resume" resume actions if nil happened? let's have complex coding, can't implement little thing in 1 function: needs cover "busy" things. thank time! pause button: function pausegamebtn() { $("#pause").click(function() { if (pausebtnclicked == true) { // ... } else { // ... } }); } a typical game loop goes through single point of code. timer phone call regularly , single place need check paused state. this simplified, basic thought is: var paused = false; // endless game loop setinterval(function(){ if (!paused){ rungameloop(); // process input => calculate => render etc } }, 50); $("#pause").click(function() { paused = true; }); $("#res...

osx - Command-line access to OS X's keychain - How to get e-mail address associated with account -

osx - Command-line access to OS X's keychain - How to get e-mail address associated with account - i'm writing bash command-line tool accesses keychain emulating web browser communicate web pages. it's quite straightforward password stored in keychain there: password=`security find-internet-password -gs accounts.google.com -w` but it's bit more tricky extract email address, specific command returns lot of information: $security find-internet-password -gs accounts.google.com /users/me/library/keychains/login.keychain" class: "inet" attributes: 0x00000007 <blob>="accounts.google.com" 0x00000008 <blob>=<null> "acct"<blob>="my-email-address@gmail.com" "atyp"<blob>="form" "cdat"<timedate>=0x32303135303333303134333533315a00 "20150330143531z\000" "crtr"<uint32>="rimz" "cusi"<...

android - Dummy ImageView not showing image -

android - Dummy ImageView not showing image - it showing image in android studio preview doesn't show when i'm running on device. ideas why happens? what's wrong code? <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/myimage" /> </relativelayout> in add-on comment i've added few possible soultions. unusual image isn't showing already. show in imageview in xml gui design view? anyway here 2 possible solutions: xml: <imageview android:layout_width="match_parent" android:layout_height="match_parent" android:...

windows - .NET WinForms Custom Control: how to get a reference to the containing form -

windows - .NET WinForms Custom Control: how to get a reference to the containing form - is there way, when creating winforms custom control/user control, reference @ runtime form command placed on, access various properties of form? rather not pass reference form constructor of control, as, various reasons, need maintain default constructor no parameters. one example: have several custom controls encapsulate win32 api calls, , of calls require window handles passed parameters. able retrieve handle of containing form can pass api function. another example: have custom command provides "toast"-style user notifications. have alternative of opening notification form in location relative location of main application form, such centered on main window, off right, etc. not possible, obviously, without knowing coordinates of main application's window. i could resort using findwindowex()-type api calls in cases, feels kludge, , not work in cases. does know if poss...

Some questions about Stream Priority in HTTP/2 -

Some questions about Stream Priority in HTTP/2 - after reading http/2 specification, there curious stream priority. in first paragraph @ "5.3.4 prioritization state management", when stream removed dependency tree, dependencies can moved become dependent on parent of closed stream. weights of new dependencies recalculated distributing weight of dependency of closed stream proportionally based on weights of dependencies. when parent stream closed, these paragraph describes dependencies's weights recalculated. first question. without additional headers or priority frame, can stream's weight set headers or priority frame recalculated? weight mentioned these paragraph recalculated. word, weight mentioned these paragraph equal stream's weight set headers or priority frame. in sec paragraph @ "5.3.4 prioritization state management" streams removed dependency tree cause prioritization info lost. resources shared between st...

Live preview of wordpress theme customizer -

Live preview of wordpress theme customizer - i want give user upload logo wordpress customizer api. ok without live preview.when user upload logo doesn't live preview in theme.but when save , publish appears in theme front end end.i can't understand why? give preview block code please give me proper code in there.the given code showing location of logo image.thank you. wp.customize( 'tctheme_logo_image', function( value ) { value.bind( function( ) { $('.navbar-header a').html(to) }); }); wordpress

javascript - Can't Upload Image URL with Froala Editor using PHP -

javascript - Can't Upload Image URL with Froala Editor using PHP - i have problem setting froala editor on uploading image using php. i have read documentation of froala editor: [enter link description here][1] here js function: $(function() { $('#edit-ru').editable({ inlinemode: false, imageuploadurl: 'upload_image.php' }).on('editable.imageerror', function (e, editor, error) { // custom error message returned server. if (error.code == 0) { alert("error"); } // bad link. else if (error.code == 1) { alert("bad link"); } // no link in upload response. else if (error.code == 2) { alert("no link"); } // error during image upload. else if (error.code == 3) { alert("during image"); } // parsing response failed. else if (error.code == 4) { alert("parsing error...

asp.net mvc - Summernote and form submission in MVC c# -

asp.net mvc - Summernote and form submission in MVC c# - i using summernote plugin text box: http://summernote.org/#/getting-started#basic-api this form have using summmernote: <div class="modal-body" style="max-height: 600px"> @using (html.beginform()) { @html.validationsummary(true) <fieldset class="form-horizontal"> <div id="textforlabellanguage"></div> <button type="submit" class="btn btn-primary">save changes</button> @html.actionlink("cancel", "index", null, new { @class = "btn " }) </fieldset> } </div> <script type="text/javascript"> $(document).ready(function () { $('#textforlabellanguage').summernote(); }); </script> now, in controller, code have: public actionresult create(userinfo newinfo , [bind(prefix = ...

c++ - How do you fix a program from freezing when you move the window in SDL2? -

c++ - How do you fix a program from freezing when you move the window in SDL2? - i'm making little game friend , 1 problem when drag window around, freezes , programme stops until allow go. searched simple solution found out happens everything. also, screws delta time since acts long frame. there way either have programme go on running while move or if that's complicated, prepare delta time? thanks? your application "freezing" because has winmain loop similar this: while (true) { if(peekmessage(&msg,null,0,0,pm_remove)) { translatemessage(&msg); dispatchmessage(&msg); } else { tickgame(); } } so instead of ticking processing wm_move message . 1 simple work around phone call games tick function within move message, or perhaps makes sense pause game when first move message , unpause if haven't gotten 1 sec or two. is, people going dragging window while playing, unlikely. to re...

html - List shifted right -

html - List shifted right - i can't seem figure out how list of links centered. seems shifted right me. sorry simple question, i'm new this. http://jsfiddle.net/mzm7szqn/ ul{ text-align:center; width:450px; margin:0 auto; font-family:arial; list-style-type:none; } li{ font-family:osr; display:inline; padding: 5px; } <ul> <li><a href = "#">web page</a></li> <li><a href = "#">after effects</a></li> <li><a href = "#">premiere</a></li> <li><a href = "#">ableton live</a></li> <li><a href = "#">blender</a></li> <li><a href = "#">auto cad</a></li> </ul> your <ul> has padding of 20px; inherited. seek adding this ul{...

django - HTTP request with Python : TypeError: an integer is required (got type socket) -

django - HTTP request with Python : TypeError: an integer is required (got type socket) - i'm facing unusual bug while trying retrieve resource via http. seems happen http client (tried requests , urllib same results). my project uses django, , run tests using tox , standard django command python manage.py test . when run test suite , unit test makes http request (e.g via requests.get('http://example.com') ), tests fails error, test suite go on until end, , hangs. have manually kill process via command line. after investigations, set try / except block arount http request, , got next stacktrace: file "/mycomputer/python3.4/site-packages/requests/api.py", line 68, in homecoming request('get', url, **kwargs) file "/mycomputer/python3.4/site-packages/requests/api.py", line 50, in request response = session.request(method=method, url=url, **kwargs) file "/mycomputer/python3.4/site-packages/requests/sessions.py", line 4...

logging - How do you get the variables passed into function using macros (objective c) -

logging - How do you get the variables passed into function using macros (objective c) - does know how dynamically variables values passed function sake of logging ? i'm looking simple way (like using compiler macro) able log function, , variable values passed (which written log file can find inputs cause functions crash) i've been trying #define nfdebug( s, ... ) nslog( @"debug: %s: %@", __pretty_function__, \ [nsstring stringwithformat:(@"%@"), ##__va_args__] ) ,which gives everything, variables values i utilize this: #ifdef your_debug_enabler_symbol_only_set_in_debug_builds #define debug_only(_code_) _code_ #else #define debug_only(_code_) #endif #define debuglog(_str, ...) debug_only(nslog(@"%s: " _str, __func__, ## __va_args__)) note there no comma before _str in nslog - means string utilize in calling code appended (by compiler) "%s: " string become composite format string nslog. whatever parameters wa...

email - PHP IMAP connecting to server TIMEOUT -

email - PHP IMAP connecting to server TIMEOUT - i'm coding simple email client app php. on local dev server works fine, when move same script on production server "can't connect secure.emailsrvr.com,993: connection timed out" response. tried everything, searching google 2 days, no solution found! both servers have exact configuration, there no issues that! phpinfo() same (imap enabled, ssl, ... extensions included, server log has no errors) the username, password , server info same , 100% right (if alter credentials or server info right error , not timeout). server back upwards guys assured me the ip not blocked. very simple connect script utilize (here stucked). port correct, host! $mbox=imap_open("{imap.emailsrvr.com:993/imap/ssl}inbox", "my_user", "my_pass"); anyone had similar issues? regards, jernej gololicic if oses different it's have different imap extensions installed well. check out: ht...

javascript - Forcing $scope.$watch to only fire once -

javascript - Forcing $scope.$watch to only fire once - $scope.$watch('text', function () { $scope.obj = new text($scope.text); console.log('hi!'); }); // hi! // hi! how can prevent $watch firing multiple times? not defining or changing $scope.text @ time before snippet above. attempted test newvalue !== oldvalue did not alter anything. edit: i have narrowed downwards issue directive issue. input box beingness watched within custom directive, reason effecting ng-model of input box multiple times. $scope.$watch(..) returns unbind function, this: var unbind = $scope.$watch('text', function () { $scope.obj = new text($scope.text); console.log('hi!'); unbind(); }); this cause fire, , unbind after firing once. edit: for valuechanges: $scope.$watch('text', function (nv, ov) { if (ov != nv) { $scope.obj = new text($scope.text); console.log('hi!'); } });...

How to match a regex in python, either completely or partially -

How to match a regex in python, either completely or partially - this basic question i've searched bit , still having doubts. let's take next regex example: regex_example = re.compile('\d{10}\s\d-\d{3}-\d{3}-\d{4}') now let's imagine there string may contain substrings matching total length of regex, such '1234567890 1-123-456-7890' or may contain substrings match first part of regex, illustration '1234567890 1-123'. i modify regex (or utilize solution) allowing me match substring has 14 or more char , matches regex either partially or entirely. code find: '1234567890 1-1' (has 14 characters , matches start of regex) or '1234567890 1-13' or '1234567890 1-134' and forth, total length of regex. you can create part after first 14 characters optional: regex_example = re.compile( '(\d{10}\s\d-\d(?:\d{0,2}(?:(?:-\d{0,3})?(?:-\d{0,4})?)?)?)') regex demo python regex

qpython3 - Passing commandline arguments to QPython -

qpython3 - Passing commandline arguments to QPython - i running simple client-server programme written in python, on android phone using qpython , qpython3. need pass commandline parameters. how do that? just write wrapper script parameters , pass real script using function execfile, , set script /sdcard/com.hipipal.qpyplus/scripts or /sdcard/com.hipipal.qpyplus/scripts3 (for qpython3). then can see script in scripts when clicking start button. qpython qpython3

encryption - Cycle count and number of instructions, assembly programming on MSP430 -

encryption - Cycle count and number of instructions, assembly programming on MSP430 - i have assembly programme written msp430 following: load memory - plain text load memory - key encrypt plain-text using key now want calculate number of cycles , instructions takes perform encryption. how can go this? encryption algorithm pretty complex , not 1 can calculate number of cycles off of scratch paper. i can provide other info if need be. in advance. assembly encryption instructions cpu-cycles

How to authenticate user by facebook using Scala / Play Framework 2.3.8? -

How to authenticate user by facebook using Scala / Play Framework 2.3.8? - i'm using scala 2.11.5 , play framework 2.3.8. have tried couple of ways create authorization facebook far. none of them worked me. asked question issues. unfortunately didn't much helpful response until now. tried way 1 tried way 2 tried way 3 tried way 4 i'm frustrated @ point. know there way authorize user , fetch basic user info such name, email, etc. please allow me know how or possible @ all? in advance! facebook scala playframework-2.3

java - Create system call to run my python code in jsp file -

java - Create system call to run my python code in jsp file - what i'm trying create jsp page phone call python code. i'm trying phone call python code scheme function in jsp. i'm creating page create cross domain phone call page jsp page. can tell me how can create scheme phone call python code? run next command execution of python code in terminal: root@user:/folder # python p111.py i tried next code <html> <body> hello! time <script> process qq=runtime.exec(new string[] { "./dsapce/webapps/jspui/p111.py", "p111.py", }, null, new file("./dsapce/webapps/jspui/p111.py")); qq.waitfor(); </script> </body> </html> something not correct.. take @ java's runtime.exec() , or processbuilder if need fancier. but jython. lets run python code in java. and avoid putting business logic in jsps; it's frowned upon—they're improve templating. set forwarding code in ser...

Converting from cmake to handwriten makefiles -

Converting from cmake to handwriten makefiles - i trying cross compile ejdb database mips based system. have used cmake create create files , scheme working uses automake (sqlite3 running on scheme now). considering on writing own makefile , utilize them connect rest of build scheme (makefiles). how can produce handwritten makefiles if have cmake files? is easy convert cmake automake? makefile cmake cross-platform automake

javascript - Navigate to another variable page on specific event -

javascript - Navigate to another variable page on specific event - i'm working on live chat site event. there audience watching grouping of presenters in live forum after live forum, each of presenters go "breakout rooms" some of audience want go breakout room 1, others breakout room 2, etc i'm trying figure out how allow people watching forum take breakout session want watch in advance (ie, during forum), have page automatically switch "breakout room" selected user 1 time leader of breakout leaves forum , room enters breakout room. any suggestions? well, understand need database. during forum, when user chooses breakout room 1 or 2, may save alternative in database (even temporary table). after live room, check alternative in db , send user there. if aren't using database, can utilize file or this. actually, may utilize session variable store user option. javascript php wordpress

c# - How to drag a pushpin and get location using Bing Maps in Windows 8.1? -

c# - How to drag a pushpin and get location using Bing Maps in Windows 8.1? - i working on bing maps in windows 8.1 app in there requirement drag pushpin , when dropped location. pushpin using 3rd party command found after little search on google. new windows 8.1 development, not much aware touch events , how handle drag events. can suggest me sample code how can this. please help. also, when displaying location facing zoom in , out issue, pushpin moves away location. here code displaying location map map = frameworkelement map; map.credentials = "my bing maps key"; //map. = mapcartographicmode.road; map.zoomlevel = 15; bing.maps.location location = new bing.maps.location() { latitude = convert.todouble(value.gettype().getruntimeproperty("latitude").getvalue(value, null)), longitude = convert.todouble(value.gettype().getruntimeproperty("longitude").getvalue(value, null)) }; maplayer layer = new maplayer(); map.children.add(layer); map...

Why does cost to access unmanaged memory in C# occasionally reach 120ms? -

Why does cost to access unmanaged memory in C# occasionally reach 120ms? - i utilize marshal.allochglobal allocate several huge chunks (100mb each) of unmanaged memory in c# application (in windows). utilize these allocate smaller pieces of unmanaged memory. after benchmarking these smaller allocations, recognized while on 99% of them cost 0-10 c# stopwatch ticks, cost 30ms 120ms , chase cost downwards individual memset calls (of 150 bytes). replaced memset phone call 2 memory writes addresses in memory area memset touch , observed same cost. means have memory accesses cost several 1000 times more cost of main memory access. page faults seem have similar cost, wondering if page faults cause behavior, looking @ windows task manager, far main memory capacity when problem occurs. i tried reproduce in microbenchmarks without success. have clue cause behavior or chase down? c# memory memory-management page-fault unmanaged-memory

audio - iOS : detect where the sound comes from? -

audio - iOS : detect where the sound comes from? - i know how utilize mediaplayer , vars mpmediaitempropertytitle . there way find app sound comes from? (it may not come music app)... thanks help. ios audio music

Schedule a task with 'AND' and 'WAIT' conditions with Windows Tasks scheduler -

Schedule a task with 'AND' and 'WAIT' conditions with Windows Tasks scheduler - i want task start when both of these conditions met: once week, every week. every fri @ 3pm when session started , not locked i know how 1 or 2, i'm not able schedule task when 2 conditions meet. in other words, if session locked @ 3pm, don't want task start now, don't want skipped! want task wait session opened (or unlocked) , start immediately. so if session unlocked saturday morning , not friday, task shall execute on saturday; , repeat same process next friday. i not sure how right specify conditions such that: if fri @ 3 pm , session unlocked; task should run. if interval (friday @ 3 pm) has passed, task has not run (because session not available); should run @ first instance session available, irrespective of date , time. windows scheduled-tasks task scheduler