Posts

entity framework - Set Service Tiers when create Azure SQL database from VS C# -

is possible set microsoft azure sql database service tiers when creating new database visual studio in c#? currently, can connect azure sql server , create table no problem reason (maybe microsoft default) databases created in web service tier going retired. set default service tiers either basic, standard, or premium depends on needs. what found far when call method database.initialize(true) <--ef http://msdn.microsoft.com/en-us/library/system.data.entity.database.initialize(v=vs.113).aspx create database , set web service tier. with azure sql v12 have option specify sku. example: var dbcreationcmd = $"create database [{databasename}] (maxsize={maxsize}," + $"edition='{edition}'," + $"service_objective='{serviceobjective}')"; // azure sql db v12, database creation tsql became sync process. // need 10 minutes command timeout executenonquery(connectionstring, dbcr...

c++ - Does C style casting adds assembly (code) or is it only for the compiler to understand the situation? -

class { public: *geta(void) { return a; } protected: *a; }; class b : public { public: b *getb(void) { return (b*)a; } }; in class assume compiler (ideally) optimize , inline getter no different code accessing variable directly ? in class b variable cast b. purely compiler or involve code ? assembly instructions same function in b ? most casts not insert assembler instructions, however, there exceptions: expanding casts on signed integers: cast inserts sign extension instruction preserve value of negative values. casts , floating point types: these casts perform full conversion, not reinterprete bits. consequently, computer has something. pointer casts multiple inheritance. while first base first member in object, second base can't be. so, casting derived* secondbase* adjust pointer, adding addition instruction code.

c# - Passing parameter from client side to web method in asp.net telerik -

i've 10 telerik dropddownlist in 1 page. so, want bind dropdownlist using webservice method. don't know how pass parameter client side web method in telerik webservice. can 1 me please. you can use onclientitemsrequesting event: http://www.telerik.com/help/aspnet-ajax/dropdownlist-onclientitemsrequesting.html small example taken article: function clientitemrequesting(sender, eventargs) { var context = eventargs.get_context(); context["filterstring"] = "value sent server"; }

android - VS 2013 Multi Device Hybrid App Failed to deploy to device, no devices found -

Image
i use new vs 2013 phonegap/cordova template create hybrid apps. it works fine using emulators , ripple media emulators when connect phone . error saying ( see screenshot ) error: failed launch application on device: error: failed install apk device: error: failed deploy device, no devices found. blankcordovaapp1 below steps tried resolve http://blog.falafel.com/running-cordova-multi-device-hybrid-app-from-visual-studio-on-android-device/ i use alcatel 1 tocuh x+ phone see below device driver installed , date. also environment variables set shown below i have tried edit android_winusb.inf file include hardware ids still no go . doing here or missing here ? the problem indeed mode of "usb computer connection" should selected "ptp camera" device recognized along below steps without driver device manager screen the device on performing command "adb devices" might still show "unauthorize...

c++ - Getting size of enum using preprocessor -

i trying find way calculate length of enum, other adding "count" element @ end of enum. have found way use preprocessor follows. #include <iostream> #include <boost/preprocessor/tuple/elem.hpp> //simple declaration template <class e> struct enum_size; //specialization done in macro each enum created #define make_enum(name, ...) enum name {__va_args__}; \ template <> \ struct enum_size<name> { \ static const int value = boost_pp_variadic_size(__va_args__); \ }; make_enum(my_enum1, a, b, c) //make_enum(my_enum2, a) //triggers compilation error int main(int argc, char** argv) { std::cout << enum_size<my_enum1>::value << std::endl; } however when try create my_enum2 above redeclaration error compiler (gcc 4.8.3 on cygwin) follows main.cpp:16:21: error: redeclaration of 'a' make_enum(my_enum2, a) ^ main.cpp:9:41: note: in definition of m...

Java add items into class as an Array -

i have below class structure , want add item it. public class person implements serializable { private string name; private string mobile; public person(string n, string e) { name = n; mobile = e; } public string getname() { return name; } public string getmobile() { return mobile; } @override public string tostring() { return name; } } i want add item this: people = new person[]{ new person("hi" , " programmer"), new person("hello", " world") }; my code , want add items while() code don't correct. people = new person[]{}; while (phones.movetonext()) { people = new person("hi" , " programmer"); people = new person("hello", " world") } you have error in source code trying put object of person array gives compilation error overcome problem first take list of type person , convert array , business ...

python - Tkinter: How do I hide text as if with a password with a Text (not Entry) widget? -

i know entry widget, in tkinter, can this: entry.config(show="*") and show asterisks instead of whatever type. however, same thing text widget, there no show option configure text widgets. there way in text widget? it'll mean lot less work me if there is. the reason less work because have lots of custom functionality , customizations set text widget class, , don't want have reprogram on again entry widget, when one-line text widget works fine in place (other maybe feature). text , entry widgets have different ways access indexes , such, , these quite involved. customizations make can such press ctrl+left skip word, , kinds of stuff (and complicated stuff not that, too, may or may not have indexes). no, text widget has no such feature. have implement yourself, , i'm guessing difficult make work.