Posts

Showing posts from January, 2011

google maps - Android: getting different latitude and longitude on same location -

Image
we making track , trace application , accuracy of address important us. we have done testing of our application , found getting different latitude , longitude same location.if there change in latitude , longitude accuracy of address 150 200 meters away actual location. my question why getting different latitude , longitude same location?? can more accurate latitude , longitude?? thanks, sanjay salunkhe used fused location api here tutorial. when working location, important understand may request accuracy, you're not guaranteed accuracy in actual location updates . here accuracy table tested google see presentation here in case there wrong in code otherwise not give away 150-200 m because huge distance.

javascript - Get actual height of document with jQuery -

i have problem jquery plugin, want display footer in specific way right before end of page. actual bottom position , compare height of entire body. but there problem jquery function height() return bad value. example know site has height of 5515px function returns me value: 8142px i use plugin mcustomscrollbar in few places on page, , think may cause problem. can't disable it, because page has elements require good. my code: (function($){ $.fn.scrollingelements = function(){ var height = $(window).height(); var max_height = $(document).height(); var prev_top = $(window).scrolltop(); var prev_bottom = top + height; $(window).scroll(function(){ var top = $(window).scrolltop(); var bottom = top + height; console.log(max_height, bottom); if(prev_top < height && top > height){ // console.log('show header', 'show sticky', 'show footer...

ios - Removal of white line under section header in UITableView? -

Image
i'm struggling removing white lines below each custom section header in uitableview, seen below. suggestions? use in tableview. self.tableview.separatorstyle = uitableviewcellseparatorstyle.none the above solves separators between cells, not headers. the thing have in custom section header containercellview.backgroundcolor = uicolor(red: 24/255.0, green: 34/255.0, blue: 41/255.0, alpha: 100) set heigth header & footer 0.01 solve problem func tableview(tableview: uitableview, heightforheaderinsection section: int) -> cgfloat { return 0.01 }

javascript - need to reload for jquery to do the function -

i have code check every height's thumbnail , make thumbnail have height of tallest thumbnail. work first time. test in resolution 768x163 1440x613 thumbnail seems have little space inside caption. try reload page. , bug got fix. how make function work when minimize window without have reload page this code on height.js (function($) { "use strict"; // thumbnail height function equalheight(group) { var tallest = 0; group.each(function() { var thisheight = $(this).height(); if(thisheight > tallest) { tallest = thisheight; } }); group.each(function() { $(this).height(tallest); }); } $(document).ready(function() { equalheight($(".thumbnail")); }); })(jquery); heres jsfiddle https://jsfiddle.net/nr2cc6ll/ just call function inside resize method like: $(window).resize(function() ...

c - How is speculative fault due to compiler optimization implemented under the hood? -

this question follow-up question on can c compiler optimizer violate short-circuiting , reorder memory accesses operands in logical-and expression? . consider following code. if (*p && *q) { /* */ } now per discussion @ can c compiler optimizer violate short-circuiting , reorder memory accesses operands in logical-and expression? (especially david schwartz comment , answer) possible optimizer of standard-conformant c compiler emit cpu instructions accesses *q before *p while still maintaining observable behaviour of sequence point established && -operator. therefore although optimizer may emit code accesses *q before *p , still needs ensure side-effects of *q (such segmentation fault) observable if *p non-zero. if *p zero, fault due *q should not observable, i.e. speculative fault occur first due *q being executed first on cpu speculative fault ignored away once *p executed , found 0. my question: how speculative fault implemented under hood?...

php - Can I maintain hydration after updating an object with Propel? -

if fetch object so: $q = orderreturnquery::create() ->joinwith('type') ->joinwith('status') ->usestatusquery() ->joinwith('email') ->enduse() ->joinwith('priority'); $object = $q->findpk(1); var_dump($object->toarray(tablemap::type_phpname, true, [], true)); this output get: array (size=14) 'id' => int 1 'typeid' => int 3 'statusid' => int 2 'priorityid' => int 1 'orderid' => int 234567 'customerid' => int 5 'initiated' => string '2016-03-02t01:11:12+00:00' (length=25) 'initiator' => int 2 'freepostagelabel' => boolean true 'lostinpost' => boolean false 'suppressemail' => boolean true 'type' => array (size=4) 'id' => int 3 'title' => string 'title 3' (length=7) 'priority...

java - Increase Maximum Room Occupants count smack api -

how increase deafult maximum room occupants count '30' desired count. possible smack api? so far researched, submitform.setanswer("muc#roomconfig_maxusers", 20000); not working thorws exception in thread "main" java.lang.illegalargumentexception: since type 'list-single' how set value muc#roomconfig_maxusers? thanks in advance. i solved problem giving maximum users count in arraylist follows, arraylist oarraylist = new arraylist(); oarraylist.add("0") submitform.setanswer("muc#roomconfig_maxusers", oarraylist);

reactjs - Clojurescript, Reagent: pass atoms down as inputs, or use as global variables? -

i'm writing clojurescript app, using reagent make components reactive. i have simple question. should pass atoms inputs through components, or use atoms global variables , let them 'side-affect' components? in tutorial use latter option, in trying keep functions pure opted former. am correct in saying using them global variables (in addition being less verbose when defining component inputs) prevents re-rendering of whole parent components atom's state not used? if make components accept atoms arguments, can make them more reusable , easier test. this true if opt keeping entire application state in single atom, passing down child components using cursors. ;; setup single instance of global state (defonce app-state (reagent/atom {:foo 0 :bar 0}) ;; define generic counter component knows ;; nothing global state (defn counter [count] [:div [:button {:onclick #(swap! count inc) "+"] [:span @count]]) ;; define counter c...

java - Caching in Tomcat and Spring MVC -

i have web application gets deployed war file tomcat container. application has 2 main aspects: it uses spring mvc provide rest endpoints it ships angularjs based single page application static content. technically there index.html in root webapp folder uses html http-equiv="refresh" redirect redirect actual index.html in subfolder. when update application notice browser not load latest version server , shows older cached version. example website shows current version number on login page, if update 1.0.5 1.0.6, find browser still shows 1.0.5 if reload page. pressing ctrl+f5 ignore cache solves temporarily. i not familiar whole caching topic, looking resources started. questions: is caching problem must configure in spring? is rather must configured in tomcat when deploy war file? is possible problem caused html redirect mentioned above? these tags should prevent reading cache <meta http-equiv="pragma" content="no-cache...

c# - Ajax calenderextender SelectedDate value is always null. -

i have run problem have textbox calenderextender ajaxtoolkit. retrieve value user puts in. how code looks like <asp:textbox id="txtvalidfrom" runat="server" textmode="datetime" autopostback="true" ></asp:textbox> <asp:textbox id="txtvalidto" runat="server"></asp:textbox> <ajaxtoolkit:calendarextender id="exvalidfrom" runat="server" targetcontrolid="txtvalidfrom" firstdayofweek="monday" format="dd/mm/yyyy"></ajaxtoolkit:calendarextender> <ajaxtoolkit:calendarextender id="exvalidto" runat="server" targetcontrolid="txtvalidto" firstdayofweek="monday" format="dd/mm/yyyy"> </ajaxtoolkit:calendarextender> and code behind: logg.validfrom = exvalidfrom.selecteddate; logg.validto = exvalidto.selecteddate; where validfrom , validto datetime? variables. no matter user presses null...

ios - Open NSURL with safari in iOS8 -

i have code open url in safari: [[uiapplication sharedapplication] openurl:[nsurl urlwithstring: @"http://www.google.com"]]; but works on ios9 , , ios8 doesn't work. have clue can be? thanks in objective c nsurl *url = [nsurl urlwithstring:@"some url"]; if ([[uiapplication sharedapplication] canopenurl:url]) { [[uiapplication sharedapplication] openurl:url]; }

java - Error extending LinkedHashMap -

i trying extend linkedhashmap students class. want bring in functionalities of map map.put(value) , map.get(key) . create object inside psvm , not making static references still below error. can point me mistake committting here? there better approach achieve task? in advance! import java.util.linkedhashmap; public class students<integer,string> extends linkedhashmap<integer,string> { public static void main(string args[]) { // line 5 students<integer,string> students = new students<>(); // line 6 students.put(1, "s1"); students.put(2, "s2"); students.put(3, "s3"); system.out.println(students.get(1)); } } error message: >> javac students.java students.java:5: error: non-static type variable string cannot referenced static context public static void main(string args[]) { ^ students.java:6: error: non-st...

Access properties of javascript object from a function which is passed into it's constructor -

the below code doesn't work because @ time function called this =window. expecting this = controller.actions.project have since learned more how this keyword works , understand why that's not case. broken controller.actions = { project: new tableauaction("project", function () { $http.get('/reports/projects/').then(function (response) { this.options = response.data; }); }}; the following solves problem, quite inelegant works controller.actions = { project: new tableauaction("project", function () { var self = controller.actions.project; $http.get('/reports/projects/').then(function (response) { self.options = response.data; }); }}; tableauaction object: function tableauaction(name, onchange) { this.name = name; this.onchange = onchange;} ...

Isotope with Fancybox filtering -

i implemented isotope.js wordpress site. use display gallery easy fancybox plugin add zooming functionality images. problem isotope filtering. added rel attribute images when filter categories fancybox still cycles through images. i need add rel attribute dynamically based on category i'm filtering. i'm struggling problem 3 days now. i've read bunch of post, tried view things still can't make work. most of posts give solution data-fancybox-group attribute can't use must use rel attribute (it doesn't work me anyway). here's wp code: <ul id="filters"> <li><a href="#" data-filter="*" class="selected">all</a></li> <?php $terms = get_terms("polygraphy-categories"); $count = count($terms); if ( $count > 0 ){ foreach ( $terms $term ) { echo "<li><a class='filterbutton' href=...

C++ includes problems, 6 files, previously defined functions -

i got 6 files, lets 'a', 'b', 'c', 'd', 'e' , 'f', .cpp. 'a' main file, 'b' , 'c' included in 'a', , 'd', 'e' , 'f' included in 'b' , in 'c'. in 'd', 'e' , 'f' there few classes , namespaces. , lot of them throw 'previously defined' error. second day trying handle that, reading lot in internet, i'm stuck. classes declared , defined in 'd','e' , 'f' used in 'b' , 'c'. you aren't supposed include .cpp files. put declarations in .h files , include those.

R: Preserve consecutive numbers in matrix -

in vector composed of 0 , 1, '1' should preserved if there @ least 3 consecutive '1'. here example: x=c(0,0,0,0,0,1,1,0,1,0,0,1,1,0,1,1,1,0,0,0) x_consecutive=numeric() (i in 1:20) x_consecutive[i]=((x[i]>0) & (x[i+1]>0) & (x[i+2]>0)) | ((x[i]>0) & (x[i+1]>0) & (x[i-1]>0)) | ((x[i]>0) & (x[i-1]>0) & (x[i-2]>0)) x_consecutive [1] na na 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 this works quite me, need perform operation rows of matrix this: matrix(sample(c(0:1),50, replace=t), nrow=5, ncol=10) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 1 1 1 1 0 1 1 0 1 [2,] 0 0 0 0 0 1 1 1 0 0 [3,] 1 1 1 1 0 0 1 1 1 0 [4,] 1 0 0 1 0 0 0 0 1 1 [5,] 0 0 0 1 1 0 1 1 0 0 to transformed this: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] ...

jQuery Validator don`t work correctly -

i have simple form validate user has enter project name. if current action "create" have check if entered value in database , return error message. if it`s edit have check if entered value different current value , in situation check again if new in database. code here: if (((action_current == action_edit) && ($(id).val() != projectdata.project.name)) || (action_current == action_create)) { initprojectnamevalidator(); } if ($(id).valid()) { return true; } else { return false; } function initprojectnamevalidator() { jquery.validator.addmethod('checkduplicatename', function(value) { var isinarray = $.inarray(value, projectsnames); return (isinarray == -1); }, messages.duplicateproject); $('#editprojectdialogform').validate({ rules : { projectform_name : { required : true, checkduplicatename : true ...

ios - EKEvent color icon -

in app, create ekevents, , put them in ekcalendar. in order make events stand out in calendar, prefix event.title bullet. i noticed however, entries in apple's birthday calendar have red birthday present icon prefix. for purposes, can, rather bullet use (a limited number-why?) of unicode characters, prefix, but, birthday present icon, give color. since event.title nsstring, assume apple using private api colorize present icon, against odds, wondering if of knows trick establish color icon in regular way. thanks input!

javascript - Slider in Angular.js -

what trying make slider following goal: the pictures randomly pulled database , reload after interval without refreshing page. so far slider.js looks this: (function () { 'use strict'; var controllerid = 'sliderctrl'; angular.module('app').controller(controllerid, ['$scope', 'common', 'config','datacontext','$interval', sliderctrl]); function sliderctrl($scope, common, config, datacontext,$interval) { var getlogfn = common.logger.getlogfn; var log = getlogfn(controllerid); var logerror = getlogfn(controllerid, 'error'); var logsuccess = getlogfn(controllerid, 'success'); var numberofdeals = 1; var vm = this; vm.myinterval = 3000; vm.slides = []; vm.addslide = addslide; vm.imagespinneroptions = { radius: 10, lines: 5, length: 0, width: 8, speed: 1.7, corners: 1.0, trail: 100, color...

ios - Moving to a background NSURLSession from a foreground NSURLSession - Handling Tasks in Process -

i trying correctly handle in-process nsurlsessiontasks in event app enters background (e.g home button press). taking approach of copying in-process tasks across background queue (see code below). finding background tasks behaving erratically , not finishing. can spot might doing wrong / advise on best approach ? - (void)appwillresignactive : (nsnotification *)notification { uiapplication *app = [uiapplication sharedapplication]; // register expiring background task __block uibackgroundtaskidentifier bgtaskid = [app beginbackgroundtaskwithexpirationhandler:^{ bgtaskid = uibackgroundtaskinvalid; }]; [self switchtobackground]; [app endbackgroundtask:bgtaskid]; } - (void)appwillbecomeactive : (nsnotification *)notification { [self switchtoforeground]; } - (void)switchtobackground { nslog(@"switch background line 217 network manager"); if ([state isequaltostring: kdownloadmanagerstateforeground]) { [urlsession get...

javascript - India states map in Google geomaps -

i create interactive geo map. have created world map region: 'world', displaymode: 'regions' and created map india markers region: 'in', domain: 'in', displaymode: 'markers', now need create map india regions instead of markers. here problem markers:- i have created there states missing in uttarakhand, chhatisgarh , telangana. can that, here link jsfiddle showing map indian states fiddle map the map works, names can wrong. recommend use iso codes avoid problems: https://en.wikipedia.org/wiki/iso_3166-2:in you can create data in way: var data = google.visualization.arraytodatatable([ ['state code', 'state', 'population'], ['in-ut', 'uttarakhand', 10116752], //rest of states ]); fiddle tell me if helps you.

java - Diamond Operator, Generics, and Compile issues -

i have encountered problem code compiles , runs fine in netbeans, when try compile command line using javac, unchecked warning error , fails. when compile -xlint:unchecked, detailed description of error points issue is. here fail use generics , problem is: list<string> name = new arraylist(); after adding diamond operator code compiles fine in , out of ide list<string> name = new arraylist<>(); it seems in first example must use casting, whereas second uses generics. my question is: bug in ide? netbeans seems catch sorts of other errors, why code compile fine in ide not command line? should obvious new programming, please forgive me if have failed offer question of significance. information comes close answering question: the java™ tutorials , what point of diamond operator in java 7?(stackoverflow) i have looked , found bug 250587, not same. also, up-to-date no updates available on netbeans. javac version 1.8.0_91 thanks taking time read t...

c - Search of an element on a unsorted array recursively -

this exercise took exam. asks write function receives unsorted array v[] , number x , function return 1 if x present in v[] or 0 if x not present in v[] . the function must recursive , must work in manner: 1. compares x element in middle of v[]; 2. function calls (recursion!!) on upper half , on lower half of v[]; so i've written function: int occ(int *p,int dim,int x){ int pivot,a,b; pivot=(dim)/2; if(dim==0) //end of array return 0; if(*(p+pivot)==x) //verify if element in middle x return 1; a=occ(p,pivot,x); //call on lower half b=occ(p+pivot,dim-pivot,x); //call on upper half if(a+b>=1) //if x found return 1 else 0 return 1; else{ return 0; } } i tried simulated on sheet of paper , seems correct (even though i'm not sure) i've written on ideone , can't run program! here link: https://ideone.com/zwwpaw is code wrong (probably!) or problem related ideone. can me? than...

c# - Computers communicating on same network -

i'm trying 2 applications communicate through local network using http / wcf. master makes web requests , looks slave applications each has web service running. slaves configured answer localhost:\\[machinename]:8000 it works when run slave on same computer master not when run on computer on same network. confirm computers on same network cmd prompt ping [machinename]. required send requests computer on same network? slave sets webservice: public void run() { config config = config.validateandcreate(); string machinename = system.environment.machinename; string baseaddress = "http://" + machinename + ":" + config.port; service.setconfig(config); if (new service().updatescripts().status != execstatus.ok) { throw new exception("failed update scripts"); } using (webservicehost host = new webservicehost(typeof(service), new u...

java - How to run spring-batch jobs threadpooled? -

i'm starting spring-batch jobs using joblauncher.run() . question: how can threadpool invocations? eg maximum of 4 job threads may running concurrently, , further jobs queued? @autowired private jobregistry registry; @autowired private joblauncher launcher; job job = registry.getjob("jobname"); launcher.run(job, params); //immediately starts job you can set threadpooltaskexecutor task executor used simplejoblauncher (the class launches jobs). executor has properties can set, maxpoolsize. public joblauncher createjoblauncher() { threadpooltaskexecutor taskexecutor = new threadpooltaskexecutor(); taskexecutor.setcorepoolsize(4); taskexecutor.setmaxpoolsize(4); taskexecutor.afterpropertiesset(); simplejoblauncher launcher = (simplejoblauncher) super.createjoblauncher(); launcher.settaskexecutor(taskexecutor); return launcher; }

Copy OpenGL texture from one target to another -

i have iosurface backed texture limited gl_texture_rectangle_arb , doesn't support mipmapping. i'm trying copy texture texture bound gl_texture_2d , perform mipmapping on 1 instead. i'm having problems copying texture. can't work copying gl_texture_rectangle_arb. here code: var arbtexture = gluint() glgentextures(1, &arbtexture) /* stuff fill arbtexture image data */ glenable(glenum(gl_texture_rectangle_arb)) glbindtexture(glenum(gl_texture_rectangle_arb), arbtexture) // @ point, if return here, arbtexture draws fine // trying copy texture (fbo , texture generated previously): glbindframebuffer(glenum(gl_framebuffer), fbo); glframebuffertexture2d(glenum(gl_read_framebuffer), glenum(gl_color_attachment0), glenum(gl_texture_rectangle_arb), arbtexture, 0) glframebuffertexture2d(glenum(gl_draw_framebuffer), glenum(gl_color_attachment1), glenum(gl_texture_rectangle_arb), texture, 0) gldrawbuffer(glenum(gl_color_attachm...

parse.com - Where does request.user come from in Parse Server -

i'm trying port parse.com app parse server. according parse migration guide, parse.user.current() can no longer used , instead should fetch current user via 'request.user'. however, request.user undefined me. for example, when login user , redirect path (/mypath), incoming request @ mypath not contain user object. parse.user.login(username, password, { success: function(user) { res.redirect('/mypath'); } }) // index of /mypath controller exports.index = function(request, response) { // request.user undefined here } how work active user after logged in sucessfully? i think figured out. when working in cloud code there no magic request.user. rather when logging in need manually store user info in current session. in parse.com days would've been managed parse-express-cookie-session middleware. explained in cloud code guide . parse-server can insert own middleware manage user described here . however, request.user available wh...

join - TSQL - Joining two numeric fields but with different lengths -

sorry if basic question have been unable find answer on google etc. i have 2 tables: table1, table2 table 1 has field 'accountno' 10 character numeric field (example: 1122334455) table 2 has field 'subaccno' 12 character numeric field (example: 112233445501) as can see subaccno same accountno additional 2 digits @ end ranging 01-99. if want join 2 tables , have been trying this: select * table1 join table2 on table1.accountno = table2.subaccno str(subaccno) '1122334455%%' as wildcard cannot performed on numeric data have attempted converting string wildcard last 2 characters. returns nothing. is able offer advice? thanks! how joining on subaccno column divided 100: select * table1 join table2 on table1.accountno = table2.subaccno / 100 actually, safe might want explicitly truncate quotient zeroth decimal place using round() : select * table1 join table2 on round(table1.accountno, 0, 1) = round(table2.subaccno / 100, 0,...

javascript - How to send chat messages using converse library -

i using openfire xmpp server , using converse client library. want send chat message chat window openfire. want send text converse method send message xmpp server. trying send message using following: var msg = converse.env.$msg({ from: 'a1@localhost', to: 'a6@localhost', type: 'chat', body: "hi" }); converse.send(msg); but sends following frame in network of console in websocket: message from='a1@localhost' to='a6@localhost' type='chat' body='hi' xmlns='jabber:client'/> this not transfer message other user neither stores in table. pretty sure calling wrong function. can povide help. you calling right function. what you'll miss: listener of messages in "a6@localhost" client: read in documentation there few functions probably, right name of server. "localhost" has problem. can check openfire real service name on own web panel ...

vba - Excel Run-time error '13': Type mismatch code issues -

i'm working on code , keep getting errors. compile, keep getting run-time errors. i'm trying compare 2 different sheets , highlight cells not match. not sure error(s) occurring. appreciated. sub david() dim initial_po double dim initial_firmed range dim initial_agreed_ship range dim initial_actual_ship range dim initial_agreed_delivery range dim initial_actual_delivery range dim initial_requested_quantity range dim initial_actual_quantity range dim initial_qmetric double dim initial_dmetric double dim final_po double dim final_firmed range dim final_agreed_ship range dim final_actual_ship range dim final_agreed_delivery range dim final_actual_delivery range dim final_requested_quantity range dim final_actual_quantity range dim final_qmetric double dim final_dmetric double dim initial_agreed_delivery_date date dim final_agreed_delivery_date date dim initial_actual_delivery_date date dim final_actual_delivery_date date dim today date 'dim numrow integer dim long dim ...

Android Robolectric and vector drawables -

i using vector drawables in app v21 , - in resource folder drawable-anydpi-v21 , have fallback bitmap versions other api levels (drawable-hdpi.mdpi,...). when run robolectric config @config(sdk = 16, application = myapp.class, constants = buildconfig.class, packagename = "com.company.app") i following error on inflate of views using these drawables caused by: android.content.res.resources$notfoundexception: file ./app/build/intermediates/data-binding-layout-out/dev/debug/drawable-anydpi-v21/ic_info_outline_white_24dp.xml drawable resource id #0x7f02010e caused by: org.xmlpull.v1.xmlpullparserexception: xml file ./app/build/intermediates/data-binding-layout-out/dev/debug/drawable-anydpi-v21/ic_info_outline_white_24dp.xml line #-1 (sorry, not yet implemented): invalid drawable tag vector the relevant parts of build.gradle are: android { compilesdkversion 23 buildtoolsversion "23.0.3" defaultconfig { applicationid "com....

sql server - Datetime2 conversion -

can know why datetime2 sql server field isn't correctly retreived in coldfusion? for example value '2016-06-23 00:00:00.0000000' in sql server when retrieved in coldfusion become {ts '2016-06-21 00:00:00'} (a difference of 2 days). thanks

css - How to Create Grid/Tile View? -

Image
for example, have class .article, , want view class grid view. applied style: .article{ width:100px; height:100px; background:#333; float:left; margin:5px; } that style make .article tiled/grid. it's work fine fixed height. if want set height auto (automatically stretch according data within it), grid nasty. and want make view this: this type of layout called masonry layout . masonry grid layout fill out whitespace caused difference height of elements. jquery masonry 1 of jquery plugin create masonry layout. alternatively, can use css3 column s. jquery based plugin best choice since there compatibility issue css3 column.

operators - XML xlst calculate value -

i'm getting number in xml 3rd part provider. need display number divided 100 , dicimals. possible in xls? so number = 40000 <xsl:value-of select="number" /> output: 40000 but need be output: 400,00 i dont have option make input value different im getting now. edit: <xsl:value-ofselect="number div 100"> gives 400 so im getting close, next formatting. im getting error: "there unclosed literal string" <xsl:value-of select="format-number(number div 100,'###,###,##0.00')"> just tried <xsl:value-of select="format-number(year div 100,'###,###,##0.00')"/> on http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=tryxsl_if , worked. full xml: <?xml version="1.0" encoding="utf-8"?> <catalog> <cd> <title>empire burlesque</title> <artist>bob dylan</artist>...

asp.net mvc - Invalid model state in Posting data with form in MVC5 -

i'm new in asp.net mvc i want fill form , post data base model binder validation false . , errors have in model doesn't show i'm sorry because don't know problem couldn't shorten it: here model: public class request { //pkey public virtual int id { get; set; } //fkey public virtual int tourid { get; set; } [required] [maxlength(150, errormessageresourcetype = typeof(errorresource), errormessageresourcename = "checklenght")] public virtual string firstname { get; set; } [required] [maxlength(150, errormessageresourcetype = typeof(errorresource), errormessageresourcename = "checklenght")] public virtual string lastname { get; set; } [required] [emailaddress(errormessageresourcetype = typeof(errorresource), errormessageresourcename = "email")] [maxlength(150, errormessageresourcetype = typeof(errorresource), errormessageresourcename = "checklenght")] public v...

sql - Run-Time Error '91' VBA Access when Adding record to Table -

i have table want add records using below function. when code executes, throws run-time error '91' i've searched forums can't work out. below code: private sub cmdcreateloan_click() dim tempinstal integer dim tempdate date dim strsql string dim dbs database on error goto 0 if me.loan_status = 10 msgbox "loan created", , "loan created" me.loan_status = 9 docmd.save docmd.openquery "que_addinstalment", acviewnormal tempinstal = me.no_instalments - 1 tempdate = dateadd("m", 1, me.first_payment_date) while tempinstal > 0 set dbs = currentdb dbs.execute " insert [tblinstalments] " _ & "(loan_id,instalment_date, total_instalment,capital_instalment,interest_instalment,next_balance) values " _ & "('loan_id','tempdate','instalment','capital_instalment','interest_instalment','next_balance');" dbs.close set dbs = nothing ...

objective c - Find total no of Close polygons iOS -

Image
i want find total number of close shape. in image, there 6 no of close polygons . have tried following method (nsinteger = 0; < [arrlinesinfo count]; i++) { nsdictionary *dictlineinfo = [arrlinesinfo objectatindex:i]; startpoint = cgpointmake([[dictlineinfo valueforkey:@"line_start_point_x"] doublevalue], [[dictlineinfo valueforkey:@"line_start_point_y"] doublevalue]); endpoint = cgpointmake([[dictlineinfo valueforkey:@"line_end_point_x"] doublevalue], [[dictlineinfo valueforkey:@"line_end_point_y"] doublevalue]); [self iscircularroute:startpoint withendpoint:endpoint]; } -(void) iscircularroute:(cgpoint) linestartpoint withendpoint:(cgpoint) lineendpoint { nspredicate *pre= [nspredicate predicatewithformat:[nsstring stringwithformat:@" (self.line_end_point_x == '%f' && self.line_end_point_y =...

android - Making chat app -

i want chat application , found code on github : https://github.com/pirngruber/androidim . , author created function send message looks this public string sendhttprequest(string params) { url url; string result = new string(); try { url = new url(authentication_server_address); httpurlconnection connection; connection = (httpurlconnection) url.openconnection(); connection.setdooutput(true); printwriter out = new printwriter(connection.getoutputstream()); out.println(params); out.close(); bufferedreader in = new bufferedreader( new inputstreamreader( connection.getinputstream())); string inputline; while ((inputline = in.readline()) != null) { result = result.concat(inputline); } in.close(); } ...

interpolation - Unknown haskell operator; `<>` -

this code appears use <> interpolation operator. https://github.com/hlian/linklater/blob/master/examples/app/jointphotographicexpertsgrouptonga.hs i can not find documentation nor source operator. ideas does/where from. traditionally, <> function defined in data.monoid . (<>) :: monoid => -> -> (<>) = mappend however, semigroups package has long used method of semigroup class in data.semigroup . of ghc 8, data.semigroup has moved base package. there plan in place making semigroup superclass of monoid . once complete, <> function entirely replaced <> method.

asp.net - How to Send a Message to a Facebook Group With a Shared User -

there many duplicates doing this, want able share post without user logging in facebook user rather have him use website's dedicated facebook user, manage groups sharing to. also, if possible, have login process of dedicated user automated in background - user choose share , that's it. i'm using c# facebook sdk can't figure out how it. code sample requires client logged in, works user, not dedicated one: if (request["code"] == null) { response.redirect(string.format( "https://graph.facebook.com/oauth/authorize?client_id={0}&redirect_uri={1}&scope={2}", app_id, redirecturi, scope)); } else { list<publishedjobsupplier> lst = new list<publishedjobsupplier>(); using (cardsmanagementserviceclient cms = cardsmanagementserviceclient.getservice(transactioncode)) { ...