Posts

Showing posts from April, 2015

C# Dll injector, VB.Net Dll injector -

i had made dll injector easy before, had windows 7, made in c# , c++, worked great! when try same codes in windows 8, seems doesn't inject dll in right way! :) dll not working... (the code i'm trying public 1 <) vb.net code: private targetprocesshandle integer private pfnstartaddr integer private pszlibfileremote string private targetbuffersize integer public const process_vm_read = &h10 public const th32cs_snapprocess = &h2 public const mem_commit = 4096 public const page_readwrite = 4 public const process_create_thread = (&h2) public const process_vm_operation = (&h8) public const process_vm_write = (&h20) dim dllfilename string public declare function readprocessmemory lib "kernel32" ( _ byval hprocess integer, _ byval lpbaseaddress integer, _ byval lpbuffer string, _ byval nsize integer, _ byref lpnumberofbyteswritten integer) integer public declare function loadlibrary lib "kernel32" alias "loadlibrarya" (

R Shiny: how to prevent duplicate plot update with nested selectors? -

i have dataset in every row contains data single person , every column contains different information him/her. let's looks (but more columns , rows in real data): data <- data.frame( height=runif(1000, 150, 200), sex=sample(c("f","m"), 1000, replace=t), heir=sample(c("blond", "black", "red", "brown"), 1000, replace=t), eye=sample(c("blue", "green", "brown"to show histograms ), 1000, replace=t) ) i want make shiny app in select category (column) , value , draw histogram of height among people share value. example category = 'sex' , value = 'f' have histogram of height among woman. because each category have different set of values, after changing category have (automatically) update value selector too. the problem means 2 updates , each of them generates new histogram, while second 1 makes sense . here code: server.r shinyserver(function(input, output,

What is wrong with this Android code that uses the parse.com database to store data -

string nametxt; string bloodtxt; string agetxt; string mobiletxt; button register; edittext name; edittext age; edittext blood; edittext mobile; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_register); name = (edittext) findviewbyid(r.id.name); age = (edittext) findviewbyid(r.id.age); blood = (edittext)findviewbyid(r.id.blood); age = (edittext)findviewbyid(r.id.age); register =(button)findviewbyid(r.id.register); register.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { nametxt = name.gettext().tostring(); agetxt = age.gettext().tostring(); bloodtxt = blood.gettext().tostring();//logcat pointing exception here// mobiletxt = mobile.gettext().tostring(); if (nametxt.equals("") && agetxt.equals("")) { toast.ma

Change Rails session cookie domain without logging users out -

i'm using rails 4.2.2 (with devise 3.4.1) , changing cookie_store domain www.boundless.dev .boundless.dev in order share same session across of our subdomains (single sign-on). boundless::application.config.session_store :cookie_store, key: '_boundless_session', domain: '.boundless.dev' if make change alone. existing logged-in users return site end 2 _boundless_session cookies, 1 domain boundless.dev , other www.boundless.dev. somehow makes logging out impossible. is possible make change without logging users out of site? i thought i'd able write method before_filter in applicationcontroller delete session cookie , replace new 1 @ .boundless.dev, doesn't work, , suspect has remember_user_token cookie. def update_session_cookie_domain session_cookie = cookies['_boundless_session'] cookies.delete('_boundless_session', domain: 'www.boundless.dev') cookies['_boundless_session'] = { value: session_cookie,

java - How are values rounded off in NetSuite -

what pattern of netsuite when comes rounding off value in purchase orders , invoices.i need scenario needs handled while rounding off values.for instance if value of 123.987 rounded 2 decimal digit value i.e123.99 since value 123.99 again rounds off 124. anymore scenario not aware of, or needs handled. thank in advance see other answers general rounding. the area care needs taken in scenario item rate value beyond 2 digits. lets customer has negotiated rate of $0.0756 per kg , want sell 1000 kg. set custom price level , set rate $0.0756 , quantity 1000. think extended line amount should $75.60 instead $76.00. because rate currency value in ns , retain 2 decimal places amount calculated though rate $0.76/kg this rounding issue in netsuite of aware. otherwise ns uses same rounding algorithms defined javascript (which can produce interesting rounding surprises - see rounding quirk in javascript or ieee-754? )

css - jQuery On Click Add Class -

so trying figure out why not work: https://jsfiddle.net/bv6ort3g/ html: <div class="all-btn">all button</div> <div class="item all"> item 1 </div> <div class="item all"> item 2 </div> <div class="item all"> item 3 </div> <div class="item all"> item 4 </div> <div class="item all"> item 5 </div> css: .all-btn { cursor: pointer; padding: 5px; border: 1px solid #000; display: inline-block; margin-bottom: 15px; } .item { display: none; } .show { display: block; } jquery: $('.all-btn').on('click', function () { $('.all').addclass('show'); }); basically want click button add class of show div tags class of all anyone know going wrong? thanks basically i've done this... $(function(){ $(".item").hide(); $(".all-btn").on("click&q

create a rpm which have rpms and scripts and during installation at least one script should execute -

something can spec file ... have created rpm when installing rpm . need invoke script part of rpm . may pre or post installation can invoke scripts part of rpm . as @etanreisner has mentioned in rpm spec file under %post , can mention whatever want accomplish after rpm installation completed. e.g %post /sbin/service snmpd restart hope helps.

python - Overlay pcolormeshes in matplotlib -

Image
i want overlay differently colored regions pcolormesh. masked regions indeed not show up, cover other complementary regions. below example first plot both regions separately (so masking works nicely), want overlay them, second 1 covers first one. how can plot different regions colored differently? #!/usr/bin/env python import numpy np import matplotlib.pyplot plt xi=np.linspace(0,10,100) yi=np.linspace(0,10,150) x=0.5*(xi[1:]+xi[:-1]) y=0.5*(yi[1:]+yi[:-1]) x,y=np.meshgrid(x,y) z = np.exp(-(x-5)**2-(y-5)**2) z1 = z.copy() z1[(x+y)<10]=np.nan z2 = z.copy() z2[(x+y)>=10]=np.nan plt.figure(figsize=(4,12),tight_layout=true) plt.subplot(3,1,1) plt.pcolormesh(x,y,z1,cmap='greens',vmin=0,vmax=z.max()) plt.subplot(3,1,2) plt.pcolormesh(x,y,z2,cmap='blues',vmin=0,vmax=z.max()) plt.subplot(3,1,3) plt.pcolormesh(x,y,z1,cmap='greens',vmin=0,vmax=z.max()) plt.pcolormesh(x,y,z2,cmap='blues',vmin=0,vmax=z.max()) edit: i should add whole thin

python - put a pipe in a dictionary -

pmu_pipe_map = {} pipe= 'tmp/%s.pipe' % hostname if not os.path.exists(pipe): os.mkfifo(pipe) pmu_pipe_map[hostname] = os.open(pipe, os.o_wronly) im trying open n pipes. in order keep track of them i'd store them somehow - in dictionary - thought above code should work freezes during execution. suggestions? this work however: pipein = os.open(pipe, os.o_wronly) aha! apparently there has read on other end before can return pipe. question asked not correct because failed test 2 scenarios in same way. problem in understanding how pipes work. in situation dictionary entry succeed once piping opened on 'read' end block until then. how determine if pipe can written

jpeg - Transparent jpg image. HOW? -

i came across image http://images.clipartpanda.com/clipart-house-house-clip-art-87.jpg and looks transparent .jpg image as far know there no transparency in jpg images how can done? it cannot done. jpg image in fact png. named jpg, server says mime type image/png . mime type wins on file extension in browsers. browser tries determine file type file extension if mime type missing - if there type, file assumed of type, regardless of extension; may have no extension @ all.

php - PHPMailer email being sent without an attachment -

i trying use phpmailer email form results, , getting email. reason though email coming through without attachments. must doing wrong, don't know what. appreciated. here php: <?php require_once('class.phpmailer.php'); if (isset($_post["submit"])) { $name = $_post['name']; $location = $_post['location']; $desc = $_post['desc']; if(isset($_post['submit'])) { $msg = ''; if (array_key_exists('userfile', $_files)) { // first handle upload // don't trust provided filename - same goes mime types // see http://php.net/manual/en/features.file-upload.php#114004 more thorough upload validation $uploadfile = tempnam(sys_get_temp_dir(), sha1($_files['userfile']['name'])); if (move_uploaded_file($_files['userfile']['tmp_name'], $uploadfile)) { // upload handled // create message // should somewhere in inclu

java - Android: api 16 draws outline of rectangle as filled rectangle -

the following code on api 21 shows outline of rectangle black border of 1 px width: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1dp" android:color="#000000" /> <size android:width="300dp" android:height="50dp"/> </shape> however, on api 16 i'm seeing solid black rectangle. why , there workaround? edit: in logcat i'm seeing continuous messages of: hardwarerenderer﹕ draw surface valid dirty= rect(107, 214 - 109, 251) i had same problem few weeks ago. added transparent solid. try with: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1dp" android:col

php - mysql query doesn't work inside loop -

i have written code` $serial_no = 1; while($rowss = mysqli_fetch_array($selectquery)) echo $rowss['work_date']; $mauzanameqry = mysqli_query($conn,"select moza_name moza_names mauza_id =1"); echo mysql_error(); $mauzanamerslt = mysqli_fetch_array($mauzanameqry); `echo $rowss['work_date']; ` it not return me in $rowss[] array when write query of select inside loop have written above select query inside while loop selects data moza_name table. $rowss[] shows data if remove inside query of moza_name table. doesn't show error's. i'm not sure trying do, may it? <?php $serial_no = 1; while($row = mysqli_fetch_array($selectquery)) { echo $row['work_date']; } $mauzanameqry = mysqli_query($conn,"select moza_name moza_names wehre `mauza_id`='1'") or die(mysqli_error($mauzanameqry)); while($row = mysqli_fetch_array($mauzanameqry)) { echo $row['work_date'];

MYSQL: Query with a two cases allways showing both cases -

the query in question this: select distinct t.name tname, t.keyid tkeyid, t.task_group ttg, case when (tgs.keyid = t.task_group , p.keyid = tgs.proyect) p.name else 'n/a' end pname tasks t, task_users tu, task_groups tgs, proyects p (tu.worker = 1 , t.keyid = tu.task) order tkeyid asc; the query should show me p.name registered in proyects table when condition of case met , n/a otherwise. there serveral entries in tasks such t.task_group = -1 condition not met. these shown correctly in results. however if t.task_group positive number (an actual reference task_group) query shows me 2 results so: +----------------------+--------+------+-------------------------------+ | tname | tkeyid | ttg | pname | +----------------------+--------+------+-------------------------------+ | sensor de frecuencia | 170 | 11 | biblioteca_perifericos_01 | | sensor de frecuencia | 170 | 11 | n/a

ios - Stop UIView from going off screen -

i have uiview circle. app - can move circle around screen using uipangesturerecognizer. don't want circle able dragged off screen. example, if drag circle right, should stop moving circle when right edge hits edge of window. here code: switch rec.state { case .began: x = fingerlocation.x - (myview?.center.x)! y = fingerlocation.y - (myview?.center.y)! break case .changed: myview?.center.x = fingerlocation.x - x myview?.center.y = fingerlocation.y - y if (myview?.center.x)! + (myview!.bounds.width/2) >= view.bounds.width { myview?.center.x = view.bounds.width - myview!.bounds.width/2 } break case .ended: myview?.center = cgpointmake(fingerlocation.x - x, fingerlocation.y - y) break } this code works if drag circle toward edge. if drag quickly, circle go on edge, , jump view second .changed state sent. how c

Biztalk JSON Encoder String To Integer -

Image
i have problem json encoder. i've create send pipeline include json encoder. when process worked json send pipeline return response message request side. json encoder convert string value integer if value integer. example please see below json. { "busidentity": { "erpid": 2075467 }, "success": true, "errormessages": [ "müşteri yaratıldı", "başarılı" ] } in example erpid field have "erpid": "0002075467" pipeline convert 0002075467 value 2075467. have got idea issue? after redeploying application issue has been solved.

sql - How do I find gap in sqlite table? -

i have sqlite table timestamps in milliseconds primary key each row should 1 second or 1000 apart 1 another. data recorder goes out , there no data in table time. how can find gaps using sql statement? cursor based solution possible know. table = pvt ts 1119636081000 1119636082000 1119636083000 1119636084000 1119636085000 ------gap------ 1119636090000 1119636091000 this may work. assuming table name "tstamps", select a.ts tstamps not exists (select b.ts tstamps b b.ts = a.ts+1000) , exists (select c.ts tstamps c c.ts = a.ts+2000) another way select a.ts tstamps not exists (select b.ts tstamps b b.ts = a.ts+1000) , a.ts < (select max(c.ts) tstamps c ) using minus operator. not sure, of these queries better performance wise. select ts+1000 pvt ts != (select max(ts) pvt) minus select ts pvt ts != (select min(ts) pvt)

command line - Is it possible to force the resolution of a window created by a java ".jar" file? -

i've got application .jar provided outside source launches gui. unfortunately original developers did not consider possibility on laptop has maximum resolution of 1366x768. default, window tall , runs off top , bottom of screen (centered). the program wrapped small .exe , i'm wondering if say: java -jar *.jar width=x height=y or *.exe --width x --height y or something? in java, there 2 kinds of parameters: program parameters: program coded search parameters , react accordingly. of course, there no "standard" values, work if programmer did thinking of checking "width" parameter , decided use resize windows vm parameters, passed jvm , not program. again dependent of vm implementation, have never seen parameter limits size of window (and if there one, result exception fail when tried open window big). example: http://www.oracle.com/technetwork/articles/java/vmoptions-jsp-140102.html additionally, fixed size gui considered bad d

eclipse - Xtext - Custom made terminal string without quotes -

i´m new xtext , have problem. when try create terminal string without quotes eof errors. if comment out code string without quotes i´dont error , works fine. can explain me this? or give me hint how better solve this? thank much // string without quotes terminal stringwq: ( ('a'..'z'|'a'..'z')('a'..'z' | 'a'..'z' | '_'| '-' | '§' | '?' | '!'| '@' | '\n' | ':' |'%' | '.' | '*' | '^' | ',' | '&' | '('|')'| '0'..'9'|' ')*); rest of code grammar org.xtext.example.mydsl.mydsl org.eclipse.xtext.common.terminals generate mydsl "http://www.xtext.org/example/mydsl/mydsl" model: (elements += gitest)* ; gitest: kwheader | kwtestcase ; // keywords header kwheader: 'test' '!'&#

php - Is instantiating a class using `new $className()` an issue by any means? Should I use it instead of `ReflectionClass::newInstance`? -

there few times, when dealing service container, have instantiate class, full class name configuration file. example, symfony container: myservice: class: "vendor\namespace\classname" arguments: [...] now, inside container, i'm left choice: can either instantiate class using following snippet, makes use of php strange feature evaluating class name in runtime: $service = new $classname(...$evaluatedarguments); or can instantiate using reflection: $reflectionclass = new \reflectionclass($classname); $service = $reflectionclass->newinstance($evaluatedarguments); the latter more clear on it's doing, , is, @ moment, preferred method. however, since $classname not user input (is loaded .yaml file works app configuration file), can't find reason not use first snippet other readability. it looks sketchy, can't think of technical/security reasons not use it, , does save memory (i don't have instantiate \reflectionclass) , far less verb

mathdotnet - Cuda Native Provider - Missing MathNet.Numerics.CUDA.dll -

math.net 3.7.0 release notes on nuget mention cuda native provider. control.usenativecuda(); throws dllnotfoundexception mathnet.numerics.cuda.dll. mkl-provider need install nuget-package. there no package cuda.dll yet? or have install? i'm using mathnet on linux mono. you right. there no nuget package available. note cuda support not stable (alpha) yet.

string - Initialize a vector of vectors where not all vectors are of same size C++ -

i have data this. static const double v1_arr={2,3,4} vector<double> v1_vec(v1_arr, v1_arr + sizeof(v1_arr[0])) static const double v2_arr={9,6} vector<double> v2_vec(v2_arr, v2_arr + sizeof(v2_arr[0])) static const double v3_arr={9,6,7,6} vector<double> v3_vec(v3_arr, v3_arr + sizeof(v3_arr[0])) how initialize vector of vectors v_v contains 3 above vectors? if using compiler supports c++11 can do vector<vector<double>> v_3{v1_vec, v2_vec, v3_vec}; if not have like vector<vector<double>> v_3; v_3.push_back(v1_vec); v_3.push_back(v2_vec); v_3.push_back(v3_vec); note if can use c++11 features, can initialize other vectors this vector<double> v1_vec{1.0, 2.0, 3.0}; and skip intermediate v1_arr .

go - Umarshalling this JSON in Golang -

i'm teaching myself how use json package in golang. seems straightforward lot of things, i'm having troubles parsing json data retrieved 3d printer. json looks this: { "tasks": [ { "class": "task", "id": "5fee231a", "instances": { "28253266": { "class": "stateinstance", "id": "28253266", "progress": 1, "statetype": "y-edgeavoiding" }, "1d774b49": { "class": "stateinstance", "id": "1d774b49", "progress": 1, "statetype": "x-calibration" }, }, "statetype": &q

excel vba - Auto-Filter Method Failing - Run-Time Error 1004 -

how doing? here's question. i'm trying apply autofilter criterias dates depends on quarter of year are. here's code. if fator = 1 datainicio = dateserial(year(date), 10, 1) datafinal = dateserial(year(date), 12, 31) elseif fator = 2 datainicio = dateserial(year(date), 1, 1) datafinal = dateserial(year(date), 3, 31) elseif fator = 3 datainicio = dateserial(year(date), 4, 1) datafinal = dateserial(year(date), 6, 30) elseif fator = 4 datainicio = dateserial(year(date), 7, 1) datafinal = dateserial(year(date), 9, 30) end if wb.sheets("change-order fup").activate if wb.sheets("change-order fup").autofiltermode = true , wb.sheets("change-order fup").filtermode = true wb.sheets("change-order fup").showalldata elseif wb.sheets("change-order fup").autofiltermode = false wb.sheets("change-order fup").cells(1, 1).autofilter end if wb.sheets("change-order fup").range

java - How do I get all the memberOf Attribute assign to a particular user in LDAP -

i have created application uses ldap authentication. need find out group name in user assign to. there way find out that. have written code somehow return 1 group name randomly. below code memberof users. private class userattributesmapper implements attributesmapper { @override public object mapfromattributes(attributes attributes) throws namingexception { ldapuser user = new ldapuser(); user.setcn((string)attributes.get("cn").get()); user.setmemberof((string)attributes.get("memberof").get()); /*string member = (string)attributes.get("memberof").get(); int length = attributes.get("memberof").size(); if(member != null){ for(int = 0;i<= length; i++){ user.setmemberof(member); } }*/ //user.setmemberof(attributes.get("memberof").getid()); user.setsamacc

c# - asp:ListView create an Case condition -

hello find below code. i trying create webpart sharepoint can bind multiple type of items in slider. i have 2 types image or video and each type has different tag , formatting. wont able bind value tags. question how can create "swich case" inside listview. if type = image --> bind tag else bind second tag. <asp:listview runat="server" id="lva"> <layouttemplate> <div class="slider"> <ul class="bxslider"> <asp:placeholder runat="server" id="itemplaceholder" /> </ul> </layouttemplate> <itemtemplate> <li> <!-- "tag a" --> <video width="320" height="260" controls> <source src="xyz" type="video/mp4"> browser not support video tag. </video>

sorting - How to sort by two fields in Java? -

i have array of objects person ( int age; string name;) . how sort array persons going alphabetically sorted , age ? which algorithm ? you can use collections.sort follows: private static void order(list<person> persons) { collections.sort(persons, new comparator() { public int compare(object o1, object o2) { string x1 = ((person) o1).getname(); string x2 = ((person) o2).getname(); int scomp = x1.compareto(x2); if (scomp != 0) { return scomp; } else { integer x1 = ((person) o1).getage(); integer x2 = ((person) o2).getage(); return x1.compareto(x2); } }}); } list<persons> sorted name, age. string.compareto "compares 2 strings lexicographically" - docs . collections.sort static method in native collections library. actual sorting, need provide comparator defines how 2 elements in list sho

scala - Composing two functions to get a function that returns HList -

this naive question shapeless : suppose have functions a => m[b] , b => m[c] . how can compose them new function a => m[b::c::hnil] ? if want generically can use scalaz's arrow : import scalaz._, scalaz._ def andthenbutkeep[arr[_, _]: arrow, a, b, c]( f: arr[a, b], g: arr[b, c] ): arr[a, (b, c)] = f >>> (category[arr].id &&& g) or if want hlist instead of tuple: import scalaz._, scalaz._ import shapeless._, shapeless.syntax.std.tuple._ def andthenbutkeep[arr[_, _], a, b, c]( f: arr[a, b], g: arr[b, c] )(implicit arr: arrow[arr]): arr[a, b :: c :: hnil] = f >>> (arr.id &&& g) >>> arr.arr((_: (b, c)).productelements) now you'd wrap functions in kleisli arrow: type optionfunc[a, b] = kleisli[option, a, b] val f: optionfunc[int, string] = kleisli(i => some("a" * i)) val g: optionfunc[string, int] = kleisli(s => some(s.length)) val c = andthenbutkeep(f, g) and then

objective c - unable to make network call after accessing contacts in iOS? -

i having strange situation here.in app trying access contacts of user's phone when user granted permission trying make network call server.my code works fine in accessing contacts after making network call delegate method never called. code abaddressbookref addressbookref = abaddressbookcreatewithoptions(null, null); if (abaddressbookgetauthorizationstatus() == kabauthorizationstatusnotdetermined) { abaddressbookrequestaccesswithcompletion(addressbookref, ^(bool granted, cferrorref error) { // first time access has been granted, add contact nslog(@"access contact"); [self sample];//here function call making network request. }); } else if (abaddressbookgetauthorizationstatus() == kabauthorizationstatusauthorized) { // user has given access, add contact nslog(@"previous access"); } else { // user has denied access // send alert telling user c

JavaScript toUpperCase isn't working. Why? -

i doing simple function. turn words first-letter upper case, doesn't work, neither display errors: function formattitle(input) { var words = input.split(' '); (var = 0; < words.length; i++) { words[i][0] = words[i][0].touppercase(); }; return words.join(' '); }; var newtitle = formattitle("all words first-letter should upper case"); document.write(newtitle); thanks in advance. the problem strings in javascript immutable. can't change char this. a solution this: words[i] = words[i][0].touppercase()+words[i].slice(1); but have simpler , faster code using regular expression: return input.replace(/\b\w/g,function(b){ return b.touppercase() }) (here more complete uppercasing, not after spaces - if want stick spaces use replace(/(\s+|^)\w/g,function(b){ return b.touppercase() }) )

sql - Why am I getting duplicate records for this query? I am performing a Left Outer Join -

i entering following query below , getting duplicate values. thought if did left outer join wouldn't that. want t0. data 2 of 3 columns. 1 column want t1. data related customer name customer code. seems want populate record twice. here code attempting use: select t0.cardcode ,t1.cardname ,t0.state crd1 t0 left outer join ocrd t1 on t0.cardcode=t1.cardcode try using distinct keyword. select distinct t0.cardcode ,t1.cardname ,t0.state crd1 t0 left outer join ocrd t1 on t0.cardcode=t1.cardcode

ios - Detect collision of two UIView's in swift -

i have 2 uiviews on viewcontroller. added pangesture first view , when start moving view second view move towards first view. want detect event when these 2 views collides. here code. @ibaction func dragfirstview(sender: uipangesturerecognizer) { let translation = sender.translationinview(self.view) dispatch_async(dispatch_get_main_queue()) { () -> void in uiview.animatewithduration(2.5, delay: 0.0, options: uiviewanimationoptions.curveeaseout, animations: { self.secondview.frame = cgrectmake(sender.view!.center.x + translation.x, sender.view!.center.y + translation.y, self.secondview.frame.size.width, self.secondview.frame.size.height) }, completion: nil) } sender.view!.center = cgpoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y) sender.settranslation(cgpointzero, inview: self.view) } what if (cgrectintersectsrect(secondview.frame, send

asp.net mvc - MVC Create method data flow -

i think know of basics of mvc there's 1 thing don't understand yet. in view create generated automatically when set project, how data sent controller? i'm used seeing actionlinks parameters here there's no actionlink can't understand how data travel view controller. could explain me please? as know, in view, first line (usually) tells view, model being used within view. like: @model models.carviewmodel lets suppose, have form on view, , posted action called edit . must have edit action, expecting parameter of type used model in view. like: [httppost] public actionresult(carviewmodel model) { //logic } this convention known strongly typed view . suppose have textbox property name of model as: @html.textboxfor(x => x.name) when form posted edit action, variable model in parameter of edit action holding respective values. i.e, model.name

c# - AutoFixture with Entity Framework - mapping int to enum -

i use autofixture (3.30.8) against entity framework (6.1.3) data model. have implemented autofixture.autoef (0.3.5) package fix entities , avoid circular references generated relationships. however, tables have several int columns represented enums in code , able set int values based on enum values , have proxy class each of enum values. here simplified example of schema: public partial class mycontext : dbcontext { public virtual dbset<parent> parents { get; set; } public virtual dbset<child> children { get; set; } } public partial class parent { public parent() { this.children = new hashset<child>(); } public int id { get; set; } public string name { get; set; } public int status { get; set; } public virtual icollection<child> children { get; set; } } public partial class child { public int id { get; set; } public int parentid { get; set; } public string name { get; set; } public int typ

D3.js X axis line not displaying -

in example of bivariate chart (mbostock’s block #3884914), x-axis line not visible. tried in different ways not make line appear. can make line appear? ticks available in example. link : http://bl.ocks.org/mbostock/3884914 this css rule, responsible hiding x-axis ,, need remove code , appear .x.axis path { display: none; }

ios - Geolocation in the browser | Desktop & Mobile -

i have read through few articles here none address following: i launching landing page app later in year, part of app launch trying gather location of our signups, not country, city or nearest city - extends desktop , mobile traffic. what proposing do, subject being possible. adjacent signup field, have location drop down, hope can auto-complete location visitor, , hit submit. allows more accurate location integrated system mail handling companies mailchimp etc use. this info, if accurate open upon geolocation / dynamic text content in site also. any , welcome.

Missing Azure Components in Visual Studio 2015 Server Explorer -

i've installed vs 2015 enterprise side-by-side vs 2013 update 5. when open server explorer in both versions , expand azure-node there difference between 2 studios. in new 2015 1 can see "app service", "mobile service", "notification hubs" , "sql databases". other nodes missing. second problem: when hit "manage" dialog inside vs 2015 not show of subscriptions. 2 of 4 displayed. is nown "feature" or missing something? the first problem asked in azure storage not showing in visual studio 2015 server explorer i can vouch suggested solution (install azure sdk 2.7 http://go.microsoft.com/fwlink/?linkid=518003&clcid=0x409 ) worked on pc.