Posts

Showing posts from April, 2015

android - Updating text in a widget on an event -

i created class downloads text internet , want take text , update textview in widget. know event (ondownloadcompletelistener) getting triggered because i'm logging can't figure out how update textview within event. know it's newbie mistake, not sure i'm missing. public class widget extends appwidgetprovider{ internettext internettext; //handles downloading text internet remoteviews views; public void onupdate(context context, appwidgetmanager appwidgetmanager, int[] appwidgetids) { final int n = appwidgetids.length; // perform loop procedure each app widget belongs provider (int i=0; i<n; i++) { int appwidgetid = appwidgetids[i]; // create intent launch exampleactivity intent intent = new intent(context, mainactivity.class); pendingintent pendingintent = pendingintent.getactivity(context, 0, intent, 0); // layout

c++ - How to comprehend that an implementation is permitted to treat dynamic initialization of non-local variable as static initialization in some cases? -

in fact, problem comes words in standard draft n4582: [basic.start.static/3] implementation permitted perform initialization of variable static or thread storage duration static initialization if such initialization not required done statically, provided that — dynamic version of initialization not change value of other object of static or thread storage duration prior initialization, and — static version of initialization produces same value in initialized variable produced dynamic initialization if variables not required initialized statically initialized dynamically. do these words mean if 2 conditions satisfied, non-local variable of class type may initialized statically (zero-initialized) constructor not called (since dynamic version, initializing calling constructor, may replaced static version)? static initialization performed during compilation/linking. compiler/linker assigns location variable in static memory , fills correct bytes (the bytes d

javascript - ngStorage: retrive data with variable key -

i need help... i need retrieve data localstorage ngstorage angular's plugin... if write $localstorage.temp = [{ name: "jhon", lastname: "pitt"}]; var myvar = $localstorage.temp; this fine.... if write var str = 'temp'; $localstorage.temp = [{ name: "jhon", lastname: "pitt"}]; var myvar = $localstorage.[str]; // doesn't work myvar = $localstorage.str; // doesen't retrieve nothing cause there's no key 'str' in local storage if write this var myvar = json.parse(window.localstorage.getitem(str)); it works, need use $localstorage how can solve problem? need much... try in working plunker you close, had syntax error on $localstorage. try: var str = 'temp'; $localstorage.temp = [{ name: "jhon", lastname: "pitt"}]; var myvar = $localstorage[str]; // remove .

php - password_hash giving error: Strict standards: Only variables should be passed by reference -

this question has answer here: what difference between bindparam , bindvalue? 7 answers edit: issue has been resolved. did not know or think of bindvalue(), why not think duplicate question. help! i learning how register users php , seems password_hash giving me "only variables should passed reference" error message. i've seen many people same error, not seem apply case (in opinion). connecting database $server = 'localhost'; $username ='root'; $password ='root'; $database = 'register_test'; try{ $conn = new pdo("mysql:host=$server;dbname=$database;" , $username, $password); } catch(pdoexception $e){ die ("connection failed" . $e->getmessage()); } registering user require 'database.php'; if(!empty($_post['email']) && !empty($_post['password'])): $p

PHP and PDO dynamic parameter binding -

i'm trying fix butchered bit of code - might have guessed, i'm cocking bind param syntax. in fact, i'm not sure i'm trying possible. here's class method... /*** * * @select values table * * @access public * * @param string $table name of table * * @param array $fieldlist fields return in results, defaults null * * @param array $criteria search criteria keyed fieldname * * @param int $limit limit of records return, defaults 10 * * @return array on success or throw pdoexception on failure * */ public function dbsearch($table, $fieldlist = null, $criteria = null, $limit = 10) { // setup $this->db point pdo instance $this->conn(); // build fieldlist if( is_null($fieldlist) or !is_array($fieldlist) or count($fieldlist) == 0) { $returnfields = '*'; } else { $returnfields = "'".implode("', '", $fieldlist)."'"; } // build criteria if( is_null($criteria) or !is

wso2esb - Invalid tenant domain Wso2 ESB-AM -

i'm trying make simple proxy using 1 of store apis in wso2 am, when send request error shown. {"error" : true, "message" : "invalid tenant domain."} this proxy , i'm using postman test it, , send user , pass json <?xml version="1.0" encoding="utf-8"?> <proxy name="login" startonload="true" trace="disable" transports="https http" xmlns="http://ws.apache.org/ns/synapse"> <target> <insequence> <property expression="json-eval($.user)" name="user" scope="default" type="string"/> <property expression="json-eval($.pass)" name="user" scope="default" type="string"/> <log level="full"> <property name="sequence" value="paso 1 - login am"/> </log> <payloadf

c - ALSA errors when running pulseaudio examples -

the errors in question these: alsa lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable open slave alsa lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable open slave alsa lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable open slave alsa lib pcm.c:2239:(snd_pcm_open_noupdate) unknown pcm cards.pcm.rear alsa lib pcm.c:2239:(snd_pcm_open_noupdate) unknown pcm cards.pcm.center_lfe alsa lib pcm.c:2239:(snd_pcm_open_noupdate) unknown pcm cards.pcm.side alsa lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable open slave i've tried can think of, including editing alsa.conf , uninstalling/reinstalling related packages. any appreciated.

on hover one div, assign animation class on another div -

stack! i have animation assigned class .slide i have on hover on div, when hover on div want animation class assigned div. using css animations. i'd appreciate , thanks! code: http://codepen.io/iheartkode/pen/wwmqmg?editors=0110 share-container { position: relative; width: 150px; height: 75px; background: #ff5722; border-radius: 10px; cursor: pointer; &:hover { // assign animation class share-icons class } p { text-align: center; color: white; } } .share-icons { position: absolute; z-index: -2; top: 15px; left: 4px; margin: 0 auto; width: 120px; height: auto; padding: 10px; background: coral; text-align: center; color: white; font-size: 2em; cursor: pointer; } .slide { animation: slide 2s linear; @keyframes slide { { transform: translatey(0px); } { transform: translatey(100px); } } } edited after clarification: change in html: <div class="share-icons sli

javascript - Sharing baseline between canvas text and html element -

i'm drawing text html canvas element, , next text have plain css-styled , absolutely positioned html button, position computed javascript. i'd use same font both, seems easy, , i'd both share same baseline. which, far can tell, hard @ moment, @ least given set of constraints i'm facing. out of box, canvas-drawn text uses textbaseline = 'alphabetic' , , can't change (for compatibility reasons , basline-aligned text using different fonts within canvas). on other hand, absolute positioning on html element uses top or bottom margin, not baseline. the textmetrics documentation on mdn describes various vertical measurements, points out available on chrome , there after flag has been set. need works on decent percentage (say >80%) of current browsers. i don't know font used, hard-coding metric information font not option. so options have? do have render font second off-screen canvas , examine pixel data in order find actual dimensions? can

python - Can't connect to CloudSQL (using GAE + Django) -

the problem i unable connect cloudsql via django in google app engine (flexible) on production server. using python 3 if makes difference. i'm using example in settings.py : databases = { 'default': { 'engine': 'django.db.backends.mysql', 'host': '/cloudsql/<your-project-id>:<your-cloud-sql-instance>', 'name': '<your-database-name>', 'user': 'root', } } (with ids filled in, of course.) when used socket, unable connect @ all: can't connect local mysql server through socket '/cloudsql/projectid:cloudsqlid' (2) when tried using ipv4 instead of socket, able connect database, error: lost connection mysql server @ 'reading initial communication packet' even stranger, when tried connecting cloudsql on local server (using ipv4 of course), able connect fine. it's deployed app giving me trouble. here's app.yam

python - Is this an issue with my method of recursion? -

in response this question tried come own solution. my solution in python 3.x def efficientalgo(number, x): print("start number... " + str(number)) # see if number dividable three, if divide 3 if number % 3 == 0: print("dividing three...") number /= 3 print(number) # use recursion see if number can divided again number += efficientalgo(number, x) print("returning number division 3 now...") return number # divide number 2 if evenly dividable 2 if number % 2 == 0: print("dividing two...") number /= 2 print(number) # use recursion see if number can divided again number += efficientalgo(number, x) print("returning number division 2 now...") print(number) return number # if number not one, subtract 1 , call if number != 1: print("subtracting 1 now...") number

python - Can someone explain this weird behaviour in {%url%} in django jinja -

when i'm passing argument url (placeholder 2) works fine, <a href="{% url 'home:detail' 2 %}">{{ category.filter.first.person}}</a> and when this: <a href="{% url 'home:detail' category.filter.first.person %}">{{ category.filter.first.person}}</a> it passes person object's output of str , name argument, expected. but when this: <a href="{% url 'home:detail' category.filter.first.person.id %}">{{ category.filter.first.person}}</a> django throws error: reverse 'detail' arguments '('',)' , keyword arguments '{}' not found. 1 pattern(s) tried: ['detail/(?p<pk>\\d+)/$'] as if person object doesn't have id, of course not true, because: <a href="{% url 'home:detail' 2 %}">{{ category.filter.first.person.id}}</a> the text link shows right id. weird thing can't pass id of person argument p

github - Removing all deleted files from git repo history w search command -

had start version controlling project not in version control. result repo 17gb , needs paired down if going repo github (the site paired down 600mb). basically want remove have deleted in process of pairing down repo completely. i've found great command find every deleted file. git log --all --pretty=format: --name-only --diff-filter=d | sort -u which lists files beautifully. now how pipe in command necessary clear history. along these lines. git filter-branch --tree-filter 'rm -rf { file }' head i've made backup copy of repo if totally screw things okay. is right command loop files into? , if how do this? ok, xargs needs little help. need use 1 per line, substituted filter-branch command: git log --all --pretty=format: --name-only --diff-filter=d | sort -u | while read -r line; git filter-branch -f --tree-filter "rm -rf { $line }" head; done we must specify -f flag filter-branch remove old refs, per purging file git repo

python - ImportError: DLL load failed: %1 is not a valid Win32 application, Windows 10 -

i have been trying pygame , running on python 3.2. when try import get from pygame.base import * importerror: dll load failed: %1 not valid win32 application. i saw this, indicated problem python , pygame installations incompatible (64-bit of one, 32-bit of other), have 32 bit versions of both , it's still giving me error! on windows 10 (64 bit), python 3.2 (32 bit), pygame (32 bit.) copied forum, minor change (python 3.4 -> 3.2) file named same appropriate file @muratgu's link.

Update a Chrome extension via inline install? -

i'm using chrome.webstore.install install extension (see https://github.com/eloquence/freeyourstuff.cc/blob/c7c581b63ad179cd6d0ddc4576f302defa7b17fa/service/frontend/install.js#l30 ), works fine. when triggering in update context user has older version installed, seems pretend it's installing new version, end result user still using old version. is there way update via javascript, or have rely entirely on webstore's auto-update mechanism that?

objective c - Printing vector graphics from Metal on OSX -

is possible output vector graphics metal api? especially in regards rendering fonts/text. the trouble using signed-distance fields (as described in chris green's 2007 paper "improved alpha-tested magnification vector textures , special effects" ) require rasterize glyphs @ finite resolution , reconstruct glyph outline in shader, can lead reduced fidelity. there have been strong advances in field lately, such viktor chlumský's work on using multi-channel sdf textures maintain sharp edges. there has been lot of work in last decade on using gpus render implicit curves more directly, of derived loop & blinn's "resolution independent curve rendering using programmable graphics hardware" (2005), written in gpu gems 3 . robust implementation of glyph rendering gpu-only rasterization know of 1 in glyphy . dobbie has written impressive webgl demo uploads glyph outline parameters texture , rasterizes purely on gpu, briefly described here .

lumen - Class 'Log' not found -

i'm new lumen , laravel, have write rest api using lumen. i've set controller , i'm having problem using logger. i've followed documentation: lumen docs this controller app/http/controllers/documentscontroller.php: namespace app\http\controllers; use illuminate\http\request; use log; class documentscontroller extends controller { public function index() { log::info('test'); return response()->json(['result' => 'oh hey!']); } } if run i'm getting error saying: fatalerrorexception in documentscontroller.php line 22: class 'log' not found so there seems wrong log facade (not quite sure how work yet in laravel/lumen). but if change log::info() call, manually pull log service out of di container works: $app = app(); $app->make('log')->info('test'); any ideas why facade method described in official documentation isn't working? doh , of cou

javascript nested function call in reactjs render classname -

function inside render statement not working. how call function part of classname? this._displaylogic().showatraffic() returning undefined. expected result: classname ="up blue" , current result: "up " , an error in console. class linestatus extends react.component{ constructor(props){ super(props); } _displaylogic=()=>{ var showatraffic=()=>{ return "blue"; }; var showbtraffic=()=>{ return "yellow"; }; console.log(showatraffic()+"....."); //this works. } componentwillmount(){ this._displaylogic(); } render(){ return( <div classname="status-content collapse" key={this.props.key}> <div classname={"up "+this._displaylogic().showatraffic()}> <row classname="show-grid"> <span>approval</span> </row> <row classname="sta

javascript - Play Real-time Notification Sound to all the users logged in the Webapp Without reloading the page -

i know there many solutions can found in web regarding problem, none of them working me. that's why i'm asking question. first let me explain i'm looking achieve - -> i'm developing multi-user web application [asp.net] -> i'm using signalr real-time database change notifications , signalr instantly transmit change notifications users logged in application. -> in addition want play notification sound logged in users can understand new notification need attention. this i've done far - javascript <script> function playsound(mysound) { //thissound = document.getelementbyid(mysound); //thissound.play(); var audio = new audio(mysound); audio.play(); } </script> code behind - scriptmanager.registerclientscriptblock(me, [gettype](), "openwindow", "javascript: playsound('./audio/notification.wav')", true) the problem solution user need reload page hear notificati

excel - Cell content is moved automatically to same cell on another sheet -

there's bug or error in code or workbook somewhere can't seem find or understand why happening. what's happening there's userform has button : select cell sheet2 put selected cell value in sheet1 cell b10 dropdown menu unloads form return sheet1 , select cell described in code sheet1.b26 . now form gone. if click in sheet1.b26 selected cell , write press {tab} content cell transferred exact same cell on sheet2 automatically , sheet1.b26 cell empty . this happens once if start writing in selected cell when form gone. there no code/formula in worksheet or workbook or module should describes action. this bugging me week couldn't find solution anywhere. workbook if wish download , try it. video description of error to recreate this: go sheet1 fire form using first button on sheet1 has "klant zoek" text on it. press button "selecteer" on form. without selecting other cell enter in last sele

c - Developing GUI and loading libraries for bootloader -

1) learned writing bootloaders , tested using bochs. now, want add gui bootloader. have googled didnt hit on relevant sources that. tried searching github existing projects. checked out this question. there way install graphics libraries or include x-window-system apis in code give in gui env (e.g: chameleon, gag) instead of including splash image ? 2) there possibility add python execution environment during bootloader stage, when step in protected mode, add python scripts? 3) how add standard c/c++ library support? thanks in advance. it might if told kind of bootloader you're talking about. work daily , of you're saying seems crazy talk. lol. usually bootloaders small startup program takes decision on load next. bootloaders contains features "flashing" main application. (the main app cannot flash self.) bootloader being first piece of code processor meets, makes critical. not want fail nor upgrade it. hence bootloaders tend strive smaller bette

c++ - memcpy() giving me seg faults -

my program opengl program compiles , runs fine when dont use memcopy, when function used in program gives me seg fault when try run program after compilation, still compiles in both cases gives me seg fault when compile program function, , seg fault when checked in gdb not show memcpy problem initialization function init() creates opengl context me, weird thing happens when include memcpy in program , compile it, otherwise init() works fine , tested in file confirm works on own i dont know why doing it, did notice has happened since linux mint upgraded packages, program worked fine before upgrade here program source code #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <x11/xlib.h> #include <x11/xutil.h> #include <gl/glew.h> #include <gl/glx.h> #include <time.h> #include <math.h> #include "glx2.c" #include "renderbuffer.h" #include "new.hpp" #def

javascript - Select Multiple Checkboxes By Cntrl + Click -

i have form has many checkbox elements lined in rows. implement function allows user hold cntrl, select checkbox , have every box either: a) become checked there no initial box checked b) become checked closest checked box is possible? many thanks. this . the code shift+key // usage: $form.find('input[type="checkbox"]').shiftselectable(); // replace input[type="checkbox"] selector match list of checkboxes $.fn.shiftselectable = function() { var lastchecked, $boxes = this; $boxes.click(function(evt) { if(!lastchecked) { lastchecked = this; return; } if(evt.shiftkey) { var start = $boxes.index(this), end = $boxes.index(lastchecked); $boxes.slice(math.min(start, end), math.max(start, end) + 1) .attr('checked', lastchecked.checked) .trigger('change'); } lastchecked = this; }); }; credits : jquery plugin shift + click select mu

sql - Query to find top customers in countries with greatest difference in from 2 months -

lets theres columns: customer_id, revenue, country, date what query show top customers highest revenue growth nov dec? what query show top 100 customers in each country has highest growth in revenue november in december? calculating revenue growth can using window function lag() : select customer_id, revenue, date, country, revenue - lag(revenue,1,revenue) on (partition customer_id order date) growth turnover extract(month date) in (11,12) lag(revenue,1,0.0) return revenue previous row. if there no previous row, return current row's revenue. results in growth of 0 first row each customer. now growth column turns greatest-n-per-group problem typically solved using window functions. window functions can't nested in single query, need use 2 levels of nested derived tables: select customer_id, revenue, date, country, diff_to_previous, dense_rank() on (order growth desc nulls last) rnk ( select customer_id, revenue, d

Android N Notification Direct Reply -

recently read new article android n notification updates google has mentioned direct reply have tried best learn article not getting how reply directly notification. if 1 can guide me thankful. i want implement like if have ever created notification using pre-android n versions easy task you. because introduced direct reply feature addition existing notification builder there 2 additions need make. follows, remoteinput reply action as these additions optional. i.e, if creating notifications notificationcompat.builder new of notification standard style without adding code. when create direct reply provide additional reply action remoteinput notification builder , else same earlier api. the below guide how add direct reply feature existing notification if want backward compatibility use notificationcompat.builder instead notification.builder detailed tutorial can found here http://devdeeds.com/android-reply-notification-directly/ thank you

.net - Issue with related entity collection in Entity Framework 5 -

i have below 4 entity in project. student public int studentid { get; set; } public string studentname { get; set; } public int standardid { get; set; } public virtual standard standard { get; set; } public virtual studentaddress studentaddress { get; set; } public virtual icollection<course> courses { get; set; } teacher public int teacherid { get; set; } public string teachername { get; set; } public nullable<int> standardid { get; set; } public virtual icollection<course> courses { get; set; } public virtual standard standard { get; set; } standard public int standardid { get; set; } public string standardname { get; set; } public string description { get; set; } public virtual icollection<student> students { get; set; } public virtual icollection<teacher> teachers { get; set; } course public int courseid { get; set; } public string coursename { get; set; } public string location { get; set; } public int teacherid { get; set; } p

.net - Error in opening & repairing word through Powershell script -

i using following powershell script code open , repair corrupted documents. $word = new-object -comobject word.application $word.visible = $true $word.documents.open($doc, $false, $false, $false, $false, $false, $false, $false, $false, $false, $false, $true, $true) #log opening file log-write -logpath "$logpathfilename" -linevalue "$docleaf - opening file" repairprogress "repair progress $count of $totcnt " "input box contains current file path , name, select , paste save dialog box if neccessary. select checkbox on repair outcome." "$doc" # "repair outcome: $global:outcome " log-write -logpath "$logpathfilename" -linevalue "$docleaf - repair outcome: $global:outcome"` i have tried giving command below: $word.documents.open($inputfile, $reffalse, $true, $null, $null, $null, $null, $null, $null

sql - Cannot insert NULL values into column 'USERNAME', table 'tempdb.dbo.#temptable error -

i have sp. while executing getting error as cannot insert value null column 'username', table 'tempdb.dbo.#temptable__________________________________________________________________________________________________________0000000002fd'; column not allow nulls. update fails. statement has been terminated. below sp alter procedure [dbo].[userreportdata] @as_ondate datetime begin declare @reportdate datetime declare @username varchar(110) select * #temptable ( select a.cuser_id, b.user_id, a.u_datetime reportdate, b.first_name + ' ' + b.last_name username inward_doc_tracking_trl inner join user_mst b on a.cuser_id = b.mkey , a.u_datetime >= @as_ondate ) x declare cur_1

python - samuelcolvin's django-bootstrap3-datetimepicker not showing calendar when clicked on input field -

i trying use samuelcolvin's django-bootstrap3-datetimepicker in based on eonasdan's bootstrap-datetimepicker forked nkunihiko's django-bootstrap3-datetimepicker show calendar user can select date , time , submit it. issue having when try click on field or on right button calendar icon in in demo website , not show me nothing. i had add widgets.py repo project since giving me no module named bootstrap3_datetime.widgets error. would appreciate help this have in models.py : class production(timestampedmodel): #some other code..... scheduled_date = models.datetimefield(null=true, blank=true) fully_produced_date = models.datetimefield(null=true, blank=true) forms_schedule.py : from producer.widgets import datetimepicker django import forms .models import production class scheduleform(forms.modelform): class meta: model = production fields = ['scheduled_date', 'fully_produced_date'] sched

android - Upgraded to Firebase and having many issues now restarting app -

i've upgraded firebase gcm. forced me upgrade build tools ect. app uses play services check subscription status, , other wise it's basic push talk application. running fine on gcm build tools 22. . . i've implemented firebase fine , works properly. problem i'm having no matter 3 of activities launch or (widget, notification, icon) results in anr. mind first time launch activities run expected. activity launched second time gives anr. going on here? log errors 06-11 02:45:49.913 32009-32009/com.cb3g.channel19 w/displaylistcanvas: displaylistcanvas started on unbinded rendernode (without mowningview) 06-11 02:45:59.883 32009-32030/com.cb3g.channel19 e/dynamitemodule: failed load module descriptor class: didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.moduledescriptor" on path: dexpathlist[[zip file "/data/app/com.cb3g.channel19-3/base.apk"],nativelibrarydirectories=[/data/app/com.cb3g.channel19-3/lib

Accessing files under asset subfolder by Id or Name android studio -

i have 2 sub-folders under assets folder i.e 1 english , turkish contains respective .mp3 files. want know how access file places under these folders. try code inputstream = getassets().open("eng/file1.mp3"); bufferedreader br = new bufferedreader(new inputstreamreader(is)); string line = null; while ((line = br.readline()) != null) { //logic here } br.close();

yii - yii2 :Invalid argument supplied for foreach() after update project with composer -

i have error in line : $count2 = new app\models\opportunity; --> $count3 = $count2->counttype($idp, $allid); <-- couttype : public function counttype($type, $allid) { $query = (new \yii\db\query())->select(['count(id)'])->from('opportunity'); $query->andwhere(['in', 'id', $allid]); $query->andwhere(['in', 'project_type_id', $type]); $command = $query->createcommand(); $model = $command->queryall(); return $model; } and $allid data : array(67) { [0]=> string(3) "473" [1]=> string(3) "472" [2]=> string(3) "471" [3]=> string(3) "470" [4]=> string(3) "469" [5]=> string(3) "468" [6]=> string(3) "467" [7]=> string(3) "466" [8]=> string(3) "465" [9]=> string(3) "464" [10]=> string(3)

javascript - using auth header to prevent access to page -

Image
on login action i'm storing inside localstorage username , token logged user afterwards i'm creating auth. headers post request. update: more specific on this. have userservice succ. put , retrieve users data localstorage, have username , sessionid , , islogged . my question is: having auth. header, info need logged user inside localstorage, how can write event handler check if user logged in before each route change. should on app.js init app , inject userservice? if yes how. (function () { "use strict"; var app = angular.module("myapp", ["common.services", "ui.router", "ui.mask", "userservice", "ui.bootstrap"]); .... how can use stored auth header in order access/deny access specific pages? update 2: app.js (function () { "use strict"; var app = angular.module("myapp", [&quo

alert - JavaFx: Message for empty file name in filechooser -

i want show message when user not enter file name on file chooser text box. please let me know if there way accomplish this. code below: filechooser filechooser = new filechooser(); filechooser.settitle("save as"); filechooser.extensionfilter extfilter = new filechooser.extensionfilter( "pdf files (*.pdf)", "*.pdf"); filechooser.getextensionfilters().add(extfilter); file destinationfile = filechooser.showsavedialog(primarystage); the filechooser implemented using native apis in javafx, it's behavior platform-dependent. on mac os x example filechooser disable "save" button if file name field empty. however impossible modify behavior of filechooser dialogs. platform using? suppose it's bug in javafx able select "save" without providing file name.

php - Creating a custom user profile page upon user registration? -

i have registration form user enters name, email, username, password, etc. information collected , stored in database. after user clicks submit, want them redirected profile page. url on profile example.php?id=33, how go doing this? how go creating actual dynamic page them? know have create 1 php page , style sheet, , apply pages, how create system right after registration, user directed profile? using php , mysqli. i'd more happy if you'd link me tutorials or if share knowledge because i've looked everywhere , couldn't find looking for. one way of doing redirect use php header function send location header browser: header('location: '.$url); where $url user profile page. work if have not sent prior output after managing registration request.

haskell - understanding MonadTransformer examples -

i going through tutorial @ https://en.wikibooks.org/wiki/haskell/monad_transformers i wrote following piece of codes. 1 without , other monadtransformer instance : -- simple password functions. getpassphrase1 :: io (maybe string) getpassphrase1 = password <- getline if isvalid password return $ password else return nothing askpassphrase1 :: io () askpassphrase1 = putstrln "enter password < 8 , alpha, number , punctuation:" p <- getpassphrase1 case p of nothing -> -- q1. ### how implement `monadtrans` ? putstrln "invalid password. enter again:" askpassphrase1 password -> putstrln $ "your password " ++ password -- validation test want be. isvalid :: string -> bool isvalid s = length s >= 8 && isalpha s && isnumber s && ispunctuation s another using monadt wrote myself. getpassphrase2 :: maybet io string getpassph

apache cordova - How to configure my app with capability "PrivateNetworkClientServer" and keep possibility to pass "WACK" test -

Image
i working on apache cordova win 10 windows-x86 store app data exchanging microcomputers collecting measurements, connected entirely local network. i tested app capability "privatenetworkclientserver" , deployed in form of "*.appx" package. working. but "privatenetworkclientserver" capability forbidden windows store setting in "package.windows10.appxmanifest" this: "uap:rule match="ms-appx-web:///" type="include" windowsruntimeaccess="all" " i have tried change setting or remove (by default windowsruntimeaccess="none"), after running "build" part of manifest returned initial state. how configure app capability "privatenetworkclientserver" , keep possibility pass "wack" test. i appreciate suggestions. thank you. to have access win store app web api in local network using "fiddler4" exemption now, still hope find more simple so

sql - Get employee with third highest salary -

i need fetch details of employee third highest salary in efficient way. my query: select(select min(salary) (select * top (3) salary employees order salary) is there issue in query.how can correct query.please help. you can use rownumber :here partitioned empid avoid ties ;with cte ( select *,row_number() on (partition empid order salary desc) rownum table ) select * cte rownum=3 if want use query: select min(salary ( select top (3) salary employees order salary )b

javascript - Meteor integrating bought theme/js freezes meteor server -

i have bought 1 ui theme i'm trying integrate meteor. have browsed stack overflow solution hours , i'm stuck. i have copied complete assets folder newly made imports directory on client side , tried use import on client main.js import modules need. problem when run server meteor --port xxxx hangs on building web application , freezes. i have tried putting in client/compatibility folder javascript , doesn't seem work. does have insight this? for static html created new template html , worked. client/lib put js libraries. rootproject/public put static assets(images/fonts). look packages on atmosphere.js , check if compatible you're trying do. confusing step because package names not same third party js libs. trial , error. any third party js files can't find on atmosphere.js dump js files in client/lib.

javascript - direction: rtl for scrollbar but text is being added to left? -

i have tried make simple calculator. right shows math expression on screen. on clicking numbers , text added how want. on pressing of operators, operator gets added left side of number , next number added left of operator. i want expression should come left right in real world, , in case of overflow, scrollbar should start right. var evt = document.queryselectorall(".evt"); var screentext = document.getelementbyid("screentext"); var screentext2 = document.getelementbyid("screentext2"); var num = function(e) { screentext.innerhtml += e.currenttarget.textcontent; screentext2.innerhtml += e.currenttarget.textcontent; } var sign = function(e) { screentext.innerhtml += " " + e.currenttarget.textcontent + " "; screentext2.innerhtml = ""; } for(var = 0 ; < 10 ; i++) { evt[i].addeventlistener("click", num); } for(var = 10 ; < 14 ; i++) { evt[i].addeventlistener("click", sign