Posts

Showing posts from March, 2015

c# - How to use isolated storage pass data to background agent in windows phone? -

Image
below coding found in share data between main app , periodic task can't work , getting error. any idea or help? in main page using system.io.isolatedstorage; using system.threading; using (mutex mutex = new mutex(true, "mydata")) { mutex.waitone(); try { isolatedstoragesettings.applicationsettings["order"] = 5; } { mutex.releasemutex(); } } and in agent: using (mutex mutex = new mutex(true, "mydata")) { mutex.waitone(); try { order = (int)isolatedstoragesettings.applicationsettings["order"]; } { mutex.releasemutex(); } } i suggest you, can use separate library project task taking care communicate in between both of applications; such foreground , background app. you must have 3 projects in application. 1) ui aapplication (foreground app) 2) project library (isolated communicati

java - Hibernate concurrency(?) issue when reading/updating -

situation: we have webapp (java ee-spring-hibernate) generates pdf barcode. barcode contains id generated @ runtime. have java service uses hibernate check if there's id current date, if none exists, entry created. if 1 exists incremented , updated. there 1 row per day containing following fields: id, coverpageid, date so when user creates first barcode of day, row added current date coverpageid=1. subsequent barcodes last id database, increment , save row incremented value. problem: when multiple users creating pdf's @ same time, hibernate fetch same value both users resulting in same barcode on pdfs. tried solution: the code fetches current id, increments , updates row executed in same method. method inside spring bean. since spring beans singletons tried making method synchronized . did not help. method: @transactional(isolation=isolation.serializable) public synchronized long getnextid(date date) { list<coverpageid> allcoverpageids = thi

python - nonlocal variable->IndentationError: expected an indented block -

this code: def **make_print_driver_singelton_class**(): counter=0 def **setcount**(): nonlocal counter counte+=1 i error: nonlocal counter ^ indentationerror: expected indented block what problem? i think code has indentation problems. def **make_print_driver_singelton_class**(): counter=0 def **setcount**(): nonlocal counter counte+=1                  

TinyMCE - adding grids that are editable without the tags disappearing -

i have added custom set of buttons adding simple grids editor. these have following structure; <div class="grid"> <div class="col-1-2"><p>column 1</p></div> <div class="col-1-2"><p>column 2</p></div> </div> a custom css assigned displays grids correctly. user goes edit text..understandably deleting or highlighting , trying replace, tinymce removes empty tags if user deletes text column 1 end this; <div class="grid">my new text<br /> <div class="col-1-2"><p>column 2</p></div> </div> i have tried adding; extended_valid_elements : 'div[id|class|style]' but had no effect. how can stop tinymce removing these empty tags or going wrong way..? thanks

javascript - kinetic js - how do I modify attributes dynamically (onmouseover) -

i have following code, position doesn't vary mouseover - missing? function drawoverlay() { var stage = new kinetic.stage({container: 'overlay'}); var layer = new kinetic.layer(); var rect = new kinetic.rect({ x: 239, y: 75, width: 100, height: 50, fill: 'green', stroke: 'black', strokewidth: 4 }); rect.on('mouseover', function(e) {rect.setposition({x: 50, y: 5 0});}); layer.add(rect); stage.add(layer); } two problems here: your y value has space in it: "5 0" vs. "50", causes javascript parsing error. you need redraw layer after changing position of node. so try this: rect.on('mouseover', function(e) { rect.setposition({x: 50, y: 50}); layer.draw(); });

forms - New-ADuser echo user password -

attempting set powershell form creates new user in our ad, script works great being contractors need echo password input , save csv exporting. below have far new-aduser -name "$d" -accountexpirationdate "$j" -accountpassword (read-host assecurestring "enter password below") secure strings aren't secure 1 might think. read password variable instead of putting read-host in subexpression: $pw = read-host -assecurestring -prompt "password" new-aduser -name "$d" -accountexpirationdate "$j" -accountpassword $pw and can decrypt secure string this: $cred = new-object management.automation.pscredential ('x', $pw) $cred.getnetworkcredential().password

php - MySQL with ND connection failover with PhalconPHP/PDO -

in this part of mysql-nd manual described how implement recommended way of failing on when loosing connection slave mysql server. i'am willing implement in phalconphp. have couple of important projects using phalcon , mysql-nd, important me in right place. trying find documentation, can't find example start with. trying find eventmanager approach, looking phalcon documentation here , here can't find way transparently. most attractive way use event manager capture error event , query same again if connection error. 1 update after reading phalcon sources found, there may no way run same query second time in standard way - mean here via kind of pdo parameter or using phalcons' eventmanager attached db service. 1 possible attempt found run query after db:afterconnection event, not solution. 2 update db:afterconnection hardly reachable, instead possible gather during db:beforequery . problem is, pdo run phalcon pdo::attr_errmode => pdo::errmode_e

Return Unique Values from an XML Files using PHP, simplexml_load_file and Xpath -

this question has answer here: distinct in xpath? 5 answers thank assistance in advance. have search through forum , through www looking answer cannot find straight forward one. i trying return results xml file extracts unique value of attribute. xml example file: <?xml version="1.0" encoding="iso-8859-1" ?> <computers> <restults> <computer id="1" group_id="a" model_group="acer" name="acer 1 gb" /> <computer id="2" group_id="a" model_group="acer" name="acer 2 gb" /> <computer id="3" group_id="b" model_group="acer" name="acer 3 gb" /> <computer id="4" group_id="c" model_group="acer" name="acer 4 gb"/> <computer id="5&

How to only view business hours in a fullCalendar agenda view -

Image
i want show business hours in daily agenda view 8:30 17:00, below: are asking how hide hours outside of business hours? if so, use mintime , maxtime options: http://fullcalendar.io/docs/agenda/mintime/ http://fullcalendar.io/docs/agenda/maxtime/ for instance, 9am - 5pm calendar: $(document).ready(function() { $('#calendar').fullcalendar({ ... mintime: "09:00:00", maxtime: "17:00:00", ... }); });

Batch file error: "cant be processed syntactically at this point" -

my batch-file program crashes @ same point. happens before crashes this: ping -n 6 127.0.0.1 1>nul: 2>nul: -n cant processed syntactically @ point. if ping -n 1 127.0.0.1|find "(0" >nul && goto loop and window closes. could maybe me fix problem? whole script: @setlocal enableextensions enabledelayedexpansion :loop set ipaddr=127.0.0.1 ping -n 6 %ipaddr% >nul: 2>nul: if ping -n 1 %ipaddr%|find "(0%" >nul && goto loop echo connection lost start "" http://www.google.com else if ping -n 1 %ipaddr%|find "(100%" >nul && goto loop echo connection ok taskkill /fi "windowtitle eq google*" goto loop endlocal here advanced version 2 blocks of code executed dependent of whether connection ok or lost. @setlocal enableextensions enabledelayedexpansion set ipaddr=127.0.0.1 :loop ping -n 6 %ipaddr% >nul: 2>nul: ping -n 1 %ipaddr%|find "(0%" >nul &&am

python - StackLayout changes size automagically in kivy framework -

using win7, eclipse, python 2.7 + kivy framework developing opengl app. trying check collision points(x, y) of widget on mouse click. create layout specific size, when entering on_touch_down(mouse click) callback layout size strangely changed(here problem). let me show code: class playscreen(screen): layout = none def __init__(self): self.layout = stacklayout(size=(types.screen_size_width, 100)) #then create widgets inside layout: self.lblscore = label(text='score:', size_hint=(.1, .1)) self.lblscorevalue = label(text='0', size_hint=(.1, .1)) ..... self.layout.add_widget(self.lblscore) self.layout.add_widget(self.lblscorevalue) #here debugger shows me self.layout size be(800, 100) #and want test if click on self.layout: def on_touch_down(self, touch): bcanaddtower = true if self.layout.collide_point(touch.x, touch.y) == true: print &quo

android - PhoneGap interop -

smartphone app should run on ios android windowsphone use-case capture video go through rich ui video processing implementation use phonegap 'video capture' & 'ui' use os specific implementation 'video processing' part ( 'objective-c' iphone, c++ android & c++/com windowsphone ) before putting more stakes phonegap, know if phonegap support above use-case, support os specific interop ( video processing ) on per os basis? phonegap supports single solution/project including per os native implementation 'video processing' part ? any appreciated. as per use-case confirm. take on capturevideo api confirm. phonegap supports jquerymobile , other mobile web frameworks. conform. implemented additional phonegap plugin (s). ideally have same js file across platforms api definition , different platform specific implementation each platform.

python - Django foreign key count filter -

i have following 2 models: class foo(models.model): param1 = ... param2 = ... ... paramn = ... class bar(models.model): foo = models.foreignkey(foo) ... ... goal: compute queryset of instances of foo such more 1 bar instance connected it i have been looking solution , seems work else foo.objects.annotate(num_bar=count('bar')).filter(num_bar__gt=1) this gave me fielderror saying 'bar' not possible field foo , tried 'bar_set' , got same error is there chance implementing them wrong, or because old depreciated now? appreciated! traceback traceback (most recent call last): file "<console>", line 1, in <module> file "/home/ryan/.virtualenvs/project/local/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) file "/home/ryan/.virtualenvs/project/local/lib/python2.7/site-packages/d

javascript - Open pop-under when user leave (exit) -

i got great script found here : http://beeker.io/exit-intent-popup-script-tutorial here js (bioep.js) code : window.bioep = { // private variables bgel: {}, popupel: {}, closebtnel: {}, shown: false, overflowdefault: "visible", transformdefault: "", // popup options width: 400, height: 220, html: "", css: "", fonts: [], delay: 1, showondelay: false, cookieexp: 1, cookiemanager: { // create cookie create: function(name, value, days) { var expires = ""; if(days) { var date = new date(); date.settime(date.gettime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.togmtstring(); } document.cookie = name + "=" + value + expires + "; path=/"; }, // value of cookie get: function(name) { var nameeq = name + "="; var ca = document.cookie.split(";"); for(var

r - conditionalPanel in Shiny not working -

i trying use conditionalpanel display message when file being loaded. however, panel not disappearing once condition true. have created reproducible code below: server.r library(shiny) print("loading start") print(paste("1->",exists('fgram'))) fgram <- readrds("data/ugram.rds") print(paste("2->",exists('fgram'))) print("loading end") shinyserver( function(input, output, session) { }) ui.r library(shiny) shinyui( fluidpage( sidebarlayout( sidebarpanel( h4("side panel") ) ), mainpanel( h4("main panel"), br(), textoutput("first line of text.."), br(), conditionalpanel(condition = "exists('fgram')", html("please wait!! <br>app loading, may take while....")), br(), h4("last line of text..") ) ) ) conditions supplied conditionalpanel executed

java - Update a single file in the EAR file in a better way -

i have ear file following structure app.ear - app-inf - lib // libraries (.jar) here - meta-inf - manifest.mf - weblogic-application.xml - module1.war - modulejar.jar - module1.war - customlib.jar under module1.war , have updated web.xml , later need deploy same ear file, better way out ant script , command prompt. by using 7zip software whit out extracting can edit files in war,ear , jar . right click on .ear->.7zip->select 'open archive' in side select 'module1.war'->open like can reach web.xml there select edit on web.xml add or delete lines.

net use - "net use" for Azure File Services fails depending on OS type -

anyone know why below "net use" command gets varied results depending on machine os though logged on admin in cases? fails or works based on os within powershell or cmd whether shell run administrator or not. share setup in azure file services , can accessed on win10 machine fine using azure powershell cmdlets. # mount azure share drive net use x: \\[myaccount].file.core.windows.net\davesdata /user:[myaccount] [my secondary key] runs fine on server 2012 gets “access denied” on server 2008 gets “path not found” on windows 10 azure file storage supports following windows / smb variants: windows 7 smb 2.1, windows server 2008 r2 smb 2.1, windows 8 smb 3.0, windows server 2012 smb 3.0, windows server 2012 r2 smb 3.0 , windows 10 smb 3.0. if connecting vm within same azure region can connect using smb 2.1 or smb 3.0. if connecting outside of azure region need ensure port 445 outbound open. many isp's / corporate filewalls block this. wiki contains list

c# - Combine custom AuthorizeAttribute and RequireHttpsAttribute -

i have custom requirehttpsattribute , custom authorizeattribute apply in filterconfig ensure controllers uses https , authorizes in same way. i have controller action need other authorization. in case must first use [overrideauthorization] override global authorization filter, , can set special authorization action. but [overrideauthorization] override customrequirehttpsattribute since inherts iauthorizationfilter . can don't have readd customrequirehttpsattribute attribute every time override authorization? public class filterconfig { public static void registerglobalfilters(globalfiltercollection filters) { filters.add(new customrequirehttpsattribute()); filters.add(new customauthorizeattribute(role = "user")); } } public class mycontroller : basecontroller { public actionresult dosomeuserstuff() { } [overrideauthorization] [customrequirehttpsattribute] [customauthorizeattribute(role = "admin&qu

php - custom permalink issue on wordpress -

i created plugin , accessed plugin page using code: add_filter('page_template', 'in_page_template4' ); function in_page_template4(){ global $wpdb; $new_page_title = 'inventory'; $new_page_title1 = 'inventory-details'; $new_page_title2 = 'spanos-inventory'; $new_page_title3 = 'trade-in-inventory'; $ppid=$_get['page_id']; $sql = "select * wp_posts id='".$ppid."';"; // $sql = "select * wp_posts post_name='".$new_page_title."';"; $cnt_post = $wpdb->get_results($sql); if(count($cnt_post)!=0){ $page_title=$cnt_post[0]->post_name; if($new_page_title==$page_title){ $page_template = dirname( __file__ ) . '/car_inventory.php'; return $page_template; }elseif($new_page_title1==$page_title){ $page_template = dirname( __file__ ) . '/inventory_details.php'; return $page_template; }

Can I use confirm() while uplifting my script from javascript to jquery? -

can use confirm() while uplifting script javascript jquery? have tried use dialog in jquery need alert box in same style in confirm()(java script). there way or can use confirm() in jquery???? thanks in advance.., jquery javascript library. it not different programming language. can easiliy use confirm or other native javascript functions when use jquery.

android - How to save an image picked from gallery to shared preferences -

i have made application has background image set. want pick image gallery , set application background. part done. want picked image sets permanently application background, because reopen application default image gets set. how can save selected image permanently till try change again? @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); bn= (button) findviewbyid(r.id.button); sharedpreferences sp = getsharedpreferences("student", mode_private); final sharedpreferences.editor spedit = sp.edit(); v = r.drawable.back; spedit.putint("background", v); relativelayout bg = (relativelayout) findviewbyid(r.id.abc); bg.setbackgroundresource(v); bn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent = new intent( intent.action_pick,

java - Android alert dialog Issue -

in android application, use 1 alert dialog display information user, , if user click dialog , should finish activity. code offer.this.runonuithread(new runnable() { @override public void run() { // todo auto-generated method stub alertdialog alert=new alertdialog.builder(offer.this).create(); alert.settitle("svsugar mill"); alert.setmessage("offer number "+offer_no.gettext().tostring()); alert.setbutton("click dismiss", new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int which) { // todo auto-generated method stub finish(); //return; } }); alert.show(); } }); it doesn't wait user response finish(). instead called if user didn't click alert dialog. know asynchronous, need this.(the offerno should displayed user. when user click alert dialog should finish activity). there way this? someone me edit: the activity finished

javascript - Keystone JS retrieve row ID in HTML table -

i'm having trouble update info : i have array each line form. here looks in jade : each info in infos form(method="post") input(type='hidden', name='action', value='save') td input(value='#{info.name.full}' disabled).form-control td input(value='#{info.field}' disabled).form-control td input(value='#{info.field1}' disabled).form-control td input(value='#{info.field2}' disabled).form-control td input(value='#{info.field3}' disabled).form-control td input(value='#{info.field4}' disabled).form-control td input(value='#{info.field5}' disabled).form-control td input(value='#{info.field6}' disabled).form-control td input(value='#{info.field7}' disabled).form-control td

c# - Select value from database based on dropdownlist value -

i have database table leave_rec(name,date1,leave,ltype) , dropdown list , gridview . i want such that,when select month(e.g. february) in dropdown list gridview should display table values february only(e.g.rohan leuva,2/28/2013,full,casual) ,means record has month=2 (february). how overcome issue? tried can display values in gridview @ moment. appriciated. sqlconnection conn = new sqlconnection(); conn.connectionstring=system.configuration.configurationmanager.connectionstrings["leave"].connectionstring; conn.open(); sqlcommand cmd = new sqlcommand("select date1,leave,ltype leave_rec name='" + dropdownlist1.selectedvalue + "'", conn); sqldataadapter da = new sqldataadapter(cmd); dataset ds = new dataset(); da.fill(ds); gridview1.datasource = ds; gridview1.databind(); the above code displays date1 , leave , ltype dropdownlist1.selectedvalue. want have second dropdown in months there. when select february in second one, grid should d

c++ - Compare typedef is same type -

i using c++ (not 11) , using libraries have different typedefs integer data types. there way can assert 2 typedefs same type? i've come following solution myself.. safe? thanks template<typename t> struct typetest { static void compare(const typetest& other) {} }; typedef unsigned long long uint64; typedef unsigned long long uint_64; typedef unsigned int uint_32; int main() { typetest<uint64>::compare(typetest<uint64>()); // pass typetest<uint64>::compare(typetest<uint_64>()); // pass typetest<uint64>::compare(typetest<uint_32>()); // fail } in c++11, use std::is_same<t,u>::value . since don't have c++11, implement functionality as: template<typename t, typename u> struct is_same { static const bool value = false; }; template<typename t> struct is_same<t,t> //specialization { static const bool value = true; }; done! likewise can implement static_assert 1

php - how can i count an element if it appears more than once in the same array? -

how can count element if appears more once in same array? i tried array_count_values, did not work, beacuse got more 1 key , value in array? this output array (restlist) array ( [0] => array ( [restaurant_id] => 47523 [title] => cafe blabla) [1] => array ( [restaurant_id] => 32144 [title] => test5) [2] => array ( [restaurant_id] => 42154 [title] => blabla2 ) [3] => array ( [restaurant_id] => 32144 [title] => test5) [4] => array ( [restaurant_id] => 42154 [title] => blabla2 ) ) i want count how many times same element appears in array , add counted value newly created 'key' called hits in same array. array ( [0] => array ( [restaurant_id] => 47523 [title] => cafe blabla [hits] => 1) [1] => array ( [restaurant_id] => 32144 [title] => test5 [hits] => 2) [2] => array ( [restaurant_id] => 42154 [title] => blabla2 [hits] => 2) ) this how tried wanted. foreach ($cooltransa

react native - Is it ok to use NavigatorIOS multiple times in the app? -

for example have tabbarios 3 items , want use in each of these tabs navigatorios. would overload? i wanted use 1 navigatorios tabbarios control, seems impossible. yes. wrap navigators in each tab bar, , initialize each 1 initial route, , should go. we're using 3 navigator components , have not run issues yet. here slimmed down version of setup: <tabbarios> <tabbarios.item> <navigatorcomponent1 /> </tabbarios.item> <tabbarios.item> <navigatorcomponent2 /> </tabbarios.item> </tabbarios>

What exactly is the Clojure REPL? What is the technology behind it? -

i know clojure repl does , how useful, not have information on how internals of works. program running in jvm? how internals of repl work? the technology behind it: the tiny java entry point: https://github.com/clojure/clojure/blob/clojure-1.7.0/src/jvm/clojure/main.java the actual implementation of repl written in clojure: https://github.com/clojure/clojure/blob/clojure-1.7.0/src/clj/clojure/main.clj the links 1.7.0 versions of files, being recent stable release of writing. to summarize these do, clojure.main tiny java class main method serves entry point repl. (so, it's standard java program.) main method accepts arguments , hands them off function in clojure.main clojure namespace (using few simple calls methods in clojure.lang.rt class implements core details of clojure runtime @ function in question – well, strictly speaking var holds function). said function calls code reads user input, evaluates it, prints out result , loops around read more i

iphone - How can I detect if a device token is obsolete? -

i have big database devices token. i guess lot of base obsolete token. how can detect if device token obsolete? thank you. for exact reason, apple provides feed service. should set batch process or stored procedure in database periodically fetches invalid tokens , removes or mark inactive in database. apns : feedback service

gwt - CellTable with Date Column -

i trying build celltable widget time tracking. first column must represent days current month in following form fri, 1 sat, 2 sun, 3 mon, 4 tue, 5 … etc. till end of month (28 -31 rows). my code looks that: column<rec,string> daycolumn = new column<rec,string>(new textcell()) { @override public string getvalue(rec rec) { daynr = datetimeformat.getformat( "ee,d" ).format(new date()); return daynr; } }; table.addcolumn(daycolumn, "date"); so can see in column today-date in cells. how can days of month (1...28/30/31) in column each in own cell? it ideal if prepared list of rec items date variable. declaring rec pojo date class rec{ date date; //getter , setters. } populate list of rec items list<rec> recitems = new arraylist<rec>(); date = new date(); int nowmonth = now.getmonth(); int nowyear = now.getyear(); list<date> listofdatesinthismonth = new arraylist<da

unity3d - Null reference exception after instantiating a light gameobject -

i coded class, declare light attribute. in constructor instantiate light object before using it, got null reference exception @ line after instantiation ( nodelight.type = lighttype.spot; ). using unityengine; using system.collections; public class node{ public bool walkable; public vector3 worldposition; public bool selected; public light nodelight; public node(bool _walkable, vector3 _worldpos) { selected = false; walkable = _walkable; worldposition = _worldpos; nodelight = new light(); nodelight.type = lighttype.spot; nodelight.transform.position = new vector3(worldposition.x, worldposition.y + 3f, worldposition.z); nodelight.enabled = false; } } thank help a light component , should exist within gameobject . have @ example unity docs : public class exampleclass : monobehaviour { void start() { gameobject lightgameobject = new gameobject("the lig

java - Set a drawable drawn programmatically on top of the ImageView -

Image
i have drawable , want drawn above imageview. it's not: i set on framelayout way: bubbledrawable bubbledrawable = new bubbledrawable(true); bubblelayout.setbackgrounddrawable(bubbledrawable); but doesn't help. neither helped this: bubblelayout.bringtofront(); bubblelayout.invalidate(); bubblelayout.requestlayout(); i tried answer here no use - imageview showed nothing https://stackoverflow.com/a/16370226/3937738 the drawable: package com.example.chat.view; import android.graphics.canvas; import android.graphics.color; import android.graphics.colorfilter; import android.graphics.matrix; import android.graphics.paint; import android.graphics.path; import android.graphics.pixelformat; import android.graphics.rect; import android.graphics.rectf; import android.graphics.drawable.drawable; import android.util.log; public class bubbledrawable extends drawable { private paint mpaint; private float mboxwidth; private float mboxheight; private rect mboxpaddi

Converting Mysql Select to Multidimensional Array of Directory Structure independent of levels using PHP -

so have select statement returns 3 values db: folder id, folder name, parent id. if folder has no parent returns null parent id. using data have split results 2 arrays. one named $tree , used "directory tree", , firstly contain parent folders have parent id set null... , named $children , contains other folders children. with these attempting create multidimensional array($tree) use display file structure user using php/html. ideally use recursion allow not knowing how deep directory goes. i trying following no success , after whole day thinking feel stuck (function find children gets called function getdirtree further down): // should recursive function. takes 2 arrays argument. // returns $tree() multiple dimension array function findchildren($tree, $children){ // tree has 2 parents in first run foreach($tree $folder){ $temparray = array(); // children has 4 foreach($children $child){ if ($chil

html - Add lines to file by using array commands with php -

i'm trying make php script adds ip firewall. i'm not entirely sure i'm doing wrong. i'm trying insert $ip 12th line of data on iptables write iptables2 . there way should doing or easiest? <?php //firewall string $ip = "-a input -s " . $_server['server_addr'] . " -j accept" . "\n"; //turn file array $file = file('iptables'); //insert string array $res = array_splice($file, 12, 0, $ip); //write file file_put_contents("iptables2", $res); //display new file $iptables2 = file("iptables2"); echo "<ul>"; foreach($iptables2 $s => $r) { echo "<li>" . $s . "=>" . $r . "</li>"; } echo "</ul>"; ?> iptables looks this: *filter -a input -i lo -j accept -a input -m state --state established -j accept -a input -p udp --match multiport --dports 10000:20000 -j accept # port 5060 -a input -s xxx.xxx.xxx.xxx -j accept

php - Jquery Ajax response doesn't work on Firefox -

this response in php. can confirm datas ok. $ajax_response = array( 'product_code' => $ajax_products, 'filter' => $ajax_filter ); echo json_encode($ajax_response); exit(); here code in javascript : $('#pr_category_filter').submit(function (event) { $.ajax({ type: $(this).attr('method'), url: $(this).attr('action'), data: $(this).serialize(), datatype: 'json', cache: false, success: function (data) { if (data.product_code != null) { $('#pagination_contents').replacewith(data.product_code); } if (data.filter != null) { $('#category_filter').replacewith(data.filter); } }, error: function (request, status, error) { return false; } }); event.preventdefault(event); }); this code works on chrome , opera. however, code doesn&

assembly - TASM Math coprocessor FSUB not substracting -

i encounter difficulties using math coprocessor. need calculate area of triangle using heron's formula (s=sqrt(p(p-a)(p-b)(p-c)), p semiperimeter , a, b , c triangle's sides). read a, b, c , calculate p have problems in substracting a, b , c p. code: data segment para public 'data' dd 0 b dd 0 c dd 0 p dd 0 pa dd 0 ; p-a pb dd 0 ;p-b pc dd 0 ;p-c area dd 0 2 dd 2 aux dd 0 data ends read macro x, aux ; reading macro a, b , c. goes fine local r, final push eax push ebx push edx mov x, 0 mov ebx, 10 r: mov ah, 1h int 21h cmp al, 0dh je final cmp al,30h jb r cmp al, 39h ja r sub al, 48 xor ah,ah mov aux,eax mov eax, x mul ebx add eax, aux mov x, eax jmp r final: pop edx pop ebx pop eax endm code segment para public 'code' .386 start proc far assume cs:code, ds:data push ds xor ax,ax push ax mov ax,data mov ds,ax read a, aux read b, aux read c, aux finit fld fadd b fadd c fdiv 2 fstp p ;p computed fld p fsub

multithreading - multi threading inside threads in c program -

i debugging c code creates 3 threads.these 3 threads wait(using pthread_cond_wait) , when program signals them(using pthread_cond_signal) create 4 threads each. when these 4 threads starts running, segmentation fault occurs. my gdb output: [new thread 0x7fffd57fa700 (lwp 707)] program received signal sigsegv, segmentation fault. [switching thread 0x7fffd77fe700 (lwp 701)] 0x00007ffff79b591f in pthread_cond_wait@@glibc_2.3.2 () /usr/lib/libpthread.so.0 (gdb) info threads id target id frame 18 thread 0x7fffd57fa700 (lwp 707) "scan_mt_skip_de" 0x00007ffff79b80db in __lll_lock_wait_private () /usr/lib/libpthread.so.0 17 thread 0x7fffd5ffb700 (lwp 704) "scan_mt_skip_de" 0x00007ffff79b5954 in pthread_cond_wait@@glibc_2.3.2 () /usr/lib/libpthread.so.0 16 thread 0x7fffd67fc700 (lwp 703) "scan_mt_skip_de" 0x00007ffff79b5954 in pthread_cond_wait@@glibc_2.3.2 () /usr/lib/libpthread.so.0 15 thread 0x7fffd6ffd700 (lwp 702)

http - Using the Web Service Consumer with Mule CE -

i'm in process of migrating cxf jaxws client use new http connector. mule docs this: <cxf:jaxws-client clientclass="org.apache.hello_world_soap_http.soapservice" port="soapport" wsdllocation="classpath:/wsdl/hello_world.wsdl" operation="greetme"/> <outbound-endpoint address="http://localhost:63081/services/greeter"/> but isn't still using old http implementation? next attempted convert use web service consumer. examples i've seen use datamapper not available mule ce. without datamapper following error when running app: an invalid return type "interface javax.xml.stream.xmlstreamreader" specified transformer "jaxbmarshallertransformer" (org.mule.api.transformer.transformerexception) @ org.mule.module.xml.transformer.jaxb.jaxbmarshallertransformer.dotransform(jaxbmarshallertransformer.java:125) is web service consumer intended used datamapper? how use with

android - disable touch events for RecyclerView inside NestedScrollV -

i have layout below: <android.support.design.widget.appbarlayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/detail_backdrop_height" android:fitssystemwindows="true" android:theme="@style/themeoverlay.appcompat.dark.actionbar" app:elevation="0dp"> <android.support.design.widget.collapsingtoolbarlayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" app:contentscrim="?attr/colorprimary" app:elevation="0dp" app:expandedtitlemarginend="64dp" app:expandedtitlemarginstart="48dp" app:layout_scrollflags="scroll|exituntilcollap