Tuesday, 15 September 2015

How to show please wait while ajax request process in complete -



How to show please wait while ajax request process in complete -

this code working fine, want create ajax please wait while still requesting information: here code.

function products(){ if (document.getelementbyid('date').value.length == 0) { alert("please pick date"); document.getelementbyid('date').focus(); homecoming false; } var ajaxrequest; // variable makes ajax possible! try{ // opera 8.0+, firefox, safari ajaxrequest = new xmlhttprequest(); } grab (e){ // net explorer browsers try{ ajaxrequest = new activexobject("msxml2.xmlhttp"); } grab (e) { try{ ajaxrequest = new activexobject("microsoft.xmlhttp"); } grab (e){ // went wrong alert("your browser broke!"); homecoming false; } } } // create function receive info sent server ajaxrequest.onreadystatechange = function(){ if(ajaxrequest.readystate == 4){ var ajaxdisplay = document.getelementbyid('sum'); ajaxdisplay.innerhtml = ajaxrequest.responsetext; } } var usr = document.getelementbyid('usr').value; var date = document.getelementbyid('date').value; var querystring = "?usr=" + usr + "&date=" + date; ajaxrequest.open("get", "ajax_prom.php" + querystring, true); ajaxrequest.send(null); }

in page, add together div id - divajaxrequestinprogress. add together text want show while ajax request in progress div. have animated gif well. now, show when start ajax processing , hide 1 time request complete. function products(){ if (document.getelementbyid('date').value.length == 0) { alert("please pick date"); document.getelementbyid('date').focus(); homecoming false; } $("#divajaxrequestinprogress").show(); var ajaxrequest; // variable makes ajax possible! try{ // opera 8.0+, firefox, safari ajaxrequest = new xmlhttprequest(); } grab (e){ // net explorer browsers try{ ajaxrequest = new activexobject("msxml2.xmlhttp"); } grab (e) { try{ ajaxrequest = new activexobject("microsoft.xmlhttp"); } grab (e){ // went wrong alert("your browser broke!"); homecoming false; } } } // create function receive info sent server ajaxrequest.onreadystatechange = function(){ if(ajaxrequest.readystate == 4){ var ajaxdisplay = document.getelementbyid('sum'); ajaxdisplay.innerhtml = ajaxrequest.responsetext; } $("#divajaxrequestinprogress").hide(); } var usr = document.getelementbyid('usr').value; var date = document.getelementbyid('date').value; var querystring = "?usr=" + usr + "&date=" + date; ajaxrequest.open("get", "ajax_prom.php" + querystring, true); ajaxrequest.send(null); }

i have added 2 lines code - 1 show , 1 hide div.

ajax

android - Create SOS signal using Java.Util.Timer -



android - Create SOS signal using Java.Util.Timer -

i want create android app performs sos signal using flashlight on phone , know how command flash light.

this want flash lite do:

1) flash lite on 1 sec 2) flash lite off 1 sec 3) flash lite on 1 sec 4) flash lite off 1 sec 5) flash lite on 1 sec 6) flash lite off 1 sec 7) flash lite on 3 seconds 8) flash lite off 1 sec 9) flash lite on 3 seconds 10) flash lite off 1 sec 11) flash lite on 3 seconds 12) flash lite off 1 sec 13) flash lite on 1 sec 14) flash lite off 1 sec 15) flash lite on 1 sec 16) flash lite off 1 sec 17) flash lite on 1 sec 18) flash lite off 1 sec

how can accomplish using timer class in java?

the best approach create class definitions of alphabet , equivalent in morse code. numbers can added well. way can come in text, not sos.

if sos goal, creating class might overkill still practice.

have @ docs timer class

http://docs.oracle.com/javase/7/docs/api/java/util/timer.html << updated link

this method used timer class in illustration below. sos quite possible add together forloop run sequence many seconds, , command led light.

public void schedule(timertask task, long delay, long period)

//usage of timer

import java.util.*;

public class timerdemo {

public static void main(string[] args) { // declare , create task timertask tasknew = new timertask() { // runs our task @override public void run() { system.out.println("timer running..."); } }; // declare , create timer timer mytimer = new timer(); /* schedule timer (task scheduled, delay in ms before task * execution, period in ms between successive tasks executions */ mytimer.schedule(tasknew, 500, 1000); }

}

i hope gives improve example.

java android timer led

How to configure Apache Hadoop Vaidya -



How to configure Apache Hadoop Vaidya -

as i'm looking tuning hadoop map-reduce jobs improve performance optimal resource utilization, i'm unable start can 1 tell me how configure apache hadoop vaidya. next apache blog hadoop vaidya, has described how utilize it. in blog found path

$hadoop_home/contrib/vaidya/bin/

which not nowadays in machine i'm assuming have install/configure apache hadoop vaidya.

any help appreciated!!

apache hadoop

objective c - How to create UICollectionView with alternating cell amount layout? -



objective c - How to create UICollectionView with alternating cell amount layout? -

i developing ipad app uses uicollectionview display list of products company. cells layout want utilize alternating between rows 1 image , 2 images, first row 1 image, sec row 2 images, 3rd row 1 image... , on, can't figure out how in code.

so can help me one?

hey guys manage working code:

- (nsinteger)collectionview:(uicollectionview *)view numberofitemsinsection:(nsinteger)section { homecoming 2; } - (nsinteger)numberofsectionsincollectionview: (uicollectionview *)collectionview { homecoming 30; } - (uicollectionviewcell *)collectionview:(uicollectionview *)cv cellforitematindexpath:(nsindexpath *)indexpath { cells *cell; if (indexpath.row %2) { nslog(@"%li", indexpath.row); cell = [cv dequeuereusablecellwithreuseidentifier:@"one" forindexpath:indexpath]; cell.label.text = @"one"; cell.backgroundcolor = [uicolor bluecolor]; homecoming cell; } else { nslog(@"%li", indexpath.row); cell = [cv dequeuereusablecellwithreuseidentifier:@"two" forindexpath:indexpath]; cell.labela.text = @"two"; cell.labelb.text = @"two"; cell.backgroundcolor = [uicolor redcolor]; homecoming cell; } }

objective-c ios7 uicollectionview uicollectionviewcell

Execute java class in PHP -



Execute java class in PHP -

i want phone call java programme , fetch it's output in stdout. followed suggestions in stackoverflow. doesn't work.

i have add together class file classpath. , can execute command in cmd correctly follows:

in php file phone call programme

exec("java hello", $output); print_r($output);

it yields nil but:

array()

what problem? how can prepare this?

ps: hello demo program, programme want phone call much more complicated might take 2 or more seconds in machine(i5 4g).

i recommend using java/php bridge found here: http://php-java-bridge.sourceforge.net/pjb/ it's quite easy install , works well.

also, recommend using next link download it. (it's same 1 link in downloads->documentation)

http://sourceforge.net/projects/php-java-bridge/files/binary%20package/php-java-bridge_6.2.1/php-java-bridge_6.2.1_documentation.zip/download

the file javabridge.war. you'll want utilize tomcat java ee container. 1 time tomcat set up, set file in webapps folder , it's installed.

if want regularly utilize java classes in php best method know of , have tried lot of them. resin worked, didn't play nice mail service server.

java php

Inno Download Plugin - Compiler error -



Inno Download Plugin - Compiler error -

i have been using idp plugin quite time now, after installing latest v1.4.0 next compiler error.

compiling [code] section compiler error! file: c:\program files (x86)\inno download plugin\idp.iss line 54: column 55: unknown type 'int64'

i using inno setup 5.5.2 (u). can please assist? thanks.

the int64 info type introduced in unicode version 5.5.3 must download more recent version of unicode inno setup. what's new list mentions (emphasized me):

5.5.3 (2013-01-30)

unicode inno setup: has int64 type, supported inttostr. added new strtoint64, strtoint64def, , getspaceondisk64 back upwards functions.

plugins inno-setup inno-download-plugin

c# - Trying to change BorderThickness in DataGrid ColumnHeader -



c# - Trying to change BorderThickness in DataGrid ColumnHeader -

im using bundle called mahapps metro, i'm trying alter style of datagrid alter default borderthickness of columnheader.

the mahapps metro datagrid command can found here: https://github.com/mahapps/mahapps.metro/blob/master/mahapps.metro/styles/controls.datagrid.xaml

the part i'm trying access custom style is:

<border x:name="backgroundborder" borderthickness="0,0,0,3" grid.columnspan="2" background="{templatebinding background}" borderbrush="{templatebinding borderbrush}" />

currently have:

<style targettype="datagridcolumnheader" x:key="geledigdheader" basedon="{staticresource metrodatagridcolumnheader}"> <setter property="horizontalcontentalignment" value="right"/> <setter property="borderbrush" value="#953735"/> </style>

this changes color want alter thickness, using property="borderthickness" not work, obviously..

well if @ style there given no explicit access borderthickness via binding. since have style can add together line

<border x:name="backgroundborder" borderthickness="0,0,0,3" grid.columnspan="2" background="{templatebinding background}" borderbrush="{templatebinding borderbrush}" borderthickness="{templatebinding borderthickness}"/>

c# wpf xaml datagrid