Posts

ms access - mysqlimport - issue with spaces in table name -

dealing incompetent database design here. moving app ms access mysql , moment important preserve table names. access db creator has spaces in table names... i tried doing import soft quotes, hard quotes, backticks, , no quotes give "check manual corresponds mysql server version right syntax use near 'citation table' @ line 1, when using table: chain citation table" i saw can escape spaces in commands eg rm chain\ citation\ table.txt same error that. here example: mysqlimport --host=mysql.myhost.com --user=dbuser -p \ --local --delete \ --fields-optionally-enclosed-by='|' \ --fields-terminated-by=';' \ --lines-terminated-by='\n' \ dbname "chain citation table.txt" what right way handle messed situation? have make holding table named somethingwithoutspaces , import , copy across? thanks advice. you try using access mysql converter , has worked me in past.

c# - listview: getting subitem text -

i have listview following columns id, surname, firstname. want surname when row selected how do using visual c# 2008? subscribing selectedindexchanged listview1: listview1.selecteditems[0].subitems[1].text you have tons of microsoft documentation it.. http://msdn.microsoft.com/en-us/library/system.windows.forms.listviewitem.listviewsubitem.aspx

sql server - If one table (A) relates to another (B), which relates to another (C), can I write a query to get table out of A from a join between B and C? -

Image
i have 3-table schema. 2 of tables (trade/portfolio) have 1:1 relationship, fk on 1 of these tables has unique constraint. the table, explained above, fk (which portfolio) relates third table. third table (price) displaying historical information portfolio (there can many prices portfolio on time-period), there's bog-standard 1:m relationship. however, need various prices portfolio. that's easy query works on portfolio id. however, feasible way price of single trade? there limitation in design prevent this? apologies long title, not find better way explain issue! thanks by description guess data model. fk tradeid unique in portfolio. and wonder if possible rows price related trade. here query give rows price tradeid 1. select price.* portfolio inner join price on portfolio.portfolioid = price.portfolioid portfolio.tradeid = 1 i see nothing in design prevent fetching rows price given tradeid.

For-loop Local Variables in C -

why following code output same memory location everytime? int x; (x = 0; x < 10; x++) { int y = 10; printf("%p\n", &y); } i thought memory location should change each time for-loop run, variable new. yes, absolutely right memory location could change. doesn't have :). in each iteration old variable "destroyed" , new 1 "created" @ same place. although decent compiler optimize unnecessary "actions" away

c# - Extension method for generic interface does not show on subclasses -

i trying implement extension method initialize moq repositories mvc3 application. have repository interface: public interface irepository<tentity> : idisposable tentity : class { //methods } i have several classes such userrepository implement interface: public interface iuserrepository : irepository<user> { //specific methods user repository } public class userrepository : efrepositorybase<user>, iuserrepository { } efrepositorybase repository base class providing general methods repository. in unit tests create extension method each type of repository retrieve mock repository. tried adding extension method this: public static class repositoryhelpers { public static mock<irepository<t>> getmockrepository<t>(this irepository<t> repository, params t[] items) t : class { mock<irepository<t>> mock = new mock<irepository<t>>(); mock.setup(m => m.getall()).returns(items.asquery...

asp.net - HTTP Modules - Safe to remove Remove -

i have following http module define inside web.config file of asp.net application. <httpmodules> <add name="urlrewriter" type="intelligencia.urlrewriter.rewriterhttpmodule, intelligencia.urlrewriter"/> <remove name="windowsauthentication"/> <remove name="passportauthentication"/> <remove name="anonymousidentification"/> <remove name="urlauthorization"/> <remove name="fileauthorization"/> </httpmodules> which of these httpmodules safe remove , of them not safe remove?

objective c - How do you convert an NSUInteger into an NSString? -

how convert nsuinteger nsstring ? i've tried nsstring returned 0 time. nsuinteger namescategoriesnsarraycount = [self.namescategoriesnsarray count]; nslog(@"--- %d", namescategoriesnsarraycount); [namescategoriesnsarraycountstring settext:[nsstring stringwithformat:@"%d", namescategoriesnsarraycount]]; nslog(@"=== %d", namescategoriesnsarraycountstring); when compiling support arm64 , won't generate warning: [nsstring stringwithformat:@"%lu", (unsigned long)mynsuinteger];