Posts

Showing posts from February, 2013

SAP ABAP - Handling with control tables -

my problem: i "loop" on table local structure named ls_eban.. and information must follow these instructions: ls_eban-matnr must be in zmd_scmi_st01 ( 1. control table (global) ) ls_eban-werks must be in zmd_scmi_st05 ( 2. control table (global) ) ls_eban-knttp must be in zmd_scmi_st06 ( 3. control table (global) ) i need selection clear , performant. have one, isn't performant @ all. my solution: select st01~matnr st05~werks st06~knttp zmd_scmi_st01 st01 inner join zmd_scmi_st05 st05 on st05~werks = ls_eban-werks inner join zmd_scmi_st06 st06 on knttp = ls_eban-knttp table lt_control st01~matnr = ls_eban-matnr , st01~bedarf = 'x' , st05~bedarf = 'x'. i have say, control tables doesn't have relation each other (no primary key , no secondary key). the first thing should not have select inside loop. instead of loop @ lt_eban ls_eban. select .... endloop. you s...

deployment - Best way to deploy Django app to OpenShift without downtime? -

i have been pushing new versions of django app openshift time now. @ first used general git push command. later on had add long running deploy commands. long story short took half hour complete deployment -> app unavailable. enabled jenkins , first push fails , app unavailable time. jenkins runs on 1 gear, creates new gear , have 4 gears running. (one paid, because jenkins not work , stays alive time) i've read hot deploy (page 40) might work without downtimes, afraid consistency(not sure read more it). so, there these 3 options how push openshift. there third party service might use? how push openshift minimize downtime , potentially number of gears used? i think you've pretty answered own question, go hot deployment if need continuous delivery on app. i'm not sure concerns consistency, if have them, use jenkins original ci purpose, , if ok, can push production using hot deployment. basically, i'd have such workflow: make changes , commi...

javascript - Unable to catch 401 status code with Angular HttpInterceptor -

i have created http response interceptor checks 401 status code. if code 401, supposed write in browser console, not work. doesn't seem catch it. app.js: 'use strict'; // declare app level module depends on views, , components var app = angular.module('myapp', []); app.factory('authhttpresponseinterceptor', ['$q', '$location', function ($q, $location) { return { response: function (response) { if (response.status === 401) { console.log("response 401"); } else { console.log("other response no 401"); } return response || $q.when(response); }, responseerror: function (rejection) { if (rejection.status === 401) { console.log("response error 401", rejection); } ...

ruby - Rails model attribute (a DateTime) has different value depending on how its called -

i using rails 4.2 , ruby 2.2.0. have model called ride has datetime attribute called start_time. when call ride.find(1803) , start_time shown january 9th. when call ride.find(1803).start_time , returns start_time on january 9th. how possible , how fix it? here's full code ran in console: irb(main):028:0> ride.find(1803) => #<ride id: 1803, start_time: "2016-01-09 00:00:00", end_time: nil, created_at: "2016-01-05 16:55:44", updated_at: "2016-01-05 20:35:38", user_id: 29, ride_type: nil, horse_id: nil, notes: "", available_to_ride_additional_horses: nil, admin_approved: false, weekday: nil, unavailable_to_ride: false, time_range_dropdown: "morning", rider_name: "matti fisher", rider_last_name: "fisher", rider_first_name: "matti", edited_at: nil, requested_time: "2016-01-09 19:30:00"> irb(main):029:0> ride.find(1803).start_time => fri, 08 jan 2016 19:00:00 est -05:00 ...

c# - Build MVC6 / ASP.Net 5 project in x86 mode -

Image
i'm working on new mvc6 / asp.net 5 project using vs2015, sp1. i'm trying configure childcarefamilyprotal project build in x86 mode. mvc6 project. can select x86 platform platform dropdown. after save configuration , reopen it, platform "any cpu" note - have build in x86 due existing dll's cannot change. below screen shot of configuration manager. open properties childcarefamilyportal, navigate build tab, , select x86 platform target. should take care of problem.

android - How to dynamically define name of R.drawable -

this question has answer here: how image drawable folder in android? 4 answers is there way generate r.drawable.... name on fly? want set background image dynamically generated name ( usable r.drawable.example_graphic ) so want find way assign string $abc -> btn.setbackgroundimage(r.drawable.$abc); i don't want create new drawable, want use existing one. yes. drawables constants @ compile time: know exists. so, in application object, create map: public static final map<string, integer> named_resources; static { map<string, integer> m = new hashmap<string, integer>(); m.put(key1, r.drawable.abc); m.put(key2, r.drawable.def); // ... named_resources = collections.unmodifiablemap(m); } now can: btn.setbackgroundimage(application.named_resources.get($abc));

xml parsing - Jquery object innerHTML working in Firefox but not IE? -

in summary have xml string use jquery find children of specific node. these children , values used build html select box , append webpage. the xml <!--- node level !--> <salutation restricted="no" type="dropdownbox" tooltip="select title customer" required="yes" size="6"> <value>mr</value> <value>sir</value> <value>mrs</value> <value>miss</value> <value>lord</value> </salutation> the code function dropdownbuilder( xml, element, id ) { // find node specific name , children selection = $("<div>" + xml + "</div>").find(element).children(); console.log( selection ); // generate select box var selectbox = "<select id=\"" + id + "\"> "; ( var j = 0; j < select...

zurb foundation - Foundation6/Sites Reveal Modal Not Working w/ live example -

example of problem here: http://liveweave.com/frs3pl basically, have modal being triggered dropdown, , reason modal hides behind grey shadow , disappears altogether moment later. what going on here?! you need take revel modal ( <div class="reveal"> ) , of contents , place child of <body> element. don't want contained inside of other elements. <body> <div class="row"> <div class="small-12 medium-3 columns"> <ul class="dropdown menu" data-dropdown-menu="" role="menubar" data-dropdownmenu="3z4e20-dropdownmenu" aria-selected="false" aria-expanded="false" data-is-click="false"> <li role="menuitem" class="has-submenu is-dropdown-submenu-parent is-down-arrow" aria-haspopup="true" aria-selected="false" aria-expanded="false" aria-label="actions" data-is...

javascript - Textarea placeholder with a checkbox -

i'm trying change placeholder of textarea press of checkbox button. can't change. to clear, i'm trying set placeholder not value. my textarea: <textarea name="problem" id="problem" rows="3" class="form-control" cols="45" placeholder="describe ticket reason in few words possible."></textarea> my javascript: <div class="onoffswitch"> <input type="checkbox" onchange="changeplh()" name="onoffswitch" class="onoffswitch-checkbox" value="1" id="myonoffswitch" checked> <label class="onoffswitch-label" for="myonoffswitch"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> </label> <script...

c# - Custom TabControl display issues -

Image
i've been writing custom drawn tab control few days , part pretty , amazing job ... except when use on windows 10 computer (at run-time). i've gone basic few lines of code trace error , can't life of me figure out. below code being used, in nutshell i'm designing horizontal aligned tab control. using system.drawing; using system.windows.forms; namespace windowsformsapplication1.ui { class tabcontroltest : tabcontrol { public tabcontroltest() { alignment = tabalignment.left; sizemode = tabsizemode.fixed; } } } i've added custom tab control form, added couple of group boxes reference purposes , changed background colour of form grey can see tab control. now, at design time 2 group boxes (1 in tab control, 1 on form) align perfectly. but @ run-time see different result. as can see tab part of control larger @ design time , resulting change means contexts of tab have moved. if on wind...

c# - How do I filter db.table by another another column from another table in MVC 5? -

i trying list of new potential borrowers not existing borrowers. have 2 tables in mvc application mapped using ef 5. both tables have field named client_name; var existingborrower = s in db.existingborrower select s.client_name; i can confirm existingborrower.tolist() returns list of items existing borrowers. i can't code below work. trying exclude list of existingborrowers not 1 item. var newborrowers = db.allclients.where(x => !x.client_name.contains(existingclients.asenumerable())); supposing both tables have key of client called 'id' unique , has same value 1 client in 2 tables, or may primary key in 1 table , foreign key in second table: var existingids = db.existingborrower.select(x => x.id).tolist(); var newborrowers = db.allclients.where(x => !existingids.contains(x.id)); this query translate in sql condition where id not in (val1, val2 ,val3, ...)

dictionary - Pythonic way to update nested dictionaries in Python -

i have data this: featurename,machine,licensehost feature1,host1,lichost1 feature1,host2,lichost1 feature2,host1,lichost2 feature1,host1,lichost1 and on... i want maintain nested dictionary first level of key feature name, next machine name, license host, , value number of times combination occurs. something like: dictionary['feature1']['host1']['lichost1'] = 2 dictionary['feature1']['host2']['lichost1'] = 1 dictionary['feature2']['host1']['lichost2'] = 1 the obvious way of creating/updating such dictionary (assuming reading data line line csv): for line in file: feature, machine, license = line.split(',') if feature not in dictionary: dictionary[feature] = {} if machine not in dictionary[feature]: dictionary[feature][machine] = {} if license not in dictionary[feature][machine]: dictionary[feature][machine][license] = 1 else: dictionary[f...

recovery - Git commands fail for some users, but not all -

i git admin in dev group. recently, b trying git pull origin resulting in many errors "refs/tags/... " , "refs/heads/..." not point valid object. so tried fresh git clone , got same errors. the same thing happening couple other users, not all, including myself (i.e. works fine me.) after attempts described below tried actual original error messages b, had tail of long list of messages: ... error: refs/tags/v4.3.0_rev2664 not point valid object! error: refs/tags/v4.6.10 not point valid object! fatal: failed read object 0a628d61199464517a9baaa117092fdd73f2f362: permission denied fatal: remote end hung unexpectedly git did not exit cleanly (exit code 1) (10515 ms @ 01/04/2016 12:35:17 pm) so did research , found this: git refs/remotes/origin/master not point valid object i followed steps in link on remote repository (after making backup copy) , things got better users, not all. currently when b tries git pull current repository gets message: ...

scala - How do I use Spark's Feature Importance on Random Forest? -

the documentation random forests not include feature importances. however, listed on jira resolved , in source code . here says "the main differences between api , original mllib ensembles api are: support dataframes , ml pipelines separation of classification vs. regression use of dataframe metadata distinguish continuous , categorical features more functionality random forests: estimates of feature importance , predicted probability of each class (a.k.a. class conditional probabilities) classification." however, cannot figure out syntax works call new feature. scala> model res13: org.apache.spark.mllib.tree.model.randomforestmodel = treeensemblemodel classifier 10 trees scala> model.featureimportances <console>:60: error: value featureimportances not member of org.apache.spark.mllib.tree.model.randomforestmodel model.featureimportances you have use new random forests. check imports. old: import org.apache.spark.mllib...

html - CSS: Image preview - Circle-to-Rectangle on hover -

Image
this admittedly simple question may have been asked here asked i'm struggling here. what want image has circle preview expands rectangle on hover (it scales). have pretty close center kind of "bobbles" , i'm not fan of empty div approach... .card{ color: #ff2772; border-radius: 15px; margin: 3px 1px; background-color: #2d3034; box-sizing: border-box; width: 300px; min-height: 400px; display: inline-block; transition: .25s; cursor:pointer; text-align: center; border: 1px solid #ff2772; } .button { background-color: #ff2772; color: #fff; padding: 10px 30px; border-radius: 10px; } #seasonone .test { background: url('http://placehold.it/250x200') 50% 50% no-repeat; width: 200px; height: 200px; border-radius: 100%; display: block; margin: 0 auto; transition: .3s; transform: scale(.9); } #seasonone:hover .test { transform: scale(1); width...

Composer SVN dependency error -

i have library classes in svn i've been using composer successfully. today ran problem, composer believes cannot find matching package, though there , composer can find in other circumstances. here composer.json 2 packages in question: { "name": "clx/auth", "repositories": [ { "type": "vcs", "url": "https://svn.example.com/", "package-path": "ldap" } } ], "require": { "clx/ldap": "dev-trunk" } } { "name": "clx/ldap", "repositories": [ { "type": "vcs", "url": "https://svn.example.com/", "package-path": "clxmsg" }, { "type": "vcs", "url": "https://svn.example.com/", ...

design patterns - JavaScript Independent Modules -

i have several modules in application , global variables. 1 module may require methods other modules work , global variables. how can organise code modules won't use methods other modules or global variables ? //global variables needed in both of modules. var a, b; //video module var video = (function() { //requires method user module: if(user.has_liked_video()) { //do smth. } //requires global variables return {} })(); //user module var user = (function() { //requires method video module: if(video.exists()) { //do smth. } //requires global variables return {} })();

ios - Set UINavigationItem title before viewWillAppear -

this point: i'm writing app "builds itself" reading configuration file. need create uitabbarcontroller contains several uinavigationcontroller s respective rootviewcontroller . since app doesn't know viewcontroller titles, need programmatically set them (from appdelegat e) before viewwillappear: method fired. if set title in viewwillappear method, first v.c. in tabbarviewcontroller show name in tabbar . what's proper way this? based on many assumptions trying achieve, think doing in application:didfinishlaunchingwithoptions: method of appdelegate should work: uitabbarcontroller *cont = [[uitabbarcontroller alloc] init]; (int i=0; i<controllers_count; i++) { uinavigationcontroller *navcont = [[uinavigationcontroller alloc] init]; navcont.title = title_here; [cont addchildviewcontroller:navcont]; } [self.window setrootviewcontroller:cont];

Android keyboard not showing when clicking on input in webview -

i have custom webview implemented in android app. if touch input or text area inside webview soft keyboard doesn't show up. have not overriden touchlisteners in webview nor did change in manifest. can me figure out why keyboard doesn't show? my layout code: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".mainactivity"> <android.support.v4.widget.swiperefreshlayout android:id="@+id/swiperefreshlayout" android:layout_width="match_parent" android:layout_height="match_parent"> <nl.aegee.enschede.android.aegeewebview android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_pa...

version control - How to enable merging a pull request in Github after one or more people approved the code? -

i'd give our github users rights approve prs without using administration rights. flat organization , not want have special person can approve code. ideally pull request can close automatically when 1 (or better 2 people) not person started pull request says "that's good". people in hurry (or perceived urgency) , end closing pr before @ least person reviewed code. is there script can this?

osx - Weird lldb behavior (comparing to gdb) C -

i come freebsd , i'm used debug gdb, unfortunately, gdb not natif on macbook, wanted debug using lldb. unfortunately, don't understand weird behavior : when launch c program , breakpoint on 1 function, , launch using "run", go breakpoint appears can read through in assembly code = hard debuging, not in gdb straight line line => easy debuging look @ .c, (i know code awful it's not point, it's trying set lldb properly) int ft_count_point(char *m, int i) { int count; int count_c; count = 0; count_c = 0; while (m[i] != '\0' || (m[i] != '\n' && m[i + 1] != '\n')) { if (m[i] == '.') { count_c++; count++; } if (m[i] == '\n' || m[i] == '#') count++; i++; } if (count != 20 && count_c != 16) return (1); exit (0); } the main function contains call on fonction , return 0. ...

ruby - Why can't RSpec find the Airbrake env keys in a test involving Sidekiq when I specify environment? -

here setup: airbrake.rb require 'airbrake' airbrake.configure |c| c.ignore_environments = [:test, :development] c.project_id = env['project_id'] c.project_key = env['project_key'] end use airbrake::rack::middleware spec_helper.rb rspec.configure |config| config.before(:suite) factorygirl.reload factorygirl.define to_create { |instance| instance.save } end databasecleaner.strategy = :transaction databasecleaner.clean_with(:truncation) airbrake.configure(:test) |c| c.project_id = env['project_id'] c.project_key = env['project_key'] end end config.around(:each) |example| databasecleaner.cleaning example.run end end config.include factorygirl::syntax::methods end worker_test_spec.rb require 'spec_helper' rspec.describe notificationworker "perform should call airbrake#notify" anotification_worker = lnotificationworker.new airbra...

Modify Twitter login text on Android -

Image
i used twitterloginbutton provided fabric, has login ui this: how can change the text says: authorise created fabric (username)-projects:(package name) on android use account. to real app name, not package , fabric username? thank you! this can changed on website fabric.io. after login, select correct project top let corner, , see "edit" link let modify project name

c++ - [unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc.so' : file not found but file exist -

i use ubuntu 15.10 64bit. try run game server. alredy install libmyodbc locate in use/lib/x86_64-linux-gnu/odbc/ have use ln s command create shot link in use/lib when start server message appear. have changed driver url use/lib/x86_64-linux-gnu/odbc/ no effect here odbc file in etc/odbc.ini [odbc data sources] odbcname = myodbc 3.51 driver dsn [tlbbdb] driver = /usr/lib/libmyodbc.so description = myodbc 3.51 driver dsn server = 127.0.0.1 port =3306 user = root password = 123123 database = tlbb option = 3 socket =

Python formatting error -

what issue? tried looking tabs, see none. file "/home/pi/jasper/client/modules/wikipedia.py", line 24 mic.say("okay, me up?") ^ indentationerror: unindent not match outer indentation level """ responds user-input, typically speech text, relaying entry wikipedia. arguments: text -- user-input, typically transcribed speech mic -- used interact user (for both input , output) profile -- contains information related user (e.g., phone number) """ mic.say("okay, me up?") def saydefinition(text): mic.say(mic.say(wikipedia.summary(text, sentences=2))) saydefinition(mic.activelisten()) indentation of doc-string should same next lines: """ responds user-input, typically speech text, relaying entry wikip...

haskell - Dynamic Event Switching in Reactive-Banana -

i working on small game utilizing reactive banana , sdl. since goal learn more reactive banana , frp, attempted use dynamic switching set collection of game objects, without success far. in bartab example, example uses event switching i've found, event triggers creation of new entry in collection acquired outside event network instead of using internal event. question is: way or special case example? are there more examples of dynamic event switching being used in reactive banana? from understand moment t (anytime behavior a), use execute create event t (anytime behavior a), in turn used update behavior carrying collection. moment t (anytime behavior a) created using trimb on behavior created triggering event. if triggering event originates in event network, doesn't compile error message "could not deduce (t ~ t1)". i'm not sure ~ means, throws error because 2 frameworks values (t) of event network , new moment value different. so, long story short, do...

c# - vshost.exe still running after uncheck Enable the Visual Studio hosting process in VS2015 -

Image
i have problem vshost.exe on running test cases using standalone test runner. vshost.exe still running after i've done following: clear bin/debug folder of project. uncheck " enable visual studio hosting process ". restart visual studio. build project. run test runner. what else miss kill vshost.exe. response appreciated. from comment56995746 , guesses either didn't save settings, or didn't rebuild, rather build, project that's because compiled bits actually reside in obj folder (and copied bin ) didn't clean. rebuild makes vs disregard them.

android - Socket Connection always returns true even if Port is not open (Port Scan) -

question: i have for statement , calls method different ip addresses (ranging 10.0.0.1 10.0.0.255 because don't have ip scanner) . method future callable , returns boolean true or false. function of method make socket , connect socket given ip & port + timeout, , return true or false based on if given ip address, has port open or not. my plan : i'm trying check if device connected same wifi network has open port (ssh port) can ssh device without knowing it's ip-address. idea private ip-address of android device, check if equal common private ip-address (for example 10.0.0.*) , scan it's ip-range (from 10.0.0.1-255) open ssh port (22). todo: get ip android device ( checked ) filter it, if private ip starting "10." && "10.0.0." or "192." && "192.168." , on ( checked ) check if port 22 open or not on range "10.0.0.1-255" or "192.168.1.1-255". ( current ) i used code here por...

How to config CloudFront Amazon prevent download content -

please guide me config cloudfront, not users download, want set on domain want. i've learn through policies of s3. s3 successful prevent domain, not work cloudfront though have check yes, update policy , bucket ... if please me specific images. in advance ...

ruby on rails - Read data image, upload from web and save them in a database -

i'm newest in ruby on rails developpement , best way save pictures/image controller of web page. try this: @fin = file.open(params[:photos] , "rb") @img = @fin.read i think have understand reasoning. @ end want able save picture database. i recommend use gem carrierwave: https://github.com/carrierwaveuploader/carrierwave you should not save picture database. instead should store image on sort of other datastore , put pointer in database. carrierwave makes easy , has different adapters store images on local filesystem, s3, sftp, or nfs. thoughtbot's paperclip alternative: https://github.com/thoughtbot/paperclip

visualization - D3.js with hyperlinks in tooltips. -

i've followed tool tip example here data visualizations book , hoped create d3.js graph utilises hyperlinked content in tooltips. i able add hyperlinks @fernoftheandes jsfiddle version of visualisation. hyperlinked version here . but more real world example of scatterplot hyperlinked tooltips not working. seem hrefs being added dom correctly, preventing links being selected. this how tooltip looks after cursor hovers on 1 of points in scatterplot: <div id="tooltip_svg_01" style="opacity: 1; left: 532.874px; top: 168px;"> <p><strong>important label heading</strong></p> <p><span id="value_tt_01">0.11318094,79</span></p> <p><a id="link_tt_01" href="https://en.wikipedia.org/wiki/2">0.11318094,79</a></p> </div> ...

jboss5.x - Config file not found run.conf.bat in jboss eap 5.1 -

when try start jboss eap 5.1 through command prompt(cmd) in windows got following error. config file not found run.conf.bat please check in bin directory when running script. how can overcome error

Java & MySQL - Create a login authentication -

i have connected java app mysql, , want user input username , password. send query mysql , spot username, , compare password given, password in database. , part, works. let's username "abc" , password "def". if when prompted username, , typed "abc def" saying successful, same password of "def a". believe problem rs.next(), , checking text before space. any ideas solutions? string databaseusername = ""; string databasepassword = ""; // check username , password system.out.print("enter username: "); string name = sc.next(); system.out.print("enter password: "); string password = sc.next(); // create sql query statement stmt = connection.createstatement(); string sql = "select * users users_name='" + name + "' && users_password='" + password+ "'"; resultset rs = stmt.executequery(sql); ...

sql server - How to read Db name within .bak file? -

i have sampledb.bak file. possible read db name within .bak file without restoring? below query give logical file(data file , log file) name of backup. restore filelistonly disk = 'd:\mybackups\backup.bak' fore more info on filelistonly

c# - How to allow the service to install without prompting for the User ID, Password, Confirm Password -

when try install service (installutil service.exe) visual studio command prompt, prompts set user id, password install service. can refer screenshot(link) of credential prompt. picture of prompting credentials while installing service. this done in c#.net .net 4.0 framework. i have searched prior posting question , end-up setting credentials null (please refer code pasted below). didn't work. private void initializecomponent() { this.stockmanagementprocessinstaller1 = new system.serviceprocess.serviceprocessinstaller(); this.stockmanagementinstaller1 = new system.serviceprocess.serviceinstaller(); // // stockmanagementprocessinstaller1 // this.stockmanagementprocessinstaller1.password = null; this.stockmanagementprocessinstaller1.username = null; // // stockmanagementinstaller1 // this.stockmanagementinstaller1.displayname = "stockmanagement"; this.stockmana...

jquery - Auto calculation using javascript -

<html> <head> <meta charset="utf-8"> <title></title> <script> var form = document.forms.myform, qty = form.qty, cost = form.cost, output = form.textbox; window.calculate = function () { var q = parseint(qty.value, 10) || 0, c = parsefloat(cost.value) || 0; output.value = (q * c).tofixed(2); }; </script> </head> <body> <form action="caltest.php" method="post" name="myform" onkeyup="calculate()"> <label>num of pax :</label> <input type="text" name="qty" /> <input type="hidden" name="cost" value="700" /> <br/> <lable>total price: ...

c# - Simple WCF service throwing 404 not found error -

i trying create simple wcf service interact javascript ajax calls (rest), not working me, seems i'm lost: service interface using system; using system.collections.generic; using system.linq; using system.runtime.serialization; using system.servicemodel; using system.servicemodel.web; using system.text; namespace wcf.app { [servicecontract] public interface iservice1 { [operationcontract] [webget( uritemplate = "getdata/{value}", responseformat = webmessageformat.json, bodystyle = webmessagebodystyle.wrappedrequest)] string getempdata(string value); } } implementation: using newtonsoft.json; using system; using system.collections.generic; using system.data.sqlclient; using system.diagnostics; using system.linq; using system.runtime.serialization; using system.servicemodel; using system.servicemodel.web; using system.text; namespace wcf.app { public class clocked { pub...

javafx - How to convert a java application to an executable file? -

i'm using launch4j create .exe file, when apply conversion method java project 1 package, works, once gather many projects in 1 main project many packages, creates .exe file, doesn't work @ all, .jre works though. what solution make main project's. exe file works? why not try pack jar file. it available pack multi class files jar. then can double click or call use it. https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html

How to track closing of browser process opened via winform application? -

i have winform application , opening browser process url. want update data on winform application on close of opened browser window. i tried process.hasexited, not working. not able find processid of browser processs in process.getprocesses.

html - Div's are over lapping? -

i'm trying make menu box , video box video box overlapping menu div's here code. <!doctype html> <html> <!doctype html> <html> <head> <meta charset="utf-8"> <title>untitled document</title> <style> .colm-1 { float:left; display:block; } .my-video-box { width:300px; height:300px; background:#f00; } </style> </head> <body> <!--- menu box ---> <div class="colm-1">colm 1</div> <div class="colm-1">colm 1</div> <div class="colm-1">colm 1</div> <!--- video box ---> <div class="my-video-box"></div> </body> </html> my menu div's floating left while i'm not floating video div/box. when use float in div's try use cl...

scala - How to pass scalacOptions (Xelide-below) to sbt via command line -

i trying call sbt assembly command line passing scalac compiler flag elides (elide-below 1). i have managed flag working in build.sbt adding line build.sbt scalacoptions ++= seq("-xelide-below", "1") and it's working fine when start sbt , run following: $> sbt $> set scalacoptions in thisbuild ++=seq("-xelide-below", "0") but know how pass in when starting sbt, ci jobs can use while doing different assembly targets (ie. dev/test/prod). one way pass elide level command line option use system properties scalacoptions ++= seq("-xelide-below", sys.props.getorelse("elide.below", "0")) and run sbt -delide.below=20 assembly . quick, dirty , easy. another more verbose way accomplish same thing define different commands producing test/prod artifacts. lazy val elidele...

sql - How to compare two tables in Postgresql? -

i have 2 identical tables: a : id1, id2, qty, unit b: id1, id2, qty, unit the set of (id1,id2) identifying each row , can appear once in each table. i have 140 rows in table a , 141 rows in table b . find keys (id1,id2) not appearing in both tables. there 1 sure there can't more (for example if each table has whole different data). i wrote query: (table except table b) union (table b except table a) ; but it's not working. compares whole table don't care if qty or unit different, care id1,id2 . use full outer join: select a.*,b.* full outer join b on a.id1=b.id1 , a.id2=b.id2 this show both tables side side. gaps there unmatched row. select a.*,b.* full outer join b on a.id1=b.id1 , a.id2=b.id2 a.id1 null or b.id1 null; that show unmatched rows. or can use not in select * (id1,id2) not in ( select id1,id2 b ) that show rows not matched b. or same result using join select a.* left outer join b ...

python - imagefield never upload in my template -

i user django, create dynamic blog site dadabase , templates htmal/css upload new post fine. now want upload on post images create new field in database image1 = model.imagefield(upload_to="/images/imagethumb/") i can login admin , create new post photo photo never see template. from research in internet, think problem in settings.py or upload_to media_root , media_url , apache folder.my /images/imagethumb/ must in media folder? add following in settings.py file media_root = os.path.join(base_dir, 'media') media_url = '/media/' create 'media' in project @ same level 'manage.py'. add following line @ end of project urls.py file. urlpatterns += static(settings.media_url, document_root=settings.media_root) now image stored in /media directory. can access following path /media/image.png it if share directory structure well. mysite your_app mysite urls.py media manage.p...

mysql - PHP : Getting link to image uploaded to directory -

i adding posts in database , against each post there image. example there product table , against each product i've id, quanitity , price. now store image in if ( isset($_post["uploadimg"]) ) { $file_name =$_files["image"]["name"]; $file_type=$_files["image"]["type"]; $file_size=$_files["image"]["size"]; $tmp_name=$_files["image"]["tmp_name"]; if ( $file_name ) { if ( move_uploaded_file($tmp_name,"images/$file_name") ) { // here } } } fetch $folder = "images"; if ( is_dir($folder) ) { if ( $handle= opendir($folder) ) { while (($file= readdir($handle))!=false) { if($file==='.' || $file==='..') continue; echo '<img src="images/'.$file.'" width="100" height="100" >'; } closedir($handle); ...

android - How can i set my selected image from gallery to my application in imageview via share option. -

i building application in can share photo gallery application, same concept of 'pinterest'. undergoes through login gateway , if user login set selected image imageview or either login continue same. share option directly share menu of phone gallery see in listview when click on share option in gallery i.e.,mail, bluetooth etc. i want know,how can set selected image imageview of application after login via share option gallery. i got answer :) can done using intent : intent intent = getintent(); // action of intent string action = intent.getaction(); // type of intent (text or image) string type = intent.gettype(); // when intent's action 'action+send' , tyoe not null if (intent.action_send.equals(action) && type != null) { if (type.startswith("image/")) { // when type 'image/*' handlesendimage(intent); // handle single image being sent } } private void handlesendimage(intent intent) { // image ur...

objective c - How to make the framewok made for public use in iOS? -

i had build framework want release publicly other framework facebook , other. need know steps same. according understanding need build using distribution. , right click on product -> show in finder. other question need create seprate distribution profile it. thanks in advance :)

How to Catch Events when drawing a polygon on Google Maps Data Layer -

when drawing polygon on google maps data layer, want handle events when user draws first point, second , subsequent points ui can give different user guidance such as: no points drawn : "click draw first point" first point drawn: "click draw next point" second point drawn: "click add point or click on first point end" when closing point drawn on data layer using data library there 'addfeature' event. when final point drawn using drawing library there different events such polygoncomplete. to see if events emitted first, second , subsequent points, used google sample code display events , modified handle drawing events on data layer. new events are: 'addfeature': 'data layer event', 'click': 'data layer event', 'dblclick': 'data layer event', 'mousedown': 'data layer event', 'mouseout': 'data layer event', 'mouseover'...

angularjs - How to continue promise chain after retry? -

i'm using restangular make multiple calls backend, have dependency on result of first call execute subsequent calls. i'm trying setup retry logic follow on requests executed after retry succeeds. here's code far: reefservice.creategitlabproject(formdata) .then(function(apiresponse) { $scope.apistatus.messages.push({'direction': 'in', 'body': apiresponse.result}); $scope.progressvalue += 1; var gitlabproject = { 'id': apiresponse.data.id, 'http_url_to_repo': apiresponse.data.http_url_to_repo, 'ssh_url_to_repo': apiresponse.data.ssh_url_to_repo }; // add deploy key reefservice.addgitlabdeploykey(gitlabproject) .then(function(apiresponse) { $scope.apistatus.messages.push({'direction': 'in', 'body': apiresponse.result}); $scope.progressvalue += 1; }) .catch(function(apierror) { $scope.apistatus.errors.push(apierror...

jquery - Download file from different origin using POST request -

i'm trying prompt download request service different ui service (different domain). trying using $.post(url, {param1: 'param1val', param2: 'param2val'}) the server returns csv file headers i receive response csv text , not sure how (if can) make being saved file. clarification might help: response server future(ok.chunked(rowenumerator.andthen(enumerator.eof)) .withheaders(("content-description", "file transfer"), ("content-transfer-encoding", "binary"), ("access-control-allow-origin","*")) .as("text/csv").withheaders(content_disposition -> s"attachment; filename=resp.csv", content_type->"application/x-download")) it seems problem $.post using ajax , looks impossible download file way. solution dynamically creating form element on document body attributes correspond the data attempting send in $.post. var form = document.createeleme...

Capturing content between square bracket tags in PHP -

i want put content bracket defined tags in text below , put of them array, attempts in php , preg_match function has been failed many times. should in php using preg_match function? $string="[restab title="name"]john o'brian[/restab][restab title="telephone"]+15254636544[/restab][restab title="address"]newyork, wallstreet ave, no 5[/restab]" you might looking this: preg_match_all('/\[[^]]+\]([^[]+)\[\/[^]]+\]/is', $string, $matches); this gives following results: array(2) { [0]=> array(3) { [0]=> string(42) "[restab title="name"]john o'brian[/restab]" [1]=> string(47) "[restab title="telephone"]+15254636544[/restab]" [2]=> string(62) "[restab title="address"]newyork, wallstreet ave, no 5[/restab]" } [1]=> array(3) { [0]=> string(12) "john o'brian" [1]=> string(12) ...