Posts

Showing posts from March, 2014

flash - AS2: Are functions declared in a class stored as separate instances taking up more memory on each object instantiated? -

flash - AS2: Are functions declared in a class stored as separate instances taking up more memory on each object instantiated? - my question memory utilize , objects in actionscript 2. if have class definition: class test1{ public function one(){trace("hello");} public function two(){trace("world");} } and sec class definition: class test2{ static public function one(){trace("hello");} static public function two(){trace("world");} } and following: var object1a = new test1(); var object1b = new test1(); var object2a = new test2(); var object2b = new test2(); is size of object1a + object1b greater size of object2a + object2b because of functions not beingness static (and perchance beingness copied each object instantiation)? not have actionscript 3 observe memory use, maybe can check how behaves in 3 if hard determine in 2. i'm wondering if non-static fellow member functions references single ...

Expression Sketchflow : Is it possible to run full screen? (and without window border?) -

Expression Sketchflow : Is it possible to run full screen? (and without window border?) - i did sketchflow prototypes client. the client need application "touchable" on 19" display, seek launch prototypes in total screen on display (as final application be). i searched through net , found "solution" : transform sketchflow project in blend project, , tell blend project run in total screen mode. this solution doesn't work time tutorials say, , doesn't work me apparently :-( do know other solution? thanks help, antoine that best solution, part of didn't work? if want send me solution can help convert run without sketchflow player. first.last@microsoft.com using name. expression-blend sketchflow

Symfony2 PHP Limit one user sessions 20 -

Symfony2 PHP Limit one user sessions 20 - i'm looking way user can come in 10 times simultaneous, if user logs more (user 11) assess whether nonexistent simultaneous sessions no users more 30 minutes connected, if happens, disconnected oldest, allowing new user (user 11) enter. if 10 users less 30 minutes, display error message, not allowing admission. it remains create table session saved, consult whenever 1 enters delete value. adionalmente, must create script poll worker each n seconds , close session if exceeded 20. this resolved php symfony2 session limit

mozart - How to bind an unbound value in a List in Oz -

mozart - How to bind an unbound value in a List in Oz - let's have next code: local l in l = {list.make 10 $} % bind nth element here end how 1 set of these unbound values? oz list documentation didn't shed lite on this. related question found was: how alter element in list in oz? reply didn't compile me, nor did find how compile. i able utilize oz list documentation work! declare temp index value l in l = {list.make 10 $} index = %index bound value = %value bound temp = {list.mapind l fun {$ b} if == index b = value else b end end $} oz mozart

python dictionary remove duplicate key values pairs -

python dictionary remove duplicate key values pairs - i have file need remove duplicated pairs (marked in bold). the input file: at1g01010 = 0005634 **at1g01010 = 0006355** at1g01010 = 0003677 at1g01010 = 0007275 **at1g01010 = 0006355 at1g01010 = 0006355** at1g01010 = 0006888 **at1g01020 = 0016125** at1g01020 = 0016020 **at1g01020 = 0005739** **at1g01020 = 0016125** at1g01020 = 0003674 at1g01020 = 0005783 **at1g01020 = 0005739** **at1g01020 = 0006665 at1g01020 = 0006665** expected output: at1g01010 = 0005634 at1g01010 = 0006355 at1g01010 = 0003677 at1g01010 = 0007275 at1g01010 = 0006888 at1g01020 = 0016125 at1g01020 = 0016020 at1g01020 = 0005739 at1g01020 = 0003674 at1g01020 = 0005783 at1g01020 = 0006665 so remove duplicates first made dictionary. after creating dictionary tried coding: import sys ara_go_file = open (sys.argv[1]).readlines() ara_id_list = [] ara_go_list = [] lines in ara_go_file: split_lines = lines.split(' ') ara_id = sp...

c# - How to set textbox width depending of text length in ActiveReports -

c# - How to set textbox width depending of text length in ActiveReports - is there property set width of textbox grow/shrink in order it´s text length? don´t want calculate length/width ratio constant.. thanks, walter if helps may want check shrinktofit property reduces size of text fits within bounds of control. c# textbox activereports componentone grapecity

with azure webjobs how do i pass parameter for a scheduled task -

with azure webjobs how do i pass parameter for a scheduled task - i creating dot net console app run azure webjob. scheduled run 1 time hour. i wondering how pass parameter job when invoked? scheduled webjobs 2 separate resources: triggered webjob azure scheduler job to pass parameters webjob need go scheduled job (in management portal) , update url used invoke triggered webjob. the rest api described here: https://github.com/projectkudu/kudu/wiki/webjobs-api#invoke-a-triggered-job basically need add together ?arguments={your arguments} end of url. these arguments passed command line arguments executable. azure azure-webjobs azure-webjobssdk

Copy and move assignment with vector -

Copy and move assignment with vector - in process of answering question stumbled upon different wordings std::vector::erase() , std::deque::erase(). this c++14 draft n4140 says std::deque::erase ([deque.modifiers]/4-6, emphasis mine): effects: ... complexity: number of calls destructor same number of elements erased, number of calls assignment operator no more lesser of number of elements before erased elements , number of elements after erased elements. throws: nil unless exception thrown re-create constructor, move constructor, assignment operator, or move assignment operator of t. and here says std::vector::erase ([vector.modifiers]/3-5): effects: ... complexity: destructor of t called number of times equal number of elements erased, move assignment operator of t called number of times equal number of elements in vector after erased elements. throws: nil unless exception thrown re-create constructor, move constructor, assignment operator, or move assignment ...

php - Remove element from session array in laravel 5 -

php - Remove element from session array in laravel 5 - i newbie in laravel 5 , trying create ecommerce web application learning on own. i have next array of products: array:2 [▼ 0 => array:4 [▼ "productid" => 3 "quantity" => 2 "productname" => "testing product 3" "productrate" => 275.0 ] 1 => array:4 [▼ "productid" => 2 "quantity" => 2 "productname" => "testing product 2" "productrate" => 180.0 ] ] now when user clicks on x link in view of cart template, delete product session, removes total array of session cart on next page reload. here's controller deleting product: public function destroy($id) { if ( \session::has( 'cart' ) && is_array( \session::get('cart') ) ) { $cart = \session::get('cart'); ($i=0; $i < count($cart); $i++) { ...

Memory allocation error in coxme package in R -

Memory allocation error in coxme package in R - i trying fit nested frailty model using coxme bundle in r. when running code, r shows me such kind error message! > library(coxme) > coxme(surv(time, stat) ~ bord11+ (1+caseid/v001), + data=dat) error: cannot allocate vector of size 402.8 mb in addition: warning messages: 1: in array(c(rep.int(c(1, numeric(n)), n - 1l), 1), d, dn) : reached total allocation of 1535mb: see help(memory.size) 2: in array(c(rep.int(c(1, numeric(n)), n - 1l), 1), d, dn) : reached total allocation of 1535mb: see help(memory.size) 3: in array(c(rep.int(c(1, numeric(n)), n - 1l), 1), d, dn) : reached total allocation of 1535mb: see help(memory.size) 4: in array(c(rep.int(c(1, numeric(n)), n - 1l), 1), d, dn) : reached total allocation of 1535mb: see help(memory.size) r memory allocation

Visual Studio 2012 Nuget Update Packages keep redownloading -

Visual Studio 2012 Nuget Update Packages keep redownloading - using: visual studio 2012 ultimate update 4 problem: every time utilize update-package, redownloads same version. scenario: 1. fire vs2012, create new project asp.net mvc4 web application -> net application. 2. type 'update-package' in bundle manager console. downloads every bundle update. save solution. exit. 3. create new project asp.net mvc4 web application -> net application. 4. since packages not updated, type 'update-package' again. when do, download 1 time again same version downloaded during first project. my problem is, not connected net have find net connection everytime 'update-package' update template. is there way can save bundle updates locally when 'update-package' dont have connected net update packages? you can create folder nuget packages, illustration d:\nugetlocalsource\ , , add together specify bundle source in nuget settings. tool...

How to change the target version of android in android studio -

How to change the target version of android in android studio - i import eclipse project android studio. original project's target android-14, studio's mimimum api version 21. , don't want download api 14, how should solve problem? you must have downloaded sdk configured compilesdkversion . sdk configured minsdkversion can lower version such api 14. in android studio configuration realized in build.grade file. example: apply plugin: 'com.android.application' android { compilesdkversion 21 buildtoolsversion "22.0.1" defaultconfig { minsdkversion 14 targetsdkversion 21 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile project(":lib") compile 'com.android.suppo...

generics - Is there any compelling reason to not be able to use equal operator(==) for default(T) in C# -

generics - Is there any compelling reason to not be able to use equal operator(==) for default(T) in C# - the equal operator , default value of generic type 2 handy feature in c#. can't utilize them seamlessly. example, expect next code can compile, public static bool equalsdefault<t>(t subject){ homecoming subject == default(t); } unfortunately, it'll fail, though there's counter-intuitive alternative, public static bool equalsdefault<t>(t subject){ homecoming object.equals(subject, default(t)); } so question why c# disallows first code snippet? the reason not work built-in reference equality operator cannot applied value types. let's take step , note system.object not, in fact, define equality operator == . c# language defines built-in reference equality operator signature (see section 7.6.10 of c# 5 specification): bool operator ==(object x, object y); however, there 2 rules when can applied: ...

html - bootstrap input-group 1px misallignment between addon and input -

html - bootstrap input-group 1px misallignment between addon and input - i have next html - using bootstrap <div class="input-group" style="width:100px;"> <span class="input-group-addon glyphicon glyphicon-time" ></span> <input type="text" class="form-control" placeholder="time"> </div> which produces next annoying output a annoying 1-2px aligning difference between input , addon - , cannot life of me figure out why is. can seen in fiddle the ' .glyphicon ' has top 1 px set in 0, .glyphicon {top: 0px} html twitter-bootstrap

Access array in PHP object -

Access array in PHP object - i have next php object i'm struggling array item out of object. examplebatch object ( [file_path:protected] => [title:protected] => [description:protected] => [link:protected] => [items:protected] => array ( ) [raw:protected] => data/example [feed_nid:protected] => array ( [0] => array ( [path] => data/example/example/ [filename] => file.csv ) [1] => array ( [path] => data/example/example/ [filename] => file.csv ) [2] => array ( [path] => dexampleata/example// [filename] => file.csv ) ) [current_item:protected] => [created] => 0 [updated] => 0 [total:protected] => array ( ) [progress:protected] => array ( [fetching] => 1 [parsing] => 1 [processing] => 1 ) ) i need access array containing 3 keys , it's info post processing. whats best way go grabbing array? if can edit class, either alter property care public or write getter it: ...

scala - How to ZIP files with a prefix folder in SBT -

scala - How to ZIP files with a prefix folder in SBT - to generate distribution zip simple build tool 1 can do def distpath = ( ((outputpath ##) / defaultjarname) +++ maindependencies.scalajars ) lazy val dist = ziptask(distpath, "dist", "distribution.zip") dependson (`package`) describedas("zips project.") this adds jar files root of zip. how 1 add together jars lib subfolder in zip? for sbt 0.7.x: nothing implemented default far know. however, can utilize sbt's fileutilities. try playing around next example, copies artifact jar tmp dir, zips dir, , deletes it. should straightforward extend dependent libs. class project(info: projectinfo) extends defaultproject(info) { def distpath = { ...

python - Most elegant way to find node's predecessors with networkX -

python - Most elegant way to find node's predecessors with networkX - i'm working on graphical model project python using networkx. networkx provides simple , functionality using dictionaries: import networkx nx g = nx.digraph() # directed graph g.add_edge('a', 'b') print g['a'] # prints {'b': {}} print g['b'] # prints {} i want utilize directed graphs because coding dependencies have directions (in above illustration have closed form 'b' conditional on 'a', not other way around). for given node, want find predecessors of node. above example, par('b') should homecoming ['a']. networkx have successor function, finds children of node. obviously, going through nodes , finding have 'b' kid work, Ω(n) in number of nodes (which expensive application). i cannot imagine simple left out of well-made package, can't find anything. one efficient alternative store directed , undirected ...

Android Studio Creating a virtual device -

Android Studio Creating a virtual device - hi have installed android studio on mac. when seek create virtual device getting next error. dowloaded android studio developer.android.com android studio working fine can not run app. can knows how can fixed ? process: studio [4033] path: /applications/android studio.app/contents/macos/studio identifier: studio version: ??? (???) code type: x86 (native) parent process: studio [3976] date/time: 2015-04-03 17:27:34.508 +0300 os version: mac os x 10.7.5 (11g63b) study version: 9 interval since lastly report: 39667 sec crashes since lastly report: 21 per-app crashes since lastly report: 19 anonymous uuid: 318ca5ec-b1f4-4cc4-ae90-7237589d0e07 crashed thread: unknown exception type: exc_bad_access (sigsegv) exception codes: kern_invalid_address @ 0x000000008fe01030 backtrace not available unknown thread crashed x86 thread state (32-b...

debian - Enable Bluetooth Adapter for BeagleBone Black -

debian - Enable Bluetooth Adapter for BeagleBone Black - i bought usb 2.0 bluetooth adapter. claims have back upwards linux kernels of versions 3.4 , higher. have beaglebone black debian gnu/linux 7 image , kernel 3.8. developing on beaglebone black hosting through usb ssh . i have tried both hot plugging , plugging in before boot , failed. then, tried this tutorial. however, cannot find connman directory on beaglebone black device. looked , assumed needed install connman package, beaglebone black has no net access. i have tried lsusb -v , suggested reply of similar question this, no luck. weird thing is, while lsusb prints bus 001 device 001: id 1d6b:0002 linux foundation 2.0 root hub bus 002 device 001: id 1d6b:0002 linux foundation 2.0 root hub lsusb -v prints bus 001 device 001: id 1d6b:0002 linux foundation 2.0 root hub then hangs. info regarding bus 002, believe device connected to, not printed. have restart ssh connection work. how shou...

.htaccess - Removing .html/.php from url with apache conf -

.htaccess - Removing .html/.php from url with apache conf - i managed remove .extension via htaccess file, wondering if possible through apache2.conf or other file without using .htaccess file. exp. example.com/example instead of example.com/example.html you can utilize these 2 rules in apache conf file: rewritecond %{the_request} \s/+(.+?)\.html[\s?] [nc] rewriterule ^ /%1 [r=302,l,ne] # internally forwards /dir/file /dir/file.html rewritecond %{document_root}/$1\.html -f [nc] rewriterule ^(.+?)/?$ $1.html [l] apache .htaccess configuration

jquery - Calling javascript method from cshtml page -

jquery - Calling javascript method from cshtml page - i trying phone call javascript page giving error "javascript runtime error: '$obligationfeetype' undefined". here javascript code var $obligationfeetype = function() { var privatemethods = { getnamedropdownvalueobject: function() { homecoming $("#obligationsguarantorname").data("kendodropdownlist"); } }; var events = { feetypeonselect: function(e) { if (e.item.index() > 0) { privatemethods.getnamedropdownvalueobject().wrapper.find(".k-dropdown-wrap").removeclass("k-invalid"); } }, ondollaramountchange: function(e) {}, onpercenatgeamountchange: function(e) {}, onbasispointchange: function(e) {} }; homecoming { "feetypeonselect": events.feetypeonselect, "ondollaramountchange": events.ondollaramou...

cs cart - How to override the fncatelog.php function in cscart -

cs cart - How to override the fncatelog.php function in cscart - i need override fncatelog.php in cscart in new addon. addon files :- 1. app/addons/newaddon/frontend/controllers/frontend/categories.post.php 2. design/themes/response/templates/addons/newaddon/overrides/blocks/product_filters/original.tpl in func.php need override fn_get_filters_products_count() function in newaddon. how can . please help me. you can utilize 1 of next hook modify info returning function: get_filters_products_count_pre get_filters_products_count_before_select_filters get_product_filter_fields you can read more hooks scheme in cs-cart @ http://docs.cs-cart.com/4.2.x/addons/hooking/index.html page. php cs-cart

ruby - Sass: errno::enoent: No such file or directory -

ruby - Sass: errno::enoent: No such file or directory - i know terribly bland error running into, i'm encountering regular "file not found" error in sass 3.4.2: /* errno::enoent: no such file or directory - dumdum.scss backtrace: /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin/compiler.rb:482:in `read' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin/compiler.rb:482:in `update_stylesheet' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin/compiler.rb:209:in `each' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin/compiler.rb:209:in `update_stylesheets' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin/compiler.rb:293:in `watch' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/plugin.rb:108:in `method_missing' /library/ruby/gems/2.0.0/gems/sass-3.4.12/lib/sass/exec/sass_scss.rb:381:in `wa...

python - Render an editable table using Flask, Jinja2 templates, then process the form data returned -

python - Render an editable table using Flask, Jinja2 templates, then process the form data returned - i'm using flask , jinja2 , need create editable table multiple rows. this table like: and here's html that: <form action="/support/team-members-update" method="post"> <table> <tbody><tr> <th>name</th> <th>id</th> <th>inbox share</th> </tr> <tr> <td>ben</td><td>55555</td><td><input type="text" name="share_55555" value="0"></td></tr> <tr> <td>steve</td><td>66666</td><td><input type="text" name="share_66666" value="1"></td></tr> <tr> <td>harry</td><td>77777</td><td><input type="text" name="share_77777" value="1">...

How can we get Facebook Page List in iOS SDK -

How can we get Facebook Page List in iOS SDK - i have logged user facebook using facebook graph api , need fetch user's facebook page list ( page status changed published ). my code looks : (void)checkloginwithfacebook { // if session state of 2 "open" states when button clicked if (fbsession.activesession.state == fbsessionstateopen || fbsession.activesession.state == fbsessionstateopentokenextended) { // close session , remove access token cache // session state handler (in app delegate) called automatically // if session state not of 2 "open" states when button clicked [self getlistofpages]; } else { // open session showing user login ui // must inquire basic_info permissions when opening session // bypass ios6 integration since not allow session opened // publish permissions! fbsession* sess = [[fbsession alloc] initwithpermissions:[nsarray ...

java - Hibernate Criteria and HQL will go to database by default? -

java - Hibernate Criteria and HQL will go to database by default? - we know session.get() go database session.load() not. how criteria , hql? i worrying synchronization between persistent objects , database. shown in this unit test result manual monitoring of database, hibernate's behaviors not expected or manual said. so of import me know if straight go database result or looking @ persistent objects. yes, go database (unless queries marked cachable, , query cache enabled, , query results in query cache). if entities returned query exist in session, existing entities returned. note test case linked doesn't create much sense: modifying entity , flushing session should done within transaction. java hibernate

c# - A link will work from root but from a sub folder won't -

c# - A link will work from root but from a sub folder won't - i writing web application , have stumbled upon unusual issue (most missing trivial). issue: suppose have menu 2 buttons(links) users, companies the home.aspx @ root level. here directory structure. home.aspx /users/userdetail.aspx /company/companyedit.aspx when user @ home.aspx , clicks on menu item users, routed users/userdetail.aspx correctly. 1 time user on userdetail.aspx , bring mouse on companies button(link) on menu , @ task bar of browser , unusual url shows this /users/company/companyedit.aspx which means when click, page never found beingness looked @ in wrong folder.. above problem happens when link in next format users/company/companyedit.aspx but if utilize /users/company/companyedit.aspx then users session key changed , destroys existing session. can 1 elaborate overlooking (i pretty doing majorly dumb can not set finger on it)....why looses application context. edit:...

vb.net - Duplicating items on listbox -

vb.net - Duplicating items on listbox - i have programme records homework in list box, , sorts date due. however, when seek sort info date, so, duplicates each item in list box. can rectified closing programme , opening again, inconvenient. there way prepare this? here code 2 frmsplashscreen: imports system.io public class frmsplashscreen dim dates() date = {} dim temparray() string = {} dim temparray2() string = {} dim path string = application.startuppath dim newuser boolean = false dim sorted boolean = false private sub btnadd_click(sender object, e eventargs) handles btnadd.click if lstdate.items.contains("no assignments yet!") lstdate.items.clear() end if frmadd.show() me.hide() end sub private sub me_mouseenter(sender object, e eventargs) handles me.mouseenter if sorted = false , lstdate.items.contains("no assignments yet!") = false sortbydate() end if end sub private sub frmsplashscreen_load(send...

php - Definind hook to run in a certain condition in codeIgniter -

php - Definind hook to run in a certain condition in codeIgniter - is possible define hook run script when specific method of specif controller called in codeigniter? the script should check 1 status determine if method homecoming value should changed or not. you guys can suggest way this,i new codeigniter , hooks. php hook codeigniter-2

c# - Using LINQ for quering in a big database take so much time -

c# - Using LINQ for quering in a big database take so much time - i'm using linq preparing info in controller , sending them view. connection provided ef6 code first migration sql server in controller , linq look , model of database map proper view model follow: var temp = db.points.tolist().select(pnt => new mappointsmodel() { pointid = pnt.pointid, name = pnt.name, positionx = pnt.positionx, positiony = pnt.positiony, road = pnt.road.id, order = pnt.order, signalstate = pnt.signalstate, powerstate = pnt.powerstate, videostate = pnt.videostate, camerastate = pnt.camerastate, hourtraffic = new int[]{ pnt.crossings.where(c => datetime.compare(c.datetime, lasthour) >= 0 ).where(c => c.line == 1).count(), pnt.crossings.where(c => datetime.compare(c.datetime, lasthour) >= 0 ).wher...

json - JQuery UI Autocomplete JSONP query/callback -

json - JQuery UI Autocomplete JSONP query/callback - i've looked @ other topics regarding jquery autocomplete , talking using json, still having issues getting source work me. i have working yui autocomplete @ moment switch jquery ui help streamline styling. for yui autocomplete have: yui().use('array-extras', 'autocomplete', 'autocomplete-highlighters', function (y) { y.one('#ac-input').plug(y.plugin.autocomplete, { resultformatter: function (query, results) { homecoming y.array.map(results, function (result) { homecoming [data styling stuff here]; }); }, //resulthighlighter: 'wordmatch', resultlistlocator: 'character_list', resulttextlocator: 'name', source: 'http://census.soe.com/s:example/json/get/dcuo:v1/character?name=^{query}&callback={callback}&c:show=name,character_id' [this longer...but idea]...

simple html dom - Coded UI :Test Wijmo Grid in Coded UI(Wijmo Flexi Grid) -

simple html dom - Coded UI :Test Wijmo Grid in Coded UI(Wijmo Flexi Grid) - we using wijmo flexi grid in our project(third party component) coded ui beingness used test application. not not able test whole grid. please note: note1 :we dont want record cells because number of cells dynamic.hence want capture whole info dom , compare against info have(in excel or xml or csv) note 2: per many online articles wijmo grid loads info visible on screen hence dom have values visible @ point of time. thanks, neeraj coded-ui-tests simple-html-dom wijmo

list - Assigning Location to Card in Simply Python Card Game -

list - Assigning Location to Card in Simply Python Card Game - i'm working on homework assignment create simple card game, , don't understand why can't utilize same method create start deck , assign start location of cards also. we're not supposed utilize more complicated lists , arrays (because that's we've learned far). the first part (that builds deck) works fine. sec part that's supposed assign location (of "deck", later i'll set in locations of "player hand" , "computer hand" deal cards) doesn't work , don't why can't utilize same method. maintain getting error "list index out of range" , can't figure out how prepare it. def startdeck(): suitname = ("hearts", "diamonds", "spades", "clubs") rankname = ("ace", "two", "three", "four", "five", "six", "seven...

data binding - Accessing TextBoxes in WPF DataBound ListBox with foreach -

data binding - Accessing TextBoxes in WPF DataBound ListBox with foreach - i have databound wpf listbox custom itemtemplate -> datatemplate. part of template listbox. on event i'd loop through textboxes in listbox , retreive values. possible? you should able using itemcontainergenerator , finding elements in template: foreach (var item in lb.items) { var itemcontainer = lb.itemcontainergenerator.containerfromitem(item) listboxitem; // name textbox in template find here. var textbox = itemcontainer.contenttemplate.findname("?????", itemcontainer) textbox; var value = textbox.text; } (if textboxes referred within listbox in template have dig deeper repeating same method.) wpf data-binding

angularjs - ui-router states with oclazyload does not load a new module to the app -

angularjs - ui-router states with oclazyload does not load a new module to the app - i trying load new module "testlazy" app when defining states in app.config using oclazyload , ui-router will need require.js hooked load new module existing app? thought oclazyload reference new module added app. please right me if on wrong path here new module placed under /js/testlazy module.js testlazycontroller.js i have module.js file , testlazycontroller.js. in index.html <head> <script type="text/javascript" src="../../dist/oclazyload.js"> </script> <script type="text/javascript" src="js/app.js"></script> </head> <body class="container"> <h1 class="page-header">$oclazyload</h1> <div ui-view="lazyloadview"></div> </body> my app.js var amodule = angular.module('dapp...

html5 - Center a Navbar when using a fixed width -

html5 - Center a Navbar when using a fixed width - i'm trying center navbar while @ same time using fixed width larger screens. want center bluish area on grid, instead cant off left edge. @ same time need left , right side float left/right respectively. photo example html <div class="navbar"> <div class="navbar-left"> <a href="#home" class="navbar-brand icon-material-radio-button-on"></a> </div> <div class="navbar-right"> <a href="#work" class="navbar-arrow icon-material-arrow-forward"></a> <a href="#work" class="navbar-arrow icon-material-arrow-back"></a> </div> </div> css .navbar { background-color: #f8f8f8; position: fixed; width: 100%; max-width: 1140px; z-index: 1; font-size: 14px; min-height: 64px; list-style: none; text-align: center; float: none; } .navbar-brand { float: left; } .n...

letters - Project Euler #17 Ruby - What's wrong? -

letters - Project Euler #17 Ruby - What's wrong? - i made programme in ruby , have no thought why it's not giving me right answer problem: if numbers 1 5 written out in words: one, two, three, four, five, there 3 + 3 + 5 + 4 + 4 = 19 letters used in total. if numbers 1 1000 (one thousand) inclusive written out in words, how many letters used? note: not count spaces or hyphens. example, 342 (three hundred , forty-two) contains 23 letters , 115 (one hundred , fifteen) contains 20 letters. utilize of "and" when writing out numbers in compliance british usage. my code: def number_to_words(n) custom = {"0" => "", "1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five", "6" => "six", "7" => "seven", "8" => "eight", "9" =...

Is there any existing ebcdic file readers available as part of spring batch framework? -

Is there any existing ebcdic file readers available as part of spring batch framework? - we developing batch job using ebcdic file(mainframe), wondering there existing reader class available read ebcdic file? thanks, mk spring-batch

Azure Web Job Monitoring and Alert -

Azure Web Job Monitoring and Alert - i have 1 web site , 3 web jobs in 1 windows azure web site (or windows azure web app after recent name change). have kinds of monitoring , alerts in place website nil web jobs @ point. sure microsoft has web job monitoring in backlog recommended solution in mean time? in lastly week, 3 web jobs stopped (scheduled run continuously) around 4 morning - tries restart gets in "pending restart" mode immediately. working microsoft back upwards on this. how send alert 1 time similar situation happens? any 3rd party extension there monitor jobs? thanks if third-party services consideration, cloudmonix @ http://cloudmonix.com - has tons of azure-specific goodies monitoring , automation , special back upwards monitoring of scheduled or on-demand webjobs. can request kick-off of on-demand jobs. cloudmonix successor azurewatch, 1 of adaptors in azure monitoring/auto-scaling space hth disclaimer: i'm affiliated compa...

c++ - Why use static function template? -

c++ - Why use static function template? - i'm reading alex graves's rnnlib. in codes there many static function templates not class fellow member methods defined static , while not.(see below) some code snipplets of helpers.hpp : class="lang-cpp prettyprint-override"> ... // static template <class r> static void sort(r& r) { sort(boost::begin(r), boost::end(r)); } // static template <class r> static void reverse_sort(r& r) { sort(boost::rbegin(r), boost::rend(r)); } // non static template <class r> pair<typename range_value<r>::type, typename range_value<r>::type> minmax(const r& r) { pair<typename range_const_iterator<r>::type, typename range_const_iterator<r>::type> p = minmax_element(boost::begin(r), boost::end(r)); homecoming make_pair(*p.first, *p.second); } // static template <class r> static void bound_range (r& r, const typename boost::range_value...

ios - Is it possible to send a voice recording through iMessage from my app? -

ios - Is it possible to send a voice recording through iMessage from my app? - in ios 8, voice recordings can "self-destruct" after listening or after amount of time on imessage. wondering how can create 1 of messages in app, share through imessage (copying , pasting imessage). ios objective-c xcode ios8 apple

ios - Swift - Custom UIView -

ios - Swift - Custom UIView - i can't create custom uiview within view controller. want 4 buttons (undo, dislike, like, info) in vertical side. undo , info button not appeared within view controller. let choosepersonbuttonhorizontalpadding:cgfloat = 40.0 allow choosepersonbuttonverticalpadding:cgfloat = 20.0 func constructundobutton() -> void{ allow button:uibutton = uibutton.buttonwithtype(uibuttontype.system) uibutton allow image:uiimage = uiimage(named:"undo")! button.frame = cgrectmake(choosepersonbuttonhorizontalpadding, cgrectgetmaxy(self.backcardview.frame) + choosepersonbuttonverticalpadding, image.size.width, image.size.height) button.setimage(image, forstate: uicontrolstate.normal) self.view.addsubview(button) } func constructnopebutton() -> void{ allow button:uibutton = uibutton.buttonwithtype(uibuttontype.system) uibutton allow image:uiimage = uiimage(named:"nope...

parsing - Ignoring whitespace (in certain parts) in Antlr4 -

parsing - Ignoring whitespace (in certain parts) in Antlr4 - i not familiar antlr. using version 4 , have grammar whitespace not of import in parts (but might in others, or rather luck). so have next grammar grammar foo; programme : a* ; : id '@' id '(' idlist ')' ';' ; id : [a-za-z]+ ; idlist : id (',' idlist)* ; ws : [ \t\r\n]+ -> skip ; and test input foo@bar(x,y); foo@baz ( z,z) ; the first line parsed correctly whereas sec 1 not. don't want polute rules places whitespace not relevant, since actual grammar more complicated toy example. in case it's not clear part id'@'id should not have whitespace. whitespace in other position shouldn't matter @ all. define id '@' id lexer token rather parser token. a : aid '(' idlist ')' ';' ; aid : [a-za-z]+ '@' [a-za-z]+; other options enable/disable whitespaces in token stream, e.g. here enable/disa...

how to override or substitute default django admin site template? -

how to override or substitute default django admin site template? - first: i used django admin site website management system,but features not appropriate me,so decide create own,according django docs,what learned can override templates per app or model while can extend adminsite build brand new one.but,i have problems playing around them,what trying were: 1,article/admin.py (one app of project) from django.contrib import admin django.contrib.admin import adminsite .models import article,articleimage,category class myadminsite(adminsite): site_header = "moonmoonbird administration" admin_site = myadminsite(name="myadmin") admin_site.register(article) 2,settings.py installed_apps = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.staticfiles', 'rest_framework', 'rest_framework_swagg...

Percentages in css using meteor? -

Percentages in css using meteor? - i'm started making first meteor app , wanted div to same height page, logically set height 100%. didn't work. set width 100%. didn't work. there error in code? or maybe meteor parse css weirdly? <head> <title>facer</title> </head> <body> </body> <template name="home"> <div id="face"> <img id="faceimg" src="http://raritea.com/raritea/images/logo.svg"/> </div> </template> css: body { margin: 0px; background-color: grey; } #face { background-color: black; width: 100%; height: 100%; } js: router.map(function(){ this.route('home', {path: '/'}); }); or maybe meteor parse css weirdly? no, meteor works other web framework. try css. #face { background-color: black; width: 100%; height: 100%; position: absolute; } also in order utilize iron:route , off <...

ios - Add Test Target to existing project in Xcode 6.3 -

ios - Add Test Target to existing project in Xcode 6.3 - note: question related, reply given there not solve issue me: xc testing framework ios(xcode 6.1) test session exited(80) without checking in i have existing ios code, , want start writing xctest cases using xcode 6.3. create test target clicking on + in test navigator. test target created me, including file tests unit tests in them. the test starts greyed out in test navigator (i cannot click cmd+t). question 1: how can enable tests? edit: reply described in screenshot: https://www.evernote.com/shard/s4/sh/6a5ca990-d723-46ee-bf77-2cf0ff4e70b2/1a62c472fbbeeffa595fcecd4a9fbbf7, found here: adding unit tests existing project? in project settings, have next settings production target (legacy): , next settings test target (auto generated): if run test anyway manually clicking on play button in test navigator, receive next extensive error messages. warning: error creating lldb target @ path '/users/erwin/...

java - GWT- FormPanel response null on submitcompletehandler -

java - GWT- FormPanel response null on submitcompletehandler - we have form panel in gwt. the action of our form panel set aspx page. per expected output, info sent through form panel using post method, set action aspx page , after successful response redirected action aspx page. but receive null getresults() function of onsubmitcompletehandler . when check response value of request network section of inspect element found same result expected. you cannot access results if post form cross-origin. from javadoc: tip:     the result html can null result of submitting form different domain. – source: http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/formpanel.submitcompleteevent.html#getresults() java asp.net gwt response formpanel

php - Outputting multiple jpegs dynamically created, into webpage -

php - Outputting multiple jpegs dynamically created, into webpage - so have code can create jpeg rectangle. <?php // create 200 x 200 image $canvas = imagecreatetruecolor(1000, 500); // allocate colors //$pink = imagecolorallocate($canvas, 255, 105, 180); $white = imagecolorallocate($canvas, 255, 255, 255); //$green = imagecolorallocate($canvas, 132, 135, 28); // draw 3 rectangles each own color //imagerectangle($canvas, 50, 50, 150, 150, $pink); //imagerectangle($canvas, 100, 120, 75, 160, $green); imagerectangle($canvas, 0, 0, 120, 100, $white); // output , free memory header('content-type: image/jpeg'); imagejpeg($canvas); imagedestroy($canvas); ?> is there way, can run in loop multiple rectangles outputted webpage. please note: not want multiple rectangles in same canvas. want canvas rectangle in it. next canvas rectangle in it, etc. tried running in loop, not seem work no, can't purely php. can output single image, , explicitly state '...

security - Symfony 2 SecurityContext class deprecated -

security - Symfony 2 SecurityContext class deprecated - i next error when seek reach app/example on symfony demo error: symfony\component\security\core\securitycontext class deprecated since version 2.6 , removed in 3.0. utilize symfony\component\security\core\authentication\token\storage\tokenstorage or symfony\component\security\core\authorization\authorizationchecker instead. the server returning right reply 200 status code though. i've found nil on google it. has encounter error before and/or know how prepare ? explanation starting symfony 2.6 securitycontext got split tokenstorage , authorizationchecker (see: symfony blog - "new in symfony 2.6: security component improvements"). the main reason prevent circular reference occurred quite when injecting securitycontext own services. solution the alter 100% backwards compatible (as stated in linked blog post), need rewrite how accessed securitycontext . // symfony 2.5 ...

What's the C# equivalent of Java's "for (String currLine: allLines)"? -

What's the C# equivalent of Java's "for (String currLine: allLines)"? - i've got java code along lines of: vector<string> alllines = new vector<string>(); alllines.add("line 1"); alllines.add("line 2"); alllines.add("line 3"); (string currline: alllines) { ... } basically, reads big file lines vector processes 1 @ time (i bring in memory since i'm doing multi-pass compiler). what's equivalent way of doing c#? i'm assuming here won't need revert using index variable. actually, clarify, i'm asking equivalent of whole code block above, not just for loop. list<string> can accessed index , resizes automatically vector. so: list<string> alllines = new list<string>(); alllines.add("line 1"); alllines.add("line 2"); alllines.add("line 3"); foreach (string currline in alllines) { ... } c# java for-loop equivalent

.htaccess - Mask www.oldsite.com/home with www.newsite.com -

.htaccess - Mask www.oldsite.com/home with www.newsite.com - how can mask instances of www.oldsite.com replaced www.newsite.com example: i'd replace: http://www.oldsite.com/home/b.jsp?id=9912&ln=115-991632 with www.newsite.com/home/b.jsp?id=9912&ln=115-991632 you can in apache redirect directive: <virtualhost *:80> servername www.oldsite.com redirect permanent /home/ http://www.newsite.com/home/ </virtualhost> .htaccess redirect mask

jquery - Issue applying DD_belatedPNG png fix on images within a lightbox (IE6) -

jquery - Issue applying DD_belatedPNG png fix on images within a lightbox (IE6) - i trying invoke dd_belatedpng prepare on images within lightbox 1 time has been called. okay, that's easy plenty colorbox: $(el).colorbox({ ... oncomplete:function(){ dd_belatedpng.fix('#product_pop .fixme'); } }); this works fine, , pngfix applied works first time lightbox called, subsequent calls lightbox don't seem have png prepare applied :s i've tried calling pngfix first time lightbox opened, , each subsequent view, nil (as per illustration below) - doesn't seem help either. example here jquery internet-explorer-6 lightbox colorbox pngfix

asp.net 2.0 - How to work with FileUpload in a WebPage? -

asp.net 2.0 - How to work with FileUpload in a WebPage? - i have follow code in asp.net webpage: protected void btnsend_click(object sender, eventargs e) { string imei = request.querystring["id"]; int imeiid = int.parse(imei); if (fupicture.hasfile) { fupicture.saveas("/images/" + imei + ".jpg"); dal.imeihandling.savepicture(imeiid, ""); } string code = request.querystring["code"]; response.redirect("~/uploadpicture.aspx?id=" + imei + "&code=" + code); } how fill saveas , how load path in asp:image ? save takes file path, typically this. fleupload.saveas(server.mappath("~/images/uploadded/new.jpg")) or similar, physical file path save. once saved, can whatever want it. note: want consider security/validation user provided image etc when doing this. asp.net-2.0