Login script JSON jqm to need help bbui

Hello

A few months ago, I tried to start with bbui get more native objects (like swipe in the menu drop-down).

The problem is that bbui sucks compared to jqm (kitchensink) my complete app depends on, and the part I am now is connection and registration of a new user of the application.

This is example code that I use a lot:

Example of form

[code]

[/ code]

Example of jQuery:

[code]

$(function() {})
$("#JqAjaxForm").submit (function (e) {}

var b is return ["JqAjaxForm"] ["email"] .value;.
var c is return ["JqAjaxForm"] ["password"] .value;.

dataString = $("#JqAjaxForm").serialize ();

$.ajax({)
type: 'POST',
URL: ""http://myserver.com/login.php ", "
data : dataString,.
data type: 'json ',.
success: function (data)
{

If (data.usrkey == "undefined") {alert ("user/password incorrect");
} Else if (data.usrkey == "null") {alert ("user/password incorrect");
} Else if (data.usrkey == '0') {alert ("user/password incorrect");
} Else if (data.banned == '1') {alert ("user/password incorrect");
}
on the other
{

USRID = data.usrid;

usrid var = data.usrid;

localStorage.setItem ('userd', usrid);

Window.Location.assign ("Start.html");

}

}

});

});
});

[/ code]

what the code, if the json in login.php data is 0 or undefined, it means that your user/pass is incorrect.

When usr.banned is 1, it means you did something wrong and you're banned from the app

Otherwise, it will return your username and which will always be greater than 0 then you will get a localstorage (aka connected).

This code does exactly what is should do... in jquery.

I tried to mix different versions of jquery and jquery mobile with bbui but it has messed up every little thing.

And this json/ajax request made in this case only connect, but I use it a lot more.

As example for user information, submit information, check if you have access to the parties (0/1).

In any case to long a little more short, jquery does not set well with bbui.

I am locked out of my application and cannot save a new user because it uses jquery to submit.

Someone at - it a good example of the above code that does exactly the same thing?

but works in bbui, OR a jquery lib (mobile) I can use with bbui

Small update on my side, when I use the zepto (http://zeptojs.com/) plugin, I get the below error:

ReferenceError: Can't find variable: webworks

This error I get also when I include any javascript jquery or jqm file

I forgot to mention, indeed, that I already have those around him.

my login script works now, jquery 1.9 x was the problem, no problems with 1.8.x

Tags: BlackBerry Developers

Similar Questions

  • Bike via script of paragraph styles - need help

    Hello

    I have a large document (potentially 3000 pages), on each page is a picture of a picture frame and inside each image is a famous quote. I need to type in each quote so I have 10 configuration value different paragraph styles in a different font. I need a script that applies "QuoteStyle1" the text on the first page, "QuoteStyle2" on the next page, etc., and once that 'QuoteStyle10' has been applied the script performs a loop and continues to scroll through the styles apply a style that is different on each page, until it reaches the end of the document.

    I got a start on the script (see image), but I think the problem is the line 11 - I want to run the script without having to select anything.

    Some additional info that may or may not be of use - all quotes are drawn from a data merge. There is also a name and a color from the data merge. The background on each frame is a different color and that is created with the a very large 'rule below' in a number of other paragraph styles. They are applied with a 'Find & ReplacebyList' i.e. find replace 'Red' with the paragraph style "ColourRed. In the script, I tried to ignore these "color" paragraph styles (lines 2-9) is only the 'quote' styles that the effects of the script.

    Any help getting this race would be more useful.Screen Shot 2015-07-15 at 10.01.20.png

    First of all congratulations for the very creative use of blending modes. I would have never thought about it by myself.

    Now, for the script, here are two ways to do it (both enjoy the fact that you use a paragraph style BaseQuote):

    (1) use a grep search:

    var doc=app.activeDocument;
    var baseQ=doc.paragraphStyles.item('BaseQuoteStyle');
    var switchToStyles=[
    'QuoteStyle1',
    'QuoteStyle2',
    'QuoteStyle3',
    'QuoteStyle4',
    'QuoteStyle5',
    'QuoteStyle6',
    'QuoteStyle7',
    'QuoteStyle8',
    'QuoteStyle9',
    'QuoteStyle10'];
    var l=switchToStyles.length;
    app.findGrepPreferences=app.findChangeGrepOptions=null;
    app.findGrepPreferences.appliedParagraphStyle=baseQ;
    app.findChangeGrepOptions.includeMasterPages=false;
    var quotes=doc.findGrep();
    for (var i=0; i
    

    (2) scroll all managers of related texts:

    var doc=app.activeDocument;
    var baseQ=doc.paragraphStyles.item('BaseQuoteStyle');
    var pags=doc.pages.everyItem().getElements();
    var switchToStyles=[
    'QuoteStyle1',
    'QuoteStyle2',
    'QuoteStyle3',
    'QuoteStyle4',
    'QuoteStyle5',
    'QuoteStyle6',
    'QuoteStyle7',
    'QuoteStyle8',
    'QuoteStyle9',
    'QuoteStyle10'];
    var l=switchToStyles.length;
    for (var p=0;p		   
  • Completely random behavior for script of division. Need help :)

    Hi people,

    I put a lot of hard work in a form for a client (with the much appreciated help of people on these cards) and I thought it was full but...

    The customer got my attention on a seemingly random behavior for 2 fields on the form.

    I have no knowledge of Javascript but, based on the research online, I came with a custom script. I've rechecked the script but can't understand why random behavior would occur.

    Here are the scripts for 2 fields:

    Basic loan

    ----------------------------------------------------------

    (function () {}

    Get the field values as numbers

    var numerator = + getField("Loan_Amount_3_L2").value;

    denominator = var + getField("Bank_Value").value;

    Do the math if the denominator does not evaluate to zero

    If (denominator! == 0) {}

    Event.Value = numerator / denominator.

    } else {}

    Event.Value = "";

    }

    })();

    Ready

    ----------------------------------------------------------

    (function () {}

    Get the field values as numbers

    var numerator = + getField("Total_Loan_2_L2").value;

    denominator = var + getField("Bank_Value").value;

    Do the math if the denominator does not evaluate to zero

    If (denominator! == 0) {}

    Event.Value = numerator / denominator.

    } else {}

    Event.Value = "";

    }

    })();

    ----------------------------------------------------------

    And here's screenshots of the completely random behavior:

    Below if we begin to enter numbers... and things look OK. $500,000 divided by $500,000 = 100 percent

    pic1.jpg

    Below, we add more numbers. Now, things are unhinged. Here, the result of 92% is incorrect. $400,000 divided $ 500,000 must be equal to 80%.

    pic2.jpg

    Then below the plot thickens again when we add more numbers. Here the basic loan value is correct at 80%, but the end of loan value is not correct. The ready value must be equal to 81% - not 80% ($ 405 000 divided by $500,000 = 81%)

    pic3.jpg

    As a side note, if I do a simplified field notation, the calculations seem to work. The reason why I do not have a simplified field notation, however, is that I get those annoying WARNING come up:

    Warning 1: "The value entered does not match the format [Base_Loan_to_Value_Ratio_LVR_L2]"

    Warning 2: "The value entered does not match the format [End_Loan_to_Value_Ratio_LVR_2]"

    (The fields mentioned in these warnings are the destination fields that produce the above incorrect percentage values).

    Could someone please identify what is happening here? Why is there such a seemingly random variation? And how can I solve this problem?

    Thank you

    Did you check the order of calculation of (different from the tab order) field to make sure it makes sense that the form?

  • PS snapshot script... Need help with report

    I am trying to achieve when products are deployed on virtual machines, the instant Powershell script will execute and take snapshots, provide the report as html (output) and then run another Script that will be run against VI3 to commit all snapshots.

    I need assistance with the statement, I want to report to display the VM name + instant summary details, script below shows only instant summary.  Also if there is a script to commit all the snapshots on defined VM.

    **********************************************

    1. Variables

    $VCServerName = "VIServer.

    $CustomFieldName = 'Snapshots'

    $ManagedObjectType = "VMName".

    $today = (get-Date-Format ' YYYY-MM - dd_HH.mm.ss - tt')

    $nsn = "PowerShell-$today.

    $a = ""

    1. Script

    SE connect-VIServer $VCServerName - Port 443 - HTTPS protocol

    Get - VM $ManagedObjectType | New-Snapshot - name $nsn - Description "Instant product update"

    Get-Snapshot $ManagedObjectType | SELECT name, ID, Description, VM creation. ConvertTo-HTML-head $a | Out-file C:\Report.htm

    Invoke-Expression C:\Report.htm

    Disconnect-VIServer $VCServerName - confirm: $False

    You must select the last one.

    Something like this for example

    Get-Snapshot -VM $vm | Sort Created | Select -Last 1 | Remove-Snapshot -Confirm:$false
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • I need help for Windows Vista black screen during the connection, even with the login screen removed

    Hey, I have a problem in Windows Vista:

    I've been updating / updated my graphics card and it is the graphics card, I'm updating, after a while, a black screen will appear (PITCH BLACK) and I there is no cursor and I tried Ctrl + Alt + Delete, but nothing seems to work, after I turned off my laptop, starts to load then it was the new dark night! (NO LOGIN SCREEN). Then I turned off my laptop then I constantly pressed f8, then I pressed "Computer repair" then it loads then my screen showed "Another user", then I clicked it then I had to type my ID but I have no details of connection, I pressed on enter with no connection details, but this still does not work because I had to type in my login information. I tried everything, then I went to safe mode and fact a password and changed my admin account type, then I rebooted my laptop, then I have constantly pressed f8 and pressed "Computer repair" then it loads and then my screen showed 'Another user' again... .

    PLEASE I NEED HELP! I WANT TO PLAY MY GAMES!

    Hello

    Follow the steps below:

     

    Method 1: Do the Startup Repair to fix the problem.

    See the following article for more information on the Startup Repair:

    Startup Repair: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

     

    Method 2: Use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    For instructions, see the following article:

    How to use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    http://support.Microsoft.com/kb/927392

    Let us know if that helps.

  • I have a problem, try to uninstall the ask toolbar. get the error message: cannot access the VB script... need help please

    I have a problem, try to uninstall the ask toolbar. get the error message: unable to access the VB script... need help

    Hello

    How do you try to uninstall the toolbar?

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Try the steps in the following Microsoft article and check if it helps.

    How to fix script errors in Internet Explorer on Windows computers:

    http://support.Microsoft.com/kb/308260

    Correction of errors in Internet Explorer: http://support.microsoft.com/kb/822521

    Method 2:

    Try to uninstall the toolbar, programs and features and check if it helps.

    Uninstall or change a program:

    http://Windows.Microsoft.com/en-us/Windows-Vista/uninstall-or-change-a-program

    Hope the information is useful.

  • I need help on the matrix of action script 3.0

    I need help on the matrix of action script 3.0

    [Ask in the correct forum allows... Left non-technical Forum Lounge for forum specific program... MOD]

    to apply a matrix for mc mat oppose:

    var mat: Matrix = new Matrix;

    mat.a = Whatever;

    mat.b =

    mat.c =

    mat.d =

    mast. TX =

    mat.Ty =

    MC. Transform.Matrix = Matt;

  • Need help with understanding PowerCli scripting by LucD

    Hello

    I'll give you the standard statement that I am a noob powercli and don't really know what I'm doing here.  Here's a script that works because it runs without error and gives a report but I need help to understand this under his weight.

    Connect-VIServer '< our vcenter >' - user < user > admin-password < admin-user-pwd >

    $allvms = @)

    $vms = get - Vm | where {$_.} PowerState - eq "Receptor"}

    $start = (get-Date). AddDays(-1)

    $metrics = "mem.usage.average".

    $stats = get-Stat-entity $vms - start $start - Stat $metrics

    $stats | Group-object - property {$_.} Timestamp.Day}, {$_.} @entity.name} | %{

    $vmstat = "" | Select the day, MemAlloc, MemMin, MemMax, MemAvg, VmName

    $vmstat. VmName = $_. Values [1]

    $vmstat. Day = $_. Group [0]. Timestamp.Date

    $mem = $_. Group | where {$_.} MetricId - eq "mem.usage.average"} | Measure-object-property value - average - Maximum - Minimum

    $vmstat. MemMax = [int] $mem. Maximum ##dfsdf

    $vmstat. MemAvg = [int] $mem. Average

    $vmstat. MemMin = [int] $mem. Minimum

    $vmstat. MemAlloc = $_. Group [0]. Entity.MemoryMB

    $allvms += $vmstat

    }

    $allvms |

    Export-Csv "c:\ < folder > \ <>.csv file Destination"-noTypeInformation

    It connects to our server vcenter server and offers two days of data.  Today and yesterday, all with a timestamp of 0:00.  See below for an example of a virtual machine.

    VmNameDayMemAllocMemMaxMemAvgMemMin
    < name VM1 >07/05/2016 0:004096181818
    < name VM1 >06/05/2016 0:0040963612

    8

    The MemMax, the MemAvg and the MemMin are for this day?  Just the max of this period of sampling time 0:00?

    What I'm looking for, it is to find that the use of the maximum memory of virtual machines are for the whole day.  So I hope that I can remove memory of VMs that do not use it.  I was listed on the change $start = (Get-Date). The value of AddDays(-1) to $start = (Get-Date). AddDays(-30) and see what things alike.  I want to be sure however that the value for MemMax is the highest value for a period of 24 hours.  That is to say for the 07/05/2016 the given virtual machine never used a maximum of 18% of his memory attributed the 06/05/2016 the maximum amount of memory used was 36%, and so on that I extend on the date range.

    Kind regards

    Michael

    It then becomes a rather simple Get-Stat script.

    $vms = get - Vm | where {$_.} PowerState - eq "Receptor"}

    $start = (get-Date). AddDays(-1)

    $metrics = "mem.usage.average".

    Get-Stat - entity $vms - start $start - Stat $metrics |

    Select Timestamp,@{N='VM'; E={$_. @entity.name}}, Value |

    Tri-objet-VM property |

    Export-Csv "c:\------.csv '-noTypeInformation

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • Hi, I'm trying buy Adobe Creative cloud but get message "this card was purchased in a country that does not match your Adobe ID you can try to connect with a login different Adobe or contact us if you need help."

    Hi, I'm trying buy Adobe Creative cloud but to message "" this card was purchased in a country that does not match your Adobe ID you can try to connect with a login different Adobe or contact us if you need help. ' "

    Can anyone help with this please. Thank you

    Hello

    Please visit the link below: -.

    Redemption code help

    How activate/redeem redemption Adobe CC Code

  • Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hey ihorl18351266,

    Please note that you can open PDF files using only the CD player. Any other format will not be supported by the software.

    Kind regards

    Ana Maria

  • Need help to export results to csv format script

    Hi guys,.

    Need help, export results to csv can someone help me. Thank you.

    Connect-VIServer test

    $cluster = 'test '.

    $clustername = get-cluster $cluster

    $Clusters = get-View - ViewType ComputeResource |? Name - as $clustername.name

    $Clusters | % {

    $Cluste = $_

    $VMHostsView = $null

    $VMHostsView = get-view $Cluste.Host - name, Hardware Config, property

    $VMss = $clustername | Get - VM

    $HostCount = ($VMHostsView |) Measure - Object). County

    $VMCount = 0 + ($VMss |) Measure - Object). County

    $VMsPerHost = [math]: round (($VMCount/$HostCount), 1).

    $vCPU = 0 + ($VMss: measure-object-sum - NumCPU property). Sum

    $allocatedram = 0 + ($VMss: measure-object-sum - memorygb property). Sum

    $avgrampervm = [math]: round (($allocatedram/$VMCount), 1).

    $pCPUSocket = ($VMHostsView | % {$_.}) Hardware.CPUInfo.NumCpuPackages} | Measure - Object - sum). Sum

    $TpCPUSocket += $pCPUSocket

    $pCPUCore = ($VMHostsView | % {$_.}) Hardware.CPUInfo.NumCpuCores} | Measure - Object - sum). Sum

    $vCPUPerpCPUCore = [math]: round (($vCPU/$pCPUCore), 1).

    $onenode = [math]: tour ((Get-Cluster $cluster |)) Get-VMHost | Select - 1 first | (measure - object - property memorytotalGB-sum) .sum)

    $twonode = [math]: tour ((Get-Cluster $cluster |)) Get-VMHost | Select - first 2 | (measure - object - property memorytotalGB-sum) .sum)

    $onenodepcpucores = [math]: tour ((Get-Cluster $cluster |)) Get-VMHost | Select - 1 first | (measure - object - property numcpu-sum) .sum)

    $twonodepcpucores = [math]: tour ((Get-Cluster $cluster |)) Get-VMHost | Select - first 2 | (measure - object - property numcpu-sum) .sum)

    $totalclusterpcores_failover1 = $pcpucore - $onenodepcpucores

    $totalclusterpcores_failover2 = $pcpucore - $twonodepcpucores

    $TotalClusterRAMGB = [math]: tour ((Get-cluster $cluster | get-vmhost | % {$_} | mesure-objet-propriété memorytotalGB-somme) .sum)

    $TotalClusterRAMFailoverOne = [math]: round (($TotalClusterRAMGB-$onenode))

    $TotalClusterRAMFailvoerTwo = [math]: round (($TotalClusterRAMGB-$twonode))

    $TotalClusterRAMusageGB = [math]: tour ((Get-cluster $cluster | get-vmhost | % {$_} | mesure-objet-propriété memoryusageGB-somme) .sum)

    $TotalClusterRAMUsagePercent = [math]: round (($TotalClusterRAMusageGB/$TotalClusterRAMGB) * 100)

    $TotalClusterRAMFreeGB = [math]: round (($TotalClusterRAMGB - $TotalClusterRAMUsageGB))

    $TotalClusterRAMReservedGB = [math]: round (($TotalClusterRAMGB/100) * 15)

    $TotalClusterRAMAvailable = [math]: round (($TotalClusterRAMFreeGB - $TotalClusterRAMReservedGB))

    $TotalClusterRAMAvailable_FailoverOne = [math]: round (($TotalClusterRAMAvailable-$onenode))

    $TotalClusterRAMAvailable_failoverTwo = [math]: round (($TotalClusterRAMAvailable-$twonode))

    $TotalClustervcpuperpcore_FailoverOne = [math]: round (($vCPU/$totalclusterpcores_failover1), 2)

    $TotalClustervcpuperpcore_failoverTwo = [math]: round (($vCPU/$totalclusterpcores_failover2), 2)

    $newvmcount = [math]: round (($TotalClusterRAMAvailable/$avgrampervm))

    $newvmcount_failover1 = [math]: round (($TotalClusterRAMAvailable_failoverone/$avgrampervm))

    $newvmcount_failover2 = [math]: round (($TotalClusterRAMAvailable_failovertwo/$avgrampervm))

    $afternewvmvcpu1 = $vcpu + $newvmcount

    $afternewvmvcpu2 = $afternewvmvcpu1 + $newvmcount

    $new1vcpupcpuratio = [math]: round (($afternewvmvcpu1/$pCPUCore), 1).

    $new2vcpupcpuratio = [math]: round (($afternewvmvcpu2/$pCPUCore), 1).

    New-Object PSObject |

    Add-Member-pass NoteProperty 'NOMCLUSTER' $clustername.name |

    Add-Member-pass NoteProperty 'TotalClusterHostCount' $HostCount |

    Add-Member-pass NoteProperty 'TotalClusterVMCount' $VMCount |

    Add-Member-pass NoteProperty "of AverageVM / Host" $VMsPerHost |

    Add-Member-pass NoteProperty 'TotalClusterpCPUSocket' $TpCPUSocket |

    Add-Member-pass NoteProperty 'TotalClusterpCPUCore' $pCPUCore |

    Add-Member-pass NoteProperty 'TotalClustervCPUCount' $VCPU |

    Add-Member-pass NoteProperty ' TotalClustervCPU/pCPUCore' $vcpuperpcpucore |

    Add-Member-pass NoteProperty "TotalClustervCPU/pCPUCore after 1 failover" $TotalClustervcpuperpcore_FailoverOne |

    Add-Member-pass NoteProperty ' TotalClustervCPU/pCPUCore after Failvoer 2' $TotalClustervcpuperpcore_Failovertwo |

    Add-Member-pass NoteProperty 'TotalClusterRAMGB' $TotalClusterRAMGB |

    Add-Member-pass NoteProperty 'TotalClusterRAMGB_Failover1' $TotalClusterRAMFailoverOne |

    Add-Member-pass NoteProperty 'TotalClusterRAMGB_failover2' $TotalClusterRAMFailvoerTwo |

    Add-Member-pass NoteProperty 'TotalClusterRAMUSAGEPercent' $TotalClusterRAMUsagePercent |

    Add-Member-pass NoteProperty 'TotalClusterRAMUsageGB' $TotalClusterRAMusageGB |

    Add-Member-pass NoteProperty 'TotalClusterRAMFreeGB' $TotalClusterRAMfreeGB |

    Add-Member-pass NoteProperty 'TotalClusterRAMReservedGB(15%) '. "$TotalClusterRAMReservedGB |

    Add-Member-pass NoteProperty 'RAM available for NEW virtual machines in GB' $TotalClusterRAMAvailable |

    Add-Member-pass NoteProperty 'RAM available for NEW virtual machines in GB after 1 failover' $TotalClusterRAMAvailable_FailoverOne |

    Add-Member-pass NoteProperty 'RAM available for NEW virtual machines in GB after failover 2' $TotalClusterRAMAvailable_FailoverTwo |

    Add-Member-pass NoteProperty 'Allocated RAM by virtual computer on an average' $avgrampervm |

    Add-Member-pass NoteProperty 'NEW virtual machines that can be configured based on the average of RAM virtual computer' $newvmcount |

    Add-Member-pass NoteProperty 'NEW virtual machines that can be configured based on the average of RAM virtual computer after 1 failover' $newvmcount_failover1 |

    Add-Member-pass NoteProperty 'NEW virtual machine that can be provisioned littleboy average RAM per virtual computer after failover 2' $newvmcount_failover2 |

    Add-Member-pass NoteProperty "vCPU/pCore ratio after new VM provisioning with 1vcpu" $new1vcpupcpuratio |

    Add-Member-pass NoteProperty ' vCPU/pCore ratio after new VM provisioning with 2vcpu' $new2vcpupcpuratio

    }

    Get-cluster $cluster | Get-vmhost | % {

    $vmhost = $_

    $VMHostView = $VMHost | Get-View

    $VMHostModel = ($VMHostsView | % {$_.}) Hardware.SystemInfo} | Model object-group | Sort - down County | Select - 1 first). Name

    $VMs = $VMHost | Get - VM #|? { $_. PowerState - eq "Receptor"}

    $TotalRAMGB = [math]: round ($vmhost. MemoryTotalGB)

    $TotalRAMUsageGB = [math]: round ($vmhost. MemoryUsageGB)

    $TotalRAMfreeGB = [math]: round ($TotalRAMGB - $TotalRAMUsageGB)

    $PercRAMUsed = [math]: round (($TotalRAMUsageGB/$TotalRAMGB) * 100)

    $TotalRAMReservedFree = [math]: round (($TotalRAMGB/100) * 15)

    $TotalRAMAvailable = [math]: round (($TotalRAMfreegb-$totalramreservedfree))

    New-Object PSObject |

    Add-Member-pass NoteProperty 'VMhost' $vmhost. Name |

    Add-Member-pass NoteProperty model $vmhostmodel |

    Add-Member-pass NoteProperty Sockets $VMHostView.Hardware.cpuinfo.NumCPUPackages |

    Add-Member-pass NoteProperty Cores $VMHostView.Hardware.cpuinfo.NumCPUCores |

    Add-Member-pass NoteProperty son $VMHostView.Hardware.cpuinfo.NumCPUThreads |

    Add-Member-pass NoteProperty VMCount (($VMs | mesure-objet).) County) |

    Add-Member-pass NoteProperty vCPU (0 + ($VMs: measure-object-NumCPU of the sum).) Sum).

    Add-Member-pass NoteProperty vCPUperCore ((0 + ($VMs | mesure-objet-NumCPU de la somme).)) Sum)/$VMHostView.hardware.cpuinfo.NumCPUCores) |

    Add-Member-pass NoteProperty 'RAMGB' $TotalRAMGB |

    Add-Member-pass NoteProperty 'RAMUsageGB' $totalramusageGB |

    Add-Member-pass NoteProperty 'RAMFreeGB' $totalramfreeGB |

    Add-Member-pass NoteProperty 'RAMUsage %' $PercRAMused |

    Add-Member-pass NoteProperty 'RAMReservedGB(15%) '. "$totalramreservedfree |

    Add-Member-pass NoteProperty 'RAM available for NEW virtual machines in GB' $totalramavailable

    }| Sort VMhost | FT-auto * | Out-String-width 1024

    See the attached script

  • Need help with a script (o - o8) *, see the Virgin if there is no

    Hi all what I need help with a script I can't find an example.

    I'm trying to subtract 2 numbers and then multiply this product. (o o8) * one but I just want to do the calculations if all fields have the numbers IE field o, o8 of field and field one.

    Thank you in advance. I was stuck on this days searching the Internet.

    Assuming you want to affect the outcome of this calculation in another text field, use this code as a custom field calculation script:

    var o = this.getField("o").valueAsString;
    var o8 = this.getField("o8").valueAsString;
    var a = this.getField("a").valueAsString;
    if (o!="" && o8!="" && a!="") event.value = (Number(o)-Number(o8))*Number(a);
    else event.value = "";
    
  • Need help to modify the findchangebylist.jsx script

    I alternate the same script vbs to meet my needs and I was happy about it (likeChild when you give him his favorite toy) but I run into som problems with when I copy and place the script vbs on another computer I want to using it called CS6 instead of CC... I tried everything I could think of but no luck... same thing happens whenever I try to use CS6 open rather CC in which I run it... on the computer I write the script running like charm (on both computers, I have CS6 and CC)... so I decided to use the same script jsx version...

    then, when I try this script:

    1. the dialog box opens only when my cursor is textframe allowing me to select what I want to change the selected item 2. 1 document. 3 selection

    2. when I select 2 blocks of text and document I have 3 or more, the script does not change in 2 pictures selected instead she does in all settings

    I need to rotate this script

    When I select the text block to open dialogbox allow me to take 2/3 of the options mentioned above, the number 2 and 3

    He doesn't find it and change only in blocks of text I selected (when it is selected with the Selection tool) not in all settings

    I tried to do it my self, but a little short of knowledge im

    I tried to switch the dialog case is open, adding the line case 'TextFrame': in this part of the script

    If (app.documents.length > 0) {}

    If (app.selection.length > 0) {}

    {Switch(App.Selection[0].constructor.) Name)}

    case 'PointInsertion ':

    'character ': case

    case "word":

    case 'TextStyleRange ':

    case "line":

    stops of the "Point":

    case "TextColumn":

    case 'text ':

    case "cell":

    case "column":

    case 'Row ':

    case 'Table ':

    myDisplayDialog();

    and it works to call the dialog box when the text block is selected, but then he didn't make changes textframe don't debut not overall selected...

    So I tried to experiment with this line

    if(myResult == true) {}

    {Switch (myRangeButtons.selectedButton)}

    case 0:

    myObject = app.documents.item (0);

    break;

    case 1:

    MyObject = app.selection [0] .parentStory;

    break;

    case 2:

    myObject = app.selection [0];

    break;

    }

    myDialog.destroy ();

    myFindChangeByList (myObject);

    }

    else {}

    myDialog.destroy ();

    }

    by changing the number 1, 2 or 3, but that only the script says that if I have 2 block of selected text to search in the second block of text (incase of number 1) or if I have selected 3 and if numer 2 only script in text 3

    I need help please

    Hello

    I ment something like this:

    //...
    var myResult = myDialog.show();
      if(myResult == true){
           switch(myRangeButtons.selectedButton){
                case 0:
                     myObject = app.documents.item(0);
                     myFindChangeByList(myObject);
                     break;
                case 1:
                     if (app.selection[0].constructor.name == "TextFrame")
                          for (var b = 0; b < app.selection.length; b++)  {
                               myObject = app.selection[b].parentStory;
                               myFindChangeByList(myObject);
                          }
                     else {
                          myObject = app.selection[0].parentStory;
                          myFindChangeByList(myObject);
                          }
                     break;
                case 2:
                     myObject = app.selection[0];
                     myFindChangeByList(myObject);
                     break;
                }
           myDialog.destroy();
           }
           else {
                myDialog.destroy();
           }
    //...
    

    App.Selection is a table, but its length is always a number.

    If the 1st element of selection is a TextFrame (or more) ==>, we get into a loop

    on the other ==> we call a function that had been initially.

    Jarek

  • Need help to modify the Script to find the number of vCPU and reservation of memory in VC

    Hello

    Need help to modify the script so that his can person report to the vc all focus level instead of each level of the Cluster.

    Thank you

    KR

    Try this instead:

    $vmsInfo = Get-VM
    #Creating array to place new object
    
    $reportdata = @()
    
    Foreach ($vm in $vmsInfo)
    {
    #Creating new object
    $vmInfo = "" | Select Name, CPUReservationMHz, MemoryReservationGB
    $vmInfo.Name = $vm.Name
    $vmInfo.CPUReservationMHz = $vm.ExtensionData.ResourceConfig.CpuAllocation.Reservation
    $vmInfo.MemoryReservationGB = $vm.ExtensionData.ResourceConfig.MemoryAllocation.Reservation / 1024;
    #Inserting data into new object.
    $reportdata += $vminfo
    }
    $reportdata
    

Maybe you are looking for

  • have no obligation when I register for support of mozilla?

    Registration with the support of mozilla means that I'm part of the support team, and I have to help firefox users?

  • How can I male Firefox open the YouTube videos and youtube pages application?

    I tried to watch a video on the youtube page, but I got a message saying that the video was not available for mobile devices. I really want to watch this video, then I tried exactly the same page with the browser android... guess what? the browser ha

  • WAG54G worm 2

    I have linksys WAG54G router ADSL 2 worm and I want to buy the linksys wireless usb adapter, then please guide what usb wireless adapter is compatible with worm WAG54G Router 2... Kind regards Rashid

  • The clear application of the scope attribute

    jdev 11.1.1.6I have following code in jsp:If (application.getAttribute ("Maintenance")! = null) {}MI = (MaintenanceInformation) application.getAttribute ("Maintenance"); fetch of the variable scope of application} else {}GetMaintenanceInformation obj

  • How can I download Adobe Acrobat Pro XI in English on my new computer?

    I have a new computer.  I disabled Acrobat Pro XI on the old computer.  I know my serial number and it appears in my product list.  But to the download screen, when I click on Adobe Acrobat Pro XI, contains a list of languages and the only links in t