Posts

Showing posts from March, 2011

c# - Use Async Method at Service Layer from MVC 5? -

i developing asp.net mvc 5 application. have been reading questions here suggest not use type of behavior want. high level of want achieve - mvc controller - calls method @ service layer , continues next line of code in controller not need return anything. method in service layer - want to call external web service has async methods want these run off on , write data db when return. is achievable or not best approach? to dummy out , test principle have following on controller: [acceptverbs(httpverbs.post)] public actionresult testasync() { _myservice.testasync(); return redirecttoaction("summary"); } at _myservice method looks follows: public async task testasync() { await task.delay(10000); var test = "testing"; _testrepository.add(test); } i hoping testasync method wait 10 seconds , check db , value testing added. not working - on ui after hitting button page goes summa...

jquery - Making .ui-btn-left larger -

quick question haven't found exact answer online. i'm new javascript quite simple issue. trying make close button on jquery page larger. .ui-dialog .ui-header .ui-btn-left { left: auto; right: 5px; } i know if specify height , width make button larger, how preferably increase size of icon match or @ least make centre on button? i solved own problem in end. had remove default close button , create own. might else trying same thing. data-close-btn turns off default close button. the data-icon tell use custom icon, more straight forward making it. #btncancel .ui-btn-inner { width: 33px; height: 35px; margin: 0px; border: none !important; background: transparent !important; } .ui-icon-custom { background-image: url(../images/image.png) !important; background-position: 0px -84px; width: 33px; height: 35px; margin: 0 !important; box-shadow:none; } <html> <head> <title>change language</t...

utf 8 - How UTF8/Unicode adapt to new writing systems? -

an example clarify question: the hongkongers' native language cantonese, however, write in different language: madarin chinese. 2 languages kindof similar, , hongkongers educated write in madarin chinese language. cantonese doesn't have writing system. though still happy madarin our writing language, however, in case 1 day hongkongers decided develop 'cantonese script' contains not-yet-existing characters, how should utf8/unicode/fonts change, adapt these new characters? i mean, change utf8/unicode/fonts standard? how linux/windows os have modified, in order display these newly created characters? (the example make question clear. we're not talking politics ;d ) the unicode coding space has on 1,000,000 code points, , 10% of them have been allocated, there lot of room new characters (even though areas of coding space have been set apart use other added characters). unicode consortium, working in close cooperation relevant body @ iso, assigns cod...

c# - Dock a Custom VCLStyle Delphi-XE2 application in AvalonDock -

i've c# application avalondock. in application can dock "third party" applications notepad , windows calculator. in dock application window displayed without titlebar, want be. i've delphi xe2 application want dock. working correct, titlebar removed , mainmenu working. until dock same application custom vcl style. in case titlebar stays displayed in dock , main menu isn't working anymore. can solve titlebar issue setting borderstyle bsnone. when apply custom style during compilation or runtime during formcreate, formshow or formactivate issue occurs. when apply style runtime button click mainmenu keeps working, window undocked, i've got empty dock , application in front of it. does has ideas how solve issue? thijs i've solved issue replacing tmainmenu tactionmanager , tactionmainmenubar. a disadvantage of solution populatemenu of korzh localizer isn't working anymore. no issue application when used in dock, localization set @ lev...

elasticsearch - Elastic search : how to get all data of specific field -

i'm using java api. want know how fetch specific field. have tried query in elasticsearch head plugin: {"fields": ["name"],"query": { "match_all": {} }} it's working. now, please me write using java api. the equivalent sql query be: select name user; to use match queries in java api.. querybuilder qb = querybuilders.matchallquery(); refer http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/query-dsl-queries.html i have created git hub repository.. refer use java client. https://github.com/sidharthancr/elasticsearch-java-client . hope helps..!

c# - FFMPEG Overlay video on top of another video -

i have looked through questions on over stackoverflow none of answers worked me. i have screen recorded video in mp4 , video recorded webcam in mp4. want overlay webcam video on top left of screen recorded video. i think found right command line doing when step through ffmpeg process freezes when reaches " handler_name :soundhandler". here command line: string overlayposition = "movie=" + '"' + _videofile.filename + '"' + "[inner]; [in][inner] overlay [out]"; string overlaycommand = "-i " + '"' + videolist[0].path + '"' + " -vf " + '"' + overlayposition + '"' + + '"' + " c:\\users\\james\\output.mp4" + '"'; does know doing wrong? i've managed trim audio , video, crop video, join sound, join video, , join sound , video cannot overlay work :(. i updated ffmpeg , ended using this: string overlaycom...

html - Canvas: fillText() on android 2.x browser -

context.filltext(text,x,y,maxwidth); maxwidth parameter won't work on android 2.x ignored can try next function? filltext(text, x, y [,maxwidth]) source: safari html canvas guide

In AngularJS route is it possible to add default query parameters? -

if route setup, i'd "otherwise" route redirect '/inbound?page=0&size=20&sort=number,desc" "?" in route escaped "%3f". .config(function ($routeprovider) { $routeprovider .when('/outbound', { templateurl: 'views/shipments.html', controller: 'shipmentctrl' }) .when('/inbound', { templateurl: 'views/receipts.html', controller: 'receiptsctrl' }) .otherwise({ redirectto: '/inbound' }); }); continuing previous answer, should set default values in inbounds route controller like var search=$location.search(); var page=search.page||0; var size=search.size||20; var sort=search.sort||'number,desc'; the exact way of doing depend on how permissive empty strings , 0 size requests thats kinda idea

Can you change the column order of a SQL statement being returned in Excel? -

we using stored procedure run sales tax report in excel. data pulls no problem, there easy way reorder columns? right excel pulls month, date, applied month... , need pull month, date, customer, contract... i tried using "order by", doesn't change column order, how data sorted. use [viewpoint]; go set ansi_nulls on; go set quoted_identifier on; go / ** object: stored procedure dbo.brptarsalestax script date: 8/28/99 9:32:28 ** / --drop proc brptarsalestax alter procedure [dbo].[udbrptarsalestax] @arco [dbo].[bcompany] = 3, @begintaxcode [dbo].[btaxcode] = '', @endtaxcode [dbo].[btaxcode] = 'zzzzzzzzz', @beginmth [dbo].[bmonth] = '01/01/1950', @endmth [dbo].[bmonth] = '12/1/2049', @notaxlines [dbo].[byn] = 'n' exec caller as create table #multilevel (name varchar (60) null, arco tinyint null, artrans int null, arline int null, mth smalldatetime null, transdate ...

java - ADT simple app - fatal exception -

this question has answer here: unfortunately myapp has stopped. how can solve this? 14 answers i have started out android , java, , have made simple app couple of textviews, button , edittext. when run app error saying the: unfortunately, firstapp has stopped. familiar programming, , wonder if miss library, or if adt misconfigured. i have tried clean , rebuild, right click project in package explorer , android tools -> add support library, restarted emulator, restarted adt , restarted computer. cant figure out this. can of see wrong here? mainactivity.java imports import android.support.v7.app.actionbaractivity; import android.support.v7.app.actionbar; import android.support.v4.app.fragment; import android.os.bundle; import android.view.layoutinflater; import android.view.menu; import android.view.menuitem; import android.view.view; import android.view.v...

ios - Unable to send mail using SKPSMTPMessage -

i using skpsmtpmessage send emails in background , working too. problem arises in 1 particular case. there part have use string returned webapi email body. skpsmtpmessage delegate shows sending successful mail never received. have tried changing returned string in various ways removing newline characters , whitespace characters too. weird part when change particular capital (a -in approve) letter small letter, mail gets delivered. the string using mail body : you have new app registration approval request. name:rktest26 email :rktest26@test.com mobile phone: address:a1asssaasssa approve please click below link. (some link) clientid=38&emailid=rktest26@test.com&approved=1 reject please click below link. (some link) if remove string content after address:a1asssaasssa part, gets delivered. can whole message gets delivered?

php - Configuring Symfony DoctrineCouchDBBundle -

i'm new symfony 2 , having difficulty setting doctrine. i'm getting following error when try persist model: class 'foo' not found in chain configured namespaces. i have bootstrap file requires composer autoloader , registers loader annotationregistry use doctrine\common\annotations\annotationregistry; $loader = require "vendor/autoload.php"; annotationregistry::registerloader(array($loader, "loadclass")); i have couchdb configured in config.yml doctrine_couch_db: client: connections: default: dbname: foo host: data.foo port: 5984 odm: document_managers: default: connection: default my model tagged annotations use doctrine\odm\couchdb\mapping\annotations odm; /** * model object foo data. * @odm\document */ class foo { ... } i've got containerawarecommand use doctrine objectmanager $dm = $this->getcontainer()->get("doctrine_couchdb.odm.default_document_m...

c - Elementary XML parser -

i trying write elementary xml parser in c, without using non-standard libraries, able to: detect several different tags detect empty tag detect tag mismatch the main problem have how differ which: beginning of tag, content , ending of tag. my idea implement finite-state machine while reading file in order know reading. please tell me ideas , correct me if pointed wrong direction. edit: added chunk of code detects elements , content char tmp, buff = -1; char *content = (char*) malloc(sizeof(char) * (size + 1)); int stage = -1; int = 0; while((tmp = fgetc(file)) != eof) { if(tmp == '<') { if(stage == 2 && buff != '>'){ printf("content: "); printcont(content,i); } stage = 1; buff = tmp; = 0; continue; }else if(tmp == '/' && buff == '<') { stage = 3; buff = tmp; = 0; continue; } else if(tmp...

php - How can i add smartyBc to slim framework -

i writing simple slim app , write raw php mixed smarty syntax keep getting following error. syntax error in template "./templates/application/header.tpl" on line 106 "{php}" unknown tag "php" if change tpl file {include_php} this {include_php} <?php echo 'home ' ?> {/include_php} i following error , type: smartyexception message: {include_php} deprecated, use smartybc class enable file: /home/ramza/apps/php/company/smarty/sysplugins/smarty_internal_compile_include_php.php line: 52 my slim index.php below : <?php session_cache_limiter(false); session_start(); require 'vendor/autoload.php'; require 'vendor/php-activerecord/activerecord.php'; require_once('smarty/smartybc.class.php'); activerecord\config::initialize(function($cfg) { $cfg->set_model_directory('models'); $cfg->set_connections(array( 'development' => 'mysql://root:@localhost/xxx'...

python - Making a module use functions and variables defined within the main program -

i'm making irc bot network. make code cleaner, defining functions in modules. these modules in folder called "plugins". 1 module say calls function sendmsg , fails because it's trying run function defined in main program. want have module able access variables defined in main program after program has started. import socket import time import re plugins.say import * host = "irc.somenetwork.net" port = 6667 nick = "ircbot" channels = "##bottesting" s = socket.socket() def connect(): s.connect((host, port)) s.send("nick %s\r\n" % nick) s.send("user %s %s nul :%s\r\n" % (nick, nick, nick)) time.sleep(3) s.send("join %s\r\n" % channels) time.sleep(3) def sendmsg(chan, msgsend): s.send("privmsg %s :%s\r\n" % (chan,msgsend)) # print "sending message \"%s\" channel/user \"%s\"" % (msgsend, chan) def quitserv(quitmsg="m8bot"): s....

linux - Portable bourne shell script without using functions of modern shells as bash, ksh, zsh etc -

first of want thank of me solve this. have exam tomorrow , have prepare script exam. new linux , bourne shell script. my project should portable bourne shell script scans directory following files: header.txt , footer.txt , content.txt . content of files should read ignoring lines starting # , content should used generating html page following header, footer , content. files can contain text and/or html code cannot contain head , body tags. when scanning directory script have compare date of last change of files ( header.txt , footer.txt , content.txt ) date of last change of html page (if have 1 already) , if date of last edit on files newer 1 on html page script should generate new html page latest content. guys thank very important me. please me getting done. thank much! to remove lines beginning # try this: grep -v "^#" file to remove lines may contain spaces (or blank characters) before # : grep -v "^[[:blank:]]*#" file

javascript - Why gravity acceleration is 0.0004 in PhysicsJS? -

or, perhaps, better, mean? what units supposed be? if i'm trying simulate friction against "background", this: return .velocitydirection .mult(mu * this.mass * g) .negate(); i expect use g 9.80665 m/s^2. working way before physicsjs: var frictionforce; frictionforce = vec2.create(); vec2.scale( frictionforce, vec2.negate( frictionforce, this.velocitydirection ), mu * this.mass * g ); return frictionforce; was using glmatrix linear algebra. i considering mass in kilograms , forces in newtons (etc) in physicsjs doesn't seem work that. (for example: if have circle body radius 1, it's 1 what? cause it'll make difference when have use value else, , when "converting" pixels on screen) now i'm using physics library feel i'm missing of physics... i hope can point me in right direction understand better. i'm going through api docs right , lear...

Add Windows Azure AD Tenant as an Identity Provider using OAuth 2 endpoint -

im trying integrate windows azure ad tenant identity provider. in order achieve able configure sample ad in azure 1. add access control namespace windows azure ad tenant. 2. add windows azure ad tenant access control namespace identity provider. and azure provides oauth 2 endpoint also. question me how can token endpoint url, client id , client secret. i appreciate if can point me how these values. thank you, dharshana. you not need use acs integrate application azure ad. further, if application web app , need single sign-on integration don't need use azure ad oauth either - sso using saml/wsfed/openidconnect should suffice. however, if web app needs access web apis on behalf of user (like directory graph api or office 365 apis) or if developing rich-client/mobile apps need call own apis on behalf of user, indeed need use azure ad oauth. topic explains pretty well: http://msdn.microsoft.com/en-us/library/azure/dn151122.aspx if indeed need clientid , client se...

jquery - IE Site Navigation Page Flicker -

so i've run problem pages flashing upon site navigation. ie, when click on link in header, page flashes white briefly before rendering. occurs in ie (currently using version 11) whereas appears cached fine in chrome , firefox. here link site: kelsey's kreations . here code in head of pages: <head> <title>flavors - kelsey's kreations</title> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"> <!--[if ie]><script>document.createelement('main');</script><![endif]--> <script src="http://use.typekit.net/dxe8zqc.js"></script> <script>try{typekit.load();}catch(e){}</script> <link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" hre...

sharedpreferences - When app data is cleared from settings shared preferences gets blank in android -

when clear app data settings shared preferences value gets lost. should not happen. want save these value long app in installed on device. please suggest alternatives or solution. please help...... for need might have store data in file in external storage , store , pick data file instead of shared preference. you may want refer link http://developer.android.com/training/basics/data-storage/files.html

Multi File (Image) Upload with Jquery PHP and Ajax -

i have form submits multi text fields using ajax, jquery , adds information in database via php without refreshing page. works fine need add images each box. how can submit these images using ajax, jquery php. this form <form action="" method="post" enctype="multipart/form-data" id="submitforminfo"> <div id="set1"> <div style="padding: 20px;"> <p>box a</p> <label class="adduserlabelblockfull">title :</label><div class="textinputtextareablock"><input type="text" id="title_a" name="title[]" value="<?= $boxacontent[0]; ?>" class="addusertextinput"></div> <label class="adduserlabelblockfull">text :</label><div class="textinputtextareablock"><textarea name="brieftxt[]" id="brieftxt_a" class="textinputtextarea">...

mysql - c# string date format from d.M.yyyy to yyyy-MM-dd -

please, how can convert date string csv import grid , mysql database? i import date in dd.mm.yyyy format , must format yyyy-mm-dd mysql database. my code datagrid rows datagridview1.rows.add(counter, "1", linein[0], controlprice, linein[3]); linein[0] date string... thank you its best use datetime.parseexact based on example, need cast string before passing function. you should consider happens if invalid date in csv, how want handle that? or expect date , want halt processing? here's linqpad example used test: object date = "12.2.2014"; var result = datetime.parseexact(date.tostring(), "d.m.yyyy", null).tostring("yyyy-mm-dd"); console.writeline(result); see post more info: datetime conversion , parsing datetime.now.tostring(“mm/dd/yyyy hh:mm:ss.fff”)

imshow - GIMP's color to alpha in python -

i make background of imshow plots transparent. know can using color alpha option in gimp. however, using gimp in case not option still need perform actions after background of imshow has been made transparent. is there way remove background of imshow plots similar gimp's color alpha in python without saving figure first?

Select custom columns from Laravel belongsToMany relation -

im trying select specific attributes on many-to-many relation users , in one-to-one. using select() on belongstomany() seem ignored , i'm still getting user attributes. class computer extends eloquent { public function users() { return $this->belongstomany("user")->select("email"); } public function admin() { return $this->hasone("user")->select("email"); } } computer::with("users")->get(); is there way of filtering specified columns related entity belongstomany() ? yes, actually can . computer::with("users")->get(array('column_name1','column_name2',...)); be careful though if have same column name both tables linked pivot table. in case, need specify table name in dot notation, tablename.columnname . example if both users , computer has column name id , need : computer::with("users")->get(array('users.id',...

vb.net - Creating SQL table from variable with spaces in the name -

i trying create sql table using vb.net, using variable. the issue table name derivation of filename , can contain space. below example of code: dim openfiledialog1 new openfiledialog dim strfilename string dim filenameonly string openfiledialog1.initialdirectory = "c:\***\***\***" openfiledialog1.filter = "csv files (*.csv)|*.csv" openfiledialog1.filterindex = 2 openfiledialog1.restoredirectory = true if openfiledialog1.showdialog = windows.forms.dialogresult.ok end if strfilename = openfiledialog1.safefilename if strfilename <> "" filenameonly = system.io.path.getfilenamewithoutextension(openfiledialog1.filename) textbox1.text = filenameonly using con = new sqlconnection("server=***\sqlexpress; database=***billing; integrated security=yes") using cmda = new sqlcommand("create table '" + filenameonly + "' (calltype varchar(30),charg...

javascript - Cordova/Phonegap Show option to use either camera or gallery -

my basic need upload image server. image can taken using camera or gallery. know changing source type can set source image taken. camera.picturesourcetype = { photolibrary : 0, camera : 1, savedphotoalbum : 2 }; this working me. want give user option select source type (camera or gallery) upon clicking button. how implemented in many apps. don't want 2 separate buttons camera , gallery. i running on android device , using cordova sencha-touch.

Difference between `a` and `&a` in C++ where `a` is an array -

i confused output of following code. #include<iostream> #include<cstdlib> using namespace std; int main() { int a[] = {1,2,3}; cout << << " " << &a << endl; cout << sizeof(a) << " " << sizeof(&a) << endl; return 0; } the output 0xbfcd3ae4 0xbfcd3ae4 12 4 how can a , &a print same expression have different sizes? thought array, name has value = address of first byte. also &a should not make sense, since 1 cannot have address (obtained & operator) address(the value of a). yet code gives output , infact 'a == &a' according output. similarly why output of sizeof(a) = 12 (which total memory occupied) array? a being "pointer" sizeof(a) = 4 bytes (on 32 bit ubuntu 11.04) obviously there misconception having. 1 sort out me ? an array not pointer, array decays to pointer when try use one. in case printing addre...

node.js - Bluebird promisify on function with return value -

i'd use bluebird's promisify function on aws putitem function. notice docs returns aws.request object. not interested in object , ideally call db.putitem({...}); , promise back. possible? when tried it, promisify'd function still returns aws.request object, suppose reasonable, it's not want in case. for time being creating promise object , manually mapping success , error data resolve/reject promise functions, feels i'm writing unnecessary boilerplate code, since aside return value, putitem function (and may of other functions) seems suited promisify. as requested, here relevant parts of code: //datastore.js var aws = require('aws-sdk'); var shareddb; if (!shareddb) { aws.config.update({accesskeyid: 'akid', secretaccesskey: 'secret', region: "us-west-2"}); shareddb = new aws.dynamodb(); shareddb.setendpoint("http://localhost:8000"); promise.promisify(shareddb.putitem); } module.exports....

php - Symfony2 Doctrine Error: Invalid PathExpression. Must be a StateFieldPathExpression -

well looking kind of might resolve problem, after still getting same error. i trying news database in selected category. relation between news , categories many-to-many on doctrine. <?php //news namespace core\databasebundle\entity; use doctrine\orm\mapping orm; class sfnews { private $date; private $header; private $content; private $contentplain; private $id; private $sfusers; private $sfuploadedfiles; private $sfcategories; public function __construct() { $this->sfuploadedfiles = new \doctrine\common\collections\arraycollection(); $this->sfcategories = new \doctrine\common\collections\arraycollection(); } // code removed public function setsfusers(\core\databasebundle\entity\users $sfusers = null) { $this->sfusers = $sfusers; return $this; } public function getsfusers() { return $this->sfusers; } public function addsfuploadedfile(\core\databa...

php - How to display recent global post in wordpress multisite -

i run wordpress multisite on ayp.no , trying figure out way present subsites logos , recent posts blogs, know there wpmudev premium plugin this, hoping there coding myself (well, not myself, @ least ask here , see).. first, need function sites , @ hand iterate thought array of sites , pull information wp_get_recent_posts() (which customized version of get_posts() ). use following must use plugin , function b5f_print_recent_posts() available throughout network: <?php /** * plugin name: recent network posts * plugin uri: http://stackoverflow.com/q/23713801/1287812 * description: creates function lists recent posts sites of network. call in plugins or themes. * author: brasofilo */ /** * iterates throught sites of network , grab recent posts */ function b5f_print_recent_posts() { $blogs = b5f_get_blog_list( 0, 'all', true ); $current_blog_id = get_current_blog_id(); foreach( $blogs $blog ) { switch_to_blog( $blog[ 'blo...

image - How to plot two variables with occurances -

i stuck problem.i have 2 variables,velocity , resistivity , occurrences of these two. 3184 1.75 16 3244 1.78 12 4200 2.08 10 .... .. .. i have tried contour requires 2,2 matrix. using post previous poster - david , recommend. assume matrix in variable called data : x=linspace(min(data(:,1)),max(data(:,1)),150); y=linspace(min(data(:,2)),max(data(:,2)),150); [x,y]=meshgrid(x,y); f=triscatteredinterp(data(:,1),data(:,2),data(:,3)-1); contourf(x,y,f(x,y),100,'linecolor','none') this should give desire.

c# - How can I do an ASP.NET background service which always runs in background? -

i have interesting problem. have web site asp.net . need independent service should running in background. example db operations in specific dates. , no need page request somebody. independent. method should follow? every idea happily accepted. thanks you should implement application. need no request, perform task - use desktop application time. if need provide ui use wpf or win forms, if perform task use console application. run @ specific time might use windows task scheduler.

html - Multiple backgrounds -

Image
i'm having problems setting 2 backgrounds 1 page. how it's supposed look: i've played around css nothing works, because see gray bg.png file: #kontakt { background: url(../images/bg.png), url(../images/img_1340.jpg); background-position: ; background-repeat: reapeat-x, no-repeat; } is possible divide page 2 intended to? thank much. if use css: background: url(../images/bg.png), url(../images/img_1340.jpg); background-position: left top, right top; background-repeat: repeat-x, no-repeat; } the result this: #kontakt { background: url(../images/img_1340.jpg), url(../images/bg.png); background-position: right top, left top; background-repeat: no-repeat, repeat; }

Apache velocity template with ztree -

both of velocity , ztree new technology me. read velocity , ztree. my problem how show output ztree. please advice me.. here code... <html> <head> #[[ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="tree/demo.css" type="text/css"> <link rel="stylesheet" href="tree/ztreestyle.css" type="text/css"> <script type="text/javascript" src="tree/js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="tree/js/jquery.ztree.core-3.5.js"></script> <script type="text/javascript"> </script> <script type="text/javascript"> function toggle(t) { if(document.getelementbyid("div"+t).style.display ==...

html - Button group issue -

i have page uses bootstrap 3 looks like: <div class="btn-group"> <a href="#"><button type="button" class="btn btn-default">test</button></a> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> test <span class="caret"></span> </button> </div> jsfiddle as can see, page screwed (the button group on 2 lines). when take out link around button, looks fine. try using links <div class="btn-group"> <a class="btn btn-default">test</a> <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"> test <span class="caret"></span> </a> </div> demo

r - Plot error SVM...min not meaningful for factors -

i trying train svm anomaly detection. this, created train_data , test_data using sourceip , protocol. when trying use plot function, gives me below error... > plot(svmfit,testdat) error in summary.factor(c(7l, 7l, 7l, 7l, 7l, 7l, 7l, 7l, 7l, 7l, 7l, : min not meaningful factors how can rid of error..? following lines of commands in external file train_data=read.csv("packetcapture_training.csv") #read source ip , protocol xtrain=train_data[4:23,c(3,5)] ytrain=c(rep(-1,10),rep(1,10)) dat=data.frame(x=xtrain,y=as.factor(ytrain)) library("e1071") svmfit=svm(y~.,data=dat,kernel="radial",cost=10,scale=false) summary(svmfit) test_data=read.csv("packetcapture_testing.csv") #read source ip , protocol xtest=test_data[371:390,c(3,5)] ytest=c(rep(1,10),rep(-1,10)) testdat=data.frame(x=xtest,y=as.factor(ytest)) plot(svmfit,testdat) > dat x.source x.prot...