Posts

Showing posts from March, 2013

oracle - problem with sql syntax -

the sql syntax following: select y.name, y.email, k.date, k.work_nr, k.score, k.filename bas1.students y, bas1.assignments k, bas1.topics y.id = k.student_id , k.topic_id = a.id a.name = 'history'; but errors, ideas? you're using twice select y.name, y.email, k.date, k.work_nr, k.score, k.filename bas1.students y, bas1.assignments k, bas1.topics y.id = k.student_id , k.topic_id = a.id , a.name = 'history'; change this

actionscript 3 - getting pictures from twitter feed -

hello have atom feed twitter , every entry looks this: <entry> <id>tag:search.twitter.com,2005:9708181705990144</id> <published>2010-11-30t20:39:45z</published> <link type="text/html" href="http://twitter.com/eva_starlily/statuses/9708181705990144" rel="alternate"/> <title>@sarahpalinusa if i'd used language willow did, reason whatsoever, dad have grounded me months. learn parent.</title> <content type="html">&lt;a href=&quot;http://twitter.com/sarahpalinusa&quot;&gt;@sarahpalinusa&lt;/a&gt; if i&amp;apos;d used language willow did, reason whatsoever, dad have grounded me months. learn parent.</content> <updated>2010-11-30t20:39:45z</updated> <link type="image/png" href="http://a0.twimg.com/profile_images/1179401088/b6c2b6ec-3432-476b-9ded-473986f12fd5_normal.png" rel="image"/&g

xml - Changing the number of columns for the New Products grid widget in Magento -

how change number of columns new products grid widget in magento? i know have update layout.xml file somehow i'm not sure insert.or maybe have layout update in cms pages include widget? if using cms page content widget container: it pretty simple, add column_count parameter in {{widget type="widget_type" parameter1="value" column_count="your_value"}} directive. by way widget standard magento block pre-configurations, can specify block parameter within {{widget}} directive. if want use widget functionality, can create etc/widget.xml in custom module xml: <widgets> <new_products> <parameters> <column_count translate="label"> <required>1</required> <visible>1</visible> <value>5</value> <!-- default parameter value --> <label>the number of products in row</label>

iphone - Binary plist Vs normal plist -

what advantages of sending binary plist on network simple plist. also, how fast binary plists process on client side? they're smaller, , bit faster process, plists in xml format; unless you're dealing lot of data, difference in processing time negligible.

select - XSLT for segmenting XML -

i have xml goes this: <company> <employee name="john"/> <employee name="sarah"/> <employee name="kim"/> <employee name="karl"/> <employee name="tom"/> <employee name="jim"/> <employee name="sandy"/> </company> how can use xslt template selecting first n nodes, 3 example, can get: <company> <employee name="john"/> <employee name="sarah"/> <employee name="kim"/> </company> in oxygen xml editor, can use following xpath achieve that: /company/employee[position() < (last() - count(/company/employee)+4)] but need use xslt in case help how can use xslt template selecting first n nodes, 3 example, can get: <company> <employee name="john"/> <employee name="sarah"/> <employee name=&q

ServletContext is null when using spring to load jetty with jersey/jax-ws -

we're using spring configure jetty , load up, , i'm trying use jersey web services , use jetty/spring library can autowire service classes jersey resources, i'm having trouble starting server because says servletcontext null. here's spring config xml: <property name="handler"> <bean id="handlers" class="org.eclipse.jetty.server.handler.handlerlist"> <property name="handlers"> <list> <bean class="org.eclipse.jetty.servlet.servletcontexthandler"> <property name="eventlisteners"> <list> <bean class="org.springframework.web.context.contextloaderlistener" /> <bean class="org.springframework.web.context.request.requestcontextlisten

How does vmware easy install work? -

with vmware workstation easy install can install os without input. how this? support built os, or vmware magic automatically select correct options? the support built os. example, in case of windows guests, vmware generates floppy disk image containing txtsetup.oem , other files used windows' unattended-installation feature.

objective c - "incompatible type in initializtion" -

my caller-code looks this: nsdictionary *mydictionary = [nsdictionary dictionarywithobjectsandkeys: @"a", a_key, @"b", b_key, @"x", x_key, nil]; id exp = [[self brain] expression]; double result = [[self brain] evaluateexpression:exp usingvariablevalues:mydictionary]; -> error line expression defined as: @property (readonly) id expression; (i not think that's relevant) the signature of function "evaluateexpression:exp..." is: " + (double)evaluateexpression:(id)anexpression usingvariablevalues:(nsdictionary *)variables;" the error receiving: "incompatible type in initializtion" i can't figure 1 out - it's initializing double variable method returns double. doing wrong? try changing plus @ beginning of method declaration minus. plus indicates class method, , you're (as far can tell) calling against instance. i think above mistake causing compiler not

C# how to Register exe? -

how find exe's path knowing name in .net? would add name os environment variable? other application have 'register' somewhere else? i need app start-up app b , call wcf services on it. thanks! to answer question: cannot know path knowing name. exe can reside anywhere on file system. there can multiple instances of don't know each other. multiple exe files different can have same name. you take 1 of several approaches round this, depending on exe targetting: get user browse exe using normal file browse dialog search file system see traces target exe leaves on system (filesystem, registry, environmental variables, etc) , use traces locate exe for either of these options save result don't have execute again when app run next time. searching filesystem take time, not guaranteed find exe (depending upon user level app running as) , may false positives, if app called dumb setup.exe . getting user locate exe first time run possibly reliable

c++ - Can't initialize static QList? -

i following error: cube.cpp:10: error: expected initializer before ‘<<’ token here's important parts of header file: #ifndef cube_h #define cube_h #include <cstdlib> #include <qtcore/qtcore> #include <iostream> #define yellow 0 #define red 1 #define green 2 #define orange 3 #define blue 4 #define white 5 using namespace std; class cube { public: ... static qlist<int> colorlist; ... }; #endif here's line gives error: qlist<int> cube::colorlist << yellow << red << green << orange << blue << white; you can't initialize object << . = there not operator=() -- it's special syntax same calling constructor. something might work qlist<int> cube::colorlist = emptylist() << yellow << red << green << orange << blue << white; where emptylist() is qlist<int> emptylist() { qlist<int> list; return list; }

iphone - Nsuserdefauls problem -

i have typed coding under highscore button. suppose string text(name) in textbox , save highscore. however, not find plist being created under document. please help -(ibaction)savehighscore_button { int i, ii = -1; struct high_score { nsstring *name; int highscore; }; struct high_score structarray[10]; nsuserdefaults *userpreferences = [nsuserdefaults standarduserdefaults]; (i=0; i<10; i++) { if ([userpreferences stringforkey :[nsstring stringwithformat:@"highscorenameentry%d",i]]!=nil && [userpreferences stringforkey :[nsstring stringwithformat:@"highscoreentry%d"]]!=nil) { structarray[i].name= [userpreferences stringforkey:[nsstring stringwithformat:@"highscorenameentry%d",i]]; structarray[i].highscore = [userpreferences integerforkey:[nsstring stringwithformat:@"highscoreentry%d",i]]; ii = i; } } if (myscore >0) { (i==ii; i>=0; i--) { if (myscore > structarray[i].highscore) { if

python - importError: no module named _winreg python3 -

where can download _winreg python3 if can @ all. have 'windir' on e:\windows. not know if cx_freeze did not notice that. using cx_freeze create msi installer. as says in _winreg documentation , has been renamed winreg in python 3.0. should run 2to3 tool if you're converting code written python 2.x.

internet explorer 8 - how to fix a IE8 error with an older version of tablesorter jquery plugin? -

i'm trying fix bugs site developed few years ago, older version of jquery. particular problem occurs in ie8, in jquery.tablesorter.min.js script. don't know how tell version of tablesorter used minified version, version of jquery 1.3.2. here error: message: 'undefined' null or not object line: 2 char: 6697 it in section of line: function getcachedsorttype(parsers,i){return parsers.type;}; the body of table uses tablesorter empty on page (it can have rows added it). still has <thead> , <tbody> tags. read @ another forum post on same problem problem related position of <table> , <form> tags. table uses tablesorter must inside form, on page. however, controller's layout contains <table> tags, , form particular page tablesorter table located within layout <table> . part of problem?

javascript - Backbone.js: How do I identify the model of the parent view upon an event? -

i have 2 collections instantiated: items , sections. each section can have multiple items , each item can occur in more 1 section. when add item section want hash of item , save array attribute of section. array attribute used determine items displayed in each section. so let's have itemlistmodel 100 items , have section 'items' attribute array [ item3_id_hash, item27_id_hash, item59_id_hash ]. when display sectionview, first map hash ids items collection objects , create itemsview displays objects. the problem have in identifying items upon creation , upon deletion can ids , add/remove them section.item attribute array. i can think of hackish solution identify item upon addition setting global variable called parent. want avoid using globals however. removing matter entirely. when user clicks x delete item in view, can't figure out how can either identify parent section's model, or @ least identify id. example view: section_1 item_1 item_2 i

What does the "yield" keyword do in Ruby? -

i encountered following ruby code: class myclass attr_accessor :items ... def each @items.each{|item| yield item} end ... end what each method do? in particular, don't understand yield does. this example fleshing out sample code: class myclass attr_accessor :items def initialize(ary=[]) @items = ary end def each @items.each |item| yield item end end end my_class = myclass.new(%w[a b c d]) my_class.each |y| puts y end # >> # >> b # >> c # >> d each loops on collection. in case it's looping on each item in @items array, initialized/created when did new(%w[a b c d]) statement. yield item in myclass.each method passes item block attached my_class.each . item being yielded assigned local y . does help? now, here's bit more how each works. using same class definition, here's code: my_class = myclass.new(%w[a b c d]) # points `each` enumerator/method of

ios4 - IPhone Weather App -

i want make weather forecasting app. api should use predict today, tomorrow, , day after tomorrow's weather. heard people saying yahoo api cannot used , apple can reject app? is there tutorial available please post link too. don't know weather api, using yahoo maps api in app in app store.

from and select in c# .net? -

can please tell me how specify particular column in select statement given below: var combinedrows = dt1 in dsresults.tables[0].asenumerable() join dt2 in dsresults.tables[1].asenumerable() on dt1.field<string>("methodname") equals dt2.field<string>("methodname") select new { dt1, dt2 }; datatable finaldt = new datatable("finaltable"); finaldt.columns.add(new datacolumn("sp", typeof(string))); finaldt.columns.add(new datacolumn("method", typeof(string))); finaldt.columns.add(new datacolumn("class", typeof(string))); finaldt.columns.add(new datacolumn("bllmethod", typeof(string))); datarow newrow = finaldt.newrow(); foreach (var row in combinedrows) { datarow datarow = finaldt.newrow(); datarow.itemarray = row.dt1.itemarray; finaldt.rows.add(datarow); } if want specify columns want select, should try changi

flex - MXML/AS error in Camera.get() -

i new flex/as programming in below code error , how resolve it <?xml version="1.0" encoding="utf-8"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:script> <![cdata[ import mx.controls.button; import mx.controls.alert; import flash.media.camera; public function clickhandler(event:event):void { var button:button=event.target button; if (button.label=='test camera') { mx.controls.alert.show("starting camera1"); //mycam = camera.get(); //myvid.attachvideo(mycam); if (camera.names.length > 0) { cam = camera.getcamera(); if (cam != null) { try

Is web.py Python 3 compatible? -

is web.py python 3 compatible? wsgi not yet python 3 compatible (see http://code.google.com/p/modwsgi/wiki/supportforpython3x ) , hence webpy not.

entity framework 4 - MVC mapping viewmodels to POCOs -

i developing asp.net mvc 3 application using ef 4 , pocos. 1 of main challenges have how map viewmodel poco. for example: i have 2 poco object -> user , order. furthemore have viewmodel --> userordermodel containing both models. whenever data posted map userordermodel user , order object. pretty straightforward (perhaps map on request in controller) wondering if there nice, clean solution problem (i thinking of creating generic mapping interace view models must define how map poco object) thanks in advance sounds job automapper great example here on mapping mvc viewmodel's poco's.

php - Zend Framework 1.7 to 1.8 Exception caught by form Method getMaxFileSize does not exist -

what cause error message "exception caught form method getmaxfilesize not exist" after switching 1.7 version 1.8 or more update: issue produced code ->addelement('file', 'avatar', array( 'required' => false , 'label' => 'upload file:' , 'destination' => '/data/avatar' , 'filters' => array() , 'validators' => array( array('extension', false, 'jpg,png,gif') , array('size', false, 102400) , array('count', false, 1) ) , 'decorators' => $this->groupelementdecorators )) update2: group decorators array $groupelementdecorators = array( 'viewhelper', 'formelements', 'file', 'errors'); according issue , must using following. 'val

How to force NHibernate to always do a join for many-to-one -

nhibernate rather smart , omits joins on many-to-one if fields related entity not used in query. however, want formula discriminator on other table without subselect, did custom persister with protected override string discriminatorformulatemplate { { return this.discriminatorformula; } } and specified column name in formula (but column name related table) <discriminator formula="typeid" /> i understand prone name conflicts, in specific case not problem. so want force related ( many-to-one ) table joined main one. best way this? joined times, when hn detects fields used, not know how force time. <many-to-one ... fetch="join"/> this covers get, criteria , lazy load, not hql. another option using custom sql operations, , select subquery instead of table (with join inside query) unfortunately, @ point hack. way nh designed, discriminator must in same table.

ruby on rails - RoR fragement caching based on id -

is there way cache fragment based on id , part? for example, <% cache(:id => session[:user], :part => 'test') %> the code doesn't seem work though. still caches based on action called it. edit: the problem having cannot expire fragment in ajax request(i refreshing page page.reload). think problem action i'm trying expire member of resource. here's routes code: map.resources :profiles, :as => 'profile', :only => [:show, :edit, :update], :member => { :home => :get } |profile| here's expire fragment: expire_fragment(:controller => 'profiles', :action => 'home', :part => 'test') thanks

php - List of DOMDocument::loadXML error messages -

i using domdocument::loadxml followed error_get_last() in event of corruption in processed xml. there available list of error messages loadxml might generate? have tried grepping in php , libxml source code, without success. (edit: hunting around in libxml2 source code has revealed error messages being produced / formatted in parser.c. throughout code, , possibly generated here, definitive list helpful.) http://www.xmlsoft.org/html/libxml-xmlerror.html ?

c# - Passing multiple tables to stored procedure with multiple table-valued parameters problem -

i trying pass datatables stored procedure accepts multiple table-valued parameters. problem is, seems parameters being passed first 1 getting errors this: trying pass table-valued parameter 13 column(s) corresponding user-defined table type requires 17 column(s). here's code.. stored procedure header: create procedure testproc @parm1 temp1tabletype readonly, @parm2 temp2tabletype readonly, @parm3 temp3tabletype readonly, @parm4 temp4tabletype readonly, @parm5 temp5tabletype readonly @parm1 has 17 columns, @parm2 13 columns, @parm3 3 columns, @parm4 11 columns , @parm5 has 8 columns. c# code (i use microsoft.applicationblocks) datatable dttable1 = dssource.tables[0]; datatable dttable2 = dssource.tables[1]; datatable dttable3 = dssource.tables[2]; datatable dttable4 = dssource.tables[3]; datatable dttable5 = dssource.tables[4]; sqlparameter param1 = new sqlparameter("@parm1", dttable1); sqlparameter param2 = new sqlparameter("@parm2",

How to connect Django to a mysql database over an ssl connection? -

i'm trying connect django mysql database accessible through ssl connection. how configure this? my first guess setting 'options' property of database definition. however, can't find info on possible options use. option 'ssl': '/map/to/ca-cert.pem' not work. the following command seems work: mysql -h url.to.host -u lizard -p --ssl-ca=./ca-cert.pem edit: ok i'm looking @ python-mysqldb documentation... maybe can find answer there. django uses python mysqldb library interface mysql. looking @ the mysqldb connection documentation , looks ssl option requires dictionary argument. might work: 'options': {'ssl': {'key': '/map/to/ca-cert.pem'}}

java - Modifying a list inside iteration -

we know illegal , throw concurrentmodificationexception : for (item : thelist) { if (i.num == 123) foo(i); // foo modifies thelist } but this? for (item : thelist) { if (i.num == 123) { foo(i); // foo modifies thelist break; } } because loop broken before thelists 's iterator's next called, there no concurrentmodificationexception . make legal? after thinking more, concluded has be. "solution" be for (item : thelist) { if (i.num == 123) { thei = i; break; } } foo(thei); // foo modifies thelist but in terms of how next called, that's same.

.net - Temporary file download link with ASP.NET -

i'd know how can generate temporary download address file limited time. know that's not best practice , using httphandlers way go according http://www.devx.com/codemag/article/34535/1954 i'm curious know how can use urlrewriting generate file name using guid or other cryptic naming technique , make available limited time. i'd appreciate if points me article it. well first need form of identifier. suggest guid , that's done, guid.newguid().tostring("n") gives such identifier. you talk of uri rewriting, that's bit of polish. rewriting turn /myfiles/a948ec43e5b743548fd9a77c462b953e /myfiles/download.aspx?id=a948ec43e5b743548fd9a77c462b953e or (after checking table) myfiles/download.aspx?id=3 or myfiles/download.aspx?filename=mynewdownload.pdf . same other uri rewriting task, lets ignore , assume we've request coming /myfiles/download.aspx?id=a948ec43e5b743548fd9a77c462b953e whether due rewriting or not. okay. you've got ide

How to create a button and its event handler in PHP? -

i new php need create button on simple page , have event handler. clue? in onclick event of button, insert javascript code points php script want run when button clicked. <input type="button" value="say hi!" onclick="location='test.php'" />

scala - How to access and update a value in a mutable map of map of maps -

i've three-level data structure (indentation , line breaks readability): scala> import scala.collection.mutable.map import scala.collection.mutable.map scala> val m = map("normal" -> map("home" -> map("wins" -> 0, "scores" -> 0), "away" -> map("wins" -> 0, "scores" -> 0))) m: scala.collection.mutable.map[java.lang.string, scala.collection.mutable.map[java.lang.string, scala.collection.mutable.map[java.lang.string,int]]] = map((normal,map(away -> map(wins -> 0, scores -> 0), home -> map(wins -> 0, scores -> 0)))) accessing innermost data (scores) requires lot of typing: import org.scalatest.{assertions, funsuite} class mapexamplesso extends funsuite assertions { test("update values in mutable map of map of maps") { import scala.collection.mutable.map // m map accumulator val m = map("

ruby on rails - Sequel not working with postgres -

i'm trying migrate rails apps postgresql in order work in same environnement on heroku... i installed postgres, pg, , postgres-pr fine on mac can't taps pull databases off heroku postgresql server. my rails apps connect seamlessly database. when run irb get: >> require "rubygems" => false >> require "sequel" => true >> db = sequel.postgres nameerror: uninitialized constant sequel::postgres::pgerror /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/adapters/postgres.rb:89 /library/ruby/site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /library/ruby/site/1.8/rubygems/custom_require.rb:31:in `k_require' /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:249:in `tsk_require' /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:72:in `check_requiring_thread' /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:69:in `synchronize' /librar

bash - rm all files except some -

when using sudo rm -r , how can delete files, exception of following: textfile.txt backup.tar.gz script.php database.sql info.txt find [path] -type f -not -name 'expr' -print0 | xargs -0 rm -- for example, delete non txt-files in current directory: find . -type f -not -name '*txt' -print0 | xargs -0 rm -- the find | xargs combination useful. if don't specify -type f find list directories, may not want. the print0 , -0 combination needed if there spaces in of filenames should deleted.

c# - nested property listbox -

i use ef , set datasource of bindingsource user. now in listbox set valuemember asuserid , displaymember product.productname (nested property) schemat is: user _________ userid username productid product _________ productid productname i bind lot of users control , display productnames there visible 1 productname though there example 4 users. the classes generated ef partial, can create source file , add property user class, that: public partial class user { public string productname { { return this.product.productname; } } } this way not need access nested properties displaymember.

javascript - move event handler with jQuery -

i have issue driving me crazy , last resort placing question here. i want move onclick event element onfocus event of same element , using following code: $("#theelement").bind("focus", {}, $("#theelement").data("events").click); $("#theelement").unbind("click"); maybe have guess it. not work. how make work? getting "fn.apply not function" message in following piece of code jquery 1.3.2: proxy: function( fn, proxy ){ proxy = proxy || function(){ return fn.apply(this, arguments); }; // set guid of unique handler same of original handler, can removed proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++; // proxy can declared argument return proxy; } edit: i'm sorry, should have mentioned. comes plugin stuff when clicking element. want make same thing when element gets focus not when cliked simplest solution thought off since can't modify code p

Using My Android as a USB Device -

i've been able find few posts on stackoverflow how control usb devices using android phone -- understand impossible (the android being usb device , all.) however, happy set application communicate other computer (a linux host) usb device. (like expensive mouse...) does have information how set android app/phone use usb connection , exchange data host computer. obviously, works @ level -- it's how eclipse , android sdk/debugger do, i'm still looking way in application. (my current phone, btw, droid incredible.) thanks, r. basically you'd need install usb device driver , adb toolsuite sdk, either or reverse engineer functionality , build else. then enable usb debugging on phone. and can adb port forward allow application on pc connect network socket listener on phone. note connections cannot made in other direction, once connection made bidirectional. if version of android supports tethering on usb, leverage implicitly create network between

php - Using a Zend_Db_Expr -

i have following query: $select = $this->getdao()->select() ->from( array(new zend_db_expr('from_unixtime(expiration)')) ); the getdao function reference data access object class looks this: class model_db_accountresetdao extends zend_db_table_abstract { protected $_name = 'accountreset'; protected $_primary = 'reset_id'; } now following error: "select query cannot join table" this while don't want join. want select field unixtimestamp how can solve problem? all appreciated. tnx if gettin select object zend_db_table_abstract can't pass him ->from() . think should $select = $this->getdao()->select() ->from(this->getdao(), array('_date or field='.new zend_db_expr('from_unixtime(expiration)')) ); or thi

c# - Select programmatically a row of a Listview -

i don't work select row of listview @ beginning of program. if (listview1.items.count > 0) { listview1.items[0].selected = true; listview1.items[0].focused = true; } after running snippet first item selected , focused. listview1.items[0].selected true listview1.items[0].focused true after clicking manually item in listview can walk thru list with listview1.items[newposition].selected = true; regards set listview1.hideselection=false , listview1.focus()

iphone - How to display 4 rows in TTLauncherView -

is possible display 4 rows instead of default 3 rows in ttlauncherview? you can modify row height category if use same number of rows: @interface ttlauncherview(fourthrow) @end @implementation ttlauncherview(fourthrow) - (cgfloat)rowheight { int rows = 4; return round(_scrollview.height / rows); } @end

Why is rails query caching not working? -

in development environment have single request generating hundreds of same queries: person load (24.4ms) select "persons".* "persons" ("persons"."person_id" = 517) limit 1 . . . person load (64.4ms) select "persons".* "persons" ("persons"."person_id" = 517) limit 1 why this? thought rails supposed enable query caching default on per request basis? config/development.rb: config.cache_classes = false config.perform_caching = true . . . # show full error reports , disable caching config.consider_all_requests_local = true config.action_view.debug_rjs = true config.action_controller.perform_caching = true config.active_support.deprecation = :log if you're connecting multiple databases (say using establish_connection in models), appears activerecord::base.connection gets query caching enabled. not sure if that's case here, tricky si

Connecting to SalesForce bulk API using C# -

i trying connect salesforce.com bulk api can mass uploads of data application. have read through pdf documentation emphasizes using curl make post requests. in keeping instructions, have created text file in xml format used logging server. login.txt contents below: <?xml version="1.0" encoding="utf-8" ?> <env:envelope xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:body> <n1:login xmlns:n1="urn:partner.soap.sforce.com"> <n1:username>my username</n1:username> <n1:password>my password</n1:password> </n1:login> </env:body> </env:envelope> here i'm trying in code make login request: xmldocument xmlresponse = null; httpwebrequest httprequest; httpwebresponse httpresponse = null; stream requestst

visual studio 2010 - VS10 Crashes When Doing “Build” or “Rebuild” of C++ Project -

Image
i posted on programmers first , told belongs here. funny, didn't think so. i have vs10 installed on windows server 2008 r2 box, along several other versions of vs dating years. our production build machine. when load or create c++ project , rebuild or clean, ide crashes. in crash details, see this: i have seen other reports seems exact same error on web ( example ). other advice open ticket, i've seen no solution. has else encountered , fixed problem? i've opened ticket ms, i'm covering bases posting here well. edit: i ran logfile suggested in comments. these entries occured after loaded vs, includes build & crash: <entry> <record>229</record> <time>2010/12/01 19:35:39.804</time> <type>information</type> <source>visualstudio</source> <description>entering function cvspackageinfo::hrinstantiatepackage</description> <guid>{68939055-38e0-4d17-92cb-890

c# - IVsOutputWindow reference not found -

i want write visual studio output window in add in. found code how write visual studio output window in custom tool? can't add reference ivsoutputwindow . there no namespace microsoft.visualstudio.shell.interop , no dll. how should fix problem thank you. it sounds you're having trouble locating ivsoutputwindow interface. if here information on type namespace: microsoft.visualstudio.shell.interop dll: microsoft.visualstudio.shell.interop if sdk install on machine dll located in following directory c:\program files (x86)\microsoft visual studio 2010 sdk\visualstudiointegration\common\assemblies\v2.0\microsoft.visualstudio.shell.interop.dll the top 2 directories may change though based on operating system , version of sdk using. if doesn't work please let me know sdk version using , i'll try , point correct path.

data access layer - SubSonic and SQL Azure -

i wrote e-commerce app , used subsonic 2.2 generate data-access-layer. works sql server 2005 , 2008. add support sql azure. does know if code generated subsonic 2.2 work sql azure? side note: if there big issues may scrap 2 yrs old data-access-layer , use telerik orm. thanks i'm not familiar sql azure, understand supports t-sql. in case, shouldn't too difficult adapt subsonic it. however, changing template files not enough, need modify source project , rebuild it. because subsonic dll contains references various ado.net providers supports (microsoft.practices.enterpriselibrary.data, mysql.data, system.data.sqlite, system.data.sqlserverce).

azure - Staging or Production Instance? -

is there anywhere in service runtime tell me if i'm running on 'staging' or 'production'? manually modifying config , production seems bit cumbersome. you should not change configurations when you're based upon if you're in prod or staging. staging area not designed "qa" environment holding-area before production deployed. when upload new deployment, current deployment slot upload package destroyed , down 10-15minutes while upload , start of vm's happening. if upload straight production, that's 15 minutes of production downtime. thus, staging area invented: upload staging, test stuff, , click "swap" button , staging environment magically becomes production (virtual ip swap). thus, staging should 100% same production. what think you're looking qa/testing environment? should open new service testing environment own prod/staging. in case, want maintain multiple configuration file sets, 1 set per deployment e

mysql - How can I effectively document a database? -

i developing database organizes scientific data group , diverse experiments reported in literature, (my background in science rather project management or programming). i have 3 documentation documents for: end users of data data enter-ers developers (e.g. myself , successor) other following users guides , descriptions other databases, there best-practices should follow, perhaps latex template, or mysqldump option automatically of documentation? doxygen supports sql. export ddl sql statements, document them doxygen notation , export html / pdf / whatever.

javascript - a href onclick event is not working if there a rel attribute defined on it -

i have onclick event href , if define rel function not getting called <a href="http://somewebsite" onclick="javascript:somefunction('somevalue');" name="top" rel="somevalue">testing </a> if remove rel property onclick working fine. what's that? i'm not sure answer, more of debugging diagnostic. plus, getting bit long use in comments section. there no js errors me in either chrome 7 or ff 3.6.8 there no apparent unclosed quotes in anchor tag while rel tag not directly supported modern browser (but rather used search spiders), consensus shouldn't affect events. in fact, per user comments, such @james kovaks, works fine in his tests . from chrome js console, function trackforga visible, , executable without error. attaching event jquery, , clicking, fires event expected. tells click event in fact being fired browser. code: $('#countrytabs li:first').click(trackf

Hibernate, return custom object with Criteria or HQL -

there way return custom object criteria query or hql query? for example, have class myclass constructor myclass(int id, string text), want incapsulate queries result in class: "select new myclass(e.id, e.name) example e" myclass not entity, simple custom class. thank all. in hql queries works showed (class name should qualified, i.e. package). although, far understand, it's not supported in hibernate criteria api, supported in jpa 2.0 criteria api criteriabuilder.construct() .

Android: Ringtone is not visible in settings>Sound and Display>phone ringtone -

i have developed sound board application, in set ringtones on long press. no issues it. ringtone changed. when go settings->sound & display->phone ringtone ringtone not listed @ all. , no ringtone selected. how list ringtone there? the list of ringtones pulled system ringtones directory, sd card, if contains folder named "ringtones". may try doing copy ringtone soundboard sd card, folder called "ringtones" (first perform check see if folder exists) @ same time set ringtone.

c# - Using LINQ to XML to Parse a SOAP message -

i getting speed in linq xml in c# , attempting parse following message , don't seem making progress. here soap message not sure if perhaps need use namespace. here soap message trying format. appreciated. attempting extract values. thanks. <soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:body> <lookup xmlns="http://asr-rt/"> <objin> <transactionheaderdata> <intwebsiteid>1000</intwebsiteid> <strvendordata>test</strvendordata> <strvendorid>i07</strvendorid> </transactionheaderdata> <intccn>17090769</intccn> <strsurveyresponseflag>y</strsurveyresponseflag> </objin> </ccnlookup> </soap:body> </soap:envelope> if interacting soap service please use

Authenticate to Facebook without Clicking Facebook Connect Button -

i have added facebook connect application via javascript sdk. i'm using spring security (this grails app) , have added code when clicks fb connection button login, manually authenticate them against user account , gets wired appropriately. have 2 questions: when user first logs in fb , don't have account them, create account them fb info, generate random password, , use email login name. if user uses regular login form instead of fb button sign in, how sign them in fb well? every time user clicks fb connect button, popup window shows up. if authenticated, goes away , web site redirects correctly. how keep popup window showing in case? thanks to first question, user might connect on facebook when landing on page after registration. can rely on javascript sdk out. see here: http://developers.facebook.com/docs/reference/javascript/fb.getloginstatus to second question, think can't, except might work around if use javascript sdk mentioned first quest

php - PayPal IPN Listener -- Sending Response w/ CURL -

i'm trying setup paypal ipn listener curl. i'm receiving post data paypal fine, i'm stuck when sending response back. this test i'm trying send paypal, looking expected "verified" or "invalid" response. $string = 'cmd=_notify-validate&test_ipn=1&payment_type=instant&payment_date=13%3a49%3a46+dec+01%2c+2010+pst&payment_status=completed&address_status=confirmed&payer_status=verified&first_name=john&last_name=smith&payer_email=buyer%40paypalsandbox.com&payer_id=testbuyerid01&address_name=john+smith&address_country=united+states&address_country_code=us&address_zip=95131&address_state=ca&address_city=san+jose&address_street=123%2c+any+street&business=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox.com&receiver_id=testsellerid1&residence_country=us&item_name=something&item_number=ak-1234&quantity=1&shipping=3.04&tax=2.02

criteria api - Prevent Hibernate N+1 Selects when grouping by an entity -

i have hibernate criteria object build thusly: criteria obscriteria = hibernatetemplate.getsessionfactory() .getcurrentsession().createcriteria(observation.class); projectionlist projection = projections.projectionlist() .add(projections.rowcount()) .add(projections.avg("value").as("avgscore")) .add(projections.avg("type.score")) .add(projections.max("date")) .add(projections.groupproperty("observedsubject")); criteria.setprojection(projection); this produces correct result me, "observedsubject" property entity. when set set show_sql true, saw after first query (which returned 18 rows) there 18 selects observedsubject entities. i've tried: criteria.setfetchmode("observedsubject", fetchmode.join); but didn't work. kind of stab in dark, tried: criteria.createalias("observedsubject", "observedsubject", criteria.full_join); but didn't work, either. there wa

android - GLSurfaceView continuously renders despite changing render mode -

i'm trying create glsurfaceview displays map of game area. when player moves, game activity calls highlightspot, in turn should trigger render request. time want re-draw view when player moves. however, current implementation, despite calling setrendermode(rendermode_when_dirty) on glsurfaceview, render mode still seems continuous. check, threw single println statement in ondrawframe method, , when run application, output fills logcat without player moving once-- it's not behaving intended. there else need in order make view render when asked? (the bulk of code derived tutorials @ http://insanitydesign.com/wp/projects/nehe-android-ports/ . omitted ondrawframe, onsurfacechanged, , onsurfacecreated methods sake of conciseness, not changing render mode or requesting render anywhere in methods. if thinks might relevant, can post too.) public class surfaceviewclass extends glsurfaceview implements renderer { public surfaceviewclass(context context) { super(con

ruby - RSpec TextMate Bundle [spec/autorun (LoadError)] -

so updated latest rspec textmate bundle , i'm no longer able run spec test "command r". i have clean version version of textmate installed. rspec version 1.3.1 installed , executable working my project gem generated mr. bones. no rvm installed the project directory looks this my_gem_project spec model_spec.rb spec_helper.rb when run "command r" textmate execute spec spec/autorun loaderror /users/jspooner/library/application support/textmate/bundles/rspec.tmbundle/support/lib/rspec/mate.rb:43:in `require': no such file load -- spec/autorun (loaderror) /users/jspooner/library/application support/textmate/bundles/rspec.tmbundle/support/lib/rspec/mate.rb:43 /tmp/textmate-command-767.rb:2:in `require' /tmp/textmate-command-767.rb:2 the problem rspec.tmbundle/support/lib/spec/mate.rb because requires spec raises loaderror: no such file load — spec error. i'm not sure why error raised. can type spec on command line can&#

when using SimpleModal and open an Iframe it is calling the src twice -

i using simplemodal , opening iframe (using ff) seems work ok in ie9 in ff calling iframe src twice thanks help the code calling looks like function addnew(){ var src = "/php/ftp/parsehome.php?dir="+userdir+"&idx=new"; $.modal('<iframe src="' + src + '" height="445" width="800" style="border:0">', { containercss:{ backgroundcolor:"#e1eff7", bordercolor:"#00a99d", height:450, padding:0, width:840 }, modal: true }); } i ran same problem. looking @ plugin code... // add styling , attributes data // append body correct dimensions, move wrap s.d.data = data .attr('id', data.attr('id') || s.o.dataid) .addclass('simplemodal-data') .css($.extend(s.o.datacss, { display: 'none' })) .appe

algorithm - Finding All Combinations of JavaScript array values -

how can produce of combinations of values in n number of javascript arrays of variable lengths? let's have n number of javascript arrays, e.g. var first = ['a', 'b', 'c', 'd']; var second = ['e']; var third = ['f', 'g', 'h', 'i', 'j']; (three arrays in example, n number of arrays problem.) and want output combinations of values, produce aef aeg aeh aei aej bef beg .... dej edit: here's version got working, using ffriend's accepted answer basis. var allarrays = [['a', 'b'], ['c', 'z'], ['d', 'e', 'f']]; function allpossiblecases(arr) { if (arr.length === 0) { return []; } else if (arr.length ===1){ return arr[0]; } else { var result = []; var allcasesofrest = allpossiblecases(arr.slice(1)); // recur rest of array (var c in allcasesofrest) { (var = 0; < arr[0].length; i++) { result

windows phone 7 - WP7 Deeplink to Marketplace -

does know code use jump within windows phone 7 application application's listing in marketplace? refer sample code marketplacedetailtask here. how to: use launchers windows phone

c# - Compiler Error Message: CS0433: The type 'Resources.labels' exists in both -

i upgraded blog (http://jeffcren.com) blogengine 1.6.1 (from 1.6.0) in order use recaptcha extension. upgraded local code 1.6.0 1.6.1, published via ftp through webmatrix. after upgrade, getting error: compiler error message: cs0433: type 'resources.labels' exists in both 'c:\windows\microsoft.net\framework\v2.0.50727\temporary asp.net files\root\9fd92f87\45a2ba06\assembly\dl3\a64307f6\f14811b8_0291cb01\app_globalresources.dll' , 'c:\windows\microsoft.net\framework\v2.0.50727\temporary asp.net files\root\9fd92f87\45a2ba06\app_globalresources.md7pit6m.dll' the source file , line number breaks varies, same basic message. differs "md7pt66m" section of app_globalresources.md7pit6m.dll (the second file path in error message). i able fix error locally deleting temporary asp.net files, can't on hosting server (godaddy). there can fix error? based on suggestions codeplex discussion page, have edited web.config file in order cycle app pool

eclipse rcp - Trying to create simple GEF -

i trying create simple automation tool testing.i have followed simple tutorials on net , created rcp view on eclipse. have tried include simple gef component on view throws me error saying " not create view: plug-in "geftutorial" unable instantiate class "geftutorial.view"." here source code particularly when uncomment creation of private scrollinggraphicalviewer viewer = new scrollinggraphicalviewer(); private rooteditpart rooteditpart = new scalablefreeformrooteditpart(); private editpartfactory editpartfactory = new simplegefeditpartfactory(); all above statements on view.my view appears back here source code view.java package geftutorial; import org.eclipse.jface.viewers.istructuredcontentprovider; import org.eclipse.jface.viewers.itablelabelprovider; import org.eclipse.jface.viewers.labelprovider; import org.eclipse.jface.viewers.tableviewer; import org.eclipse.jface.viewers.viewer; impo