Posts

c# - AppDomain Creation : Resolving "Could not load file or assembly" error -

this weird. here's code : appdomain newdomain = appdomain.createdomain("newdomain ", null, new appdomainsetup { applicationbase = @"d:\mydllfolderfullpath\" }); assembly = newdomain.load("myassembly"); this throws "could not load file or assembly" error. checked assembly's dll located under specified folder path, , name of assembly correct. when copy myassembly.dll currentdomain's main folder, works ! behaves if applicationbase setting new appdomain has absolutely no effect , keep pointing current appdomain's appbase. any ideas ? i don't know want exactly... but load dll appdomain , create instance, can this: create appdomain. setup , security info optional parameters. var appdomain = appdomain.createdomain("a friendly name identify application", null, null); load assembly: var assemblyname = assemblyname.getassemblyname(@...

asp.net - Pagination not working in asp:DataGrid -

problem: when attempt go page 2 or other subsequent page of data grid, nothing refresh page. markup: <!--main datagrid--> <asp:datagrid id="dgtasks" runat="server" pagesize="40" allowpaging="true" autogeneratecolumns="false" forecolor="#333333" gridlines="both" font-size="small" allowsorting="true" onitemdatabound="item_databound" > <headerstyle backcolor="#990000" font-bold="true" forecolor="white" horizontalalign="center" font-size="small"/> <columns> ... </columns> <selecteditemstyle backcolor="#ffcc66" font-bold="true" forecolor="navy" /> ...

c# - Managed C++ prospects -

has tried coding in managed c++? have few questions : how productive language compared c#? is there restriction on type of projects can written? can write web application in managed c++? is possible mix managed , unmanaged c++ code in 1 application? is mfc still valid in managed c++? best option when considering migration of vc++ application? i've found c# far more productive. real magic of managed c++ yes, can mix managed , unmanaged code in - inside 1 function! don't know how microsoft did (and apparently neither they, because official name feature "ijw" - "it works" :)).

javascript - Dynamically show data in the popup which is determined in onpopupshowing event handler -

i developing firefox extension. on 1 <menupopup> , onpopupshowing calls javascript function. javascript function extracts list of names. these names have displayed in same popup. how can this? need pass data (just use beans in java) browser javascript function. data can change every time popup called. you need modify dom rapresenting menupopup. example: <menulist> <menupopup id="mymenupopup"> <menuitem id="firstitem" label="mozilla" value="http://mozilla.org"/> <menuitem id="seconditem" label="slashdot" value="http://slashdot.org"/> <menuitem id="thirditem" label="sourceforge" value="http://sf.net"/> </menupopup> </menulist> now if want add item: var mymenupopup = document.getelementbyid("mymenupopup"); var newitem = document.createelement("menuitem"); newitem.setattribute("id...

3d - Draw on different side of a cube -

i draw colorcube on scene. i want draw image on front , image on right side of it. i know must load image textureloader , add texture and put texture on cube.but didn't know how put on right side of it. the colorcube class 'all in one' class quick test purpose. if want create cube particular behavior, texture, color, etc. it's better create 1 scratch. check links (in french can read code) : http://deven3d.free.fr/java3d/chap03.htm#formesbase http://deven3d.free.fr/telechargements/fichiers/java3d/chap03/box3d/box3d.java http://deven3d.free.fr/telechargements/fichiers/java3d/chap03/quadarray3d/quadarray3d.java

validation - Rails - validates_uniqueness_of model field with the inverse of :scope -

i'm trying validate uniqueness of field in model 1 catch - shouldn't raise error if records have shared relation. sake of example, here's mean: class product < activerecord::base belongs_to :category end class category < activerecord::base has_many :products end >>> category.create({ :name => 'food' }) # id = 1 >>> category.create({ :name => 'clothing' }) # id = 2 >>> p1 = product.new({ :name => 'cheese', :category_id => 1, :comments => 'delicious' }) >>> p2 = product.new({ :name => 'bread', :category_id => 1, :comments => 'delicious' }) >>> p3 = product.new({ :name => 't-shirt', :category_id => 2, :comments => 'delicious' }) >>> p1.save >>> p2.save # should succeed - shares same category duplicate comment >>> p3.save # should fail - comment unique category_id = 1 if use validates_uni...

Rails 3 nested resource route problem as form_for -

i have nested resources in routes.rb - ( my rake:routes gist ) namespace(:admin) resources :restaurants resources :menus resources :menu_items end end in controller: def new @restaurant = restaurant.find(params[:restaurant_id]) @menu_item = @restaurant.menu_items.build end trying create new menuitem (action #new), url: http://127.0.0.1:3001/admin/restaurants/1/menu_items/new error: nomethoderror in admin/menu_items#new showing /home/fps/workspace3/peded/app/views/admin/menu_items/_form.html.erb line #1 raised: undefined method `admin_menu_items_path' #<#<class:0xb6582d78>:0xb6581f2c> extracted source (around line #1): 1: <%= form_for @menu_item |f| %> ... how make form work? created out of nifty:scaffold update i tried in _form: <%= form_for [:restaurant, @menu_item] |f| %> but ended similar error: showing /home/fps/workspace3/peded/app/views/admin/menu_items/_form.html.erb line #1 raised: undefined method `r...