Posts

Showing posts from May, 2015

Entity Framework Core automatic migrations -

this command awesome : enable-migrations –enableautomaticmigration:$true this made life easier , never in projects have worked using code first entity framework , every deployment in production cake walk out single issue. removing auto migrations in ef core loss of productivity. entityframework core automatic migrations as answered here https://stackoverflow.com/a/39526807/2463026 can't instantiate applicationdbcontext, ever need dependency injected. automatic migrations enabled that, thinking , working in pure object oriented way , abstracting underlying table / schema / column stuff. opened database when verification needed , other reports kind of stuff. is there way these in ef core ?

hreflang tags - no return tags error messages -

i'm trying understand required return tags. i have following 2 pages: https://thai.dating <link rel="canonical" href="https://thai.dating/" /> <link rel="alternate" href="https://thai.dating/?language=english" hreflang="en" /> <link rel="alternate" href="https://thai.dating/?language=indonesian" hreflang="id" /> <link rel="alternate" href="https://thai.dating/?language=portuguese" hreflang="pt" /> <link rel="alternate" href="https://thai.dating/" hreflang="x-default" /> https://thai.dating/?language=portuguese <link rel="canonical" href="https://thai.dating/?language=portuguese" /> <link rel="alternate" href="https://thai.dating/?language=english" hreflang="en" /> <link rel="alternate" href="

Pass SQL string to oracle stored procedure and get results with execute immediate -

i trying pass in sql string stored procedure , using execute immediate return results. this: create procedure p360_rct_count (sqlstring in varchar2) begin execute immediate sqlstring; end; / i not sure how accomplish it. above, when execute sp using command below, error: execute p360_rct_count 'select count(distinct entity_id),addr_county p360_v_rct_count group addr_county'; the error is: ora-06550: line 1, column 22: pls-00103: encountered symbol "select count(entity_id),addr_county p360_v_rct_count group " when expecting 1 of following: := . ( @ % ; symbol ":=" substituted "select count(distinct entity_id),addr_county p360_v_rct_count group " continue. basically building sql string in system , need pass in sp , results system. relatively new stored procedures in oracle. the easiest way work result set sys_refcursor . can used quite jdbc or odbc. your procedure this: create procedure p360_rct_count

java - Oberserve to attributes of Object with 2 Oberservers -

i got product object 2 attributes want oberserve 2 different oberservers. if change 1 attribute notification other attribute observer got changed. how can make sure notification when got changed? import java.util.observable; public class product extends observable { private string name; private double price; public void setname(string n){ name = n; this.setchanged (); this.notifyobservers(); } public void setprice(double p){ price = p; this.setchanged (); this.notifyobservers(); } public string getname() { return name; } public double getprice() { return price; } } public class observerdemo { public static void main(string [] args) throws exception { product p1 = new product(); p1.addobserver((obj, arg) -> system.out.println("name changed to: " + ((product) obj

javascript - Resize div vertical or horizontal -

how resize div vertical or horizontal not using css property resize height or width using pure javascript code? you can style e.g. getelementbyid('div_register').style.width='500px'; getelementbyid('div_register').style.height='500px';

php - Session data not saving -

i debugging php session worked when last tested it, couple of months ago. code has not changed in way, session has stopped working. i have read multiple questions here other articles no suggestions have solved problem. believe code correct, when asked support @ bluehost, must code problem: i starting session , setting few session variables: <?php session_start(); $_session["franchise_name"] = $_post["name"]; $_session["db_name"] = $_post["name"]; $_session["franchise_location"] = $_post["franchise_location"]; $_session["franchise_phone"] = $_post["franchise_phone"]; $_session["franchise_address"] = $_post["franchise_address"]; $_session["franchise_email"] = $_post["franchise_email"]; header("location: session.php"); /* redirect browser */ exit; ?> if echo session variables after setting them, well. stuff. know works in section. ses

python - Django (mezzanine) urls catching everything -

i'm writing custom views in admin of django project, should simple. have "events" page , want create "event" page (exactly same django polls tutorial in admin, event page same detail view.) no cannot use built in functionality normal using foreignkeys etc , need build scratch. urls.py: admin.autodiscover() def get_admin_urls(urls): def get_urls(): my_urls = [ url(r'^my_cms/events', views.events, name="events"), url(r'^my_cms/events/(?p<event_id>[0-9]+)/$', views.detail, name='detail'), ] return my_urls + urls return get_urls admin_urls = get_admin_urls(admin.site.get_urls()) admin.site.get_urls = admin_urls urlpatterns = i18n_patterns("", ("^admin/", include(admin.site.urls)), ) so.. visiting .../admin/my_cms/events/ works .../admin/my_cms/events/xxxxxx displays same events page, rather detail view if change url pattern oth

javascript - Parent onClick is not triggered when the child element is clicked inside button -

i have dropdown-button component has click lister. button has text , icon. click event triggered if click button on outline , not on text or icon. here component: <template lang="html"> <div> <button class="button dropbtn" @click="toggledropdown"> <span>{{ name }}</span> <span class="icon"><i class="fa fa-caret-down"></i></span> </button> <div v-show="visible" class="dropdown-content is-primary-important"> <slot> </slot> </div> </div> </template> <script> export default { props: ['name'], data: function() { return { visible: false } }, mounted: function() { this.hidedropdownonclick(); }, methods: { toggledropdown: function() { // trigged on click of button // make dropdown visible console.log("toggling dropdown");

java - How to trim a string using regex? -

i have alphabet: {'faa','fa','af'} , have string: "faaf" i have regex: "(faa|fa|af)*" helps me match string alphabet. how make java trim string into: {fa,af}, correct way write string: "faaf" based on alphabet? here code: string regex = "(faa|fa|af)*"; string str = "faaf"; boolean ismatch = pattern.matches(regex, str); if(ismatch) { //trim string while(str.length()!=0) { pattern pattern = pattern.compile("^(faa|fa|af)(faa|fa|af)*$"); matcher mc = pattern.matcher(str); if (mc.find()) { string l =mc.group(1); alphabet.add(l); str = str.substring(l.length()); system.out.println("\n"+ l); } } } thanks aaron helped me problem.

serialize mp4 file into frames to hbase using flume -

i trying serialize media files cctv (in .mp4 format) , store individual frames hbase based on sequence number. i tried using spooldir source , hbase sink (using asynchbasesink) nothing seems working. if has tried similar stuff can validate if approach right. i trying on single cloud instance flume & hbase on same instance , hbase using default file structure of vm & not hdfs. leads .. sample configuration files help.

c++ - Dos window show up then disappears immidiately -

when run codes below, dos window show immidiately disappear. want window stay , wait user's next command input. should startupinfo.hstdinput if want keep window showing , have use createprocess in project not winexec etc. int winapi winmain( hinstance hinstance, hinstance hprevinstance, lpstr lpcomline, int ncmdshow) { security_attributes secattr; handle hread,hwrite; secattr.nlength = sizeof(security_attributes); secattr.lpsecuritydescriptor = null; secattr.binherithandle = true; if (!createpipe(&hread,&hwrite,&secattr,0)) { return false; } char command[1024]; strcpy(command,"ping 192.168.0.1"); startupinfo startupinfo; process_information processinfo; startupinfo.cb = sizeof(startupinfo); getstartupinfo(&startupinfo); startupinfo.hstderror = hwrite; startupinfo.hstdoutput = hwrite; startupinfo.hstdinput = hread; startupinfo.lptitle =

html5 - how to add box shadow to after and before pseudo elements? -

i trying chat box....i want same color , box shadow pseudo elements similar concern box ..i tried not working .... here codepen link http://codepen.io/mgkrish/pen/qmepep?editors=1100 .chat_other{ padding: 30px; padding-bottom: 15px; padding-top: 15px; display: flex; background-color: #ffffff; box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.1),inset 0px 1px 0px 0px rgba(255, 255, 255, 0.15); border-radius: 14px; width: 50%; position: relative; margin-left:30px; } .chat_other:before { content: ""; position: absolute; z-index: -1; bottom: -2px; left: -23px; height: 20px; border-left: 40px solid #e5e5ea; border-bottom-right-radius: 16px 14px; border-bottom-left-radius: 9px; -webkit-transform: translate(0, -2px); } .chat_other:after { content: ""; position: absolute; z-index: -1; bottom: 0px; left: 4px; width: 26

html - Is it OK to style anchor tags as block elements? -

is ok use html below style anchor block element? read somewhere before it's wrong, can't see why , it's damn convenient! drawbacks of method, if any? <style> a.button{ display:inline-block; padding: 10px 20px; border: 1px solid grey; } </style> <a class="button" href="#link">click me!</a> not ok <a> elements styled blocks or inline-blocks, it's necessary in cases, avoid problems. take bit of code: a {outline:1px dotted} click <a href="#"><div>here</div></a> in browsers, outline around anchor not proper rectangular shape, because of div inside. in others, outline isn't there @ all. if change a's display block , differences go away; has nice rectangular outline in browsers. a {outline:1px dotted; display:block} click <a href="#"><div>here</div></a> so, no need worry.

jboss - I can't open my eclipse jee neon? -

when install jboss developer studio 10.3.0.ga in eclipes marketplace restart. jump tip window showing that: 'init' has encountered problem. internal error occurred during:"init". can't open eclipes. there problem pic: enter image description here

sql server - T-SQL Check if list has values, select and Insert into Table -

i'm quite new t-sql , struggling insert statement in stored procedure: use parameter in stored procedure list of ids of type int. if list not empty, want store ids table delivery. to pass list of ids, use table type: create type tidlist table ( id int null ); go maybe know better way pass list of ids stored procedure? however, procedure looks follows: -- parameter @deliverymodelids tidlist readonly ... declare @storeid int = 1; -- delivery if exists (select * @deliverymodelids) insert [mydb].[delivery] ([deliverymodelid], [storeid]) output inserted.deliveryid select id @deliverymodelids; if list has values, want store values db storeid 1. if insert deliveryids 3,7,5 result in table delivery should this: deliveryid | storeid | deliverymodelid 1...............| 1...........| 3 2...............| 1...........| 7 3...............| 1...........| 5 do have idea on how solve issue? thanks ! you can add @storeid select insert .

javascript - How to copy a value from an input box into the inside of a Jquery Script? -

i want set dynamic value jquery script. goal: copy value amounter "amount": "here", inside script. here code: <button id="rzp-button6">pay razorpay</button> <form name='razorpayform'> <input type="text" name="amounter" id="amounter" value=""> </form> <script> var options = { "key": "rzp_test_s7jzhwh0czdxmh", "name": "arijit aich", "amount": "1200", "description": "testing payment", "image": "http://www.google.com/favicon/android-icon-192x192.png", "handler": function (response){ $("#razorpayform").html(response.razorpay_payment_id); var rpid = response.razorpay_payment_id; window.location = '/invoice.php?billno=' + rpid; }, "prefill": { "name": "

usb - How to connect a big track in an IC at the Kicad? -

i need 90ohm of differential pair track impedance connect integrated circuit usb. that, have 1.212mm of track width, it's impossible connect track @ ic, connect little part smaller track, photo, believe won't. know how can connect it? connection also, can put connector between ic , usb? interfere in something?

c# - HttpRequest taking too long to respond. Works fine in browser -

i creating web request read response. response string around 100 characters. when hit url in browser responds in second, when try read response using below code times out. sometime throws error "unable connect remote server." httpwebrequest request = (httpwebrequest)httpwebrequest.create(serviceurl); request.method = "get"; request.useragent = "mozilla/5.0 (windows; u; windows nt 6.0; en-us; rv:1.9.0.5) gecko/2008120122 firefox/3.0.5"; request.proxy = null; string responsestring = string.empty; using (httpwebresponse response = (httpwebresponse)request.getresponse()) { stream datastream = response.getresponsestream(); streamreader reader = new streamreader(datastream); responsestring = reader.readtoend(); reader.close();

android - YouTube Player View pausing video after each second -

i understand there other similar questions asked. either have no solutions or solutions provided not working. the player works fine in fullscreen mode part of layout contents, keeps pausing , rebuffering. here code: public class playeractivity extends youtubebaseactivity implements mediaplayer.onpreparedlistener, youtubeplayer.oninitializedlistener { ... youtubeplayerview = (youtubeplayerview) findviewbyid(r.id.player_youtube); button yt_player_button = (button) findviewbyid(r.id.player_yt_play); yt_player_button.settext("click play youtube video"); yt_player_button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { youtubeplayerview.initialize(getstring(r.string.youtube_api_key), playeractivity.this); } }); } ... @override public void oninitializationsuccess(youtubeplayer.provider provider, youtubeplayer youtubeplayer, boolean b) { if

javascript - Cordova iOS: Click on custom auto suggest not recognized cause keyboard closes -

Image
in cordova app have problem on ios devices , have no idea how solve. i have custom auto-suggest shows below input field while typing. contained in dialog box "position: fixed;". autocomplete unordered list. click on < li > element should place selected text input. problem is, when user clicks on li, input loses focus, keyboard disappears , whole fixed dialog box "jumps" down , click event not recognized. recognized when keyboard closed. i tried several workarounds, giving focus input field after blur. not help. keyboard closes , opens instead of keeping opened. any ideas how solve? here video showing behaviour. recorded on ios simulator same behaviour on real iphone 6s. i have found solution now. said click event not triggered when keyboard hides, touchstart event triggered. so did workaround, looking touchstart event followed blur event. if touchstart-target not receive click event within given time, trigger one. works on test ip

spring security + oauth2 + Reactjs + zuul proxy -

i working oauth2 , spring security , using zuul proxy. have login button in client web app. when user click on request should redirect authentication server authentication. it's not redirecting request authentication server. sharing code, kindly give solution. 1. client web application code @springbootapplication @enablezuulproxy @enableoauth2sso public class oauthuiapplication { public static void main(string[] args) { springapplication.run(oauthuiapplication.class, args); } @configuration protected static class securityconfiguration extends websecurityconfigureradapter { @override public void configure(httpsecurity http) throws exception { http.logout().and().antmatcher("/**").authorizerequests() .antmatchers("/index.html", "/home.html", "/", "/login").permitall() .anyrequest().authenticated().and().csrf() .cs

Deserializing ISODate objects from MongoDB into Java POJO -

i have existing data in mongodb formatted such: "created_at" : isodate("2011-11-25t18:17:16z") when try deserialize java pojo using morphia, gives date system timezone applied date instead of gmt date. /** * class aggregationquerydetails. */ public class aggregationqueryresulttriggeredpolicydetails { /** triggered time. */ private date created_at; /** event ids. */ private list<string> event_ids; /** * @return createdat */ public date getcreatedat() { return created_at; } /** * @param createdat * createdat set */ public void setcreatedat(date createdat) { this.created_at = createdat; } } how can avoid timezone conversion ? internally java.util.date not store timezone. date internally represented in utc. format date timezone wish. the behavior seeing due fact when "view" java.util.date either in debugger or printing it, shown in lo

How do I send a message to all client threads in my TCP IP server in Python? -

i'm trying build tcp ip server in python. goal run commands on clients. run command you'll have type "cmd command" in server. i've never worked threads before , can't seem find out how send command want execute client threads. point me in right direction? my code far: import socket import sys thread import * host = '' port = 8884 clients = 0 connected_id = "" s = socket.socket(socket.af_inet, socket.sock_stream) print 'socket created' # bind socket local host , port try: s.bind((host, port)) except socket.error, msg: print 'bind failed. error code : ' + str(msg[0]) + ' message ' + msg[1] sys.exit() print 'socket binded' # start listening on socket s.listen(10) print 'socket listening' # function handling connections. def clientthread(conn): # sending message connected client con

c# - Extract data from string using pattern -

hi have long string: 'bla bla bla... <img src="/uploads/photo.png" width="143" height="136" /> bla bla bla...' and want extract long string: image tag - width, height , of course path... maybe this: <img src="*" width="*" height="*" /> but don't know how "*" data. can please suggest me code extract image path ( * ). might in c#, vb or java... anything. thanks! don't use regex parse html. use html parser insted. e.g. can use htmlagilitypack : var html = "bla... <img src=\"/uploads/photo.png\" width=\"143\" height=\"136\" /> bla..."; htmldocument doc = new htmldocument(); doc.loadhtml(html); var img = doc.documentnode.element("img"); var src = img.attributes["src"].value; // "/uploads/photo.png" var width = img.attributes["width"].value; // "143" var height = img.at

jquery - How to show a background picture till Owl Carousel loads it's images -

i using owlcarousel v1.3.3 in old project. shows white slides (without images) when page loaded first time. (seems images bit bigger in size/resolution cannot make them smaller need high res pictures. my question is, possible show static background image of smaller size /resolution till other images loaded in owl carousel. thanks. edit: please find code below. // javascript code below //================================================================================= $("#main-slider").find('.owl-carousel').owlcarousel({ slidespeed : 500, paginationspeed : 500, singleitem : true, navigation : true, autoplayhoverpause:false, navigationtext: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>" ], afterinit : progressbar, aftermove : moved,

javascript - Global access to array values made from Json -

$.getjson("sluzba.json", function(result){ array = $.each(result, function(value){ return value; }); tablemaker(array); }); this code, want have access array outside scope of function. is possible? please help... yes, possible. can using callback method. function myfunction(callback){ $.getjson("sluzba.json", function(result){ array = $.each(result, function(value){ return value; }); callback(array); tablemaker(array); }); } myfunction(function(myarray){ console.log(myarray); });

html5 - Google Cloud Speech API Javascript -

i'm working university stage , have integrate google cloud speech api in html5 page perform speech recognition. have 2 problems: 1) i'm searching around web , don't find suitable library generate audio file (flac or wav) microphone. 2) don't understand if impossible using javascript perform google speech api recognition or not. if not: how can do, considering have manage event of pushing button? thank you!

javascript - Drag and drop with easeljs in Animate CC 2017 -

i've been using html canvas project in adobe animate cc 2015.2 drag around movieclip on stage, using method recommended in creatjs mouse interaction tutorial . doing on macbook pro running os x yosemite @ work. here code used , worked fine. movieclip on stage in first frame of timeline , actions in same frame. movieclip instance (my_mc) follows mouse around - far good. this.my_mc.on("pressmove", function(evt){ evt.currenttarget.x = evt.stagex; evt.currenttarget.y = evt.stagey; }); however, trying exact same example in animate cc 2017 on 2 friends' macbook pros retina display running macos sierra, results in there being strange , significant offset between position of mouse , position of movieclip. offset bigger further away mouse moves origin (0,0) of stage. does know why happening or can think of workaround? i've tried few modifications using globaltolocal, not solve problem. the 3 main reasons can think of are: some change in animate cc

debugging - Why does this keep returning error "Object not found" from Heroku/Parse in swift? -

i trying delete row username = usernameselected heroku/parse server. username selected not nil , exist on server. nothing seem wrong @ all, "object not found" instead of deleting whole row. let query = pfquery(classname: "requests") query.wherekey("username", equalto: usernameselected) query.limit = 1 query.findobjectsinbackgroundwithblock({ (objects, error) in if error != nil { }else { if let objects = objects { obj in objects { obj.deleteinbackgroundwithblock({ (success, error) in activityindicator.stopanimating() uiapplication.sharedapplication().endignoringinteractionevents() if error != nil { self.alertdisplay("error", message: error?.userinfo["error"] as! string) }else { self.alertdisplay("", message: "styles submitted..! please wait next

php - How to inject a custom property to Illuminate Routing Route class -

in other words, how override class add custom property route class. instance suppose following in routes/web.php : route::get('/post', 'postcontroller@index')->description('this posts list') the above code generate undefined method error: call undefined method illuminate\routing\route::description() i have tried define in providers/routeserviceprovider.php following: <?php namespace app\providers; use illuminate\support\facades\route; use illuminate\foundation\support\providers\routeserviceprovider serviceprovider; class routeserviceprovider extends serviceprovider { /** * namespace applied controller routes. * * in addition, set url generator's root namespace. * * @var string */ protected $namespace = 'app\http\controllers'; public $description = null; /** * define route model bindings, pattern filters, etc. * * @return void */ public function boot()...

android - Firebase Delete -

i have 1 listview , adapter imagebutton delete data, don't know how delete data setonclick. need click imagebutton , delete data. have data type room not null. public class orgmanageroom extends appcompatactivity { private listview listview; private arrayadapter<string> arrayadapter; private arraylist<string> list_of_rooms = new arraylist<>(); arraylist<hashmap<string, string>> myarrlist; public arraylist<string> arr; public arrayadapter adapter; private databasereference mdatabase = firebasedatabase.getinstance().getreference().getroot(); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_org_manage_room); // listview = (listview)findviewbyid(r.id.listview); // listview.setadapter(new imageadapter(this)); // arr

javascript - Map function usage and declaration to quick navigation -

phpstorm has feature navigate function declaration. in current work project faced situation usage function name generated depends of used component. component 1 function selectonefile(id){ //complex logic } component 2 function selecttwofile(id){ //another complex logic } place function gets called <?php $components = [0 => 'one', 1 => 'two'] ?> var fileid = $(somecomponent).data('id'); select<?php echo $components[$_post['component_id']] ?>file(fileid); i can't rewrite function be selectfile(fileid,'<?php echo $components[$_post['component_id']] ?>'); because inside logic of functions different. also can't use 1 name function because 1 case components loaded on 1 page, , on case loaded 1 component on page. i want navigate between function declaration , usage: when press ctrl+b on selectonefile(id) show me usage select<?php echo $components[$_post[&

Monitor biztalk server(biztalkmgmtdb) SQL Server Agent job failed on step 2 - Part2 -

please go through: monitor biztalk server(biztalkmgmtdb) sql agent job failed on step 2 - part1 details how question born. how can prevent messages refcount less 0, without reference counts biztalkmsgboxdb , orphaned dta service instances biztalkdtadb? usually need run bhm quite on environment clean inconsistency there practice regularly when ever sql server agent job failed. there queries can use in sql find if there orphaned messages in biztalk. 1 of these queries one: select count(*) [biztalkdtadb].[dbo].[dta_serviceinstances] dtendtime null , [uidserviceinstanceid] not in (select [uidinstanceid] from[ biztalkmsgboxdb].[dbo].[instances] (nolock) union select [streamid] [biztalkmsgboxdb].[dbo].[trackingdata] (nolock)) fyi: found query here: https://www.biztalkadmin.com/orphaned-messages-in-the-tracking-database/ it list count of orphaned service instances. remove count clause select statement list. might idea come , how perhaps change impleme

c# - ASP.NET Core Running as Windows Service gets 500 Internal Server Error -

i'm trying implement asp.net core application windows service. i'm following steps outlined here . publish app, create service pointing executable in publish location. service gets created successfully. start service , successful. however, when try navigate browser url set up, "500 - internal server error". i'm pretty new process , don't know how track down. here how set entry point: public static void main(string[] args) { var isdebug = debugger.isattached || args.contains("--debug"); string runpath = isdebug ? directory.getcurrentdirectory() : path.getdirectoryname(process.getcurrentprocess().mainmodule.filename); var host = new webhostbuilder() .usekestrel() .usecontentroot(runpath) .usewebroot(path.combine(runpath, "wwwroot")) .useurls(new string[] { "http://myserver:9191" }) .useiisintegration() .

reactjs - Failed PropType. Value is undefined -

Image
my intention basic. want name appear in hellopage container upon rendering and, then, click turn name "bob." presume i'm missing stupid. hellopage.js (container, name should appear, totally undefined) import react 'react'; import proptypes 'prop-types'; import {connect} 'react-redux'; import {bindactioncreators} 'redux'; import * actions '../actions/helloactions'; export const hellopage = ({name, actions}) => { return ( <div> name {name}. hello page. <div onclick={() => actions.sayhello()}>but name different.</div> </div> ); }; hellopage.proptypes = { actions: proptypes.object.isrequired, name: proptypes.string.isrequired }; function mapstatetoprops(state) { return { name: state.name }; } function mapdispatchtoprops(dispatch) { return { actions: bindactioncreators(actions, dispatch) }; } export default connect(mapstatetoprops, mapdispatchtoprops

git - How can I view changed files for each commit in the log? -

this question has answer here: how have git log show filenames svn log -v 7 answers i want view list of files changed in each commit in git log . another question asked how view changed files single commit, , got following response : $ git diff-tree --no-commit-id --name-only -r bd61ad98 index.html javascript/application.js javascript/ie6.js what want know how apply git log . is, command should run following output? commit 78b3ba12002f9cab5cbb57fac87d8c703702a196 author: wd40 <example@example.com> date: fri apr 14 09:59:57 2017 -0500 change more things about.html javascript/application.js javascript/ie6.js commit 0f98b1f7eda33a4e9cfaab09506aa8094044085f author: wd40 <example@example.com> date: fri apr 14 09:49:03 2017 -0500 change things index.html javascript/application.js javascript/ie6.js additionally,

git - Error installing Github Desktop in Windows 10 -

currently downloaded 'github desktop' here: https://desktop.github.com but when want run it, appeares advices of system error like: lack of libiconv-2.dll, libintl-8.dll, libpcre-1.dll , libeay32.dll (two times). also, github installed in c://user/.../appdata/local , c://.../appdata/roaming. please want install package github not know do. thanks attention.

javascript - Where to put jquery function -

i want make row clickable on <tbody> <tr class='clickable-row' data-href="{% url "perception:detail" %}" data-turbolinks="false"> <td><a href="{{ object.loan.get_absolute_url }}" data-turbolinks="false">{{ object.loan }}</a></td> <td><b>{{ object.current_balance }}</b></td> <td>{{ object.operation_error }}</td> <td>{{ object.start_date }}</td> <td>{{ object.end_date|default:"" }}</td> <td>{{ object.created }}</td> <td>{{ object.modified }}</td> </tr> in using example <tbody> <tr class='clickable-row' data-href='url://'> <td

python - why the value of lambda_var is changing? -

# sieve of eratosthenes? trial division? , python 3.6, pycharm 2017.1 def _odd_iter(): n = 1 while true: n += 2 yield n def primes(): yield 2 = _odd_iter() while true: num = next(it) yield num abc = num f_inner = lambda lambda_var: lambda x: x % lambda_var > 0 # lambd_var here f_outter = f_inner(abc) = filter(f_outter, it) = 0 nx1 in primes(): += 1 if <= 100: print(i, nx1, sep="#\t") else: break while tried watch value of "lambda_var" breakpoint set line, found chaning minimal max in every loop, , thing it's not quite normal. wanna know, why? e.g.:step step: steps num abc lambda_var 1 3 3 undef 2 undef undef 3 3 5 5 undef 4 undef undef 5 5 undef undef 3 6 undef undef 5 7 7 7 undef 8 undef undef 7 9 undef undef 3 10 undef undef 5 11 undef undef 7 12 11 11 undef 13

Angular: Can I attach an Observable to a variable? -

this doesn't seem work, yet there no errors: @component({ selector: 'geofinder', template: '<input type="text" class="form-control" [(ngmodel)]="cityname" />' }) export class geofindercomponent implements oninit { cityname; ngoninit() { let citynamechange = observable.from(this.cityname); citynamechange.subscribe((data) => console.log(data)); } } what trying achieve here attach observable variable triggers when value changes. i'd happy if bind observable keyup event of input field, refuses work. you could... use setter , add handling there _cityname; cityname() { return this._cityname; } set cityname(name) { // stuff here } you could... split [(ngmodel)] call callback (ngmodelchange) hook '<input [ngmodel]="cityname" (ngmodelchange)="onchange($event)"/>' cityname; onchange(newcity) { // stuff here } you could... use reac

c++ - Specific matrix function task -

let's have function send these parameters. reference on matrix m (filled 0 , 1), coordinate x, , coordinate y. f(m,x,y). x , y coordinates of cell in matrix. function has return matrix n 3x3 format. n has filled count of how many 1's around every cell around (x,y). please @ picture in order understand better. picture not know how work way around matrix information. can please me @ least start? :d matrix class class matrix { private: int cols; int rows; int **cells; public: matrix(const int& x , const int& y); //constructor matrix(const matrix& m); //copy constructor int get_at(const int& x, const int& y)const; //returns value cell[x][y] void set_at(const int& x, const int& y); //sets value in cell[x][y] int get_rows()const; //returns number o

Changing character in a for loop in bash script to execute a program many times -

i new bash scripting , call program 22 times. 22 different files. file names this: filename_chr1_test filename_chr2_test filename_chr3_test ... filename_chr22_test this loop far: #!/bin/bash chr_num in {1:22}: /path/to/plink --file filename_chr$chr_num_test --exampletest done for reason i'm getting error back. i'm not sure why. can me debug? thanks help!! i suggest: #!/bin/bash chr_num in {1..22}; /path/to/plink --file filename_chr${chr_num}_test --exampletest done

sql - UPDATE query with multiple criteria and subqueries -

i trying change data table multiple criteria sub-query this: update field0 f0 set f0.c=iif(table.field="x","a",iff(table.field="y","b","c")) ( select f2.b field (field1 f1 inner join field2 f2 on f1.a=f2.a) inner join field0 f00 f00.a=f1.a ) table ; but it's not working, says have problem how wrote query. i tried this: update field0 f0 set f0.c=iif(f0.a=any( select f1.c field1 f1 inner join field2 f2 on f1.a=f2.a f2.b=4),"a",iif(f0.a=any( select f1.c field1 f1 inner join field2 f2 on f1.a=f2.a f2.b not null),"b","c")) ; but 1 says query not updatable query :/ i dont know do, help? this actual code wroth: update flights f set f.status = (select iif(de.handeling_code=4,"canceled",iif(de.handeling_code not null,"on time ","late")) irregular_events ie inner join delay_event de on ie.ie_code=de.delay_code ie.flight_code=f.flight_code order f.fl

r - Errors using CausalImpact package with Zoo objects -

i'm trying model impact of storms on sales patterns using causalimpact package. when create zoo object , pass model receive error. i've read through documentation , can't figure out i'm doing differently examples in documentation. i'm working following data.frame: > head(my.data) date sales units 1 2014-10-17 71319.85 21436.64 2 2014-10-18 88598.26 26755.79 3 2014-10-19 95768.29 29823.86 4 2014-10-20 62303.04 19417.71 5 2014-10-21 56477.57 17562.21 6 2014-10-22 54890.39 16946.43 then i'm converting zoo object: my.data<- zoo( my.data[ ,c('sales','units')], my.data[,'date'] ) > str(my.data) ‘zoo’ series 2014-10-17 2017-04-13 data: num [1:907, 1:2] 71320 88598 95768 62303 56478 ... - attr(*, "dimnames")=list of 2 ..$ : null ..$ : chr [1:2] "sales" "units" index: date[1:907], format: "2014-10-17" "2014-10-18" "2014-10-19" ... then set p

proxy - Kamailio 4.4 seturi Only Accepts Explicit Strings? -

i've been working @ implementing simple serial forking described in tm module's documentation (the q values stored priority weight in mysql table) proxy querying database determine domain forward to. i've verified through extensive use of xlog variable i'm using build new uri use seturi getting correctly. use append_branch call in subsequent while loop iterating on sql query results, doesn't have problems taking formatted parameter. however, when go restart kamailio gripes @ me string expected. line corresponds console seturi call. i've tried casting string, doesn't seem part of 4.4 (or syntax wrong). i've thought building uri strings , storing avp, suspect i'd have same problem. for reference, i'm doing: $var(basedest) = "sip:" + $var(number) + "@" + $(dbr(destination=>[0,0]))+ ":" + $var(port); seturi($var(basedest)); and it's outputting when trying load config: <core> [cfg.y:3368]: yye

How do I use APIs in Javascript -

so, want lottery results (from site called magayo.com offers free api mega millions) app, "numgen" in windows 10 app store, and, don't know how use apis, of internet tutorials useless , tell me things don't want or need know. want information api , display neatly on app, please me. thank you! you need call api using http request , consume response display results on app. http request can made via xmlhttprequest [xhr], or library jquery ( ajax ) or axios . you can read more on mozilla developer network . also why use javascript develop native apps suitable windows 10? using electron too? developing in c++ improve performance although uwp app supports javascript codebase language too.

Correct way to use default DateTime in ASP.NET MVC 5 -

i have sql server database. 1 of tables has sql datetime column. column should not have entered when record created, later should modified. i understand datetime not nullable. default datetime2 1/1/0001, while minimum value sql server 1/1/1753. why when insert datetime null have "0001-01-01" in sql server? so, question correct way this? how set po.podate minimum sql server (1/1/1753). applicationdbcontext db = new applicationdbcontext(); purchaseorder po = new purchaseorder(); po.podate = new datetime(1753, 1, 1); // best way? // po.podate = datetime.minvalue; doesn't work because datetime.minvalue 1/1/0001 // po.podate = null; doesn't work because datetime non-nullable value type // po.podate = dbnull.value; doesn't work because type system.dbnull not datetime db.purchaseorders.add(po); db.savechanges(); if expect date not nullable, yes, have best way. ef pass in value field regardless, if don't, try pass i

c# - Json.Net not saving $type information -

when serialize page object, json.net not adding $type property controls (which in ilist ) when serializes them. have tried adding following code class constructor , webapi startup, json.net still not adding $type information control serializes. jsonconvert.defaultsettings = () => new jsonserializersettings { typenamehandling = typenamehandling.all, metadatapropertyhandling = metadatapropertyhandling.readahead }; for testing purposes, added $type property control myself in json code, , json.net able deserialize object correctly, still not serializing correctly. here's how classes setup. public class page { public guid id { get; set; } public guid customerid { get; set; } public ilist<control> controls { get; set; } } and here control class: public class control : controlbase { public override enums.cscontroltype cscontroltype { { return enums.cscontroltype.base; } } } and here controlbase ab