Posts

Showing posts from September, 2015

android - can not access to progress bar in an other activity -

i have objects in layout video view,text view , on comes this: <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.cardview android:id="@+id/cardview_mypost" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginbottom="@dimen/activity_vertical_margin" app:cardcornerradius="@dimen/activity_vertical_margin" app:cardelevation="@dimen/activity_vertical_margin" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/web_withe_color" android:animatelayoutchanges="@anim/anim_list" android:padding="8dp" > <!-- thu

angular - Changing route back and forth and subscription callbacks -

i working on angular2 beta 17 version. have found out, when have longer request server (2-3s), , switch routes couple of time (back , forth), callback gets executed number of times route has changed. solved adding .unsubscribe() in ngondestroy . however, shouldn't done default on http calls when changing router? has been fixed in latest rc?

php - Cannot send mail with no "From" header Codeigniter -

i have library in codeigniter autoloads <?php if ( ! defined('basepath')) exit('no direct script access allowed'); class send_email { private $ci; public $from_email; public $from_name; public $reply_to; public $to_email; public $subject; public $message; public function __construct() { $this->ci =& get_instance(); $this->ci->load->library('email'); } public function send_email($f_email,$f_name,$t_email,$rep_to,$sub,$msg){ $this->from_email = $f_email; $this->from_name = $f_name; $this->to_email = $t_email; $this->reply_to = $rep_to; $this->subject = $sub; $this->message = $msg; $this->ci->email->from($this->from_email, $this->from_name); $this->ci->email->to($this->to_email); $this->ci->email->reply_to($this->reply_to); $this->ci->email-&g

java - Vaadin 7 Pass Data Between Views -

i have 2 vaadin views , want make search process these 2 views. first view contains textfield search parameter , button seach process. want is, once user click search button, want send search parameter second view , call search method dao classes here display search result. vaadin newbie , dont have idea how appreciated. the classic approach pass data view via parameters of view (this allows bookmark search). see view interface: void enter(viewchangelistener.viewchangeevent event) this view navigated to. method called before view shown on screen. event.getparameters() may contain parameters relevant view. you can send parameters originating view via navigator. e.g. navigator.navigateto("search/searchterm") // `search` view name, `searchterm` passed param see example in handling uri fragment path of book of vaadin

c++ - Linker error with a xbox 360 controller function -

i'm getting undefined reference xinputgetstate , have no idea why. headers i'm using : xinput.h , windows.h . firstplayer constant 0 . xinput_state state; zeromemory( &state, sizeof(xinput_state) ); // state of controller xinput. dwresult = xinputgetstate( firstplayer, &state ); any advice nice. i'm using codeblocks ide mingw compiler. okay figured out. missing line : #pragma comment(lib, "xinput.lib") is there better work around this? feel strange!

oracle - PL/SQL Source (Line Number) in query on v$sql / v$sqlarea table -

i use oracle enterprise manager monitor current load on db. if there high-load sql can see details, there "statistics" tab. in "general" section can see: module: jdbc thin client action: (empty) parsing schema: schema1 pl/sql source (line number): schema1.package_abc (1457) sql profile: n/a sql plan baseline n/a also, have simple query can run on database see going on: select q.sql_id, q.parsing_schema_name, q.address, q.sql_text, q.last_active_time v$sqlarea q q.last_active_time > sysdate - 1 order last_active_time desc question is: there way add result of query column pl/sql source (line number) present same info oracle enterprise manager? you can lot of information v$session. preferred approach instrument pl/sql code calls like: dbms_application_info.set_action('doing xxx in yyy); when want know are. can found in v$session.action also see following columns may of interest: plsql_entry_object_id plsql_entry_subprogram

r - Plotting a cluster with [1*n] matrix variable -

i beginner when comes r. trying plot clusters (after estimating them, of course) of data set (2 variables). used kmeans(x, centers, iter.max = 10, nstart = 1, algorithm = c("hartigan-wong", "lloyd", "forgy", "macqueen"), trace=false) ## s3 method class 'kmeans' fitted(object, method = c("centers", "classes"), ...) cluster vector and got point, quite unsure how should proceed in order graph showing 1 variable on x , other on y axis clusters indicated. how should go it? thanks! ok think should do: result<-kmeans(x,centers,...) plot(data$x,data$y, col=result$cluster) that plot data , color respective observation depending cluster is. can add center of clusters points(result$clusters, col=1:2, pch=18,cex=2) the last 2 commands pch , cex center points like.

css - c# line break in dataTable -

Image
i have gridview filled datatable. columns display in datagrid view have limited display of character css. problem doesn't show enough characters i'd put line break first sentence, i'm using webforms. the datagridview bind : string strsql = @"select id, dernieresolution, descriptiondemande, nomcontact, numero, sousrubrique, titredemande datatable 1=1"; datatable dtdeskcache = databasecachedigitalhepdeskconnection.sqldatatable(strsql, "dbname"); gvdata.datasource = dtdeskcache; gvdata.databind(); and css code hide part of informations : .hotline-search #gvdata tr td { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } it looks right now, there's not enough informations, want add rest of sentence don't want inline. someone have ideas ?

PHP: Reformatting Array -

help me reformat array this: array ( [samplearr] => array ( [0] => array ( [id] => 1 ) [1] => array ( [id] => 2 ) ) ) this array need reformat in above array: array ( [samplearr] => array ( [id] => 1 [id2] => 2 ) ) may can looping again array this. $data['samplearr'] = []; foreach($data['samplearr'] $key => $value) { $k = !empty($key) ? $key : ""; $format['samplearr'][$value['id'].$k] = $value['id']; }

asp.net - Install npm without node -

i starting asp.net core web application using visual studio 2015 , use angularjs2 typescript editing. in order work need install npm package manager. install npm without node since not use node.js. there way this? simple answer questions no. npm nodejs package manager . name imply, can use install node programs. this wiki defination of npm npm default package manager javascript runtime environment node.js. so, need install node.js in order run npm. hope helps. thank you.

How to deploy Spring Boot (1.3.6) or any Spring Boot project (connection to cloud database) to Google App Engine? -

i want deploy spring boot application (connect cloud sql , return result) on google app engine, please share steps deploy it. you can try jenkins auto deployment feature deploy application on server refer link more idea on jenkins. http://www.tutorialspoint.com/jenkins/jenkins_automated_deployment.htm please share more info on server , how set connection database more info.

java - How to improve: Given two integers, return the number of digits that they share -

i received question during interview, question given 2 integers, return number of digits share. for example 129 , 431 return 1 - both share digit 1 , no other digit. 95 , 780 return 0, since none of integers overlap. my thoughts iterate through digits, store them hashtable , check .containskey. my java solution: public int commondigits(int x, int y) { int count = 0; hashtable<integer, string> ht = new hashtable<integer, string>(); while (x != 0) { ht.put(x % 10, "x"); x /= 10; } while (y != 0) { if ((ht.containskey(y % 10)) { count++; } y /= 10; } return count; } but takes o(n) space , o(n + m) time, anyways can improve this? why not use simple bit fiddling?  public int commondigits(int x, int y) { int dx = 0; while (x != 0) { dx |= 1 << (x % 10); x /= 10; } int count = 0; while (y != 0) { int mask = 1 <<

php - Laravel - Query Model if values contain a certain string (taken from search input) -

i implementing search using laravel , ajax. have product belongs tag , subcategory. on other hand subcategory belongs category. want check of properties (field values) , check if contain given string. searching found out have use like . here tried: $products = product::where('name_en', 'like', $search)->get(); however products if search string matches value. want match if contains it. how can proceed belongsto relationships? how can check propreties of tag , subcategory well? how chain achieve desired result? in advance. you doing 1 thing wrong, query returns exact matches because given exact string. query should this. $products = product::where('name_en', 'like', '%'.$search.'%')->get(); above query gives products contains searched string. and if want search in relational tables can user laravel method join() . there 1 more method wherehas avoiding method, because creates complex query. heavy. can use join(

c# - Workspaces in Roslyn -

what different workspaces in roslyn , differences between them? know of msbuildworkspace , adhocworkspace . how workspace affects roslyn analysis? have read need dnxworkspace mvc projects have not try them out yet.

loops - PHP - Looping $_POST in PHP Query -

first im student. im trying make looping in $_post php statements this if ($_post) { //get value of latitude, longitude, radius site.php calculate in query above include('config/dbconnect.php'); //database connection $lat = array(); $lon = array(); $rad = array(); $stmt = array(); $sql = array(); $lat1 = $_post['lat1']; //get value of latitude 1 $lon1 = $_post['lon1']; //get value of longitude 1 $rad1 = $_post['rad1']; //get value of radius 1 $endrow = $_post['endrow']; ($i = 2; $i <= $endrow; $i++) { $lat[$i] = $_post['lat'.$i]; //get value of latitude n $lon[$i] = $_post['lon'.$i]; //get value of longitude n $rad[$i] = $_post['rad'.$i]; //get value of radius n } //haversine formula , view match site ci , d2g_trx ci $sql = "select site.*,d2g_trx.*, ( 6371 * acos( cos( radians($lat1) ) * cos( radi

javascript - Replace a string word with empty space with js -

i have following string: var string = "deluxe 3 bed private" and following code replace "private" word empty space: var rooms = ["basic", "standard", "superior", "deluxe", "private"]; //var room = "room"; vwo_$(document).ready(function(){ wri.eventbus.on('ui:microsite:availabilitystore:refresh', function(){ var roomname = $(".roomnamelink"); roomname.each(function(){ (var = 0; < rooms.length; i++) { var pattern = "[^\s]" + rooms[i]; var regex = new regexp(pattern); string = string .replace(regex, " "); } }); }) but regex wrong. if word "private" found in string want replaced empty space. var string = "deluxe 3 bed" i want replace of words found in rooms array empty space can use 1 regex possible words var regex = /\b(basic|standard|superior|deluxe|private)\b/gi

hibernate - create entity for given relation one to one relationship, primary key of one table is foreign key of another table -

Image
send me hoe create entities relation using hibernate jpa annotations this onetoone mapping between user , profile @entity public class user { @id private int id; private string name; @onetoone(fetch = fetchtype.lazy, mappedby = "user", cascade = cascadetype.all) private profile profile; } profile entity @entity public class profil{ @genericgenerator(name = "generator", strategy = "foreign", parameters = @parameter(name = "property", value = "user")) @id @generatedvalue(generator = "generator") private int id; @onetoone(fetch = fetchtype.lazy) @primarykeyjoincolumn private user user; }

PHP: download images from array of urls? -

i'm trying download images array , store them on server using php. this php code: $images = 'http://url.com/image.jpg, http://url.com/image2.jpg, http://url.com/image-test.jpg, http://url.com/image6.jpg, http://url.com/image.jpg'; $images = array(''.$images.''); foreach($images $name=>$image) { $name = explode(",", $image); $name0 = implode(" ",$name); copy(''.$name0.'', '/test/'.$name0.'.jpg'); } when run code, don't images stored on server , warning message on php page. could please advise on issue? the warning message this: warning: copy(/test/http:/url.com/image.jpg http:/url.com/image2.jpg in line 88 and on line 88: copy(''.$name0.'', '/test/'.$name0.'.jpg'); try following: $images = 'http://url.com/image.jpg, http://url.com/image2.jpg, http://url.com/image-test.jpg, http://url.com/image6.jpg, http://url

c# - Mobile Service Client throws exception when response is not found -

i trying port application azure mobile service azure web app. (the mobile service working). have added microsoft account authentication web-app, , web app api has mobileappcontroller attribute. have universal windows app front end calls api. app first checks if player in database, if not not found response. if call method using following code mobileserviceclient exception. private async task<httpresponsemessage> getazmasyncp(string apiext, idictionary<string,string> param ) { string myuri = string.format("{0}{1}", urlbase, apiext); //client mobileserviceclient correctly logged in //i not response 404 not found, exception "the request not completed, not found" var response = await client.invokeapiasync(myuri, system.net.http.httpmethod.get, param); return response; } if call api httpclient , add own headers, mobile client supposed me, response requested. here code: private async static tas

javascript - Is bundling my JS/TS project anti-pattern? -

i'm working on project in angular 2 using typescript , trying nail-down workflow. yesterday, saw this video guy bedford package management. in it, makes mention of fact considers bundling anti-pattern. i've seen similar mention of moving away bundling on angular-university guide . from have read since watching video, seems me reason bundling being anti-pattern http2 allows multiple responses per request , sent in parallel. seems pretty useful since single request server return whole angular app in individual files. is http2 support prevalent enough transition un-bundled apps? pros , cons? edit #2: tried make question more focused anti-pattern strong term. fuzzy one: have intuitive sense of means, easy lost in weeds of arguing whether questionable practice x or not, in fact, anti-pattern. so rather trying read off-hand comment during talk library author, i'd present case against bundling. these points should uncontroversial (if disagrees let me know

django - JQuery is not defined when using document ready -

i facing strange behavior trying execute the: $(document).ready(function() { with jquery. i have script in right inside a: window.addeventlistener inside script use repeatedly jquery. want replace window.addeventlistener: window.addeventlistener("map:init", function (e) { with: $('#add_geometry').on(("map:init", function (e) { and want include script inside the: $(document).ready(function() { when try error in console: uncaught referenceerror: $ not defined i know jquery loaded on time. application build django, not sure if issue related this i tried recommendations in above link didn't work. missing basic here? please add jquery file in code. it seems have not reference jquery file in page before jquery code execute. you can add below code. <script src="~/scripts/jquery-1.8.2.js"></script>

c# - ObjectDisposedException when moving form -

i made custom form. now i'm trying implement feature drag form around while holding titlebar. throws exception: system.objectdisposedexception has idea problem is? this code: [dllimportattribute("user32.dll")] public static extern int sendmessage(intptr hwnd, int msg, int wparam, int lparam); [dllimportattribute("user32.dll")] public static extern bool releasecapture(); form form; button buttoncancel; button buttonok; dialogresult inputbox(string title, string prompttext, ref string value) { form = new form(); buttoncancel = new button(); buttonok = new button(); label label = new label(); textbox textbox = new textbox(); panel titlebar = new panel(); label lbltitle = new label(); panel pnlexit = new panel(); label lblexit = new label(); form.text = title; label.text = prompttext; textbox.text = value;

java - Android HttpURLConnection POST Request with image/jpeg -

i trying send image in post request httpurlconnection . have next code: string i3 = string.valueof(system.currenttimemillis()); bytearrayoutputstream i4 = new bytearrayoutputstream(); i4.write(("--" + i3 + system.lineseparator() + "content-disposition: form-data; name=\"" + i1.this.i2 + "\"; filename=\"" + i1.this.i2 + ".jpg\"" + system.lineseparator() + "content-type: image/jpeg" + system.lineseparator() + "content-length: " + string.valueof(i2.this.i1.length) + system.lineseparator() + system.lineseparator()).getbytes()); i4.flush(); i4.write(i2.this.i1); i4.flush(); i4.write((system.lineseparator() + system.lineseparator() + "--" + i3 + "--").getbytes()); i4.flush(); i4.close(); httpurlconnection i5 = (httpurlconnection) new url(myurl).openconnection(); i5.setrequestmethod("post"); i5.setdooutput(true); i5.setrequestproperty("user-agent&quo

swift - UiTableviewcell with UITextView auto layout scroll -

i used uitextview in uitableviewcell can edit , expand height. working fine auto layout, textview , tableviewcell expand height automatically. my problem when height expand beyond screen size , when keyboard show. when enter new line in textview can't see cursor (because height beyond visible view) , didn't scroll automatically. other scenario when textview height beyond screen size, when edit text in middle place, scroll doesn't work properly. my idea develop facebook post view controller or email compose view controller (like multiple different uitableviewcell , of textview can expand height)

iOS - Swift - How to add a button to MKPointAnnotaton - MapKit -

currently have map view set 5 hardcoded locations shown on map pins. when user clicks on these pins callout show user has details of location. within these callouts trying include button user can press , takes them view controller. below current code have, when tap on pins no button shown, have idea missing or need in order implement button? here code locations , current user location. import uikit import mapkit import corelocation import scenekit class secondviewcontroller: uiviewcontroller, mkmapviewdelegate, cllocationmanagerdelegate { @iboutlet weak var mapview: mkmapview! //location manager property let locationmanager = cllocationmanager() override func viewdidload() { super.viewdidload() mapview.delegate = self //find current location view loaded self.locationmanager.delegate = self //setting accuracy self.locationmanager.desiredaccuracy = kcllocationaccuracybest //so location services used within app self.locationmanager.requ

php - Laravel foreach issues -

Image
i stuck on foreach loop inside blade template after hours of trial , failure need help. my controller public function menue() { $restaurants = user::with('articles')->get();; return view('pages.menues')->withrestaurants($restaurants); } my foreach @foreach($restaurants $restaurant) <div class="panel panel-default"> <div class="panel-heading"> @foreach($restaurant->articles $article) {{$article->title}} <span class="float-right">{{$article->published_at}}</span> @endforeach </div> <div class="panel-body"> @foreach($restaurant->articles $article) {{$article->body}} @endforeach {{$restaurant->name}} </div> </div> @endforeach this i'm trying loop trough: { &qu

javascript - Cordova JQuery Error VS2015: Exception: Cannot call method 'concat' of undefined -

i'm getting error in vs when load html jquery.mobile: exception: cannot call method 'concat' of undefined jquery.mobile-1.4.5js i followed tutorial: https://wordpress.org/support/topic/-this-xml-file-does-not-appear-to-have-any-style-information-associated getting started jquery. this example of html throwing exception: <!doctype html> <html> <head> <!-- customize content security policy in meta tag below needed. add 'unsafe-inline' default-src enable inline javascript. details, see http://go.microsoft.com/fwlink/?linkid=617521 --> <!--<meta http-equiv="content-security-policy" content="default-src 'self' data: gap: http://api.openweathermap.org https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">--> <meta name="format-detection" content="telephone=no"> <meta

javascript - Selenium Java Scroll Bar in section -

im trying move scroll bar right using selenium webdriver in java, in order focus on element screenshot, after trying know, cannot it. the scenario shown on picture 1: sorry deleting data due privacy issues as may see, scroll located element in blue rectangle, i've tried one: javascriptexecutor js; js = (javascriptexecutor) driver; js.executescript("$(\"#pagination\").animate({ scrollleft: \"-50000px\" })"); pagination div id. can me guys? best regards. use 'openqa.selenium.interactions.actions' move element. should automatically element's position x, y , scroll it. // initialize instance actions action = new actions(webdriver); // find element focus inside iframe webelement = webdriver.findelement("<find element wish focus>"); // perform move action action.movetoelement(we).build().perform(); haven't tested though, hope helps. update: you have 2 similar ids - "#pag

javascript - Fetching data from async api call using react redux -

Image
i'm having problem api call in react redux project. here's code snippet project. poiaction.js export function poisuccess(pois) { // log detail below console.log("poi: ", pois); return { pois, type: poi_fetch_success }; } export function poifetch(pois) { return { pois, type: poi_fetch_attempt }; } export function fetchpoi(token) { return dispatch => axios({ method: 'get', url: 'http://localhost:9090/poi', headers: { 'x-access-token': token }, }) .then((pois) =>{ // let poi = pois.data[0]; // console.log("pois: ", pois.data[0]); dispatch(poisuccess(pois)); }) .catch((error) => { throw(error); }) } console log output: poireducer.js export default function poi(state = [], action){ switch(action.type){ case poi_fetch_attempt: return state; case poi_fetch_failed: return state; cas

c# - WebAPI allow only single date format -

inside webapi have method allows user register page. [allowanonymous] [route("create")] [httppost] public async task<ihttpactionresult> createaccount(mymodel newaccount) { } my model has datetime field filled date when request made. works fine when user sends example 1990-02-07 07.02.1980 incorrect value inside model - date nad month switch values. know can create custom jsonconverter shown here , can globally? inside startup.cs have: config.maphttpattributeroutes(); config.formatters.remove(config.formatters.xmlformatter); var jsonformatter = config.formatters.oftype<jsonmediatypeformatter>().first(); jsonformatter.serializersettings.contractresolver = new camelcasepropertynamescontractresolver(); jsonformatter.serializersettings.nullvaluehandling = nullvaluehandling.ignore; jsonformatter.serializersettings.dateformatstring = "yyyy-mm-dd"; jsonformatter.serializersettings.dateparsehandling = dateparsehandling.datetime; but still can

html - How to make backgroud over video tag? -

i tried make background on video tag opacity 0.6: html: <body> <video></video> </body> css: body { background: #000; opacity: 0.6; position: relative } check out fiddle link .video-wrapper{width:320px;height:240px;position:relative;} .video-overlay{background:red;opacity:0.6;position:absolute;width:100%;height:100%;top:0;left:0;} .video-wrapper:hover .video-overlay{display:none;}

matlab - Two symbolic complex variable functions intersection -

i have 2 symbolic complex variable functions , want find intersection of these functions. %% close all;clear; clc x1=sym('x1','real'); x2=sym('x2','real'); x=x1+1i*x2; r=8; s=1+1i; ck=0; k=20:-1:0 ak=(k+1)*(k+1); bk=-k*(k+1)+1i*2*k*r; sk=bk-x-(ak*ck)/s; s=sk; ck=-2*r-1i*2*r*k; end sk(x1,x2)=sk; f1(x1,x2)=real(sk(x1,x2)); f2(x1,x2)=imag(sk(x1,x2)); ezplot(f1); hold on; ezplot(f2); grid on; graph of these functions , intersection thanks.

f# - FSCL error on a simple example -

i trying use opencl fscl on f# obtaining errors don't understand open fscl.compiler open fscl.language open fscl.runtime open microsoft.fsharp.linq.runtimehelpers open system.runtime.interopservices [<structlayout(layoutkind.sequential)>] type gpu_point2 = struct val mutable x: float32 val mutable y: float32 new ( q ,w) = {x=q; y=w} end [<reflecteddefinition>] let pointsum(a:gpu_point2,b:gpu_point2) = let sx =(a.x+b.x) let sy =(a.y+b.y) gpu_point2(sx,sy) [<reflecteddefinition;kernel>] let modgpu(b:float32[], c:float32[],wi:workiteminfo) = let gid = wi.globalid(0) let arp = array.zerocreate<gpu_point2> b.length let newpoint = gpu_point2(b.[gid],c.[gid]) arp.[gid] <- newpoint arp [<reflecteddefinition;kernel>] let modsum(a:gpu_point2[],b:gpu_point2[],wi:workiteminfo) = let gid = wi.globalid(0) let cadd = array.zerocreate<gpu_point2> a.length let n

common lisp - Override :INITFORM of the class slot in subclass -

i need generalize default slot value in subclass. example: (defclass class-a () ((slot-1 :initarg :slot-1 :initform #'identity) <...> other-slots<...>)) its subclass is (defclass class-b (class-a) ((slot-2 :initarg :slot-2 :initform 0))) but #'identity not enough default value, more general (lambda (&rest x) x) will suit better expect multiple arguments (i think doesn't contradict liskov principle). best way override :initform class-b ? i can add initialize-instance :after class-b , see if slot-1 set #'identity , override it. what happens if reintroduce slot-1 in class-b ? want avoid have repeat slot information it. what happens if reintroduce slot-1 in class-b? it works. i want avoid have repeat slot information it. no. difference.

sql - Ensuring two columns only contain valid results from same subquery -

i have following table: id symbol_01 symbol_02 1 abc xyz 2 kjh okd 3 que qid i need query ensures symbol_01 , symbol_02 both contained in list of valid symbols. in other words needs this: select * mytable symbol_01 in ( select valid_symbols somewhere) , symbol_02 in ( select valid_symbols somewhere) the above example work correctly, subquery used determine list of valid symbols identical both times , quite large. innefficient run twice in example. is there way without duplicating 2 identical sub queries? you try use cte like; with validsymbols ( select distinct valid_symbol somewhere ) select mt.* mytable mt inner join validsymbols v1 on mt.symbol_01 = v1.valid_symbol inner join validsymbols v2 on mt.symbol_02 = v2.valid_symbol

How can I change background image in JFrame using JButtons? -

i want change image background of jframe using button. know how use jframe , jbutton. you should add following code in button action listener setcontentpane(new jlabel(new imageicon("c:\\users\\computer\\downloads\\colorful design.png")));

vb.net - Where is the default Settings file in a Visual Basic Project? -

i'm editing visual basic application. save settings per user. need know application configuration located in solution explorer. if looking user settings strings, can see them menu: project->[yourproject] properties... select 'settings' @ side tab. the project application configuration under project in solution explorer, or project window mentioned above, 'application' tab.

ios - Firebase inconsistent data structure -

Image
i assessing firebase replacement parse in current app. have come across issue when querying remote data. when retrieve query getting inconsistent data structure back. my realtime data looks this: previously in parse bool values set 'beef, chicken, pork' have been held in array , query based on array containing item each row. firebase advises arrays bad in json have had implement them bool's , query based on property, query looks this firdatabasereference *ref = [[firdatabase database] reference]; firdatabasereference *path = [ref child:@"recipes"]; firdatabasequery *query1 = [path queryorderedbychild:@"beef"]; firdatabasequery *query2 = [query1 queryequaltovalue:[nsnumber numberwithbool:yes]]; [query2 observesingleeventoftype:firdataeventtypevalue withblock:^(firdatasnapshot * _nonnull snapshot) { [self hidespinner]; nsarray *recipes = (nsarray *)snapshot.value; the initial query works fine , da

javascript - Ng-file-upload show upload indicator -

i'm using ng-file-upload , want show upload indicator during upload process, haven't found way in documentation, may there way? even looking directive , tried using 1 moved better 1 worked me , easy configur , use , documentation , demos enough things right look @ directive: https://github.com/nervgh/angular-file-upload

c# - Start application anyway IIS -

i'm tried automatic start iis webapplication . i want able call application_start inside global.asax happend after first request web application. how can when iis server started?? thanks. you can implement system.web.hosting.iprocesshostpreloadclient interface , load datas in preload method. need configure serviceautostartproviders in iis.

ibm mobilefirst - TLS1.2 connection from native Android app to Worklight server using wlclient library -

i using wlclient.jar making connection worklight server android native app requirement make tls1.2 connection . dont find api in wlclient.jar mentioning tls1.2 security level . customizing wlclient.jar option ? if yes changes need ? this issue has since become apar (support ticket) mobilefirst platform foundation 7.1: pi64093: apps on android versions 4.4.2 , earlier cannot connect server using https if tls 1.2 enabled . workaround (from apar description): in native android code of mobilefirst platform hybrid application, in "oncreate()" method in application's main activity, possible replace default sslsocketfactory provided android 1 enables tls 1.2, after call "wl.createinstance(this)", in order accommodate use of tls 1.2 android versions 4.4.2 , earlier. specific steps , code accomplish beyond scope of apar. there ifix available download ibm fix central. the issue resolved programmatically enabling tls on android

objective c - How to stop presenting iOS native player after invoked by UIWebView -

i using uiwebview playing youtube videos. uiwebview directly fires native player playing these videos. displaying loader cancel button until video starts playing. when click cancel button need hide webview. the problem when click cancel button hide webview native player still presenting after hiding webview. is possible stop presenting native player when webview closed?

java - How to include Maven dependencies in Manifest file -

Image
i developing plugin osgi application, using maven compile. in order install plugin, osgi application should read information plugin dependencies. information should provided in manifest.mf file. i'm wondering how use virgo tooling generate proper manifest.mf file. these dependencies include in manifest.mf update according answer used apache felix to pom.xml have added <plugin> <artifactid>maven-jar-plugin</artifactid> <configuration> <archive> <manifestfile>${project.build.outputdirectory}/meta-inf/manifest.mf</manifestfile> </archive> </configuration> </plugin> <plugin> <groupid>org.apache.felix</groupid> <artifactid>maven-bundle-plugin</artifactid> <executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> <goals> <goal>manifest</goal>

SQL calculating percentage and list of top ten regions -

i need help. have these tables. patient (patienid, names, gender, address, contact, occupation, doctorid, userid, registrarid) diagnosis (diagnosisid, provissional_diagnosis, alternative_diagnosis, definitive_diagnosis, patientid, doctorid) treatment (treatmeni, medicine, dosage, type, councelling, diagnosisid) so want write following queries what percentage of patients have suffered 'malaria' treated malaria in future? list top 10 regions highest number of malaria cases.

java - Null pointer exception on other machines other than Mine -

this question has answer here: what nullpointerexception, , how fix it? 12 answers i'm writing java swing app in eclipse. i've exported runnable jar. , when run it. working fine. i've sent same jar second machine. , when ran it, surprise, therw null pointer exception . below piece of code. try { string dburl = path.getdburl(); system.out.println(dburl); textarea.append(dburl + "\n"); system.out.println(path.getsystemid + " s id \n"); textarea.append(path.getsystemid + "\n"); // connect excel class.forname("sun.jdbc.odbc.jdbcodbcdriver").newinstance(); connection myconn = drivermanager.getconnection(dburl); string querystring = "select sum(pages) totalunitscount,sum(totalerrors) totalerror, sum(iif(type 'formatting error ',(totalerrors

asp.net - Putting a model on every view -

i'm trying pass usermodel every view, can show on top current user information. this baseviewmodel : public class baseviewmodel { public usermodel currentuser { get; set; } } basecontroller: public class basecontroller : controller { protected override void onactionexecuted(actionexecutedcontext filtercontext) { userrepository userrep = new userrepository(); baseviewmodel model = new baseviewmodel { currentuser = userrep.getcurrentuser() }; base.onactionexecuted(filtercontext); } } homecontroller: (default) public class homecontroller : basecontroller { public actionresult index() { listrepository listrep = new listrepository(); return view(listrep.getalllists());//returns ienumerable<listmodel> } } my shared _layout.cshtml : <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" conte

xpages - Bluemix - NSF .XSP Application display Error 403 after git push -

after pushed modified nsf file bluemix service got: error 403 http web server: forbidden perform operation this list of operations performed: downloaded sample app set git repository cloned modified app (changing images on main page) pushed back it seems problem application signing. advice?

php - Symfony/Silex SecurityServiceProvider: Serialization of 'Closure' is not allowed -

i follow [silex securityserviceprovider][1] [1]: http://silex.sensiolabs.org/doc/providers/security.html step step, when submit login form, got error: exception in abstracttoken.php line 154: serialization of 'closure' not allowed i don't know error comes from... use same code exemple: controller: $app->get('/login', function(request $request) use ($app) { return $app['twig']->render('login.twig', array( 'error' => $app['security.last_error']($request), 'last_username' => $app['session']->get('_security.last_username'), )); }); view: <form action="{{ path('connexion') }}" method="post"> {{ error }} <input type="text" name="_username" value="{{ last_username }}" /> <input type="password" name="_password" value="" /> <input t

javascript - What’s happening in this code with Number objects holding properties and incrementing the number? -

Image
a recent tweet contained snippet of javascript. can please explain happening in step step? > function dis() { return } undefined > 5 = dis.call(5) number {[[primitivevalue]]: 5} > five.wtf = 'potato' "potato" > five.wtf "potato" > 5 * 5 25 > five.wtf "potato" > five++ 5 > five.wtf undefined > five.wtf = 'potato?' "potato?" > five.wtf undefined > 5 6 in particular, not clear me: why result of dis.call(5) number kind of [[primitivevalue]] property, results of five++ , five * 5 appear plain numbers 5 , 25 (not number s) why five.wtf property disappears after five++ increment why five.wtf property no longer settable after five++ increment, despite five.wtf = 'potato?' assignment apparently setting value. op here. funny see on stack overflow :) before stepping through behaviour, important clarify few things: number value , number object ( a = 3 vs a