Posts

Showing posts from July, 2012

android - White map but whe i apply less zoom the map appears -

i need put map in linearlayout layout: <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > .... <linearlayout android:layout_width="800dp" android:layout_height="400dp" android:orientation="horizontal" android:layout_gravity="center"> <fragment android:id="@+id/mapasave" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" class="com.google.android.gms.maps.supportmapfragment" /> </linearlayout> ....... </linearlayout> the problem map appears totaly white, when apply less zoom, map appear, continental size. the code of

Group data in nested dictionary Python -

i have dictionary this, data = {'04-01-2012': [{1: 0.93}, {2: 0.9195000000000001}, {3: 0.9090000000000001}, {4: 0.8985000000000002}, {5: 0.8880000000000002}, {6: 0.8775000000000003}, {7: 0.8670000000000003}, {8: 0.8565000000000004}, {9: 0.8460000000000004}], '12-01-2012': [{1: 0.96}], '07-01-2012': [{1: 0.96}, {2: 0.95}, {3: 0.94}, {4: 0.9299999999999999}, {5: 0.9199999999999999}, {6: 0.9099999999999999}], '06-01-2012': [{1: 0.945}, {2: 0.9365}, {3: 0.928}, {4: 0.9195000000000001}, {5: 0.9110000000000001}, {6: 0.9025000000000002}, {7: 0.8940000000000002}], '10-01-2012': [{1: 0.93}, {2: 0.9244}, {3: 0.9188}], '05-01-2012': [{1: 0.935}, {2: 0.926}, {3: 0.917}, {4: 0.908}, {5: 0.899}, {6: 0.89}, {7: 0.881}, {8: 0.872}], '11-01-2012': [{1: 0.945}, {2: 0.9325}], '02-01-2012':

php - Codeigniter XSS filter removing inline style on post Ajax data -

i have admin panel in codeignter. have enabled global xss filtering in application/config/config.php because need time. i have form add email templates. when trying post email template html content xss filter removes style attribute posted content. tried $temptate_body = $this->input->post('temptate_body', false); when globally disabled xss filter works fine don't want disable globally. form posting through jquery ajax. googled encode template body content php htmlentities function does, not luck. any ideas how disable behavior site admins able assign inline styles email templates? you read raw input data in order bypass filter, shouldn't that. the 'global_xss_filtering' setting automatic xss filtering on input , bad practice , that's why feature deprecated in codeigniter 3. don't enable global xss filtering; escape manually on output ; , please, unless form of yours in admin panel , trust source, don't skip escaping

javascript - "ion-scroll" - not able to scroll vertically -

Image
i have written code horizontal image slider using ion-scroll . working properly. want page should scrollable vertically also. can't scroll whole page swiping on contents inside <ion-scroll> (marked area in image). can scroll page swiping outside marked area. if change direction="xy" can scroll inside <ion-scroll> contents only. <ion-content> <ion-scroll zooming="false" direction="x" style="width: 100%;"> <div style="width: {{albumdetail.sliderwidth}}; repeat"> <span ng-repeat="list in albumdetail.lists"> <a href="#/app/browse/albums/{{albumdetail.type}}/{{list.id}}"><button id="album-card" class="button button-light"> <img width="140px" height="140px" src="{{list.albumart}}"/> <p id="album-name-card">{{list.albumname}}</p> </button></a&g

c# - UpdateRecurringPaymentsProfile + Authentication/Authorization Failed -

i try make request updaterecurringpaymentsprofile in paypal using httpwebrequest in mvc webapplication. problem occurred while processing request. please see below result. timestamp=2015-08-19t12:07:38z&correlationid=c803523ed08bf&ack=failure&version=0.000000&build=000000&l_errorcode0=10002&l_shortmessage0=authentication/authorization failed&l_longmessage0=you not have permissions make api call&l_severitycode0=error httpwebrequest request = (httpwebrequest)webrequest.create("https://api-3t.sandbox.paypal.com/nvp"); request.method = "post"; string formcontent = "&method=updaterecurringpaymentsprofile" + "&profileid=" + httpcontext.current.session["profileid"] + "&amt=" + amt + "&currencycode=" + currencycode + "&acct" + acct +

blackberry 10 - Cordova : white screen on BlackBerry10 and deviceready not firing -

i'm building multiplatform app cordova 5.1.1, works great on ios , android, i'm getting bit frustrated because screen white on blackberry 10. by using remote webinspector can see these logs in console : deviceready has not fired after 5 seconds. cordova.js:999 channel not fired: oncordovainfoready cordova.js:992 deviceready has not fired after 5 seconds. cordova.js:999 channel not fired: oncordovainfoready cordova.js:992 i saw post talking including "webworks.js" they're kinda old , don't think if still apply nowadays. could guys me issue ? thanks, cordova's official documentation building blackberry 10 indicates should install blackberry webworks sdk build apps bb10. has been own experience. building android requires android sdk installed -- makes sense same true blackberry 10. you can download sdk here: http://developer.blackberry.com/html5/ if you're not developing native extensions, can skip part needing native sdk. wh

How to make layout for Android app intended for wearables with api under 20 -

i bought cheap chinese android watch android 4.4.2, api 19. create app work on watch android phones. problem if put special layout layout-watch folder, qualifier not work since can used minimal api version 20. also, if write this: if(conf.uimode == conf.ui_mode_type_watch) { it returns false , behaves non-watch device. please give me hints how create "watch app" kind of devices should work on api 20+ ? how specify special layout wearables/watches ? how write condition can determine if current device wearable device/watch ? thanks i using this: public static boolean iswatch(activity activity) { if(build.version.sdk_int>=build.version_codes.kitkat_watch) { configuration conf = activity.getresources().getconfiguration(); return conf.uimode == conf.ui_mode_type_watch; } else { if(uiutil.getdisplaywidth(activity)<320||uiutil.getdisplayheight(activity)<320) { return true; //some dump chinese watch } e

java - Retrieving searched results from table -

how can store searched values table list? unable locate table result. webelement names = driver.findelement(by.xpath("//*[@id='idnumber']/div[3]/table")); thread.sleep(100000); list<webelement> totalrowcount = names.findelements(by.xpath("//*[@id='idnumber']/div[3]/table/tbody[2]/tr")); system.out.println(totalrowcount); even basic code, it's giving error it's unable locate element. first want find element table , want select radiobutton of searched value. please us. there several problems. 1) first line storing single table tag in names third line searching below names using names.findelements() second xpath contains xpath first element. unless have nested tables, both same structure issue. 2) why have sleep() between these lines, let alone such long one? there's no reason it. 3) sysout isn't going print human readable. try instead: list<webelement> totalrowcount = driver.findelements(

jquery - Phone Mask in ASP.Net -

i doing asp.net application , need use phone mask input in textbox. using jquery , not working. asp.net: <asp:textbox runat="server" id="txtcelular" cssclass="w240 placeholder"></asp:textbox> javascript: <script src="\scripts\jquery-1.7.2.js" type="text/javascript"></script> <script type="text/javascript"> $("#txtcelular").mask("(999) 9999-9999?9"); $("#txtcelular").on("blur", function () { var last = $(this).val().substr($(this).val().indexof("-") + 1); if (last.length == 5) { var move = $(this).val().substr($(this).val().indexof("-") + 1, 1); var lastfour = last.substr(1, 4); var first = $(this).val().substr(0, 9); $(this).val(first + move + '-' + lastfour); } }); </script> you have keep in mind id specify on

push notification - IBM MobileFirst 7 - Bulk Send Message error indications are incomplete -

i sending array of push messages bulk send message api in ibm mobilefirst 7. each of messages sends individually, when sending through basic send message api, , can combine messages array , send through bulk send message api. however, if deliberately make 1 message target non-existent device id, of messages fail send, , error array not indicate message failure. is there way more information message failed? there way have bulk send message api not fail entirely when 1 message results in failure? don't see in the docs found here either of these issues. this appears valid defect. if ibm customer or business partner , can please open pmr. can quote discussion in pmr.

javascript - JS: Create report on Node.js -

i need create report (text file), has tables , images. first used pdfkit : - can add picture, creation of table not possible. draw many lines - it's not good. another option create file using excel-export : - creating table perfect, there no way add image. anyone knows module, combines addition of images , creation of simple table? i found answer in other lib - html-pdf very easy use. can read in more detail here

mysql - Inner join on more than 2 tables -

i have 3 different tables balance , received , expenses following data in it. table received: mysql> select * received; +-----+---------+-----------------+---------------------+ | rid | site_id | received_amount | receive_date | +-----+---------+-----------------+---------------------+ | 1 | 1 | 500 | 2015-08-19 18:16:51 | | 2 | 1 | 600 | 2015-08-19 18:16:52 | | 3 | 1 | 500 | 2015-08-20 18:16:52 | | 4 | 1 | 500 | 2015-08-19 18:16:52 | +-----+---------+-----------------+---------------------+ table expenses: mysql> select * expenses; +-----+---------+----------------+---------------------+ | eid | site_id | expense_amou

Delete file created with php script from php -

i have script creates, updates or delete file given argument on /var/www/ folder. if( $_server['request_method'] === 'put' ){ $params = json_decode(file_get_contents("php://input")); $myfile = fopen( '/var/www/folder/'. $params->name , "w") or die('failed open file'. $params['name']); fwrite( $myfile, $params->command ); fclose(); } else if( $_server['request_method'] === 'delete' ){ $params = json_decode(file_get_contents("php://input")); echo unlink( '/var/www/folder/'. $params->name )? "the file deleted" : "the file not deleted". '\n'; } i having issue, though. files being succesfully created in folder, aren't being deleted unlink command - returns false. the apache server running on ubuntu machine. 'folder' permissions 777 , permissions script. files

asp.net - Trailing slash Umbraco and HTTPs -

i have umbraco site sits behind netscaler. requests translated http https (via netscaler) , trailing slash appended using iis rewrites. iis re-write rule causing https request (without trailing slash) insert additional request status of 302. essentially: https://example.com/news (status 301) http://example.com/news/ (status 302) https://example.com/news/ (status 200) ideally 1 301 redirect , 200 - need remove temporary redirect the iis rewrite rule add trailing slashes: <rule name="add trailing slash" stopprocessing="true"> <match url="(.*[^/])$" ignorecase="true" /> <conditions> <add input="{request_method}" pattern="post" negate="true" /> <add input="{request_filename}" matchtype="isfile" negate="true" /> <add input="{request_filename}" matchtype="isdirectory" negate="tru

python - Search text file for multiple strings and print out results to a new text file -

i'm new python programming , i'm trying learn file i/o best can. i in process of making simple program read text document , print out result. far i've been able create program of many resources , questions on website. however i'm curious on how can read text document multiple individual strings , save resulting strings text document. the program below 1 i've made allows me search text document keyword , print results between keywords text file. can 1 set of starting , ending keyword per search: from tkinter import * import tksimpledialog import tkmessagebox tkfiledialog import askopenfilename root = tk() w = label(root, text ="configuration inspector") w.pack() tkmessagebox.showinfo("welcome", "this version 1.00 of configuration inspector text") filename = askopenfilename() # data search text file outputfilename = askopenfilename() #output text file open(filename, "rb") f_input: start_token = tksimpledialog.

javascript - AngularJS complex table header -

i'm developing timesheet application. have ready layout (html/css). i'm working on layout behavior. current goal extracting timesheet table header in directive. angular template html should similar this: <colgroup class="col_day"> <col ng-repeat="day in header.days" ng-class="someconditions"> </colgroup> <thead> <tr> <th ng-repeat="day in header.days" ng-class="someconditions"> {{somelayout}} </th> </tr> </thead> i want use template via directive this: <table> <timesheet-header></timesheet-header> <tbody></tbody> <tfoot></tfoot> </table> problems: angular doesn't allow use multiple roots in template in directives replace: true template content appears outside of tag (only if template contains single tag rendered inside table i have bad solutions: cre

ruby - Puppet class orders break using defines -

i have level of dependency in order of modules being applied: class build() { # define order class['base'] -> class['config'] -> class['app'] -> class['sso'] class { 'base' : ... } class { 'config' : ... } # etc } class base::init.pp () { class { 'base::prereqs' : ... } class { 'base::worker' : require => class['base::prereqs'] ... } } # etc etc the error occurs when base::prereqs has: define base::prereqs::file () { ... } class base::prereqs () { $files = [ 'file_name', ... ] base::prereqs::file { $files : } } the desired order base::init --> base::prereqs --> base::worker --> config::init --> config::prepreqs --> config::worker --> app::init ... however actual order using define becomes... base::init --> base::prereqs (except resources created in define) --> config::init --> config::prereq

Making internationalization work in blogger? -

i'm referring page here: http://phoexpert.blogspot.de/2015/08/why-am-i-doing-this.html?m=1 so in blog post author uses csjs library internationalization (following advice in post ). while works in browser version doesn't work mobile version. i assume has query"?m=1" added url mobile version. while on desktop can delete "?m=1" desired version, can't delete in mobile version? so how can fix it? there library besides csjs works blogger (i've searched , far post referring in beginning reference)? or there workaround? more importantly, why happen? thought doesn't make difference whether it's mobile or desktop version. thought thing matters browser size? why query "?m=1" messes internationalization?

php - Warning: json_decode() expects parameter 1 to be string -

i insert php array mysql using json_encode method : ["11","10","4"] now need convert php array: $me = ["11","10","4"]; $you = json_decode($me, true); echo $you; but in result see : warning: json_decode() expects parameter 1 string, array given in c:\xampp\htdocs\test\test.php on line 5 how fix this?! your problem $me isn't string. should encapsulate in single-quotes change this. $me = '["11","10","4"]'; $you = json_decode($me); print_r($you); // becasue php array, // copy/paste every time

javascript - jQuery CSS Opacity Animate -

so i'm trying create simple fading slideshow 5 slides repeats when finished. i feel i've got should work, it's not. <script type="text/javascript"> $(document).ready(function() { function playslide(){ settimeout(function(){ $("#slide-two").animate({"opacity":"1"}, 2000, 'swing').delay(11000).animate({"opacity":"0"}, 1, 'swing')}, 10000); settimeout(function(){ $("#slide-three").animate({"opacity":"1"}, 2000, 'swing').delay(11000).animate({"opacity":"0"}, 1, 'swing')}, 20000); settimeout(function(){ $("#slide-four").animate({"opacity":"1"}, 2000, 'swing').delay(11000).animate({"opacity":"0"}, 1, 'swing')}, 30000); settimeout(function(){ $("#sl

excel - VBA to save worksheet with a specific name -

hi simple answer im new vba. i have worksheet in workbook. worksheet has specific reference in cell a1 changes each time used. order number , formatted 03 01 15. next 03 02 15, 03 03 15 , on. what want use vba save sheet in new workbook in orders folder, , new workbook called order number. i can use record macro function basic vba copy sheet, open new workbook, paste values , close workbook, im struggling getting name right. each new workbook have different name based on order number. any appriciated.

java - @OneToOne Hibernate with annotations. Can't properly save -

i can't make foreign keys auto generate using hibernate , jpa annotations. seems ok, entries saved in database. date come 1 form which, when submited creates user object modelattribute , saves in database. here beans. else should add ? @entity @table(name="adress") public class adress implements serializable { @id @generatedvalue(strategy=generationtype.auto) @column(name="adress_id") private integer adressid; @notblank(message="the city must completed") @column(name="city") @size(min=5,max=30) private string city; @notblank(message="the street must completed") @column(name="street") @size(min=5,max=30) private string street; @notnull(message="the street number must completed") @numberformat @column(name="street_no") private integer streetno; @onetoone @joincolumn(name="user_id") private user user;} and other one: @entity @table(name="users") public class user implements s

Filtering children by parent value in elasticsearch -

i have index 3 document types: lead - have , id , type (child of account) account - have id payment - have , id, type , account_id (child of account) they in parent-child relationship. want statistics lead types have (group type) , count how many payments of type have. i came query, i'm unable filter child aggregation parent's type. query lead type { "query": { "match_all": {} }, "aggs": { "by_type": { "terms": { "field": "type" }, "aggs": { "payments_count": { "filter": { "and": [ { "has_parent": { "type": "account", "query": { "filtered": { "query": { "match_all": {}

Vue.js Binding Dynamic Models -

i'm trying create series of select tags array of dynamic properties. refering documentation on dynamic select options however, don't know model name before data, need create v-model binding dynamic value. any ideas ? code on jsfiddle html <div id="selectapp"> <div v-repeat="dynamicselects"> {{key}} <!--this works: <select v-model="setreps1" options="setreps1"></select> --> <select v-model="{{key}}" options="{{key}}"></select> </div> <pre>{{$data|json}}</pre> js new vue({ el: document.queryselector("#selectapp"), data: { dynamicselects: [ {key: "setreps1"} ], setreps1: [ { text: '0', value: '0' }, { text: '1', value: '1' } ] } }); *update fiddler link * so figured out way

ruby on rails - Cloud 9 IDE - Web Server running but not displaying in browser -

i have rails application running in cloud 9 ide. when run using command line rails s -b $ip -p $port running command displays console log => booting thin => rails 4.2.3 application starting in development on http://0.0.0.0:8080 => run `rails server -h` more startup options => ctrl-c shutdown server thin web server (v1.6.3 codename protein powder) maximum connections set 1024 listening on 0.0.0.0:8080, ctrl+c stop but when try open url in browser, says "no application seems running here!", @ same time, try using curl http://0.0.0.0:8080 this working properly. i tried restarting ide still same, check c9 status operational. the issue resolved, not sure wrong, since did not anything, started ide today , working fine.

cart - How to set custmer id for an quote in magento? -

i adding product cart , tried map customer id,email quote using below code $product_id = 123; $qty = 1; $product = mage::getmodel('catalog/product')->load($product_id); $cart = mage::getmodel('checkout/cart'); $cart->init(); $superattributearray = array('151' => '3'); $params = array( 'product' => $product_id, 'qty' => $qty, 'super_attribute' => $superattributearray ); $cart->addproduct($product, $params); $cart->save(); $currenquoteid = mage::getsingleton('checkout/session')->getquoteid(); $store = mage::getsingleton('core/store')->load(mage::app()->getstore()->getid()); $quote = mage::getmodel('sales/quote&

c# - How to handle missing values from VirtualKey enumeration in KeyRoutedEventArgs e -

using c#, i'm extending windows.ui.xaml.controls.textbox class handle custom formatting of input user types. logic called 2 event handlers, 1 textchanged event (for attempts paste data) , keydown event (for typed input). my problem concerns keydown event , arguments, contained in keyroutedeventargs class . key press described virtualkey enumeration . unfortunately enumeration missing many keys, such comma, tilde, or backspace. additionally, delete present, when press textchanged event gets handled before keydown event. can mess behavior of control. is there way of handling typed data give me control need in custom control? backspace available, virtualkey.back. the comma key oemcomma, (virtualkey)188. tilde character requires holding down shift key , pressing oem8 key, (virtualkey)223. in neck of woods not on spanish keyboard, use lot have dedicated ñ key , have press altgr + d4 plain tilde. can reverse-engineer other missing ones having @ system.windows.f

java - why no type mismatch error in string split method when run in loop? -

this question has answer here: what colon mean in java? 5 answers i have string handling related question split() - return type string[] in loop storing split value in string literal for (string retval: str.split("-")) why doesn't give type mismatch error in code below? string str1 = "abfg-hjddh-jdj"; string str = str1.split("-"); string str = str1.split("-"); gives error because split returns array, correct syntax is: string[] str = str1.split("-"); in for-each loop for (string retval : str.split("-")) for each loop : indicates iterating array, collection or list of strings, no error trhown examples: for (int retval : string.split("-")) // error, arraylist<books> books; (book book : books) // correct set<integer> integers; (integer

android - RecyclerView scrollToPositionWithOffset with animation -

im trying animate card view's position , resize fit screen @ same time. when user clicks button inside cardview, cardview should expand size of container, , scroll become visible @ same time in custom animator class, im using following function: @override protected void applytransformation(float interpolatedtimetransformation t) { int newheight = (int) (startheight + (targetheight - startheight) *interpolatedtime); view.getlayoutparams().height = newheight; ((linearlayoutmanager) mainpage.maingrouprecycler.getlayoutmanager()).scrolltopositionwithoffset(mainpage.maingrouprecycler.getchildadapterposition((cardview) view.getparent()), 0); view.requestlayout(); } in following case, recyclerview instantly shows cardview @ top of visible area without animating scrolling, animates resize. need scroll @ same time resize happening. i tried calling scroll function: mainpage.maingrouprecycler.scrolltoposition(mainpage.maingrouprecycler

ios - Adding subview to `UITableViewCell` is repeated -

i use custom edit actions edit row indexpath after action pressed -(nsarray *)tableview:(uitableview *)tableview editactionsforrowatindexpath:(nsindexpath *)indexpath { uitableviewrowaction *deletebutton = [uitableviewrowaction rowactionwithstyle:uitableviewrowactionstyledefault title:@"delete" handler:^(uitableviewrowaction *action, nsindexpath *indexpath) { uitableviewcell *cell = (uitableviewcell*)[tableview cellforrowatindexpath:indexpath]; uiswitch *switch = [[uiswitch alloc] initwithframe: cgrectmake(0,0,0,0)]; [cell.contentview addsubview:switch]; }]; return @[deletebutton]; } this adds uiswitch cell pressed delete action button, however it's being repeated every 12 rows or so; indexpaths different (0-1)-(0-2)..etc . i believe caused because of method used grab cell in line uitableviewcell *cell = (uitableviewcell*)[tableview cellforrowatindexpath:indexpath]; by design, cell's re-used cells scroll off top

wordpress - Google App Engine modules: routing second module to subdirectory -

has run 2 different wordpress installations separate modules inside google app engine? i have following: /app/ - wordpress1 - wordpress2 - app.yaml - second.yaml - dispatch.yaml - php.ini inside wordpress1 , wordpress2 clean installations of wordpress, gae helper plugins. app.yaml contains default module config, redirects traffic wordpress1 using url handlers. second.yaml contains second module config ( module: second ) , redirects traffic wordpress2 . in dispatch.yaml check subdir second load second.yaml config: dispatch: - url: "*/second*" module: second everything fine , dandy: http://localhost.dev:8080 -> wordpress1/index.php http://localhost.dev:8080/second/ -> wordpress2/index.php but can't seem work out how set edge cases: http://localhost.dev:8080/secondwithextra -> dispatcher error (no url set) http://localhost.dev:8080/second (missing trailing slash) -> same above i tried add followi

java - How to find the most common character in a String -

i have quick question. how find common character in string in java. know logically how it, not sure if syntax in correct: public class helloworld { public static void main(string[] args){ string votes = "abbab"; char[] storingarray = votes.tochararray(); int numofb = 0; int numofa = 0; if (storingarray.contains("a")) { numofa++; } else if (storingarray.contains("b")) { numofab++; } if (numofa = numofb) { system.out.println("tie"); } else if (numofa > b) { system.out.println("a"); } else { system.out.println("b"); } } } could me how correctly in java? you can not compare char array string, below logic should work , give need: public static void main(string[] args){ string votes = "abbab"; char[] storingarray = votes.tochararray(); int numofb = 0; int numofa = 0;

delphi - pmAuto ModalPopupMode proper use or bug workaround -

i'm having problems using tapplication.modalpopupmode=pmauto , wondering if problems caused usage of pmauto or bug in delphi. simple use case: form1(mainform) , form3 permanent forms. (created in dpr) form2 created when needed , freed afterward. form3 contains tcombobox x items. sequence of actions : form1 create , show form2 modal. form2 show form3 modal. close form3 close , free form2 show form3 <---- tcombobox contains 0 items. i use combobox example, guess controls saves information in destroywnd procedure , restore in createwnd procedure isn't working right. tested tlistbox , displays same behavior too. is known fact 1 shouldn't mix permanent , temporary form when modalpopupmode pmauto? if not, there known workaround problem? if it's bug, fixed in more recent version of delphi? (i'm using xe4) it not bug, quirk in how various windows interact each other when dealing modality. when form3 first created, tcombobox.creat

java - File path problems in windows environment -

i have following line of code: "%s/ramp_adapter/user_%d/ramp_file_receipt/%d".format(new java.io.file(".").getabsolutepath().replace("/.",""), endpointid, fileid) if print line in window wrong file path: e:\git\project\codeadapters\rampadapter\./ramp_adapter/user_1001/ramp_file_receipt/3 in unix, file path coming correct. i know need make compatible windows , tried using filenameutils didn't resolved problem. the path should correct in environments. replace "%s/ramp_adapter/user_%d/ramp_file_receipt/%d" with "%s" + file.separatorchar + "ramp_adapter" + file.separatorchar + "user_%d" + file.separatorchar + "ramp_file_receipt" + file.separatorchar + "%d" replace getabsolutepath().replace("/.","") with getabsolutepath().replace(file.separator + ".", "")

c# - How to display information from joined tables in a DataGridView -

i write software shows database contents in forms application. make easier explain, i'll use shopping list example. i have number of lists in 1 table tlists i have number of tproductpackages in table a list can consist of many productpackages , 1 productpackage can in many lists. m:n relationship reflected in separate table named tlistprodpacks . a productpackage contains product. product can have several productpackages. in every tproductpackage table entry, there's foreign key fk_productid references entry in table tproducts . my forms application should navigate through lists using bindingnavigator . in bound controls, should display details of selected list. working fine. (just bound controls.) all list contents (entries in tlistprodpacks selected tlists element) should shown in datagridview. working fine. details of productpackages ( tproductpackages items i.e. 1 hop more next table) displayed correctly. in table product value available id (fk_ producti

writing to a file with php and javascript -

so want use buttons on html page call php program write text file. success package ajax function, file has supposed have written not exist. my html <button type = "button" onclick = "getrequest('changestate.php', changestate('1'), 0)"></button> my javascript functions: function getrequest(url, success, error) { var req = false; try{ // browsers req = new xmlhttprequest(); } catch (e){ // ie try{ req = new activexobject("msxml2.xmlhttp"); } catch(e) { // try older version try{ req = new activexobject("microsoft.xmlhttp"); } catch(e) { return false; } } } if (!req) return false; if (typeof success != 'function') success = function () {}; if (typeof error!= 'function') error = function () {}; req.onreadystatechange = function() { if(req.readystate == 4) {