Posts

Showing posts from April, 2012

sql - Syntax error (missing operator) in query expression 'Mainv1 Grouped.GroupMonth=V.GroupMonth -

i trying add column in query table. have added table reference recieving error message stating have syntx error (missing operator)in select expression select mainv1grouped.groupmonth, mainv1grouped.totalbk, v.errorcount, doc.docreviewerrors, v.errorcount/mainv1grouped.totalbk errorpercent (select sum(mainv1.number) totalbk, datepart("yyyy",[mainv1].[proddate],1,1) & "-" & right('0'& datepart("m",[mainv1].[proddate],1,1),2) groupmonth from mainv1 (mainv1.department) in('afs booking') and ((mainv1.function) in('agr - mre','agr - not mre','assump/partic','auto booked - b/c nre','auto booked - b/c re','bcu - mre','bcu - not mre','bodp','comm - mre','comm - not mre','comm fee','guidance line','guidance line / lease line','l/c secured','l/c unsecured',...

python - Return value from other dataframe from partial string match -

i'm trying create new dataframe column partial string match dataframe. how example below? df1: # id 1 666666 2 666667 3 666668 4 666667 df2 # ref 1 ref_666666_blah blah 2 ref_666667_blah blah 3 ref_666668_blah blah 4 ref_666667_blah blah df3 #what want # id match 1 666666 ref_666666_blah blah 2 666667 ref_666667_blah blah 3 666668 ref_666668_blah blah 4 666667 ref_666667_blah blah i know not code i'm trying below: df1['match'] = df2['ref'].map(lambda x: x if x.str.contains(df1['match']) thanks! there number of ways accomplish this. if able extract id ref column, in particular example df2[id] = df2.ref.apply(lambda c: c.split('_')[1]) , proceed df1.join(df2, on = 'id') . if need call more complicated match function, following: def getmatch(str_id): matches = (c c in df2['ref'] if str_id in c) try: return matches.next() except: return n...

css - CSSStyleDeclaration differences in IE and Chrome -

i looking cssstyledeclaration in both ie 11 on w7 , latest chrome. markup this: <div style="padding:5px;min-height:70%"> the problem in chrome doesn't have min-height ie shows correctly. can please explain why , if that's how works way of reliable checking height/width being specified in style? thanks try this: <div style="display:block;padding:5px;min-height:70%">

c# - Handling Special Characters (¦) -

i'm bit lost on how read , write to/from text files in c# when special characters present. i'm writing simple script cleanup on .txt data file contains '¦' character delimiter. foreach (string file in directory.enumeratefiles(@"path\raw txt","*.txt")) { string contents = file.readalltext(file); contents = contents.replace("¦", ","); file.writealltext(file.replace("raw txt", "txt"), contents); } however, when open txt file in notepad++, delimeter �. going on? characters (¦) encoding / how determine that? i've tried adding things like: string contents = file.readalltext(file, encoding.utf8); file.writealltext(file.replace("raw txt", "txt"), contents, encoding.utf8); everything working correctly switching encoding 'default' when both reading/writing. string contents = file.rea...

android - Symbols in androidmanifest.xml -

when open androidmanifest.xml file appears nonsense symbols can't read. how convert these symbols human-readable letters , code? finally can resolve problem using either android commands or android app special used read files called androidmainfest.xml

c# - Humanize uppercase name with hyphenated last name -

this standard way title case uppercase names using .net humanizer library. "first m hyphenated-last".transform(to.lowercase, to.titlecase); // result (v1.37.0): "first m hyphenated-last" // desired result: "first m hyphenated-last" unfortunately character following hyphen lowercase when seems me should uppercase. anyone have suggestions getting result i'm looking humanizer, or not possible humanizer of v1.37.0?

regex - Objective-c NSRegularExpression strange match -

my nsstring pattern doesn't work well. nsstring *pattern = @"/api/v1/news/([0-9]+)/\\?categoryid=([0-9]+)"; nsstring *string = urlstring; nsregularexpression *regex = [nsregularexpression regularexpressionwithpattern:pattern options:nsregularexpressioncaseinsensitive error:nil]; why matches following string? /api/v1/news/123/?categoryid=22abc i want match only /api/v1/news/123/?categoryid=22 where 123 , 22 can variable number. your regex fine, allows partial matches. disallow them, use ^ , $ anchors: ^/api/v1/news/([0-9]+)/\\?categoryid=([0-9]+)$ ^ ^ see regex demo the ^ asserts position @ beginning of string, , $ asserts position @ end of string. see ideone demo showing no match first input string have, , this demo matching second one. if need match strings separate words, use \\b (word boundary) @...

javascript - $.when(ajax1, ajax2, ajax3).always(ajax1,ajax2,ajax3) fires before the 3 requests are done -

i have 3 different services ask data. if 3 successfull, can load widget allright. if service1 and/or service2 down or respond error, can still load widget limited features. if service3 responding error, no matter if service1 , 2 work ok, means total failure , need show error message. so tried this: var s1=$.ajax(url_service1); var s2=$.ajax(url_service2); var s3=$.ajax(url_service3); $.when(s1,s2,s3).always(s1,s2,s3){ //here code looks services ok or wrong //to decide show , how; } but $.when().always() code triggers 1 of services responds error. same happens $when(s1,s2,s3).then( successfunc, failurefunc) meaning failure callback triggered, due failure of of 3 services, can't check status of other 2. so maybe have failure service1 , can't check if services2 , 3 ok. the way 3 services finish, no matter right or wrong found far this: $(document).ajaxstop(function(){ console.log("finished"); }); but, i'm developing small widget...

c# - Rotativa ActionAsPdf() Very Slow -

using rotativa 1.6.4 nuget , have noticed following issue using code below. actionaspdf hangs randomly indeterminate amount of time. code below hanging: var pdfresult = new actionaspdf("report", new {id = request.params["id"]}) { cookies = cookiecollection, formsauthenticationcookiename = formsauthentication.formscookiename, customswitches = "--load-error-handling ignore" }; background info may help: the customswitches in use ignore documented issue calling wkhtmltopdf.exe using actionaspdf, not suppress errors in code in wkhtmltopdf call. observations, usage , testing: it works when running application (whether or not stepping through code), can anywhere 10 seconds 4 minutes between hitting pdfresult = new actionaspdf , entering "report" action being called. can't discern happening in output window of visual studio, no errors being thrown have found. random slow transition reports() ...

C++ while loop, using if else statements to count in an array -

i'm having trouble basic c++ program assignment, , appreciate help. assignment follows: write program accepts input keyboard (with input terminated pressing enter key) , counts number of letters (a-z , a-z), numerical digits (0-9), , other characters. input string using cin , use following looping structure examine each character in string "if" statement , multiple "else if" statements. my program far is: #include <iostream> using namespace std; int main() { char s[50]; int i; int numlet, numchars, otherchars = 0; cout << "enter continuous string of characters" << endl; cout << "(example: abc1234!@#$%)" << endl; cout << "enter string: "; cin >> s; = 0; while (s[i] != 0) // while character not have ascii code 0 { if ((s[i] >= 'a' && s[i] <= 'z') || s[i] >= 'a' && (s[i] <= 'z')) {numlet++; } else if (s[i...

php - PDO foreach loop over bindParam with a reference return wrong result -

i think i've read many topics on question still wrong result. have query parameters array want loop foreach() bind parameters. foreach($aqueryparams $key => &$value){ $stmt->bindparam($key, $value); } this concerns insert query , result key inserted in table instead of value. i'm sure key , value , @ place. var_dump() on $key , $value give :firstname $key , samy &$value . :firstname inserted in table... and tried bindvalue without using reference , it's same result. to clearer, give link of github repository. can see declaration of parameters array in clientmanager.class.php @ line 44, , foreach() loop bind parameters in dboperation.class.php @ line 97. https://github.com/code-climber/car_rental/blob/preparedstmt/src/car_rental/model/dao/clientmanager.class.php i'm going mad this. ok, found wrong. sql query. had put quotes around each values parameters. did not have error message, focused on thing new me, loop on bind...

Java (beginner): creating a menu that displays features of a calculator -

i started java class during associates software engineer track , having difficulty understanding language. i need create menu displays features of calculator, output should display console this: what do? a.) add 2 numbers. b.) subtract 2 numbers. c.) multiply 2 numbers. d.) divide 2 numbers. please enter letter. then need choice(input) user, grab 2 numbers(input) user. i don't know begin. started class , we're diving head first. any & appreciated! you can use scanner class. for example: java.util.scanner in = new java.util.scanner(system.in); string input = in.nextline(); switch (input.tolowercase()) { case "a": system.out.println("option \"a\" selected;"); break; case "b": system.out.println("option \"b\" selected;"); break;

java - xmlworker create annotations in form fields for further searches -

i create pdf , need post-processing in workflow update content, best way find create pdfformfield annotation. after create fields annotations can search positions throught acrofield object , obtain page , positions. public static list<fieldposition> getpositions(pdfreader pdfreader, string name) { acrofields acrofields = pdfreader.getacrofields(); list<fieldposition> fieldpositions = acrofields.getfieldpositions(name); return fieldpositions; } and can draw text in positions this: public static void writestring(pdfreader pdfreader, pdfstamper pdfstamper, string name, string valuestr, font fonttype, float leftdiff, float bottomdiff) throws ioexception, documentexception { phrase pagephrase = new phrase(valuestr, fonttype); float left; float bottom; list<fieldposition> fieldpositions = getpositions(pdfreader, name); if (fieldpositions != null) { (fieldposition fieldpo...

angularjs - Mocking multiple return values for a function that returns a success/error style promise? -

nb: code reproduced memory. i have method generated djangoangular has signature in service: angular.module('mymodule') .service('pythondataservice',['djangormi',function(djangormi){ return {getdata:getdata}; function getdata(foo,bar,callback){ var in_data = {'baz':foo,'bing':bar}; djangormi.getpythondata(in_data) .success(function(out_data) { if(out_data['var1']){ callback(out_data['var1']); }else if(out_data['var2']){ callback(out_data['var2']); } }).error(function(e){ console.log(e) }); }; }]) i want test service in jasmine, , have mock djangoangular method. want call through , have return multiple datum. this (sort of) have tried far, reproduced memory: describe('python data service',function(){ var mockdjangormi, beforeeach(module(...

Swift iOS application crashed when I hit on a button that need to take me other viewcontroller -

i developing swift ios application, when tried hit on login button needs pull user information mysql database , have verify user provided values. doing stuff fine. after verifying credential need navigate other view controller, unfortunately app getting crashed @ point , given below error. 2015-09-29 18:15:43.839 iosbudgetmanager[2998:66920] *** assertion failure in -[uikeyboardtaskqueue waituntilalltasksarefinished], /sourcecache/uikit_sim/uikit-3347.44.2/keyboard/uikeyboardtaskqueue.m:374 2015-09-29 18:15:43.867 iosbudgetmanager[2998:66920] *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: '-[uikeyboardtaskqueue waituntilalltasksarefinished] may called main thread.' *** first throw call stack: ( 0 corefoundation 0x000000010e67cc65 __exceptionpreprocess + 165 1 libobjc.a.dylib 0x0000000110429bb7 objc_exception_throw + 45 2 corefoundation 0x00000001...

java - Include Trailing Character for Regex -

Image
i have regex made java search words: virtue virtues virtue virtues the line of code here: pattern p = pattern.compile("\\bvirtue[s']?\\b", pattern.case_insensitive); however, need include trailing character. example: virtue's or virtue's can tell me else needed trailing character? you can try following regular expression: (?i)\bvirtue('?s)?\b additionally, if plan use regular expression often, recommended use constant in order avoid recompile each time, e.g.: private static final pattern regex_pattern = pattern.compile("(?i)\\bvirtue('?s)?\\b"); public static void main(string[] args) { string input = "virtue\nvirtues\nvirtue\nvirtues\nvirtue's or virtue's"; matcher matcher = regex_pattern.matcher(input); while (matcher.find()) { system.out.println(matcher.group()); } } output: virtue virtues virtue virtues virtue's virtue's

angularjs - JSON from REST service returning under wrong name -

i building angularjs/typescript web app netbeans restful backend. have typescript interface set vendor follows: interface vendor { vendorno: number, name: string, address1: string, city: string, province: string, postalcode: string, phone: string, vendortype: string, email: string; } when call rest service pull of vendors javadb pulling json named under different scheme interface, , in order angular directives work, have reference naming scheme of json instead , causing things break: [{"vendoraddress":"543 sycamore ave","vendorcity":"toronto","vendoremail":"bb@depot.ca","vendorname":"big bills depot","vendorno":1,"vendorphone":"(999) 555-5555","vendorpostalcode":"n1p1n5","vendorprovince":"on","vendortype":"trusted"}, {"vendoraddress":"628 richmond street...

c# - How to detect when a winforms application creates a new window? -

i'm using webbrowser control in form application , want block popup/alert/prompt window can create. currently, implementing various methods block popups like: canceling various events fire when new window created. changing global ie settings through registry make show less alerts , prompts. using browser feature controls block popups. injecting javascript every page disable functions can create new windows. extending web browser control new events implementing things idochostshowui allow me block popups. using "hidden" events of base activex webbrowser object newwindow2 , newwindow3. all of combined blocks 99% of windows webbrowser control can create (the 1% being extremely rare cases javascript prompt() function called within iframe document located on different domain parent window, still haven't found way block :d). but it's lot of code, making big mess can sometime interfere normal browsing. want know if there different approach. since of wi...

android Login to website -

hi trying login njit site using httpost. reason keep getting rejected if use correct username , password. kind new php searched problem website looking cookie. can me this. thank in advance public void postlogindata() { // create new httpclient , post header httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("https://cp4.njit.edu/cp/home/login"); try { // add user name , password edittext uname = (edittext)findviewbyid(r.id.txt_username); string username = uname.gettext().tostring(); edittext pword = (edittext)findviewbyid(r.id.txt_password); string password = pword.gettext().tostring(); list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(3); namevaluepairs.add(new basicnamevaluepair("user", username)); namevaluepairs.add(new basicnamevaluepair("pass","password")); namevaluepairs.add(new ba...

c++ - Compiler warning: suggest parentheses around arithmetic in operand of '|' -

i have gone through other similar issues, , yet cannot understand why getting error : warning: suggest parentheses around arithmetic in operand of '|' [-wparentheses] &((~((periphs_io_mux_func)<<(periphs_io_mux_func_s)))) \ i using xtensa-gcc. following code (from esp8266 sdk) : #define pin_func_select(pin_name, func) { \ write_peri_reg(pin_name, \ (read_peri_reg(pin_name)) \ &((~((periphs_io_mux_func)<<(periphs_io_mux_func_s)))) \ |((((func&bit2)<<(2))|(func&0x3))<<(periphs_io_mux_func_s)) ); \ } while (0) the "&" , "|" leading on last 2 lines both @ same level of parentheses. compiler warning there can confusion developers regarding precedence.

How do I translate X to the 25th power into something php understands? -

i trying figure out how code 10 25th power times variable. have tried x*(x^25) not return correct value. if matters, formula find inflation, actual formula i'm using is: x*(1.01^25) x equal amount of money being calculated 1.01 equal 1% inflation 25 equal number of years, needs 25 in case just use pow() function: $x = 10; echo pow($x, 25); //(base, exponent)

numpy - Memory Efficient L2 norm using Python broadcasting -

i trying implement way cluster points in test dataset based on similarity sample dataset, using euclidean distance. test dataset has 500 points, each point n dimensional vector (n=1024). training dataset has around 10000 points , each point 1024- dim vector. goal find l2-distance between each test point , sample points find closest sample (without using python distance functions). since test array , training array have different sizes, tried using broadcasting: import numpy np dist = np.sqrt(np.sum( (test[:,np.newaxis] - train)**2, axis=2)) where test array of shape (500,1024) , train array of shape (10000,1024). getting memoryerror. however, same code works smaller arrays. example: test= np.array([[1,2],[3,4]]) train=np.array([[1,0],[0,1],[1,1]]) is there more memory efficient way above computation without loops? based on posts online, can implement l2- norm using matrix multiplication sqrt(x * x-2*x * y+y * y). tried following: x2 = np.dot(test...

Streaming video from Syphon into openCV on python -

i trying video feed opencv on python using syphon. i'm using black syphon video in via blackmagic intensity box. have experience this? the capture in opencv this, : capture = cv2.videocapture(1) is there way direct stream syphon opencv? doesn't appear possible (without coding beyond capabilities). other option use opencv within processing , use syphon library.

javascript - AngularJS and PHP - Notice: Undefined property: stdClass -

i have simple patch http request angularjs php , i'm getting error notice: undefined property: stdclass::$todoname in console. here codes: html <div ng-controller="updatetodocontroller"> <div class="input-field col s12" ng-repeat="t in todo"> <input id="{{ t.id }}" type="text" class="validate" ng-model="todoname"> <label class="active" for="{{ t.id }}">{{ t.name }}</label> <button class="btn waves-effect waves-light" ng-click="updatetodo(t.id)">update </button> </div> </div> controller function updatetodocontroller($http, $scope, $routeparams, $location) { $scope.updatetodo = function(todoid) { var req = { method: 'patch', url: 'app/endpoints/update-todo.php', headers: { 'content-type': 'application/x-...

sorting - Descending List box Items Delphi XE8 -

i reviewing questions how sort list box items in descending sequence. seem default , sequence ascending. have availability of collection of string (tstringlist). it seems me if insert sort target collection list, perform sort (in ascending order) access sorted items in descending order , add them unsorted list box item after key stripped off, receive desired descending effect. procedure tbcslbdemoc.descendlzb(var lb: tlistbox); var sc: tstringlist; i: integer; rdt: tdatetime; buf : string; begin sc := tstringlist.create; := 0; repeat rdt := tfile.getlastaccesstime(lb.items[i]); sc.add(formatdatetime('yyyymmddhhmmss', rdt) + ' ' + lb.items[i]); inc(i); until (i > (lb.count - 1)); sc.sort; lb.sorted := false; lb.items.clear; := sc.count - 1; repeat buf := sc[i]; delete(buf, 1, 15); lb.items.add(buf); dec(i); until (i < 0); sc.free; end; these results seemed work fine me question how improve upon ...

android - How to update list item in listview? -

i have listview smsarrayadapter of smsitem objects. smsarrayadapter.java public class smsarrayadapter extends arrayadapter<smsitem> i want update item of listview . why taking smsitem objects in onitemclick method , trying mark them read. smsitem smsmessagestr = (smsitem) arrayadapter.getitem(pos); if (smsmessagestr.status == false) { ((smsarrayadapter) arrayadapter).setread(pos, smsmessagestr.id); toast.maketext(this, "id " + smsmessagestr.id, toast.length_long).show(); arrayadapter.notifydatasetchanged(); } the method marking sms read follows declared in smsarrayadapter.java public void setread(int position, string smsmessageid) { smsbody.get(position).status = true; smsitem smsitem = smsbody.get(position); smsitem.status = true; smsbody.set(position, smsitem); contentvalues values = new contentvalues(); values.put("read", true); int flag = context.getcontentresolver...

ios - How to Center UI View when in landscape & portrait? -

i having trouble centering 2 uiimages , layer when orientation changes. here did center _colorlayer = [calayer layer]; cgrect frame = self.hueimageview.frame; cgsize superviewsize = self.hueimageview.superview.frame.size; self.hueimageview.center = cgpointmake((superviewsize.width / 2), (superviewsize.height / 2)); self.checkeredview.center = cgpointmake((superviewsize.width / 2), (superviewsize.height / 2)); self.labelpreview.center = cgpointmake((superviewsize.width / 2), (superviewsize.height / 2)); this works fine in portrait. when rotate images not go middle . the project on github https://github.com/rk905/newcolorpic/blob/master/newcolorpic/neocolorpickerhslviewcontroller.m just set center superview other views. superview.center should it. no fights height/2 , width/2 . if use constraints, not need set again. align views center.y , center.x of superview. no fight orientations because constrain center automaticly move also

c - Why free() release data but save next_node value? -

i training lists , point start wonder how work free() function. think clear either data , next_node values in struct first_node (look @ code), instead data values destroy , next_node still point next position on list. why? struct data { int a; int b; }; struct node { struct data* data; struct node* next_node; }; struct list { struct node* first_node; }; void init(struct list* list) { list->first_node = null; } … struct data* remove_first_element_from_list(struct list* list) { if (list->first_node == null) { printf("the list empty!\n"); return 0; } struct data *pointer; pointer = list->first_node->data; free(list->first_node); list->first_node = list->first_node->next_node; return pointer; } thanks explaination. you have undefined behavior when do list->first_node = list->first_node->next_node the ub because list->first_node no longer points all...

date format - Why minute is not considering when comparing two times in android? -

i want compare time current time.which should not less current time. here code: try { date p_from=new simpledateformat("hh:mm").parse(from_time); date p_to=new simpledateformat("hh:mm").parse(to_time); date p_selected=new simpledateformat("hh:mm").parse(string.valueof(p_hour[0])+":"+string.valueof(p_min[0])); if (p_selected.before(p_to)&&p_selected.after(p_from)) { string min_str=""; if (p_min[0]<10) { min_str=string.valueof("0"+p_min[0]); } else { min_str=string.valueof(p_min[0]); } tv_estimate_time.settext("pickup on "+string.valueof(p_hour[0])+":"+min_str); popupwindow.dismiss(); } else { ...

Deleting JavaScript array element shows undefined -

this question has answer here: how remove particular element array in javascript? 53 answers i have javascript array objects , array having ids. want compare objects in array array of ids , if id found in object, want remove element array. doing result shows undefined in place of deleted element. var data = [{"name": "john_smith","val":"3","id":"2"},{"name": "peter_adams","val":"2","id":"3"},{"name": "priya_shetye","val":"1","id":"4"},{"name": "sara_brown","val":"4","id":"5"}] var arr = ["2","5"]; (var = 0; < data.length; i++) { for(var j=0;j<arr.length;j++){ if (arr[j]==data[i].id ) { ...

android - The return value of update query is 0 -

i want marks sms read . have id of sms . have tried following code mark sms read . public void setread(int position, string smsmessageid) { contentvalues values = new contentvalues(); values.put("read",true); int flag = context.getcontentresolver().update(uri.parse("content://sms/inbox"), values, "_id=" + smsmessageid, null); toast.maketext(context, "the result "+flag, toast.length_long).show(); } but return result 0 . why return result 0 ? my app not set default . why , return result 0 .if app set default , return result 1 .

wpf - XAML Binding issue, Parent-Child, with two ListBoxes -

pretty fresh in xaml, need help. little lost bindings. because think issue on "parent-child" relationship, make short version of code. maybe helps somewhere:) problem: until use 1 listbox in code, need 2 listbox. until bind so: <datatrigger binding="{binding isselected, relativesource={relativesource findancestor, ancestortype={x:type listboxitem}}}" value="true"> how bind selected name? because have 2 different listbox. 1 have name "lstbox" "sldbox". my short code: <grid> <grid.resources> <datatemplate> <canvas> <thumb> <thumb.template> <controltemplate> <canvas> </canvas> <controltemplate.triggers> <datatrigger binding="{binding isselected, relativesource={relativesource findancestor, ance...

python - Django - Autocomplete_Light's "Add Another" popup declares: "'initial' is an invalid keyword argument for this function" -

i working on getting "add another" popup work django-autocomplete_light . following along in docs: http://django-autocomplete-light.readthedocs.org/en/latest/addanother.html i have set urls: import autocomplete_light.shortcuts al almondking.financiallogs import models almondking.financiallogs import forms urlpatterns = [ url(r'^branches/autocreate/$', al.createview.as_view( model=models.companybranch, form_class=forms.companybranch), name='branch_autocreate'), ] and autocomplete_light_registry.py al.register(companybranch, search_fields=['^branch_name'], attrs={ 'placeholder': 'branch', 'data-autocomplete-minimum-characters': 1, }, widget_attrs={ 'data-widget-maximum-values': 1, 'class': 'modern-style', }, add_another_url_name='company:branch_autocreate', ) however, when click plus sign add new related ...

linq with select distinct and count for the C# application -

i have 2 sql query, have tested both queries working. need convert linq query dropdown list(mvc c#). there way linq query should display date without time? eg date 2015-09-30 select distinct deldate location dstatus = 'true' , fstate = 'true' output 2015-09-30 14:06:37.000 2015-09-30 14:14:09.547 my second query, need convert linq list only select count(distinct couname) statuscount location dlstatus = 'true' , fstate = 'true' , couname = 'alan' as per sql in question, equivalent linq be select distinct deldate location dstatus = 'true' , fstate = 'true' var deldates = location .where(l => l.dstatus == "true" && l.fstate == "true") .select(f => f.deldate) .distinct(); select count(distinct couname) statuscount location dlstatus = 'true' , fstate = 'true' , couname = 'alan' var statuscount = location .where(l ...

Fast preview not working in MobileFirst -

Image
i tried restart http , mobilefirst server. 1 message came faster preview can't configured project. solution?? try close eclipse , following: locate temp folder ( windows , os x ) delete wlbuildresources folder open eclipse re-build

asp.net mvc - MVC Required Validation not working -

my model :- public class instrument { [display(name = "id")] public string id { get; set; } [display(name = "instrument id")] public string instrumentid { get; set; } [display(name = "manufacturer"),required(allowemptystrings=false)] public list<string> manufacturer { get; set; } ..... ..... } my view has these <div class="form-group"> @html.labelfor(model => model.manufacturer[0], htmlattributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @html.editorfor(model => model.manufacturer[0], new { htmlattributes = new { @class = "form-control" } }) @html.validationmessagefor(model => model.manufacturer[0], "", new { @class = "text-danger" }) </div> </div> ...