Tag Archives: Programm general

MVC route attributes intermittently stop working

I get intermittent problems with MVC routing attributes which stop working on our Azure hosted site. Controller action and attributes look like this: [AllowAnonymous] [RequireHttps] [RoutePrefix(“{lang}”)] public class HomeController : LocalizationController { […] [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)] [AllowAnonymous] [Route(“sl”, Name = “SelectLanguage”)] public ActionResult SelectLanguage(LanguageVersions? id) { This is action is called from the View like… Read More »

requirejs, datatables and pdfmake – Uncaught File ‘Roboto-Regular.ttf’ not found in virtual file system

Here is my code. requirejs.config({ “paths”:{ ‘pdfmake’: ‘//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min’, }, “shim”: { ‘pdfmake’: { deps: [“//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js”] }, } }); and in datatables – https://datatables.net/extensions/buttons/examples/html5/pdfMessage.html requirejs([‘pdfmake’],fucntion(){ $(‘#example’).DataTable( { dom: ‘Bfrtip’, buttons: [ { extend: ‘pdfHtml5’, messageTop: ‘PDF created by PDFMake with Buttons for DataTables.’ } ] } ); }); in inspect i see files is loaded but… Read More »

How can l combine two SVM scores?

l have trained two Linear SVMs for the same task on two different training examples (but for the same classes). Dataset_1=(x_1,y_1) Dataset_2=(x_2,y_2) test_data=(test_sample,test_labels) We have 50 classes. Same classes for dataset_1 and dataset_2 : list(set(y_1))=list(set(y_2)) #First classifier clf_dataset_1 = SVC(kernel=’linear’, random_state=42).fit(x_1, y_1) clf_dataset_1.predict(test_sample) #Second classifier clf_dataset_2 = SVC(kernel=’linear’, random_state=42).fit(x_2, y_2) clf_dataset_2.predict(test_sample) What l would like… Read More »