Posts

Showing posts from January, 2013

c# - Updating Entity Framework without Nuget from Vs2010 to Vs2015 -

just started working @ company planning on taking existing project , revamping it. project windows form built in c# , communicates app windows mobile 6.5, relays information app database management application. uses .net 4.0 entity framework 4.0. i going working on , first thing migrate project vs2010 vs2015; however, whenever try directly, have errors show references missing. have double checked .net targets projects in solution , match. i have tried going vs2010 vs2012 take step @ time; however, same errors show before. i have tried: setting targets each project in solution installing nuget, cannot find entity framework in porject package manager console, can never find version of entityframework when get-package typed package manager console, no packages installed returns installing manually, there no entityframework.dll in solution folders this project have entity framework system.data.entity included , looks of it, has entity framework api , calls. specific e

html - Responsive div is taller than 100% when I flip my smartphone to landscape. How to fix it? -

here html code divs (parent/child): <div id="header"> <div id="elements"> <img style="margin: auto" class="img-responsive" src="https://s20.postimg.org/59ntjyiot/arvan_tourism_logo_web.png" alt="arvantourismlogo.png"> <p style="font-size: 2.5em; color: white">arvan tourism</p> <p style="font-size: 1.5em; color: white">explore our wonderful albania.</p> <button id="whatweofferbutton" class="btn btn-success" style="margin-top: 5px"> offer? </button> </div> </div> here css code: #header { box-sizing: border-box; background-image: url("https://s20.postimg.org/o8ddqmo7x/blue_eye.jpg"); background-size: cover; background-position: center; width: 100%; height: 100%; display: table; } #elements { display: table-cell; text-al

mysql - Group Concat in one column with multiple values -

Image
i need print select values in 1 column, here data: mysql> select date_format(str_to_date(items.date, '%y-%m-%d'), '%m %d, %y') date_new, unit, descpt, p_cost, add_by, group_concat(color,' = ',qty) color, sum(qty) total, sum(qty) * p_cost ptotal items status in ('1','2') group descpt; +---------------+------+------------------------+--------+--------+------- ------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --+-------+--------+ | date_new | unit | descpt | p_cost | add_by | color | total | ptotal | +---------------+------+------------------------+--------+--------+---- -----------------------------------------

cmd - Batch copy multiple files from different folders with their paths listed in a txt file, and rename any duplicates -

i've been trying tackle problem few days no avail. have no programming experience whatsoever , task has been driving me nuts. i have txt file has list of paths files need copied. 8000 paths in file. copying each item isn't such big deal can add copy command , destination before/after each path. the crux of issue many of these files have same filename , when they're in different directories it's not problem. however need files in same destination folder , keeps overwriting itself. to sum up, have .txt file looks this: d:\big folder\folder\subfolder a\filea.file d:\big folder\folder3\subfolder za\filek.file d:\big folder\folder\subfolder ds\filed.file d:\big folder8\folder\subfolder p\filea.file... i need tool let me copy of these files 1 destination folder, , make sure duplicates renamed aren't overwritten. such filea.file , filea.file become filea.file , filea1.file edit: far i've come with for /f "tokens=* usebackq"

sql server - T-SQL - Is this possible (solve) -

i have problem solve language i'm familiar with. use sql therefore wondering if there following issue: the following word: capricorn substitutes: a = @ = ! o = 0 (zero) i must find combinations of spelling capricorn , without substitutes could point me in right direction of use or solution? kind regards this cartesian product or cross join in sql. select cast('c' varchar(50)) + +'pr' +i + 'c' + o + 'rn' (values ('a'), ('@')) t1(a) cross join (values ('i'), ('!')) t2(i) cross join (values ('o'), ('0')) t3(o)

php - Typecasting a boolean operation to a boolean results in false -

in php, when typecasting boolean operation returns true , reason interpreter typecast false . why this? take following example: (bool) 1 === 1 // false (bool) (1 === 1) // true this operation should return true , reason returns false . when adding parentheses work correctly. explain why is? i'm using php 7.0.8 it's order of operations. first statement evaluates bool before equality check (bool) 1 === 1 same ((bool) 1) === 1 whereas (bool) (1 === 1) evaluates inside of parenthesis first. 1 isn't same thing true .

sql - Best way to 'flatten out' tables with relationship information? -

i have 1 table, relationships, structured relationships ------ relationship employer_id employee_id 10000 10020 10021 10001 10019 10020 10002 10021 10018 where relationship between employer , employee uniquely identified relationship column. employee can have multiple employers, , employer can have multiple employees. each person has own unique id -- can appear multiple times in both employer , employee id fields. and table, review, structured so. meetings review ------ meeting attendee_id 10000 10020 10000 10019 10001 10018 10001 10021 this table shows list of meetings , attendees. 2 people can attend meeting -- each meeting attendee, meeting, represented once in attendees field. ids in attendee field can joined ids in employer/employee field in relationships table. i'd result set following -- each row unique meeting, , have identified relationship between 2 meeting attendees using 2 separate col

Retrivieng specific occurrences of a given Regex with Oracle SQL -

in simplified form, i'm attempting retrieve either first occurrence of '.*?=(.*?);.*' regex, or second, or third -- is, either x or y or z (that is, want able hardcode in query want first, second or third values) in following example: select regexp_replace( 'margin=x;margin=y;margin=z;', '.*?=(.*?);.*', '\1', 1 -- occurrences. thought picking 1, 2 or 3 solve problem? ) dual; -- returns "xyz", terrible. expecting return "x", in case. looking @ oracle documentation, thought relatively straightforward, last parameter (occurrences), apparently allows me select groups take consideration. doesn't! why? thanks i´m goingoff completly different solution. combining hierarchial substring select regexp_replace option needs? this way create option either select 1 or multiple values, depending on needs. wouldn´t need write concatinating regex value , adjust select bit more needs select regexp_replace(subs

php - Composer installation failed "requirements could not be resolved to an installable set of packages." -

Image
i trying install braunson/fatsecret package php composer on local xampp installation. https://packagist.org/packages/braunson/fatsecret-laravel when try install following command: php composer.phar require "braunson/fatsecret:dev-master" the installation fails, , following message: your requirements not resolved installable set of packages. i have installed composer (in opinion) correctly in /applications/xampp/htdocs/my-folder/ documentation says: php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'installer verified'; } else { echo 'installer corrupt'; unlink('composer-setup.php'); } echo php_eol;" php composer-setup.php php -r "unlink('composer-setup.php');"

.htaccess - Htaccess url redirecting error -

i have following structure in htaccess file. issue if uri matches condition url redirect according rule , if uri doesn't match default rule should apply, please tell me how fix. first rule: redirectmatch 301 /mob/(.*) http://www.newdomain.com/price/$1 default rule: redirectmatch 301 /(.*) http://www.newdomain.com/$1 when tried default rule overriding other rules. assuming both domains on same root folder , host: rewritecond %{http_host} ^originaldomain\.com$ rewritecond %{request_uri} ^/cms rewriterule ^(.*)$ https://differentdomain.com/$1 [l,r=302] if not on same root , folder: rewritecond %{request_uri} ^/cms rewriterule ^(.*)$ https://differentdomain.com/$1 [l,r=302] 2nd part if url not act, url, system or post: rewritecond %{the_request} !^[a-z]{3,}\s/(act\?(.*)|url|system)$ [nc] rewritecond %{the_request} !^post [nc] rewriterule ^(.*)$ http://originaldomain.com/$1 [l,r=302] should work, if after test change 302 301 if needed.

jasper reports - How to format java.time.LocalDateTime and java.time.LocalDate with pattern? -

in following snipped property $f of class java.time.localdatetime or java.time.localdate . <textfield pattern="ee. dd.mm.yyyy"> <reportelement...> </reportelement> <textfieldexpression><![cdata[$f{thelocaldatetime}]]></textfieldexpression> </textfield> how can format property textfield pattern in jasper reports? to use pattern attribute in current version of jasper-report date/time object need java.util.date class or 1 of it's subclasses. the solution convert java.time.localdate , java.time.localdatetime converting java.util.date from java.time.localdate <textfield pattern="ee. dd.mm.yyyy"> <reportelement...> </reportelement> <textfieldexpression><![cdata[java.util.date.from($f{thelocaldate}.atstartofday(java.time.zoneid.systemdefault()).toinstant())]]></textfieldexpression> </textfield> from java.time.localdatetime <

autocomplete - Struts2 jQuery autocompleter not working -

Image
currently doing struts up-gradation task (struts2.0 struts2.5). want replace struts dojo tag struts-jquery. here facing issue when replace struts-dojo autocompleter struts-jquery autocompleter. getting below response server : [ { "firstname": "bulwark technologies llc", "partnerid": 925 }, { "firstname": "bulwark technologies llc1", "partnerid": 926 }, { "firstname": "bulwark technologies llc2", "partnerid": 927 } ] for displaying @ client side using struts2-jquery-autocompleter - <sj:autocompleter href="%{urlpartnerlist}" list="%{partnernamelistbeanstruts2}" listvalue="firstname" listkey="partnerid"/> i getting "undefined (multiple times - based on result found in query @ server side)" in textbox. could 1 please here? in advance. my suggestions in comments lead in wrong direc

php - UPDATE parts of JSON doc with JSON_SET() instead of setting whole doc new -

i want update parts of json doc inside mysql database table. the field name in database: jdata the problem i do not want set jdata = '{_whatever_}' , because loose keys. i need preserve existing keys (e.g. key1 , key3 ) , set key2 new designated value 999 . the json doc { "calculation":{ "key1": 100, "key2": 200, "key3": 300 } } the php/mysql $a = json_encode(['key2' => 999], json_unescaped_slashes); $sql = " update svtr.auftrag set jdata = json_set(jdata, '$.calculation', '{$a}') where[...] "; using full path so: json_set(jdata, '$.calculation.key2', 999) no option here, since original json doc more complex , have iterate many keys. think of having 30 key/value pairs , needing update 29 of them. hope can make sense of ramblings ... in advance! seems getting jdata fine, somehow like $jdata = 'select jdata yourtable co

How Can I Turn This Javascript Code Into Phaser Code? -

if(mouse.x && mouse.y) { mygameball.x = mouse.x; mygameball.y = mouse.y; } how can turn javascript code phaser code? you can use game.input , this create = function() { // .. this.game.input.addmovecallback(this.domygamemousemove, this); } domygamemousemove = function(evt) { if (evt.isdown) { mygameball.x = evt.x; mygameball.y = evt.y; } }

mysql - Find number of users count in a day who visit the url -

Image
i need query fetch 'number of different users count' in day visit url. structure of table and try query select distinct `userid`,`url`, from_unixtime(`time`,'%y-%m-%d') date,count(`userid`) usercount `mdl_log` group from_unixtime(`time`,'%y-%m-%d') but not work. please me correct query. use disinct , count together select count(distinct `userid`) usercount,`url`, from_unixtime(`time`,'%y-%m-%d') date `mdl_log` group from_unixtime(`time`,'%y-%m-%d')

c - sizeof(Array_Name) inside main function VS sizeof(Array_Name) inside a user defined function -

this question has answer here: why isn't size of array parameter same within main? 13 answers sizeof(array_name) when used in side main function returning number of bytes of array, while when used inside userdefined function retures size of pointer (and because passed function pointer). my question that, why when sizeof(array_name) used inside main, not treated pointer? this because array names decay pointers when passed functions. example int main() { int arr[3] = { 1, 2, 3 }; printf("main: %zu\n", sizeof(arr)); f(arr); } void f(int *ptr) { printf("%zu", sizeof(ptr)); } output: main: 3 * sizeof(int) f: sizeof(int *) (where sizeof... replaced actual value on compiler) also, doesnt depend on whether array declared in main or not. rule more general: in function array declared, treated actual array. when pa

javascript - refactor angular-route to angular-ui-router -

i've created single page application using ngroute so: index.html (ngroute) var smalltalkzmodel = angular.module('smalltalkzmodel', ['ngroute']); smalltalkzmodel.config(function($routeprovider) { $routeprovider .when('/', { templateurl : 'components/login/loginview.html', controller : 'logincontroller' }) .when('/chat', { templateurl : 'components/chat/chatview.html', controller : 'chatcontroller' }); }).run(function ($rootscope) { // app loading, set isapploading true , start timer console.log($rootscope); $rootscope.isapploading = true; });; small-talkz.model.js (ngroute) <div ng-app="smalltalkzmodel" > <div ng-view> </div> </div> then heard better use ui.router because 3rd party have more capabilities , can ngroute , more , supported in future version of angular js... so, tried refactore cod

asp.net web api - Identify the starting point resource for REST service -

Image
i creating asp.net web api service maze game. users should cells details in maze visualize maze in 2d plane. achieving using method public list<cell> get() user should details of cell giving cellid input. achieving using method public cellrepresentation get(string id) . note cellrepresentation used return hypermedia links using webapi.hal . these links represent target cells possible movements up, down, left , right. now, need way communicate starting point cell users start game. [in following maze , cell “10” starting point]. rest based way send message? controller public class cellscontroller : apicontroller { public cellscontroller() { } //get cells in maze public list<cell> get() { maze m = new maze(); return m.getcells(); } //get specific cell public cellrepresentation get(string id) { maze m = new maze(); cell c = m.g

javascript - Display popup message when the number of a group of cells equals number of another group of cells -

Image
i'm looking script displays popup message when number of yellow cells equals number of red cells. i've include picture of concept below. appreciated. hope classes of individual coloured blocks red_block , yellow_block setinterval(function(){ var reds = document.getelementbyclassname('red_block') var yellows = document.getelementbyclassname('yellow_block') if(reds.length == yellows.length){ alert("what ever") } }, 1); document.getelementbyclassname return array of element having class giving timeinterval 1ms check values every moment

.htaccess - Rewrite conditions in htaccess -

i'm trying create sitemap multistore magento website. each shop-view has it's own sitemap. therefore have made sitemap/store_en/sitemap.xml sitemap/store_de/sitemap.xml sitemap/store_nl/sitemap.xml what i'm trying achieve redirect on request of mydomain.nl/sitemap.xml mydomain.nl/sitemap/store_nl/sitemap.xml this have put in htaccess file. doesn't work. can see i'm doing wrong? ##rewrite rule de sitemaps rewritecond %{http_host} ^.*mydomain.nl$ rewriterule ^sitemap.xml$ /sitemap/store_nl/sitemap.xml [nc] i have rewrite rule. don't know if of influence... rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !(.*)/$ rewritecond %{request_uri} !(.*)\.(html|shtml|php)$ rewriterule ^(.*)$ http://%{http_host}/$1/ [l,r=301] thanks in advance! directives mod_rewrite read , processed top bottom. in case had redirect in top. rules matches (sitemap.xml not file, or directory,

psql - Retrieving json data that contains special characters -

it looks psql db contains badly formatted json fields, hence cannot retrieve data using ->> operators. i have table column "reputation" of type json. i perform query "reputation" column specific object: select reputation hashes sha1='c1b5684e132a85d18a35ddb98233cc2b71efcf0e' i receive following result looks json formatted escape characters: "{\"status\": \"malicious\", \"scanner_match\": 33, \"first_seen\": \"2010-05-27t09:00:27\", \"scanner_count\": 34, \"last_seen\": \"2010-05-27t09:00:27\"}" however, when i'm trying specific field in json, receive nothing: select reputation->>status hashes sha1='c1b5684e132a85d18a35ddb98233cc2b71efcf0e' i tried following query check how psql handles json , received error: select * json_each((select reputation hashes sha1='c1b5684e132a85d18a35ddb98233cc2b71efcf0e')); error: cannot

webpack - How to create common.css file and use postcss only? -

this current webpack config – https://gist.github.com/lavezzi1/1179d91c584c0b0a7544c862c8bb07ca as can see multipage app , faced few problems. i want compile 2 files each page: common.css (css file common styles) , index.css (for example css file individual styles index page). how can that? tried commonchunks plugin generates common.js file, not css. found workaround how make it, import main.css file directly in entry js file of each page. makes problem, describes below; i want use postcss without preprocessors. possible? when import main.css directly in js file postcss plugin doesn't work (code doesn't compile) tested postcss-nested plugin works fine inside of *.vue file. how fix that? i stuck it. hope help. thanks! have tried add !postcss-loader after !css-loader ? the net result be: loader: extracttextplugin.extract('style-loader','css-loader!postcss-loader?sourcemap!sass-loader')

git - Automatically Fetch Branch, Run Script, and Push to Other Branch -

i automatically copy develop branch second branch, let's call clean , whenever update first branch develop . new , changed .py files in clean branch processed script autopep8 , pushed. i figured maybe use github's webhooks listen events on specific branch, not sure how deploy script. is this right way approach problem or there easier way automatize style-based cleaning version? goal keep dirty version commented-out code , custom quirks, while delivering clean version - tested separately. “i choose lazy person hard job. because lazy person find easy way it.” —bill gates you using webhooks , github api, feel using git hooks might more efficient way of approaching problem. issue doing way required add hook new clone of repo, hooks not shared between clones.

c++ - how to query if(T==int) with template class -

when i'm writing function in template class how can find out t is? e.g. template <typename t> ostream& operator << (ostream &out,vector<t>& vec) { if (typename t == int) } how can write above if statement works? something this: template< class t > struct typeisint { static const bool value = false; }; template<> struct typeisint< int > { static const bool value = true; }; template <typename t> ostream& operator << (ostream &out,vector<t>& vec) { if (typeisint< t >::value) // ... }

Uber SSO login issue in iOS 8 Swift 2.2 -

i trying integrate uber ride sdk in app. use code add uber login button whiteloginbutton = loginbutton(frame: cgrectzero , scopes: [.profile, .places], loginmanager: loginmanager(logintype: .native)) whiteloginbutton.presentingviewcontroller = self whiteloginbutton.delegate = self whiteloginbutton.colorstyle = .white blackview.addsubview(whiteloginbutton) and delegation use extension viewcontroller : loginbuttondelegate{ func loginbutton(button: loginbutton, didlogoutwithsuccess success: bool) { self.showmessage("logout success") } func loginbutton(button: loginbutton, didcompleteloginwithtoken accesstoken: accesstoken?, error: nserror?) { if accesstoken != nil { self.showmessage("got accesstoken!") } else { // error } } code not working native type login in app. in details sso login not redirect official uber app app access token. all callback url , settings verified other sample , work

javascript - Pass default parameter values in function react -

i got error after updating react-native , react i think right syntax, don't know why error shown: this.list = function(table, callback, wheredata = [],selection = '',extra = '') { syntaxerror: unexpected token = @ exports.runinthiscontext (vm.js:53:16) @ module._compile (module.js:387:25) @ object.module._extensions..js (module.js:422:10) @ module.load (module.js:357:32) @ function.module._load (module.js:314:12) @ module.require (module.js:367:17) @ require (internal/module.js:16:19) @ object. (/users/apcrat/documents/redux/delfoo_react/api/model/catalog/cuisine_route.js:7:12) @ module._compile (module.js:413:34) @ object.module._extensions..js (module.js:422:10) you need compile code babel.js use ecmascript 6 features or if want work on es5, can this

C# windows (WinForms) child application locks sockets -

i have 2 windows c# winforms applications behave same way related issue. behavior exhibits if applications ran in order: main application starts , part of normal working process opens sockets; mixture of tcp udp , multicast. @ time pressing button starts application using c# process related libraries. second app starts ok , ok. it known , acceptable if start second instance of main app second instance won't able use sockets first 1 owns. issue have if shutdown first app , restart, won't able acquire sockets anymore... until child app shutdown. note second app doesn't use sockets whatsoever, somehow windows keeps sockets locked until second app shuts down. i have question related programming in c# win forms on topic capital letters people can not distinguish on/off topic: how solve don't need shutdown second app first 1 able acquire sockets (which -i know - free). this normal handle inheritance behavior. unfortunately .net process.start passing tru

Does android native support items to Floating Action Button? -

Image
i want create floating action button items picture. & add text beside item. picture taken google website . found libraries solve problem. this & this pretty curious android native design libraries. 1 have idea how make possible native library? picture: update: code written floatingactionbutton fab = (floatingactionbutton) findviewbyid(r.id.fab); fab.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { // actions here } }); xml follows <android.support.design.widget.floatingactionbutton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" android:src="@android:drawable/ic_dialog_email" app:layout_behavior="com.alhikmah.weather360.utility.scrollawarefabbehavior&q

swift2 - Show JSON data in text View in Swift -

i getting response server [{ "images":[{ "title_de":"sdfs", "title_it":"dsdfs", "title_fr":"dfsf", "approved":"true", "title_ru":"sdsf", "title_ko":"sdfs", "title_jp":"sfsdf", "title_es":"sdfs", "title_pt":"dfs", "folder_id":29, "title_en":"title image", "title_hi":"sdfss", "image_used_count":"0", "updatedtime":"1470641760", "folder_empty":"false", "id":115, "is_folder":"false" }, { "title_de":"tests ashdod", "title_it":"test cv", "title_fr":"tests asga

Create custom notification, android -

Image
i want create notification red bordered notification in image: i know how create normal notifications blue bordered notifications in image, want show icon , 3 lines of information near that. how can that? suggestion appreciated. add remoteview in notification here sample remoteviews remoteviews = new remoteviews(getpackagename(), r.layout.widget); notificationcompat.builder mbuilder = new notificationcompat.builder( this).setsmallicon(r.drawable.ic_launcher).setcontent( remoteviews); // creates explicit intent activity in app intent resultintent = new intent(this, test.class); // stack builder object contain artificial stack // // started activity. // ensures navigating backward activity leads out of // application home screen. taskstackbuilder stackbuilder = taskstackbuilder.creat

Meteor.js: Build iOS app for production Where should –server <host>:<port> point? -

i building ios app using meteor + cordova , can't head around.. using meteor build <path> --server <host>:<port> command, should <host>:<port> point? server should have build ios app? should deploy app galaxy first? --server <host>:<port> should point location of meteor server (so mobile app knows go connect meteor based backend). example, if you've deployed meteor backend galaxy, , have made available @ https://yourprodurl.com , --server setting like: --server=https://yourprodurl.com:443

c - Why does avr-gcc tell me about missing argument while expanding my [fancy] macro? -

i'm developing code atmel, defines consistent register names program port pins. instance: portc traditionally used set (high or low) pin on port c pinc used read state of particular pin on port c ddrc used read/write direction (0=input, 1=output) of pin on port c so found code — understand — defines pin macro this: #define led_pin c,7 then following macros (restricted use case i'm talking here): #define _bv(bit) (1 << bit) ... #define _set(type, name, bit) type ## name |= _bv(bit) #define _clear(type, name, bit) type ## name &= ~ _bv(bit) #define _test(type, name, bit) ( type ## name & _bv(bit) ) ... #define output(pin) _set(ddr, pin) #define input(pin) _clear(ddr, pin) ... #define high(pin) _set(port, pin) #define low(pin) _clear(port, pin) so can write function main() follows: main() { output(led_pin); high(led_pin); } while convenient ,

How to deploy an atg project in weblogic? -

i created simple project using atg 10.2 .i want know how deploy in weblogic. please provide detailed procedure screenshots,if possible. to provide 'detailed' procedure beyond scope of stackoverflow trying provide. said, if have understanding of weblogic management console should able follow these steps setup initial deployment: create server 1.1 specify server name (eg. commerce) , port number server run on (eg. 8180). select 'stand-alone server'. 1.2 once created go configuration > server start newly created server , modify 'arguments' block , include following setings (assuming running windows, unix update own paths) -datg.dynamo.data-dir=c:\atg-data -datg.dynamo.server.name=commerce -d64 -xx:parallelgcthreads=8 -dsun.rmi.dgc.client.gcinterval=3600000 -dsun.rmi.dgc.server.gcinterval=3600000 -xms1152m -xmx2048m -xx:newsize=128m -xx:maxnewsize=256m -xx:permsize=128m -xx:maxpermsize=256m 1.3 save server create datasources 2.1 in cons

How to store firebase instance id token? -

is firebase token use sent specific device? how store firebase token in mysql? from google website, not mention length of token. it seems long. an instance id token identifies specific app on specific device. firebase documentation : registration token - id generated fcm sdk each client app instance. the instance id token indeed expires in few conditions. documentation : the registration token may change when: the app deletes instance id the app restored on new device the user uninstalls/reinstall app the user clears app data. the token relatively long string. since you're unlikely search it, i'd store in in text field in database.

How to make modal overlay scrollable using CSS -

how make overlay scrollable when modal's length has exceeded current view's height? my overlay has following css: .ngdialog-overlay { position: fixed; background: rgba(0, 0, 0, 0.4); top: 0; right: 0; bottom: 0; left: 0; -webkit-backface-visibility: hidden; -webkit-animation: ngdialog-fadein 0.5s; animation: ngdialog-fadein 0.5s; } if remove top, right, bottom , left properties, can scroll outside modal fine, don't have overlay visible. most of solutions i've found in use code above (with exception of -webkit , animation), it's not working me. have tried overflow: auto; on dialog? .ngdialog-overlay { position: fixed; background: rgba(0, 0, 0, 0.4); top: 0; right: 0; bottom: 0; left: 0; -webkit-backface-visibility: hidden; -webkit-animation: ngdialog-fadein 0.5s; animation: ngdialog-fadein 0.5s; overflow: auto; }

Git: move a branch to make it point to another -

i had following situation: -----o | master branch1 then had make changes master: -----o-----o-----o | | branch1 master now want branch1 @ same point of master (and therefore contain commits made): -----o-----o-----o | master branch1 i don't know if merge correct way achieve this. steps should take? edit: consider have uncommitted changes should committed on branch1 after branch1 date master. need current changes left untouched committed later on branch1 since branch1 references commit ancestor of master , merge operation won't result in merge commit; instead, git move branch1 reference forward references same commit master . called fast-forward merge. from documentation : when try merge 1 commit commit can reached following first commit’s history, git simplifies things moving pointer forward because there no divergent work merge – called “fast-forward.”

Google Map V3 - Set map bounds -

Image
when plot route in google maps v3, i'm able push coordinates bounds object , map zoom level shows entire route. i'm able set center of map equal middle of route: var bounds = new google.maps.latlngbounds(); bounds.extend(latlng); //do each coordinate map.fitbounds(bounds); map.setcenter(bounds.getcenter()); however, i've added overlay on left. map 100% screenwidth , goes underneath overlay: is possible set map boundaries match visible? (i've highlighted mean green border) , there make sure entire route visible right of overlay? i hope makes sense. google manage accomplish on map site. need reduce zoom level. manage left panel in css

ElasticSearch with MongoDB hosted externally and python -

i trying use mongo-connector connect mongodb hosted on mongolab , elasticsearch running locally on virtual machine. however, getting error: operationfailure: database error: not authorized query on local.oplog.rs is there way connect externally hosted db using mongo-connector?

linker - Linking legacy Fortran95 library to C++ with ifort/icpc -

background: in situation have make use of old fortran95 library in new c++ project. f95 library extensive, has tons of small modules, poorly documented, , auto-generated decade ago obscure computer algebra system (by people on different continent). heirloom code, works , irreplaceable. luckily have source code , can compiled current versions of ifort, not familiar fortran, , rather not touch old code in significant way. so suppose have fortran code (pes_shell.f90): subroutine pes_init() use pes,wp=>pes_wp implicit none real,parameter::auang=0.5291772083 call pes0_init (dir='coef') call pes1_init (pes_x3y1z1u1_sysall) return end subroutine pes_init the functions pes0_init(...) , pes1_init(...) lead abyssal depths of fortran library , contained in pes module. i can compile object file, if give ifort path modules: ifort -r8 -o2 -c pes_shell.f90 -i/home/debianuser/pes/pes_library/lib/mod my poc c++ code, calling pes_init(): extern "c"{ vo

java - WELD-00143 Pseudo scoped bean has circular dependencies -

using weldjunit4runner , getting error message: exception 0 : org.jboss.weld.exceptions.deploymentexception: weld-001443: pseudo scoped bean has circular dependencies. dependency path: - managed bean [class com.my.own.bounded_contexts.client.cache.cacheclientcommpriorizedacceptrequestservice] qualifiers [@any @default], any known solution problem in weld? more error message: java.lang.exceptionininitializererror @ com.my.own.weldjunit4runner.createtest(weldjunit4runner.java:18) @ org.junit.runners.blockjunit4classrunner$1.runreflectivecall(blockjunit4classrunner.java:244) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.blockjunit4classrunner.methodblock(blockjunit4classrunner.java:241) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:70) @ org.junit.runners.blockjun

c - Non-blocking synchronization of streams in CUDA? -

is possible synchronize 2 cuda streams without blocking host? know there's cudastreamwaitevent , non-blocking. creation , destruction of events using cudaeventcreate , cudaeventdestroy . the documentation cudaeventdestroy says: in case event has been recorded has not yet been completed when cudaeventdestroy() called, function return , resources associated event released automatically once device has completed event. what don't understand here difference between recorded event , completed event . seems imply call blocking if event has not yet been recorded. anyone can shed light on this? you're on right track using cudastreamwaitevent . creating events carry cost, can created during application start-up prevent creation time being costly during gpu routines. an event recorded when you put event stream. completed after activity put stream before event has completed. recording event puts marker stream, thing enables cudastreamwaitevent

terminal - Python pick up file output after reconnecting to server? -

i don't have lot of experience python i'm hoping can me out. i have set server python file run via commandline doing like: python pyserver.py this file provides me continuous output can see going on. works fine, whenever disconnect server , reconnect can no longer see output file generating. how can pick on output of file running python can see output again after reconnect server?

ios - How to send signal when app in background in opentalk? -

i have implement remote notification in ios 8. in notification have 2 button? 1 ) when click on end call want send signal other device. 2) when click on accept want send signal other device. see following screenshot better understand notification screen when tap notification display following screen . main screen when open main screen working fine. following code notification button tap buttons. - (void)application:(uiapplication *)application handleactionwithidentifier:(nsstring *)identifier forremotenotification:(nsdictionary *)userinfo completionhandler:(void (^)())completionhandler { doctornotificationviewcontroller *doctornoti = [[doctornotificationviewcontroller alloc]initwithnibname:@"doctornotificationviewcontroller" bundle:nil]; if ([identifier isequaltostring:notificationactiononeident]) { [doctornoti btnacceptpressed:0]; } else if ([identifier isequaltostring:notificationactiontwoident]) { [doctornot

Sinch sms api and chars with accent mark -

when try send sms "ó" char blank char instead. have read in doc that: the default alphabet gcm 7-bit, characters in languages such arabic, chinese, korean, japanese, or cyrillic alphabet languages (e.g., ukrainian, serbian, bulgarian, etc.) must encoded using 16-bit ucs–2 character encoding. but if encode message utf-16 (i have read ucs-2 utf-16) 40001 error. so, posible send special chars sinch? gsm-7 , usc-2 encodings used sinch backend send message on smpp. latin1 (iso-8859-1) used, , why you're getting missing character since sms providers not support , therefore decode message using different decoder. sinch removing latin1 (which result in shorter encoded short message usc-2) support , use usc-2 instead messages cannot encoded gsm-7 or ascii. i'm interested in 40001 you're getting. if you're setting charset utf-16 on http request should not that. if you're doing else please post code (without appkey , secret) see more how

What is the different between setContentView and getLayoutResource in android? -

generally, when want load android layout use setcontentview(view) in oncreate function. saw function getlayoutresource() load layout too. have read getlayoutresource , don't understand it. different between them? i not sure read getlayoutresource() loading layout too? getlayoutresource() method gets layout resource shown view. setcontentview(view) on other hand sets activity content layout resource . resource inflated, adding top-level views activity. so instance, if had invoked setcontentview(r.layout.my_awesome_layout); , calling getlayoutresource() should return integer identifier r.layout.my_awesome_layout ; you can read more on setcontentview(android.view.view) i hope helps.

iphone - The UDID is always returning zero data from keychain in IOS? -

i had application in saving [[[uidevice currentdevice] identifierforvendor] uuidstring] on keychain this: nsstring *bundleid = [[[nsbundle mainbundle] infodictionary] objectforkey:@"cfbundleidentifier"]; nsstring *strapplicationuuid; if(![keychainitem objectforkey:(__bridge id)(ksecvaluedata)]){ nsstring *idfa = [[[uidevice currentdevice] identifierforvendor] uuidstring]; nslog(@"bundleid %@",idfa); [keychainitem setobject:idfa forkey:(__bridge id)(ksecvaluedata)]; nslog(@"saving item %@", [keychainitem objectforkey:(__bridge id)(ksecvaluedata)]); strapplicationuuid=[keychainitem objectforkey:(__bridge id)(ksecvaluedata)]; }else{ nslog(@"saved item %@", [keychainitem objectforkey:(__bridge id)(ksecvaluedata)]); strapplicationuuid=[keychainitem objectforkey:(__bridge id)(ksecvaluedata)]; } // nsstring *strapplicationuuidstr = [[nsstring alloc] initwithdata:[keychainitem obj

X axis in DateTime format in R script/plot -

Image
i trying build forecast plot in r. but, inspite of trying many solutions unable plot x axis in dates. my data in form of : datetime(mm/dd/yyy) consumedspace 01-01-2015 2488 02-01-2015 7484 03-01-2015 4747 below forecast script using: library(forecast) library(calibrate) # group searches date dataset <- aggregate(consumedspace ~ date, data = dataset, fun= sum) # create time series based on day of week ts <- ts(dataset$consumedspace, frequency=6) # pull out seasonal, trend, , irregular components time series (train forecast model) decom <- stl(ts, s.window = "periodic") #predict next 7 days of searches pred <- forecast(decom) # plot forecast model plot(pred) #text(pred,ts ,labels = dataset$consumedspace) the output looks this-- can see have x axis displayed periods(numbers) rather in data format. any highly appreciated. try enter explicit specifications in plot : plot(x=date, ...) if not work try : timeline<

Android email validation vs Firebase email validation -

is there way use firebase email validation without performing credentials update , listening failures? along lines of firebaseauth.validateemail(someemail) ? in android possible check valid input email using : android.util.patterns.email_address.matcher(someemail).matches(); however accepts emails finishing top level domain being 1 character long, eg. test@email.c such emails however, invalid firebase , throw following exception if used: com.google.firebase.firebaseexception: internal error has occured. [ invalid_email ] is there way of marking input field invalid if user enters firebase-invalid email address? after research, invalid_email seems have 2 reasons. 1 invalid format can checked android method. other 1 email not signed up. think facing second case since test@email.c valid in email format (although domain doesn't exists). therefore, not think there firebaseauth.validateemail(someemail) method authentication method validate email. throws exc

OpenLayers 3 Resize a feature -

i using openlayers 3 , openstreetmap application. i've managed draw circle vectors on map draw markers, problem have circles have same size when zooming in , out. how can change size of vectors according resolution ? here vector definition: var dealersource = new ol.source.vector(); function dealerstyle(feature) { var style = new ol.style.style({ image: new ol.style.circle({ radius: 6, stroke: new ol.style.stroke({ color: 'white', width: 2 }), anchor: [1.5, 1.5], fill: new ol.style.fill({ color: 'green' }) }) }); return [style]; } you can change size of circle depending on zoom level ( if that's want ) var dealersource = new ol.source.vector(); function dealerstyle(feature) { var style = new ol.style.style({ image: new ol.style.circle({ radius: map.getview().getzoom(),

Can't establish SSL connection to web service C# -

i'm trying connect web-service. i'm new ssl stuff. here's code: public void sendrequest(string httpsurl, string postdata, string[] certificates, string password) { httpwebrequest request = (httpwebrequest)webrequest.create(httpsurl); request.method = "post"; byte[] bytearray = encoding.utf8.getbytes(postdata); request.contenttype = "application/x-www-form-urlencoded"; request.contentlength = bytearray.length; x509certificate certificate = null; foreach (string cert in certificates) { certificate = new x509certificate(cert, password); request.clientcertificates.add(certificate); //add cert } stream datastream = request.getrequeststream(); datastream.write(bytearray, 0, bytearray.length); datastream.close(); } the request.getrequeststream() throws exception: "the underlying connection closed: not establish trust relationship ssl/tls secure channel". certificates given me web service provider (.cer files), password (key.dat

c# - SQLite insert does not work in DAL, no errors appear? -

i'm new sqlite database. i'm trying insert new record in sqlite db table "time_sheet_info", invoke dal method .asmx webservice; & no errors; executenonquery returns 1; no data appears. i've tried execute insert command inside webservice; worked there!! any suggestions? **note: access ws using auto-generated proxy. gui: protected void page_load(object sender, eventargs e) { if (!ispostback) { savedatadolcls data = new savedatadolcls(); data.intprojectid = 1; data.inttaskid = 1; webservice1 wsp = new webservice1(); wsp.savedata(data); } } ws: [webmethod] public void savedata(savedatadolcls arrdata) { using (transactionscope scope = new transactionscope()) { obj1.savedata(arrdata); } } dal: savedatadolcls obj = new savedatadolcls(); public void savedata(savedatadolcls arrdata) { using

visual studio 2015 - VS2015 extension - Get selected items in Error list -

i'm trying make extension visual studio 2015 depends on selected items in error list view. i'm retrieving list following code: var errorlist = this.dte2.toolwindows.errorlist ivstasklist2; ivsenumtaskitems items; errorlist.enumselecteditems(out items); but problem i'm able description (text) not error code (helpkeyword). description way: ivstaskitem[] item = new ivstaskitem[1]; while (items.next(1, item, null) == 0) { string description; item.get_text(out description); } hope can helped me on i'm quiet frustrated @ moment. i able using different approach: var errorlist = dte.toolwindows.errorlist ierrorlist; var selected = errorlist.tablecontrol.selectedentry; if (selected != null) { object content; if (selected.trygetvalue("errorcode", out content)) { return (string)content; } }

javascript - room id - philips TV -

how read room number of settings of tv / tvs via network. can save number room in tv remote control -> professional settings -> room id i needs show @ appropriate tv. update function room(){ var japitobjforwixpsvc = new createjapitobjectforwixpsvc(); japitobjforwixpsvc.cookie = 1040; japitobjforwixpsvc.cmdtype = "change"; japitobjforwixpsvc.fun = "professionalsettingscontrol"; japitobjforwixpsvc.commanddetails = { "professionalsettingsparameters" : [ "roomid" ] lert(roomid); }; sendwixpcommand(japitobjforwixpsvc); delete japitobjforwixpsvc; } i not know whether trail goes, needs pull number of tvs hotel sure javascript mi function roomid() { var japitobjforwixpsvc = new createjapitobjectforwixpsvc(); japitobjforwixpsvc.cookie = 1040; japitobjforwixpsvc.cmdtype = "request"; japitobjforwixpsvc.fun = "ro