Posts

Showing posts from August, 2012

url - Burp Suite: Page keeps on loading after proxy is configured on Firefox to record activities -

Image
when set proxy record activities in burp suite, url keeps on loading, though manually without proxy works. while recording proxy, url keeps on loading. any idea why url not work while recording proxy? you need add certificate burp proxy browser. easiest way certificate point browser @ proxy , go http://burp hit 'ca certificate' button in top right side of window. once downloaded follow these instructions https://support.portswigger.net/customer/portal/articles/1783075-installing-burp-s-ca-certificate-in-your-browser .

javascript - Send data one page to another pager according to ID in Angular JS -

Image
i using mobile angular js ui frame work. new in angular js , want send data 1 page page city id. if user click on city data show according city. home page: html page: <div class="jumbtron scrollable-content text-center bg-color"> <div class="row"> <div class="bgimage"> <div class="bannercntnt"> <div class="hp-text-bnnr" style="color:white"> want delivery? <br>choose city </div> <br> <div class="btn-group" ng-controller="mycontroller"> <button ui-turn-on='mydropdown' class='btn' ng-click="getdatafromserver()" style="width:160px;background-color:white; color:#c62222"> <span class="fa fa-location-arrow"></span> <strong> select city...

c# - SQLite database first with entity framework in VS 2015 Community Edition -

Image
i want create wpf application use sqlite database entity framework. googled , found these link1 , link2 , link3 says need install sqlite-netfx46-setup-bundle-x64-2015-1.0.99.0.exe . when trying connect database getting following error. i googled not find solutions. please solve error. i had exact issue, mine cause having older version installed in : "c:\program files (x86)\system.data.sqlite\2010" uninstalling , deleting directory, followed reinstalling newer 2015 version fixed it, hope helps link below found solution http://system.data.sqlite.org/index.html/tktview/8b77722ff3b0e766fce4db053f3a62d09af942e7

How can I select a particular function to run based on a filename using Powershell? -

i have function change filename , move specific computer. function duplicated computer, have 2 specific functions each filename. can't seem figure out how script choose function want use. here i've tried no luck: $files = dir -path \\server\pptv\*\*.* -include atrium.*, clirel.* -recurse { (if ($file.fullname -eq "atrium.*" | rename-copy-atrium), (if ($file.fullname -eq "clirel.*" | rename-copy-clirel))) } how can pipe function , run? rename-copy-atrium example 1 of function names. the proper syntax if() statement in powershell is: if([condition]) { [execute code] } so want like: $files = dir -path \\server\pptv\*\*.* -include atrium.*, clirel.* -recurse foreach($file in $files) { if($file.fullname -like "atrium.*") { # assume function takes fileinfo object parameter argument rename-copy-atrium $file } elseif($file.fullname -like "clirel.*") { re...

how to correctly format this glyphicon button with input field using bootstrap -

Image
i want add search button inside input field , did it.here current output. i used class="btn btn-xs btn-danger to have button red background , white color symbol bootstrap danger buttons.but can see not doing it. here code: <div class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user" aria-hidden="true"></i></span> <input type="text" class="form-control" id="employeeid" placeholder="enter id"> <span class="input-group-btn"> <button type="button" id="search" class="btn btn-xs btn-danger"> <span class="input-group-addon"><i class="glyphicon glyphicon-search " aria-hidden="true"></i></span> </button> </span> </div> so how...

How to add a Plug in Elixir / Phoenix before the Router? -

is there way insert plug run prior router selecting controller/action? i've got app redirect root path specific subdomains, regardless of current path on domains. so: sub.myapp.com/foo/bar should redirect sub.myapp.com/ but, default, router says there no path /foo/bar , halts execution of plugs, meaning never hits redirect. is there way insert plug prior router choosing action/controller? (note: i'm pretty sure can handle case a catch-all route , i'm curious if there's better way.) your router called explicitly in lib/my_app/endpoint.ex . can add plugs in file before then. you can write plug handles redirects , halt connection before router called. defmodule hellophoenix.endpoint use phoenix.endpoint, otp_app: :hello_phoenix plug plug.requestid plug plug.logger ... plug customredirectplug # add plug here plug hellophoenix.router end

how to restrict Yii2 url view get request -

here explain problem clearly, how can restrict request through url in yii2 this url: http://localhost/school/backend/web/index.php?r=user%2fview&id=42 here if change view id = 43 , showing data of id 43 , don't want data through url. want restrict request through url or how can encrypt id value if change url manager to 'urlmanager' => [ 'enableprettyurl' => true, 'showscriptname' => false, ], then getting url below http://localhost/school/admin/user/view?id=42 here if change id=43 getting data of id 43 how can this. appreciated. assuming current scenario (let me know if misunderstood something): company can see/add/edit people (that part did). now, each company can actions on own people , not others. one solution: in company model must have like: public function getpeoples() { return $this->hasmany(people::classname(), ['id_people' => 'id']); } you can add funct...

julia lang - How to quit/exit from withing "included" file file -

what can within file "example.jl" exit/return call include() in command line julia> include("example.jl") without existing julia itself. quit() terminate julia itself. edit: me useful while interactively developing code, example include test file , return execution julia prompt when condition met or compile tests working on without reorganizing code much. i'm not quite sure you're looking do, sounds might better off writing code function, , use return exit. call function in include.

linux - Security updates pending even with unattended-upgrades on Debian -

i installed few days ago unattended-upgrades package install automatically security updates on debian 8 system. notice when run : poiuytrez@xxx:/var/log/unattended-upgrades$ apt-get -s dist-upgrade |grep "^inst" |grep -i securi inst curl [7.38.0-4+deb8u2] (7.38.0-4+deb8u3 debian-security:8/stable [amd64]) [] inst libcurl3 [7.38.0-4+deb8u2] (7.38.0-4+deb8u3 debian-security:8/stable [amd64]) inst libcurl3-gnutls [7.38.0-4+deb8u2] (7.38.0-4+deb8u3 debian-security:8/stable [amd64]) inst libfuse2 [2.9.3-15+deb8u1] (2.9.3-15+deb8u2 debian-security:8/stable [amd64]) that have few security updates pending. what's wrong configuration? you need either /etc/apt/apt.conf.d/20auto-upgrades or /etc/apt/apt.conf.d/02periodic , must contain lines apt::periodic::update-package-lists "1"; , apt::periodic::unattended-upgrade "1"; . run (as root) dpkg-reconfigure -plow unattended-upgrades create /etc/apt/apt.conf.d/20auto-upgrades if it's miss...

Excel using a formula to check a condition and write the count -

Image
i have 2 columns column m has set of details server type , column k contains alert types received. in next sheet want result check specific server type in column k , check specific alert , write count of number of times specific alert occurred. column k column m **sub component** **server type** unknown application batch 1 cpu inc 4 process assumptive 1 filesystem infra disk infra filesystem infra unknown assumptive 1 filesystem assumptive 1 so result looking is: in server infra how many filesystem alerts came (answer = 2) in server assumptive 1 how many process alerts came (answer = 1) so servers need know count of individual alerts received use =countifs() formula: =countifs(b:b,d2,a:a,e2) screenshot you can use server type , alert type criteria of =countifs() formula. see below... =countifs(...

saga - How can I correlate events in a masstransit state machine without using a Guid? -

i have defined following state machine in masstransit: public class orderstatemachine : masstransitstatemachine<orderstate> { public orderstatemachine() { instancestate(x => x.status); event(() => ordercreated, x => x.correlateby(order => order.ordercode, ctx => ctx.message.ordercode).selectid(ctx => newid.nextguid())); //how should select id these events? event(() => orderprovisioned, x => x.correlateby(order => order.ordercode, ctx => ctx.message.ordercode)); event(() => orderinvoiced, x => x.correlateby(order => order.ordercode, ctx => ctx.message.ordercode)); state(() => created); state(() => finished); compositeevent(() => orderfinished, order => order.compositestatus, orderprovisioned, orderinvoiced); initially( when(ordercreated) .then(context => console.writeline("order created")) ...

anonymous namespace in c++ cannot access header -

i have enum in header: namespace somespace { namespace internal { class someclass { public: typedef enum { knone = 0, kkaka = 1, }someenum; } } } in cpp, use anonymous namespace helper functions. #include <somespace/internal/someclass.h> using somespace::internal; namespace { bool helpme(someenum& foo) //does not recognize enum in header { } } void someclass::membermethod { } but cannot access someenum in .cpp file. why that? how can around without polluting internal namespace example? someenum scoped class name declared in. use need someclass::someenum . assumes someclass accessible in scope have it. if not need somespace::internal::someclass::someenum

php - Joomla: How to get the URL of an associated menu item (Multilingual / from current page) -

i want manually add hreflang-attribute html-head of page. i'm using joomla 3.4.8 + seblod component multilingual site. if associate menu items of different languages, "link-tag" , "hreflang-attribute" added head make relationship between menu items visible search engines. for reason, tag not added, if i'm in list-and-search-view of seblod component. that's why manually want write missing tags head. i know how add meta information head , how id of current menu item, but can't figure out how id (or seo-friendly url) of associated menu items of current page. any ideas? i hope described myself well... in advance! example: menu item of current page in german language. associated / connected menu item in english language (which showing english version of current page). need sef-url of english menu item. the easiest solution query active menu of variables menu. code below should return current active route menu: $app = jfactory::...

Xamarin Native Vs Xamarin.Forms -

i've been learning own xamarin.forms, use in project on company. project type - (order entry / data entry ). the application use in ipad , windows tablets/pc. until dint have many problems, sqlite orm sad part because must map dynamic querys, , cant use oledb. , ui no important, can same ui on both platforms, more important core business code. i asked boss contact people give formation in xamarin, present our project , want go , give formation. the first thing presented me, shouldn't constructing application using xamarin.forms, xamarin native. , why(i asked) ? because xamarin.forms, ui in windows example, when release ipad ui not good, , have major problems that, , make tweaks fix it, , performance drop big lists and have 1/2 months of knowledge , work not use , start new project. so question is... true? know there topic in stackoverflow question, forms 2.0 maybe game changed. my best regards, , in advance :) xamarin.platform (aka xamarin native) ...

c# - Regular expression to match non escaped character -

i need regex match keyword's value , optional type possible conditions following. in examples below curly braced fields need capture. somevaluexxx expected there although there might rare cases value null/empty string. type=xxxx optional argument , might not there. the closest regular expression able produce following: ^anniversary(?:(?::)|(?:;.*:))([^:]*)$ capture anniversary's value fail when there's escaped colon ( /: ) in value. somekeyword:{somevalue} somekeyword:{somevalue/:withcolonescaped} somekeyword:{somevalue/:withsemicolonescaped} somekeyword;type={sometype}:{somevalue} somekeyword;type={sometype}:{somevalue/:withcolonescaped} somekeyword;type={sometype}:{somevalue/;withsemicolonescaped} somekeyword;arg1=myarg1;type={sometype}:{somevalue} somekeyword;arg1=myarg1;type={sometype}:{somevalue/:withcolonescaped} somekeyword;arg1=myarg1;type={sometype}:{somevalue/;withsemicolonescaped} somekeyword;arg1=myarg1;type={sometype};arg2=myarg2:{somevalue}...

Is is possible to run Android Service after app deinstallation? -

i want run script if task destroyed. works fine possible keep service running, after user destroyes app? read binding service not working me. no. if user uninstalls app, components destroyed , removed operating system. however, can make service automatically restart after app killed (but not uninstalled) starting through context.startservice(intent) , , returning service.start_sticky in onstartcommand() @override public int onstartcommand(intent intent, int flags, int startid) { return start_sticky; }

php - What state of function arguments does debug_backtrace() capture? -

some abstract code: function test($a = 5) { debug_backtrace(); = 10; } what debug_trace tell arguments of test function? capture $a 5 or 10? if call function example way: test(4); it'll capture '4'. and if call way: test(); it'll capture no data arguments. suppose parser doesn't initialize arguments if haven't been used anywhere. (calling debug_backtrace doesn't count.) i've done more researches , things have turned out little bit unexpected (personally me) if passing arguments reference... logical enough, admit. if use following code: <?php function test2(&$a) { $a = 5; test($a); $a = 8; } function test(&$a) { $a = 6; print_r(debug_backtrace()); $a = 7; } $test = 1; test2($test); we'll such output: array ( [0] => array ( [file] => /var/www/localhost/htdocs/index.php [line] => 4 [fu...

ruby - Rails nested form creation -

i have app in want create nested form my models: class abonent < activerecord::base belongs_to :town has_many :numbers, :dependent => :destroy accepts_nested_attributes_for :numbers end class number < activerecord::base belongs_to :abonent end abonents controller: class abonentscontroller < applicationcontroller def new @abonent = abonent.new end def create @abonent = abonent.new abonents_params if @abonent.save redirect_to :towns else render action: "new" end end private def abonents_params params.require(:abonents).permit( :fullname, :work_position, :department, :email, :town_id, numbers_attributes: [ :phone ] ) end end and abonents view <hr><br> <%= form_for :abonents, url: abonents_path |f| %> <%= f.label :fullname %>: <%= f.text_field :fullname %><br /> <br /> <%= f.label :work_position %>: <%= f.text_field :work_pos...

sails.js - Using Sailsjs Skipper file uploading with Flowjs -

i'm trying use skipper , flowjs ng-flow big file uploading. based on sample nodejs located in flowjs repository, i've created sails controller , service handle file uploads. when uploading small file it's works fine, if try upload bigger file (e.g. video of 200 mb) i'm receiving errors (listed below) , array req.file('file')._files empty. intersting fact happening few times during uploading. example, if flowjs cut file 150 chunks, in sails console these errors appear 3-5 times. so, chunks uploaded server, few lost , in result file corrupted. verbose: unable expose body parameter `flowchunknumber` in streaming upload! client tried send text parameter (flowchunknumber) after 1 or more files had been sent. make sure send text params first, files. these errors appears flowjs parameters. i know text parameters must sent first correct work skipper. , in chrome network console i've checked flowjs sends data in correct order. any suggestions? cont...

PHP Illegal String Offset - But Array is Set -

maybe trivial problem - im stuck. have array, printed out print_r array ( [code] => 200 [content] => array ( [0] => array ( [belegid] => xxxx [belegdatum] => 1453330800 [lager] => abclager [transporteur] => 0 ) ) ) when try access array via if($auftrag['code'] == "200"){do something} i error warning: illegal string offset 'code' in can enlight me please? cheers i found error. human working overtime mistake. i doing print_r array - printed out properly. wasn t saving result of json decode $auftrag.

php - How to sort two fields in an array in cakePHP? -

i'm working on cakephp. have array array ( [0] => array ( [event] => array ( [start_date] => 2014-01-23 [year] => 2014 ) ) [1] => array ( [event] => array ( [start_date] => 2015-01-23 [year] => 2015 ) ) [2] => array ( [event] => array ( [start_date] => 2015-02-23 [year] => 2015 ) ) [3] => array ( [event] => array ( [start_date] => 2016-02-01 [year] => 2016 ) ) [4] => array ( [event] => array ( [start_date] => 2016-02-02 ...

linux - bash loop with GNU less that refreshes every 2 minutes -

i have linux machine data folder , script produces report xlsx spreadsheet file on ever changing content of folder being run. use xlsx2tsv script convert tsv text takes less 1 second. script takes 1 minute produce spreadsheet file , want have terminal screen showing results of table in gnu less buffer, can move around cursors, , search content /search , etc. of up-to-date version of content. at moment have bash while true; do loop first calculates content of script, transforms tsv , pipes gnu less . in terminal screen have while true; do loop kills less command every 2 minutes. leaves me 1 minute of inactivity, waiting spreadsheet updated before being able navigate content less . i optimise setup new spreadsheet produced in background not when kill less command, starting 1 minute before, updated less command gives me working copy can navigate. ideally without having create third terminal window it. any ideas? maybe gnu parallel? current setup: # screen in data folder ...

encryption - Encrypt message for Web Push API in Java -

i'm trying create server capable of sending push messages using push api: https://developer.mozilla.org/en-us/docs/web/api/push_api i've got client side working want able send messages payload java server. i saw nodejs web-push example ( https://www.npmjs.com/package/web-push ) couldn't translate correctly java. i tried following example use dh key exchange found here: http://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/cryptospec.html#dh2ex with of sheltond below able figure out code should working isn't. when post encrypted message push service, expected 201 status code push never reaches firefox. if remove payload , headers , send post request same url message arrives in firefox no data. suspect may have way i'm encrypting data cipher.getinstance("aes/gcm/nopadding"); this code i'm using currently: try { final byte[] alicepubkeyenc = util.frombase64("base_64_public_key_from_push_subscription"); k...

Change variable value based on row index {R} -

main problem i attempting expand dataset copy rows systematically change 1 variable ( year ) in each row based the value of value ( survey ). each survey round took place on multiple years, , data reflect this. example data in data.frame, , this: mydata: region year iv dv survey 1 usa.vermont 1999 1.469 6 1 2 usa.vermont 2002 1.698 7 2 3 usa.vermont 2005 1.556 6 3 4 usa.newhamp 1999 0.518 2 1 5 usa.newhamp 2002 0.698 3 2 6 usa.newhamp 2005 0.431 1 3 i used mydata.2 <- mydata[rep(1:nrow(mydata),each=3),] , got this: mydata.2: region year iv dv survey 1 usa.vermont 1999 1.469 6 1 1.1 usa.vermont 1999 1.469 6 1 1.2 usa.vermont 1999 1...

python - How to used NamedTemporaryFile (and when is it closed?) -

i'm trying write series of functions writes temporary file, stuff written file. i'm trying understand how file dealt with. what i'd in abstract is: def create_function(inputs): # create temp file, write contents def function1(file): # stuff temp file def function2(file): # other stuff temp file so can like: my_file = create_function(my_inputs) function1(my_file) function2(my_file) so here's i've done: def db_cds_to_fna(collection, open_file): """ pulls data mongodb , writes temporary file - writing arbitrary string doesn't alter question (i'm pretty sure) """ record in db[collection].find({"type": "cds"}): open_file.write(">{}|{}|{}\n{}\n".format( collection, record["_id"], record["annotation"], record["dna_seq"] ) ) return open_file.name de...

reactjs - Redux nested objects as state - is this possible/optimal -

i'm new redux please bear me. wondering if following possible and/or optimal , if so, how update nested object values in reducer? const initialstate = { banner: { backgroundcolor: 'black', text: 'some title', textcolor: 'white', image: null }, nav: { mainopen: false, authopen: false, } ... } and in reducer not seem work... export default function reducer(state = initialstate, action = {}) { const {type, data} = action; switch (type) { case set_banner_text: return { ...state, banner.text: data //<-- ****this fails unexpected token!!!**** } ... } or better to have 'banner' reducer, 'nav' reducer , on?? tia! since you're updating key of object, try using update key const state = { ...initialstate, banner: { ...initialstate.banner, // extend text: 'newtext' } } which translates to var state = _extends({}, initialst...

scripting - Use command output for "if then else" in batch file -

i want run command , use result "if then" statement schtasks /query /s server /fo list /tn "task" | find /c "running" i'm hitting roadblock on how manage though. normal output command either 0 or 3 . need able "if result 0 goto " or along lines. any suggestions? the command for preferred method output lines of command variable further processing. run in command prompt window for /? details on command. for /f %%i in ('%systemroot%\system32\schtasks.exe /query /s server /fo list /tn "task" ^| %systemroot%\system32\find.exe /c "running"') if "%%i" == "0" goto :eof the pipe operator | must escaped ^ applied command schtasks , not resulting in syntax error because of applying command for .

flash - Modify SWF after decompiling -

flash programming not programming language in write code daily.however need modify behaviour of swf application.i found online decompilier gave me as files , didn't have troubles in understanding code.however don't know how rebuild file obtain new swf after modified sources.i found on internet free tools,like flashdevelop seems job i'm stack in understanding how rebuild swf.my sources simple scripts ( no classes ) seems related.any apreciated.thank you. from within macromedia flash application need publish solution. generate additional file .fla file extension .swf. you have working file (the .fla) , need generate output file (.swf). please visit link below video explanation of swf's. .fla's , .swf's

provisioning - SyncFramework Dynamic Filtering Template Error Creating Select Changes sp -

i provisioning server, sql 2008 r2, , creating 3 different provisions, speak, 12 tables in scope. first provisioning has no parameters , second , third provisioning parameters. on second , third provisioning using templates , adding filters each table. specifying schema object. filters creating dynamic filters. when execute apply command on provisioning second , third provisions, error _selectchanges stored procedure exists table. have set setcreateproceduresforadditionalscopedefault(dbsynccreationoption.create). still trying create stored procedure name of original stored procedure 1st provisioning. in playing around see found each of provisions insert, update, bulkinsert,etc... stored procedures created each table created in schema specified selectchanges stored procedures each table not created in schema specified in default schema. found if did not specify schema , did 3 provisionings, describe above, worked , separate selectchanges stored procedures each table wer c...

c# - How do I know the node position under parent with selenium? -

i trying figure out how know position of current node under parent, using selenium , of time use xpath. because want extract columns of table in example number of columns dynamically generated <tabe> <tr> <td>23</td> <td>42</td> <td>31</td> </tr> <tr> <td>13</td> <td>21</td> <td>32</td> </tr> </table> so lets need second colunm (42 , 21), since the content dynamically generated don't know if second colum know want colum number 42. selenium 42 easily. bu need position of td. i have thought in algorithm might complex , slow. like: get html code under current get parent of current node iterate (while counting) got parent , compare each child inner code 1 found. some other validations need think when found that's colum that algorithm have issues "what if there 2 elements same inner code...

performance - ConstantScoreQuery in elasticsearch -

i'm not sure how constantscorequery works regarding performance in elasticsearch 1.4 (i don't think changed between 1.0 , 2.0 regarding this) a simple query has calculate score if query : { "constant_score": "match": {"field":"text"} } it's faster without constant_score. now if doing boolquery, there difference between wrapping boolquery constant_score or wrapping every must/should/must_not clause ? exemples : { "constant_score": { "bool":{ "must": [ {"match": {"field1": "text1"}}, {"match": {"field2": "text2"}} ] } } } versus { "bool":{ "must": [ {"constant_score": {"match": {"field1": "text1"}}}, {"constant_score": {"match": {"field2": "text2"}}} ] } } another on...

multithreading - Java: Why/what are these threads monitoring? -

Image
i have multithreaded java application splits image 4 chunks, 4 threads (i have quad-core cpu) each work on individual chunk of image, converting grayscale. i found quite slow reason, used netbeans profiler , found threads "monitoring" (waiting) quite lot. example, (green = running, red = monitoring) i experimented different numbers of threads, e.g. 2, , found still happened (the time didn't happen 1 thread). inside threads, commented out bits of code until narrowed "big delay" down statement: newimage.setrgb(i,j,newcolor.getrgb()); // write new value pixel if commented out, code runs (almost 5x) faster, , there no thread monitoring: so why 1 line cause delay? color library (alongside bufferedimage)? right i'm going try , array of ints rgb values instead of using color object , see how goes. here source code: pixelsmanipulation.java (main class): public final class pixelsmanipulation{ private static sequential sequentialgrayscaler...

linux - Renaming files in subfolders using zmv -

let's want rename files inside subfolders of folder foo.txt bar.txt using zmv. i've tried zmv '**/foo.txt' 'bar.txt' creates bar.txt in root folder. how can keep files in corresponding subfolder? you need reference directory part in target. can putting wildcards in parentheses , using $1 refer part matched parenthetical group. ** wildcard little special , requires parentheses around **/ , no more, no less. zmv '(**/)foo.txt' '${1}bar.txt' you can use -w flag have each wildcard automatically made parenthetical group. zmv -w '**/foo.txt' '${1}bar.txt' or can use -w flag , use wildcards in replacement text — with flag, wildcards in replacement text turned $1 , $2 , etc. zmv -w '**/foo.txt' '**/bar.txt' alternatively, can use $f refer source path. zmv '**/foo.txt' '$f:r.txt'

javascript - How to avoid a function directing to another page if an entry is incorrect -

i have remove page can remove entry database pre loaded option box. however, redirects 'remove-module-complete.php' page when type in random text. want direct 'remove-module-complete.php' if actual entry database. javascript doesn't seem working. i have validation entry 'didnt match item' jquery still directs me 'module remove complete' if press submit. any help? here php <?php if (isset($_post['submit'])){ $modulecode = $_post['modulecode']; $modulecodelen = strlen($modulecode); if ($modulecodelen=6){ $sqltwo = "delete modules id = '$modulecode'"; mysql_query($sqltwo); $restwo =& $db->query($sqltwo); if(pear::iserror($res)){ $errorvar = ($res->getmessage()); echo "<script type='text/javascript'>alert('invalid entry, please try again. error code: $errorvar');</script>...

java - Columns not appearing when TableView is static -

this question has answer here: javafx 8 compatibility issues - fxml static fields 1 answer i have question tableview element in javafx. when try use , add columns it, works fine, if set static (need access stage) columns not appearing @ all. my code looks (extracts): @fxml private static tableview<datensatz> table = new tableview(); @override public void initialize(url url, resourcebundle rb) { erstelletabelle(); } private static void erstelletabelle() { tablecolumn namecolumn = new tablecolumn("name"); namecolumn.setcellvaluefactory(new propertyvaluefactory<>("name")); tablecolumn handynrcolumn = new tablecolumn("handynummer"); handynrcolumn.setcellvaluefactory(new propertyvaluefactory<>("handynummer")); tablecolumn rechnungsdatumcolumn = new tablecolumn("rechnungsdatum...

android - MediaStore.Audio album art database update -

afaik, album art files places @ loacation android/data/com.android.providers.media/albumthumbs . for newly dowloaded song, when query database mediastore.audio.albums.external_content_uri field mediastore.audio.albums.album_art , value null. getting name of album correctly, implies row has been inserted, value of field not updated. however if open default music player, can see able load album art. can please explain, why query returns null app?

Type hinting in Python 2 -

in pep 484 , type hinting added python 3 inclusion of typing module. there way in python 2? can think of having decorator add methods check types, fail @ runtime , not caught earlier hinting allow. according suggested syntax python 2.7 , straddling code in pep 484 defined type hinting, there alternative syntax compatibility python 2.7. not mandatory don't know how supported is, quoting pep: some tools may want support type annotations in code must compatible python 2.7. purpose pep has suggested (but not mandatory) extension function annotations placed in # type: comment. such comment must placed following function header (before docstring). example: following python 3 code: def embezzle(self, account: str, funds: int = 1000000, *fake_receipts: str) -> none: """embezzle funds account using fake receipts.""" <code goes here> is equivalent following: def embezzle(self, account, funds=1000000, *fake_receipts)...

javascript - Regex: How do I remove the character BEFORE the matched string? -

i intercepting messages contain following characters: *_- however, whenever 1 of these characters comes through, preceded \ . \ formatting though , want remove before sending off server. know how create regex remove backslash single letter: 'omg\_bbq\_everywhere'.replace(/\\_/g, '') and recognize operation 3 times: once each character want remove preceding backslash for. how can create single regex detect 3 characters , remove preceding backslash in 3 cases? you can use character class [*_-] . to remove backslash before these characters: document.body.innerhtml = "omg\\-bbq\\*everywhere\\-".replace(/\\([*_-])/g, '$1'); when place subpattern capturing group ( (...) ), capture subtext numbered buffer, , can reference $1 backreference (1 because there 1 (...) in pattern.)

oop - javascript object literal instantiation -

i new js oop , dont understand how can this. i have var cadastro = object.create(qform); var options = { myinstancename: "cadastro", dependentlistsmode: "one", defaultbuttons: ['enter-query', 'new'] } cadastro.initform(options); then have qform.js var qform; qform = { initform: function (parms) { $.extend(this, parms); var frmobj = $(this.formid); this.userrestrictions(parms); $(this.currentform).find("a[data-form-action]").hide(); this.clearform(); this.disablefields(); }, the problem if have e object in same page , this.currentform have value of latest intantiated object . qform.js extense file lot of methods. how can manage this. thanks in general code works, uses object.create create new instances based on qform prototype , new instances not share properties, here short working example: var qform; qform = { i...

c - passing double pointer as argument -

i wanted use double pointer. but, please tell me did wrong here. value n not update after function called. expecting 30 still see 10. int main(int argc, char **argv) { int n = 10; int *ptr = &n; int **ptr2ptr = &ptr; function(&ptr2ptr); printf("%d", n); return 0; } void function(int *num) { *num = 30; } you passing triply indirected integer function function . &ptr2ptr address of pointer pointer integer. did not define nor declare function before calling main . incorrect in c99, supported in ansi c , implicitly declares function take number of arguments of types , returning int . should move definition of function before main , change to: void function(int ***num) { ***num = 30; }

swift - Issues with MobileVLCKit on iOS (Nightly Build) -

i have issues can't around mobilevlckit on ios (mobilevlckit-universalbinary-20160204-0547). on ios9 , swift. i need able know when stream cannot played, either because url not valid or other reason. tried checking vlcmediaplayer.state won't (ever) vlcmediaplayerstateerror can present sort of user friendly error. workarounds? vlcmediaplayerstatebuffering kind of useless. state getting set vlcmediaplayerstatebuffering when player buffering remote media doesn't switch other state, preferably vlcmediaplayerstateplaying when plays smoothly. effectively, cannot show loading spinner or when video buffering. when remote video stops or streaming stops working mid-streaming, drawable view of vlcmediaplayer displays last frame. there way sort of purge/clear drawable view? any ideas? thanks! thanks checking out our unstable nightly builds :) this on todo list next week. add proper dialog api including support user friendly dialogs (customizable app). if ...

javascript - How to change permanently an external file.txt? -

i change file.txt on click. example, wrote this: html: <script type="text/javascript" src="file.txt"></script> jquery: var counter = config.rans; var counter1 = config.bans; $('.redanswer').one('click', function(){ var xhr = new xmlhttprequest(); xhr.open('put','file.txt', true); xhr.setrequestheader('content-type','text/javascript; charset=utf-8'); xhr.send( 'var config={"rans":' + ++counter + ',"bans":' + counter1 + '};' ); $( '.rtotal' ).text( counter ); $( '.btotal' ).text( counter1 ); }); $('.blueanswer').one('click', function(){ var xhr = new xmlhttprequest(); xhr.open('put','file.txt', true); xhr.setrequestheader('content-type','text/javascript; charset=utf-8'); xhr.send( 'var config={"rans":' + counter + ',"bans...