Posts

Showing posts from February, 2011

.net - Is it possible to reuse an existing process via a plugin or application in C#? -

.net - Is it possible to reuse an existing process via a plugin or application in C#? - i have existing programme have work around. provides decent plugin architecture, i've run problem. need create command-line plugin check if programme running , pass command-line parameters existing instance. is possible using plugin? best practice in situation utilize messaging system? for scenario describe, have used wcf service hosted on net.pipe protocol. basically, have contract defines endpoint can receive info provide command-line arguments. when process starts, first attempts contact service. if service available, means existing process , running. in case, open channel process, send info it, , exit. if service not available, start service. c# .net plugins

How to use a different font CSS color for all Internet Explorer browser versions? -

How to use a different font CSS color for all Internet Explorer browser versions? - i have wordpress theme uses html5 bolierplate. well, utilize "edit css" module of jetpack plugin create modifications , additions theme's css. through "edit css" module of jetpack, have defined 3 dimensional css text shadows various wordpress widget headings. .example-widget h3{ color: #fff; text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15); } the problem, on net explorer, 3d text shadow not supported (at to the lowest degree ie9. have not tested on ie10) , white font not work lite colored background. on ie, need color of #444 replace 3d text effect. the bolierplate defines next in <head> , can't ...

vb.net - Issue with combobox autocomplete -

vb.net - Issue with combobox autocomplete - i trying incorporate 3 comboboxes functional gui consist of textboxes, numericupdown controls , comboboxes. on form have navigation keyboard (me.selectnextcontrol) keys , down. happens? when step in gui first time work ok , can move up/down keyboard expected. problem becomes when edit combobox in midle of gui , set this: mycombo.autocompletemode = autocompletemode.suggestappend mycombo.autocompletesource = autocompletesource.customsource mycombo.autocompletecustomsource = myautocompletestringcollection problem when come combobox navigation loop don't keypress (up or downwards keys) anymore because combobox takes them itselfs purpose (change index). i seek mycombo.autocompletesource = autocompletesource.customsource after combobox_leave turns off autocomplete not wanted. question is: here possible set described combobox after usage in mode @ origin of program, when not edited, can navigate keyboard through...

tortoisesvn - How can I track file and folder modification times with SVN? -

tortoisesvn - How can I track file and folder modification times with SVN? - please notice, has nil setting use-commit-times . using svn maintain track of school work (word documents, pdfs, images, etc.). necessary this? have things effect svn's arbitrary properties can used store information. how do this? additional information: not talking lastly commit time. subversion not store metadata. hack around creating custom properties record timestamps, need run script update them before performing commit. the repository cares when item changed in repository. svn tortoisesvn

How to play online videos in Android? -

How to play online videos in Android? - i developing sample media player app in android play online videos, have developed code play videos. plays video sd card well, facing 2 issues in respect. 1- when open app online videos shows video not play video , after while displays alert dialog having message "sorry, video cannot played". 2- have code "progress bar", don't know set code when video downloading internet. here code can check it. in advance. myvideoview = (videoview) findviewbyid(r.id.surface_view); seek { myvideoview.setvideouri(uri.parse("http://www.my_domain_name.com/videos/video1.mp4")); myvideoview.setmediacontroller(new mediacontroller(this)); myvideoview.requestfocus(); myvideoview.start(); } catch(exception e) { toast.maketext(getapplicationcontext(), "no media found", toast.length_long).show(); } ...

MoonAPNS (was:Run a PHP script from within ASP.Net/C#?) -

MoonAPNS (was:Run a PHP script from within ASP.Net/C#?) - i have php script (taken here) send apns notifications ios app web services app written in c#/asp.net. i've managed install php on server , tested script command line don't know how within web service (or if possible). is there way run php file within asp.net or improve trying re-write php script in c#? -edit- more searching turned this, prompted me seek next code, without success: public void pushnotificationalert() { string phone call = @"""php.exe"""; string param1 = @"-f"; string param2 = @"""~\apns\mypush.php"""; process myprocess = new process(); processstartinfo myprocessstartinfo = new processstartinfo(call); myprocessstartinfo.useshellexecute = false; myprocessstartinfo.redirectstandardoutput = true; myprocessstartinfo.arguments = string.format("{0} {1}", param1, param2); myproce...

android - Calling the old method call inside AsynTask doInBackground -

android - Calling the old method call inside AsynTask doInBackground - i'm new android programming , coded app in android 2.2. when tried run app in android 3 or higher error : android.os.networkonmainthreadexception in android 2.2 have method this: public jsonobject makeservicecall(string url, map<string, string> params) which performing network phone call operations. looking google found need move code asynctask class of doinbackground . but have problem in changing params of doinbackground takes object... varags, method takes 2 parameter string,map<string,string> . are there work around can within doinbackground phone call original makeservicecall . thanks in advance. you can utilize constructor of custom asynctask send multiple variable, don't need send variable in execute() method. this: private class myasynctask extends asynctask<void, void, boolean>{ private string mstring = null; map<string, s...

open source - Simple CMS for designers -

open source - Simple CMS for designers - i realise question may downvoted, i'll seek outline needs possible. basically i've been looking @ perch, simple cms can added in @ end of website design. me, core benefits ease of utilize - adding line of code areas content may change. has simple admin area. i've looked @ concrete5 , doesn't seem simple. does have suggestions simple cms? fundamentally web designer, not developer, , looking quick set perch, free. by simple cms mean simple install , easy no technical knowledge understand on admin side. simple in implementation. the sites simple, maybe blogging functionality other there need edit text , images. in advance! you didn't mention specific site needs , factor in determining best cms solution. however, based on stated, suggest looking @ wordpress. has lot of functionality , can extended accommodate needs of websites. simple larn , there vast community of users/developers can help speed using wo...

c# - Safe query in linq-sql? -

c# - Safe query in linq-sql? - i have next query: dat = s in dat orderby s.schedule.employee.employename ascending select s; the problem schedule or employee might null , in cases, should either show first or last, dont care. is there way this? crashes when null . used sort grid view: [nullreferenceexception: object reference not set instance of object.] kezberprojectmanager.cases.<gvcases_sorting>b__8(case s) in c:\users\jlarouche\documents\visual studio 2010\projects\kezberprojectmanager\kezberprojectmanager\cases.aspx.cs:103 system.linq.enumerablesorter`2.computekeys(telement[] elements, int32 count) +88 system.linq.enumerablesorter`1.sort(telement[] elements, int32 count) +21 system.linq.<getenumerator>d__0.movenext() +178 system.web.ui.webcontrols.gridview.createchildcontrols(ienumerable datasource, boolean databinding) +1698 system.web.ui.webcontrols.compositedataboundcontrol.performdatabinding(ienumerable data) +67 system...

dsl - Elasticsearch query too many results -

dsl - Elasticsearch query too many results - i'm tring set simple search homecoming me simple results custom ordering, ordering fine based on custom score. the problem query "query": { "query_string": { "query": query_term, "fields": ["name_auto"], } } note: name_auto border n gram field on elastics i result set if query not create sense. example: i have elastcisearch index populated name of android applications. if search face results related ordered number of comments on play store, menans [facebook, facebook messenger, ...] the problem when query facesomeuselesschars still same results before fore sure there nil match "someuselesschars". can help elasticsearch homecoming results match query, if score of results poor. query 'facesomeuselesschars' match has 'face' in because of ngrams (e.g. first 4 characters of query match multiple tokens in inde...

linux - Retrieving bash's output history -

linux - Retrieving bash's output history - i using mac osx , looking command retrieves history of outputs (when exist) of commands ran. possible ? i think bash keeps history of commands entered. can retrieve entering 'history'. don't think bash stores output of these commands anywhere, have feature of terminal emulator. linux bash history

c# - Points on a circle by angle not spaced evenly -

c# - Points on a circle by angle not spaced evenly - this question has reply here: finding points on perimeter of circle 1 reply given: x = originx + radius * cos(angle); y = originy + radius * sin(angle); why points not evenly distributed around border of circle? image of result: class circle { public vector2 origin { get; set; } public float radius { get; set; } public list<vector2> points { get; set; } private texture2d _texture; public circle(float radius, vector2 origin, contentmanager content) { radius = radius; origin = origin; _texture = content.load<texture2d>("pixel"); points = new list<vector2>(); //i = angle (int = 0; < 360; i++) { float x = origin.x + radius * (float)math.cos(i); float y = origin.y + radius...

ios - animateWithDuration isn't animating UIButton -

ios - animateWithDuration isn't animating UIButton - i have category on uiview should animate motion of uibutton 1 point another. beingness run, button doesn't move @ all. seems animation successful, there's no motion @ all. the button called repeating nstimer, counts downwards point button animated (check every sec see if true, if remaining points--, when remaining points == 0 animate). there timer beingness called every 0.01 seconds work levels on microphone, if increment frequency still doesn't work. i think animation code ok - holding animation displaying correctly. if in viewdidload before animating animates (although starts @ end point , animates i've placed button in storyboard), if animate in flow of programme doesn't work. the category correctly outpoints end points, , after 5 seconds "done". the category: @implementation uiview (animation) - (void) moveto:(cgpoint)destination duration:(float)secs option:(uiviewanimatio...

R plot - normal curves with color gradient -

R plot - normal curves with color gradient - how can create curves color gradient in r. take @ flame. it should that. tried create normal curve , normal curve, technically speaking, can't create such figure bunch of normal curves because won't come downwards , intersect @ right spot on either side. how can create such figure in r? ideas? the best i've been able far is: par(bg="black") plot(seq(0.15,0.85,by=0.01), 5*dbeta(seq(0.15,0.85,by=0.01),10,10 ), type="l" , ylim=c(0,700) ) # sets plotting framework. for( in 1:200 ) { lines(x= seq(0.15,0.85,by=0.01), y= i*dbeta(seq(0.15,0.85,by=0.01),10,10 ), col= colorramppalette(c("yellow", "orange", "red", "hotpink", "violet", "blue", "lightblue", "lightgreen", "darkgreen", ...

java - Checking for overlength fields in a fixed-position text file -

java - Checking for overlength fields in a fixed-position text file - i have fixed width text file need parse. each line constitutes record, 1 or more fields occupying fixed position in line. way have programme set parses each line using parsing strategy depending on record type (the first 4 digits of line determine record type. parsing strategy series of substrings grab fields need, , place them field object. each field object has name (e.g. currency code) , info contains. these field objects placed record object, has name , list of fields. i figure out way determine if have overlength fields in given record. (e.g. if country supposed 5 characters long column 40-44 , set in 8 character string programme should able handle that). this portion of code determines behavior , executes it: string line; seek { // hold "current" record count line = in.readline(); for(; line != null; line = in.readline()) { record rec = context.executebehavio...

c# - Setting visibility of a link in code behind -

c# - Setting visibility of a link in code behind - i have in source code: <a href="createalbum.aspx" id="createalbumlink"> create new album </a> now want set visibility in code behind. how can so? have link within listview control. replaced above <asp:linkbutton id="linkbutton1" runat="server" postbackurl="~/createalbum.aspx"> create new album1</asp:linkbutton> still couldnt observe in codebehind. source code: <form id="form1" runat="server"> <asp:listview id="lvalbums" runat="server" datasourceid="sqldatasource1" groupitemcount="3" insertitemposition="lastitem"> <layouttemplate> <table border="1"> <tr id="groupplaceho...

json - Updating resources in RESTful API with forms or representations -

json - Updating resources in RESTful API with forms or representations - i saw many examples xhtml used in restful api authorization oauth or openid. while seems quite natural asked myself if there other advantages submitting forms improve posting/puting representation of resource ? i'm interested in machine-to-machune interaction human-to-machine. if understand well, 1 of aspects content-negotiation xhtml forms can returned client or not (because default json , xml doesn't back upwards forms) depending on accept header in request. let's have simple scenario item resource added cart resource. api supports json , xml. i'm doing want client post item resource representation cart resource , works great. client should aware of semantics , need know construction of item resource representation because otherwise encounter error 400 (bad request). then thought using forms easier as provide guidance client on post cart . there problem, because supported ...

xml - Validation errors on xsd:keyref -

xml - Validation errors on xsd:keyref - i have problem next schema want "match" jobgroup attribute of job element name attribute of jobgroup element, can't verify costraints through validation this schema , illustration should fail <?xml version="1.0" encoding="utf-8"?> <xs:schema targetnamespace="http://www.example.org/example" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://www.example.org/example" elementformdefault="qualified" > <xs:element name="cluster" type="tns:clustertype"> <xs:keyref name="jobgroupkeyref" refer="tns:jobgroupkey"> <xs:selector xpath=".//job"></xs:selector> <xs:field xpath="@jobgroup"></xs:field> </xs:keyref> <xs:key name="jobgroupkey"> ...

Adding jquery and custom scripts to a Wordpress theme -

Adding jquery and custom scripts to a Wordpress theme - doing searching through google, came across same bit of code on , on adding jquery from-scratch wordpress theme. if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); function my_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_server['server_port'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null); wp_enqueue_script('jquery'); wp_enqueue_script('my_script', get_bloginfo('template_url') . '/js/theme.js', array('jquery'), '1.0', true); } i've added code functions.php file, , created js folder , made theme.js file using next syntax in it: jquery(function ($) { /* can safely utilize $ in code block reference jquery */ }); when refresh wp site, theme.js fil...

c# - RavenDB, programmatically check whether Server instance is running -

c# - RavenDB, programmatically check whether Server instance is running - i configure document store in next way: store = new documentstore { url = serverurl }; store.initialize(); i know how can create sure prior or post initialization but before opening session whether client connected server. did not startup server , still initialize store, not sure why or whether creates default embedded db if cannot find server under specified url. thought how check connection established between client , server? initialization not open connection. ravendb client opens , closes connections needs to. it not revert embedded database. have explicitly utilize embeddabledocumentstore if want embedded database instance. if want check if server up, can , see if fails. easiest thing seek build number of ravendb server. can done using documentstore.asyncdatabasecommands.getbuildnumberasync() . here extension methods help create easier. set these in static class: publ...

Phonegap: Getting Started with Android? -- on Linux -

Phonegap: Getting Started with Android? -- on Linux - on phonegap.com, getting started android? page have sections: 3a. setup path environment variable on mac os 3b. setup path environment variable on windows but no section linux. why ? should if on linux (ubuntu) ? i myself utilize phonegap on linux, have installed android sdk via eclipse (eclipse juno linux) , ease of access, utilize applaud plugin eclipse. steps installation: download eclipse "software center" or eclipse's website. for android sdk utilize instructions given on android developers' site (http://developer.android.com/sdk/installing/installing-adt.html ) applaud plugin(optional): http://www.mobiledevelopersolutions.com/home/start site contains step-by-step procedure of installing android sdk , applaud plugin. path environment variable on linux, path environment variable can defined in ~/.bashrc ~/.bash_profile file. if have either of files, utilize text editor such gedi...

javascript - Event on change -

javascript - Event on change - i have this:i want when select thing on dropdown list submitt button should fired... have added onchange event i.e onchange go function in have called form using document.getelementbyid("frmreport").submit(); <script type = "text/javascript"> function go() { document.getelementbyid("frmreport").submit(); } </script>enter code here </head> <body id="homepage"> <!-- right side/main content start --> <div id="rightside"> <!-- graphs box start --> <div class="contentcontainer" id="graphs"> <div class="contentbox" id="graphs-1"> <form name="frmreport" id="frmreport" method="post"> <table style="display: none;" class="area"> <ca...

java - JNLP Error parsing or reading file -

java - JNLP Error parsing or reading file - i have jnlp file class="lang-xml prettyprint-override"> <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="file:///homes/rm3710/selfassessment" href="selfassessment.jnlp"> <information> <title>dynamic tree demo</title> <offline-allowed/> </information> <resources> <!-- application resources --> <j2se version="1.6+" href= "http://java.sun.com/products/autodl/j2se"/> <jar href="test.jar" main="true" /> </resources> <application-desc name="dynamic tree demo application" main-class="logic.myapplication" width="300" height="300"> </application-desc> <update check=...

ruby on rails - link_to, view, controller -

ruby on rails - link_to, view, controller - i implemented link: view: <li><%= link_to "trainer-sportler", :controller => "trainerones", :action => "trspmatch" %></li> controller: def trspmatch render :trspmatch end and 1 view trspmatch.html.erb rails says: unknown action action 'show' not found traineronescontroller when implemented def show end , create show.html.erb. rails opens show.html.erb not trspmatch.html.erb? you want define trainerones resource this: resources :trainerones collection 'trspmatch' end end that expose url /trainerones/trspmatch maps traineronescontroller#trspmatch. seems @ this link help understand routes better. in case, benefit lot running rake routes in console, display routes , how map controllers methods. seek before , after rewriting trainerones resource explained above, , you'll see difference. luck! ruby-on-rails view...

Perl, Assign to variable from regex match -

Perl, Assign to variable from regex match - i relatively new perl , there illustration snippet of code in check_ilo2_health.pl in there piece of syntax not understand how or why works. code snippet parsing ssl client data, in case xml, line line. if ( $line =~ m/message='/) { ($msg) = ( $line =~ m/message='(.*)'/); #<---- here if ( $msg !~ m/no error/ ) { if ( $msg =~ m/syntax error/ ) { #...etc an illustration of xml in question: <response status="0x0000" message='no error' /> so in case if statement takes message line of xml sample. understand my ($msg) treats variable sort of list , understand how regular expressions match; however, not understand syntax such $msg assigned no error. perl seems playing around parenthesis syntax , such work. while works know how works. assistance appreciated. see perlretut, extracting-matches: ... in scalar context, $time =~ /(\d\d):(\d\d):(\d\d)/ returns tr...

asp.net mvc 4 - Can't get MVC 4 FileExtensions Attribute to work on ViewModel property -

asp.net mvc 4 - Can't get MVC 4 FileExtensions Attribute to work on ViewModel property - i need upload csv file , want restrict it's extension .csv so added follow property viewmodel: [fileextensions(errormessage = "must take .csv file.",extensions = "csv,txt")] public httppostedfilebase file { get; set; } in view have following: @html.textboxfor(m => m.file, new { type = "file"}) @html.validationmessagefor(m => m.file) however hits "modelstate.isvalid" check returns invalid error message of "must take .csv file." i assume i'm missing parameter, haven't found sample of in utilize yet. the problem fileextensionsattribute works on string variables. easiest way check file extension of httppostedfilebase variable utilize this simple attribute. solved problem. the downside new attribute validated on serverside don't forget check model state with: if (modelstate.isvalid) { // wo...

validation - in javascript onchange i wish to convert date input numeric (01022013) to date format )01/02/2013) -

validation - in javascript onchange i wish to convert date input numeric (01022013) to date format )01/02/2013) - i want create form user come in 01022013 format , onchange should convert date format . , onfocus should in numeric format. pl help. try this: '01022013'.replace(/(\d{2})(\d{2})(\d{4})/, '$1/$2/$3') // -> "01/02/2013" javascript validation data-conversion

iphone - 3.5" ios app screens get messed up on 4" screen -

iphone - 3.5" ios app screens get messed up on 4" screen - my first app got accepted , uploaded onto app store today :) download onto 4s (iphone 3.5 inch screen size) perfect!! when download app onto iphone 5 (iphone 4 inch screen size) pictures out of place , moved around on screen (as if images beingness stretched. how can prepare this? dont have time right redo of fine art work. want black bars on top , bottom. how can accomplish this? bunch guys! remove retina (4-inch) launch image project navigator (although improve provide 4-inch version of app :p ). iphone ios xcode

asp.net - ASP Table overlap to next column -

asp.net - ASP Table overlap to next column - i'm having problem layout of table. can see in screenshot there grid view within gridview. illustration see has 3 grid views main 1 , 1 in both table. set description in cost 2 column , remove 3th gridview. can guys help me find solution allow sec table overlap next column? thanks http://img43.imageshack.us/img43/9384/tabelf.jpg </head> <body> <form id="form1" runat="server"> <div> <asp:gridview id="gridview1" runat="server" autogeneratecolumns="false" autogeneratedeletebutton="false" autogenerateeditbutton="false" onrowcancelingedit="gridview1_rowcancelingedit" onrowdeleting="gridview1_rowdeleting" onrowediting="gridview1_rowediting" onrowupdating="gridview1_rowupdating" onrowcommand="gridview1_rowcommand" style='table-layo...

css3 - Remove gap from img tag css -

css3 - Remove gap from img tag css - i have problems. allways when iclude img tag in html file, have gap arround tag. not margin , not padding. inquire me ? can help me delete gab css ? <img src="../images/modules/bildergalerie2.jpg" /> thanks <img src="../images/modules/bildergalerie2.jpg" /> the gap caused fact <img> inline element cause them follow same rules text. prepare that, add together display: block; on image or play vertical-align (set bottom). more information, read first-class article @ mozilla https://developer.mozilla.org/en/docs/images,_tables,_and_mysterious_gaps css css3

ios - UILabel on UITableViewCell does not appear correctly -

ios - UILabel on UITableViewCell does not appear correctly - i have interface configured using constraints in interface builder. set shown: http://imgur.com/a/xqa7d. when cell rendered, right hand label not appear (but space remains): http://imgur.com/xwbssmd. the cell in question custom uitableviewcell subclass: #import <uikit/uikit.h> @interface progresscell : uitableviewcell @property (weak, nonatomic) iboutlet uilabel *textlabel; @property (weak, nonatomic) iboutlet uiprogressview *progressview; @property (weak, nonatomic) iboutlet uilabel *detailtextlabel; @end there no farther logic on class. the table view cell instantiated identifier have set on storyboard: - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"progresscell"; progresscell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier ...

windows phone 8 - How to set a background to a textBlock that changes its content -

windows phone 8 - How to set a background to a textBlock that changes its content - background i'm trying set textblock command @ bottom of screen (with little margin below it), , wish set background it, no matter shown behind textblock, easy read. on android, set background it, , tell have width , height wrap_content, take space needs, can't find similar thing on wp8. current status this xaml i've created: ... <grid > <image x:name="fullscreenimage" stretch="fill" visibility="collapsed" /> <textblock horizontalalignment="center" verticalalignment="bottom" margin="0,0,0,200" fontsize="40" x:name="picturelabel" textwrapping="wrap" foreground="#ff000000" /> </grid> the problem since textblock doesn't have background property, had utilize wraps it. however, since content changes dynamic...

label - Can't prevent all marker overlays from overlapping markers google maps api v3 -

label - Can't prevent all marker overlays from overlapping markers google maps api v3 - i have google map using api version 3. want create markers custom icon , numbered labels. i've been trying utilize seems accepted method this, "labels.js" solution i've provided below. however, no matter try, numbered overlays overlap of markers (despite me setting marker , label same zindex). see screenshot provided see i'm talking about. if take @ markers 14 , 15 in screen, you'll see 15 label overlaps 14 marker, shouldn't, should underneath 14 marker. http://i.imgur.com/qoyqchj.jpg many discussions overlapping custom overlays revolve around line of code: var pane = this.getpanes().overlayimage; however, have in place. i'm setting each label overlay , marker pair same zindex, , overlapping markers proves zindex increment working. i've provided of code below, , have run brick wall. i've tried possible no luck. assume variables have been ...

c# 4.0 - Listbox is disabled and vertical scrollbar goes way with silverlight -

c# 4.0 - Listbox is disabled and vertical scrollbar goes way with silverlight - i have this <listbox itemssource="{binding students}" selectionmode="extended" name="liststudents" height="430" isenabled="{binding canupdatenumber}"> </listbox> when isenabled true , items in listbox more vertical scrollbar present. when isenabled false items disabeld (which true) , scrollbar off cant see items in listbox. how create scrollbar nowadays when isenabled false try wrapping listbox scrollviewer control, this: <scrollviewer verticalscrollbarvisibility="auto" height="430" width="110" padding="0"> <listbox itemssource="{binding students}" selectionmode="extended" name="liststudents" isenabled=...

How to move module under Mercurial to another VB.NET project? -

How to move module under Mercurial to another VB.NET project? - am using single mercurial repository track vb.net 2010 solution myvbsolution. contains 2 projects projecta & projectb. module 'module1' in projecta. top of mercurial repository myvbsolution. how move projectb in vb.net. retaining alter history module1? i have read need need utilize hg mv perform copy, not know steps required integrate move vb.net. the construction of code now: myvbsolution projecta -module1 projectb wanted: myvbsolution projecta projectb -module1 you can move file using hg mv outside of visual studio. after that, in visual studio, remove missing file projecta , utilize add->existing item on projectb add together projectb . but if utilize tortoisehg, it's easier: move file in visual studio , utilize detect renames function of tortoisehg (you can utilize 100% similarity). vb.net mercurial

Using PHP inside Smarty template files -

Using PHP inside Smarty template files - the utilize of php within smarty template files has been possible in previous versions of smarty deprecated. you can still using backwards compatibility wrapper. this makes using php within template file possible doing: {php}echo "hello world";{/php} does know of problems or issues might cause? to expand comments given total answer, problem embedding arbitrary php code breaks downwards separation between php , smarty. since smarty compiles straight php, write in smarty can written in pure php, , may or may not end readable, e.g. <?= $foo ?> {$foo} fine <?php if ( $expr ): ?> hello <?php endif; ?> {if $expr} hello {/if} not bad either but <?= htmlspecialchars(strtoupper($foo ?: 'hello')); ?> {$foo|default:'hello'|upper|escape:html} bit harder on eye the main advantages see of using smarty (all of voided if utilize {php} ): obvious separation - clear gi...

ruby on rails - Proxy Error when I update my application on Amazon Elastic Beanstalk -

ruby on rails - Proxy Error when I update my application on Amazon Elastic Beanstalk - i have ruby on rails application hosted on amazon elastic beanstalk. when update , alter run application have, on website's page, error : proxy error the proxy server received invalid response upstream server. proxy server not handle request http://commentmyprojects-env-vpusz2adwc.elasticbeanstalk.com/. reason: error reading remote server apache server @ commentmyprojects-env-vpusz2adwc.elasticbeanstalk.com port 3128 when restart application, through beanstalk's console, on , on works after while. how can solve problem? thanks! ruby-on-rails amazon-ec2 elastic-beanstalk

python - NameError: name 'yearout' is not defined -

python - NameError: name 'yearout' is not defined - please tell me wrong, , other ways needs improving def finalcalc(y, d, m): end = (y + d + m) % 7 homecoming end def monthlook(m): if m == 1: monthout = 6 elif m == 2: monthout = 2 elif m == 3: monthout = 2 elif m == 4: monthout = 5 elif m == 5: monthout = 0 elif m == 6: monthout = 3 elif m == 7: monthout = 5 elif m == 8: monthout = 1 elif m == 9: monthout = 4 elif m == 10: monthout = 6 elif m == 11: monthout = 2 elif m == 12: monthout = 4 print(finalcalc(yearout, dayout, monthout)) def daysimp(d): dayout = d % 7 monthlook(monthin) def yearc(y): y = y % 100 yearout = y + (y // 4) yearrem = y % 4 if yearrem >= 2: yearout += 1 yearout = yearout % 7 daysimp(dayin) dayin = int(input("what day in month?")) monthin = in...

html5 - how to keep toggle state after page refresh -

html5 - how to keep toggle state after page refresh - i have expandable menu, can see code in this link.. my question how can maintain toggle state after page refresh. thanks helps. how save in session variable? session("topmenustate") = xyz where xyz state info update mmmmm seek , explain best can limited amount of javascript skills. to check if local storage/session storage available follows if(typeof(storage)!=="undefined") { // localstorage , sessionstorage supported } else { // localstorage , sessionstorage not supported } once satisfied local storage available can go on coding actual scripts, otherwise, 1 assume maybe code not work? further more when user clicks on link in sliding menu, thought persist name of menu he/she clicked on, , when page loads, or when render menu's can check session/local storage see menu item (if any) clicked on so in links in sliding menu may end along lines of : <div cl...

android.support.v4.app.getFragmentManager() returns null? -

android.support.v4.app.getFragmentManager() returns null? - this stacktrace: fatal exception: main java.lang.nullpointerexception @ com.example.test.fragments.loadingfragment$1.run(loadingfragment.java:66) @ android.os.handler.handlecallback(handler.java:725) @ android.os.handler.dispatchmessage(handler.java:92) @ android.os.looper.loop(looper.java:137) @ android.app.activitythread.main(activitythread.java:5041) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:511) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) @ dalvik.system.nativestart.main(native method) line 66 of fragment: fragmenttransaction ft = fm.begintransaction(); fm gotten this: android.support.v4.app.fragmentmanager fm = getfragmentmanager(); my fragment extends android.support.v4.app.fragment , these imports: import android.os.bundle; import androi...

d3.js - displaying whole world map with topoJSON and D3 -

d3.js - displaying whole world map with topoJSON and D3 - first of i'm totally new 2 libraries (which believe awesome), sorry if sounds stupid question. display whole world using d3 + topojson. i'm next this tutorial so. downloaded both files when comes using ogr2ogr avoid filtering england + republic of ireland whole world. follow tutorial print map in end uncaught typeerror: cannot read property 'type' of undefined on line 1 of optimised topojson library :-). now, i'm pretty sure did wrong conversion when calling ogr2ogr , can't figure right filter apply whole map. little bit more experience willing help? thanks p.s. if follow tutorial using uk map, shows correctly, think it's related ogr2ogr conversion. edit: these commands used convert maps , merge them: ogr2ogr -f geojson subunits.json ne_10m_admin_0_map_subunits.shp , used ogr2ogr -f geojson places.json ne_10m_populated_places.shp , merge them: topojson --id-property su_a3 -p name...

android - How to display the image from JSON object string -

android - How to display the image from JSON object string - im new android.. im facing problem in app.. i've been trying several ways of displaying json images solutions never succeeded. in database images stored in folder. in json object got scr path image. want display image in emulator.i got path in json object : "imgsrc=question/images/u2_1_l2_q66". have stored path in imgarr array. how display image path? want add together images folder drawables.please help me. lot. code protected string doinbackground(string... args) { list<namevaluepair> params = new arraylist<namevaluepair>(); params.add(new basicnamevaluepair("tid", tid)); json = jsonparser.makehttprequest(url_get_quesurl, "get", params); log.d("all groups: ", json.tostring()); seek { int success = json.getint(tag_success); if (success == 1) { system.out.println("success"); groups = jso...

Sums of entries, Python -

Sums of entries, Python - possible duplicate: summing values of columns multiple files i have little problem here, i'm trying sum entries multiple files (50), , each of them contain 3 columns. example, using first 3 files: file1.txt, file2.txt, file3.txt like: file1.txt: 2 3 4 1 5 6 5 4 7 file2.txt: 1 2 1 2 3 2 4 3 1 file3.txt: 6 1 1 1 3 0 3 4 5 so question how sum entries column one, column 2 , column 3 50 files end file looks like: output.txt: 9 6 6 4 11 8 12 11 13 i've read in 50 files , appended them i'm having problem summing entries 1 one. so i've done this: for p in range(50): locals()['first_col%d' % p] = [] locals()['second_col%d' % p] = [] locals()['third_col%d' % i] = [] in range(1,50): f = open("file"+str(i)+".txt","r") line in f: locals()['fist_col%d' % i].append(float(line.split()[0])) locals()['second_co...