w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
AWS - Automatic deployment (.NET) to CloudFormation stack
cloud-init is used with windows too. See the documentation for bootstrapping Windows stacks.

Categories : Amazon

Is it possible to determine how much space is available on the stack?
There's no standard way to do it from within the language. I'm not even aware of a documented extension that is able to query. However some compilers have options to set the stack size. And platform may specify what it does when launching a process, and/or provide ways to set stack size of a new thread, maybe even manipulate existing one. For small platforms it's usual to know the whole memory size, have all the data segments on one end, a set size arena for the heap (may be 0), and the rest is stack, approaching from the other side.

Categories : C++

Determine stack usage of a posix pthread?
I have a multi-threaded program where one of the stacks is blowing up, but I can't figure out which one. Let the program crash and leave a core file. Load that core into a debugger, and it will tell you right away which thread crashed. The thread that crashed is not necessarily the one with the overflow. It's true that there are scenarios where one thread overflows its stack, but another thread crashes because of it. However, such scenarios are exceedingly rare (at least for non-user allocated thread stacks -- the pthread library will normally provide a stack guard page(s) to protect agains this). I can only think of one such scenario, and it's very unlikely in practice. I'm looking for a portable approach using a pthreads call or something similar. There is no portable w

Categories : C++

Why won't CloudFormation execute my command?
Your commands block should be nested inside the config block, at the moment it is at the same level in the hierarchy. "AWS::CloudFormation::Init" : { "config" : { "files" : { "c:\Packages\WebDeploy_amd64_en-US.msi" : { "source" : "http://download.microsoft.com/download/1/B/3/1B3F8377-CFE1-4B40-8402-AE1FC6A0A8C3/WebDeploy_amd64_en-US.msi" } }, "commands" : { "1-installwebdeploy" : { "command" : "msiexec.exe /i c:\Packages\WebDeploy_amd64_en-US.msi ADDLOCAL=ALL /qn /norestart" } } }, }

Categories : Amazon

Why won't my CloudFormation script download a file?
Jonathon, I tried your template and the file downloaded successfully for me. You can check the cfn logs on the instance. They are in c:cfnlog. My cfn-init.log shows: 2013-07-19 21:30:18,269 [DEBUG] Parent directory c: est does not exist, creating 2013-07-19 21:30:18,269 [DEBUG] Writing content to c: estgoogle-logo.png 2013-07-19 21:30:18,269 [DEBUG] Retrieving contents from http://www.google.com/images/srpr/logo4w.png 2013-07-19 21:30:18,316 [DEBUG] No mode specified for c: estgoogle-logo.png 2013-07-19 21:30:18,316 [WARNING] Unsupported OS for setting owner/group: nt And my cfn-wire.log shows: 2013-07-19 21:30:18,269 [DEBUG] Request: GET http://www.google.com/images/srpr/logo4w.png [headers: {'Accept-Encoding': 'identity, deflate, compress, gzip', 'Accept': '*/*', 'User-Agent': 'pyth

Categories : Amazon

Is it possible to create a SNS subscription with CloudFormation without creating a topic?
As you already discovered, AWS CloudFormation doesn't provide the expected AWS::SNS::Subscription resource (yet) and I'm not aware of this being possible by any other means, unfortunately - guess the rationale is that both are either managed within a template or externally, but your use case is sound and I can see no fundamental reason why this shouldn't be available (maybe they'll add it at some point, AWS is usually expanding their APIs over time to address such inconsistencies/missings).

Categories : Amazon

Installing Windows applications/extensions with Amazon CloudFormation
For your example of WebDeploy, you could add this: "C:\Webdeploy\WebDeploy_amd64_en-US.msi" : { "source" : "http://download.microsoft.com/download/1/B/3/1B3F8377-CFE1-4B40-8402-AE1FC6A0A8C3/WebDeploy_amd64_en-US.msi" } as a element of this section of the template "WindowsServer": { "Type" : "AWS::EC2::Instance", "Metadata" : { "AWS::CloudFormation::Init" : { "config" : { "files" : { You could then add this command: "1-installwebdeploy" : { "command" : "msiexec.exe /i C:\Webdeploy\WebDeploy_amd64_en-US.msi ADDLOCAL=ALL /qn /norestart" } to the list of commands.

Categories : Amazon

Functional Requirements vs Non Functional Requirements for a mobile web app
if you have a look on this question, there is explained what non-functional rquirements are. In my mind the third point of your non-functional list is a functional requirment. Because this describes a functinality which the app should have. And the fourth and fith requirement depends also in the functional category I guess. But in this two cases I'm not 100% sure Hope I could help you a bit

Categories : Misc

Generating subnet CIDR blocks programmatically in CloudFormation templates (or adding integers together)
My solution for these kinds of issues was to use a legitimate programming language to compile a template into a CloudFormation JSON document. I used PHP 5.4, Twig and Symfony Console, but YMMV. Essentially, you do the math ahead of time in the programming language, then use that data as you write-out your JSON document.

Categories : Amazon

How can we write a function List multiPop(int k) that pops k elements from the stack or until the stack is empty?
Translate the following concept in to Java: create a list to store the popped members in. while (the stack is not empty and we have to pop more elements) { add a popped member from the stack to the list } return the list. Done

Categories : Java

Disadvantages of increasing Stack Size and difference between Stack Commit and Reserve
The OBVIOUS consequence of increasing the stack-size is more memory usage. Since the stack isn't enormous in comparison to overall memory in most cases, it's not a big issue. Obviously, if there are many threads using large stacks each, then that can amount to a large amount of the available memory in the machine - particularly if the machine hasn't got huge amounts of memory in the first place. "Reserved" space is allocated but not actually physically present until it has been "touched" - in other words, the physical memory space is not allocated for the stack here - just some space taken out of the virtual memory map for the allocation (so, if you are tight on virtual space because your application needs as much memory as it can get in a 32-bit environment, then it may still be a fact

Categories : C++

stack columns in dataframe, and also stack index column
Is this what you're after? In [11]: df1 = df.set_index(['aware', 'aware_2', 'aware_3', 'resp']) In [12]: df1.columns.name = 'heading' In [13]: df1.stack() Out[13]: aware aware_2 aware_3 resp heading 1 0 1 1 respondent a brand volvo engine p country swe age 23 volvo True 0 0 1 2 respondent b brand volvo engine None country swe age 45

Categories : Python

Is the vim clipboard a stack? If yes, how can I paste copied data from that stack?
I wouldn't say it is a stack. it works like stack ( for deletion) . I think you need to take a look "numbered registers". Vim has 0-9 numbered registers. If you think it as a stack, the size of the stack is 9 (1-9) for deletion. Yanked things were stored in register 0 and "", no stack structure. I said it works "stack like" but not stack (for deletion) because, with stack data structure, you could not randomly fetch element. you can just pop or push. but with vim's register, you could get any (0-9) element by "1 "3 "5 for example, and keep the "stack" without changing. read :h registers for detail.

Categories : Vim

How to find the call stack when there is just a corrupt stack corefile?
Displaying the call stack requires correct instruction pointer (eip), stack pointer (esp) and valid stack contents. From your output it looks like the stack had been corrupted and the previous function returned to some random address (eip=0x04229c7a). So, you are out of luck. Try running your program under valgrind.

Categories : C

Column stack and row stack with H5py to existing datasets
After rereading some of the documentation on H5py, I realized my mistake. Here is my new script structure that allows me to stack arrays in the HDF5 file: import h5py import numpy arr1 = numpy.random.random((2000,2000)) with h5py.File("Plot0.h5", "w") as f: dset = f.create_dataset("Plot", data = arr1, maxshape=(None,None)) dsetX, dsetY = 2000,2000 go = "" while go == "": go = raw_input("Current Size: " + str(dsetX) + " " + str(dsetY) + " Continue?") arr2 = numpy.random.random((2000,2000)) with h5py.File("Plot0.h5", "r+") as f: dset = f["Plot"] print len(arr2[:]) print len(arr2[0][:]) change = "column" dsetX, dsetY = dset.shape if change == "column": x1 = dsetX x2 = len(arr2[:]) + dsetX

Categories : Python

Stack by pointers in C working except at stack underflow
When you create the stack you allocate space for a node -- and don't fill it with anything. So after the call to create_stack() you have a blank node on your stack already. I guess you don't want that, doing just void create_stack(stack_node **top, int *status) { *top = NULL; *status = PUSH -1; } will work just fine. You allocate the memory during the push() call anyway any you check for top_stack == NULL during the functions. Alternatively you could have a flag in your stack node to indicate it's not used (then during push you'd not create a new one) but that's too complex for what you want here.

Categories : C

how to construct a string of physical subnet ids to create db subnet group on the fly in a cloudformation script?
I run into the same issue, after working with AWS support I understood that List of String does not mean what we initially thought. Also, if you want to place the DB inside a VPC you must not use AWS::RDS::DBSecurityGroup objects. Here is a full sample, it took me a while to get it working: "dbSubnetGroup" : { "Type" : "AWS::RDS::DBSubnetGroup", "Properties" : { "DBSubnetGroupDescription" : "Availability Zones for RDS DB", "SubnetIds" : [ { "Ref" : "subnetPrivate1" }, { "Ref" : "subnetPrivate2" } ] } }, "dbInstance" : { "Type" : "AWS::RDS::DBInstance", "Properties" : { "DBInstanceIdentifier" : { "Fn::Join" : [ "", [ { "Ref" : "AWS::St

Categories : Amazon

In linux, all kernel processes share the same kernel stack, each user process has its own stack, correct?
Incorrect. There's one kernel address space, and no kernel processes. There are kernel threads, and there are user space threads that enter the kernel. These run in the kernel address space. Each of these has a separate stack, within the kernel address space.

Categories : Linux

3/4 Password requirements
Your problem is here: preg_match('/$passwordspecs/', $_POST['password']) You are trying to access value of variable $passwordspecs in a single quotes. You need to use double quotes instead. Otherwise it is treated as a string. Change it to: preg_match("/{$passwordspecs}/", $_POST['password']) But you have more problems than that: Do not store password as a string, use some sort of hashing algorithm as Garytje suggested. Do not directly insert data into database that user provided. (DO NOT TRUST USER INPUT), in other words use prepared statements or else someone will inject SQL code. And in my opinion, as a customer/user, I hate when I have to choose a password like that, its hard to remember later on. I am registering on your website (means you get +1 user) why cant I choose pas

Categories : PHP

Creating Requirements
One approach would be to utilize the Specification pattern. So, basically, your item would have a WearerSpecification property which returns a specification that returns true if the current character satisfies it. Something like this: public abstract class Item { private readonly ISpecification<Character> _wearerSpecification; protected Item(ISpecification<Character> wearerSpecification) { _wearerSpecification = wearerSpecification; } public ISpecification<Character> WearerSpecification { get { return _wearerSpecification; } } } In the method that is called when the character tries to pick up an item, the code would look something like this: public class Character { public void PickUpItem(Item item) { if(

Categories : C#

RVM requirements error
It looks like RVM tried to install some dependencies using Macports and Macports proceeded to get really confused about dependencies when it tried to install autoconf. Try running: brew install autoconf Otherwise you should run this bash script: https://gist.github.com/siraj/1399288 Assuming you have brew, which you should if you don't. If your Macports just isn't working, then you can manually install all of the requirements like this: brew install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm

Categories : Ruby

What xml parser fits these requirements?
Using Sax As you want to modify XML this is not going to help you Using DOM Since you care about memory(efficiency) this is not going to work Using Stax This is what helps your concerns. You have also pointed on it. How to modify XML using Stax is discussed here

Categories : Java

Specifying the requirements for a generic type
Scala doesn't allow you to specify the constructor's signature in a type constraint (as e.g. C#). However Scala does allow you to achieve something equivalent by using the type class pattern. This is more flexible, but requires writing a bit more boilerplate code. First, define a trait which will be an interface for creating a T given an Int. trait Factory[T] { def fromInt(i: Int): T } Then, define an implicit instance for any type you want. Let's say you have some class Foo with an appropriate constructor. implicit val FooFactory = new Factory[Foo] { def fromInt(i: Int) = new Foo(i) } Now, you can specify a context bound for the type parameter T in the signature of Class1: class Class1[T : Factory] { def method1(i: Int) = { val instance = implicitly[Factory[T]].fromInt(

Categories : Scala

WSO2 API Manager Requirements
For the given number, 10000 API calls per day, it will be enough to have one API Manager server instance in following hardware. You can have another CPU core, and 2 GB RAM for same machine if WSO2 BAM server runs on same machine. Physical : 3GHz Dual-core Xeon/Opteron (or latest), 4 GB RAM (minimum : 2 GB for JVM and 2GB for the OS, 10GB free disk space (minimum) disk based on the expected storage requirements (calculate by considering the file uploads and the backup policies) . Virtual Machine : 2 compute units minimum (each unit having 1.0-1.2 GHz Opteron/Xeon processor) 4 GB RAM 10GB free disk space. One cpu unit for OS and one for JVM. (e.g if 3 Carbon instances running require VM of 4 compute units 8 GB RAM 30 GB free space) NOTE: You may have more than one instance as a cluster f

Categories : Wso2

How can I structure the HTML for these requirements
As above, Iframes may be best; however they are deprecated and don't always give the best results. An alternative would be to set a div for the content, and Ajax the content into the frame. You can then access it through the dom to get links etc. To decide which would be best I would consider what content is being loaded - full HTML documents (with doctype, head, metadata etc) will be problematic without I frames. If the content being loaded is just plain text, maybe with a few basic HTML elements, I would ajax it into a div

Categories : Javascript

ZF2 Server Requirements/Recommendations
This type of answer is really only one you'll be able to answer yourself by loading up your application and testing. Depending on your application you may need more resources than the typical application would. You mentioned Magento so here is a link to their requirements: http://www.magentocommerce.com/system-requirements However this still won't fully answer your question. There are many factors involved here such as the web server you will be running. Other applications running on the same machine. The amount of users you will have at any given type. There really is no true calculator to define what resources you'll need. ZF2 specifically does not have many system requirements but you can find more information on that here: http://zf2.readthedocs.org/en/latest/user-guide/overview.htm

Categories : Apache

wix burn installer requirements
Note that WiX is not an installation environment of its own. To put it simply, it is a comfortable, XML-style way to describe your installation requirements that gets translated into Windows Installer .msi databases by its compiler and linker. In this respect, WiX is a relatively thin wrapper around Windows Installer technology, and while it does provide extra features to help the setup developers, its abilities are dictated by the underlying technology and its limitations are not of its own but the limitations of Windows Installer itself. System Requirements from Windows Installer 3.1 shows this: Supported Operating System Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows Server 2003, Windows XP, Windows XP Service Pack 1, Windows XP Service Pack 2 Windows Installer 3.1

Categories : Wix

jQuery styling if certain value requirements of a are met
Firstly td elements do not have the val property. Need to use .text to get the text Next use parseInt to convert it to a number if (n > 50) { supposed to b e if (parseInt(n, 10) > 50) { But because you are specifically setting each td to a specific color. You need to iterate over the list using $.each. You can also use .filter as well. // Will return all the `tds` with the value var $red = $('.red').filter(function() { return parseInt( $(this).text(), 10) > 50; }); // Set the red elements to color red $red.css('color', 'red'); // All `.red` which are not in above selector are selected $('.red').not($red).css('color', 'blue'); Using Filter Demo Using Each Demo

Categories : Jquery

Requirements on connecting to https
Basically you have to add nothing, you only need to add http basic auth credentials if needed. This is how i usually connect to a https api with http basic auth. //Base URL NSURL *requestPasswordURL = [NSURL URLWithString:BASEURL]; //Http client with server credentials AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:requestURL]; [httpClient setAuthorizationHeaderWithUsername:@"user" password:@"password"]; //Set request parameters for example email NSDictionary *params = @{@"email": email}; NSMutableURLRequest *request = [httpClient requestWithMethod:@"POST" path:API_REQUEST parameters:params]; request.cachePolicy = NSURLRequestReloadIgnoringCacheData; //Prepare request AFHTTPRequestOperation *request = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [requestPa

Categories : IOS

Requirements for impelemting Zooz in ios app
Try this invoiceRefNumber is your system accounting invoice number, it is for tracking only and not used by our system. appKey - is the app key you received from us upon registration Creating a payment request and opening the payment dialog. -(IBAction)pay{ ZooZ * zooz = [ZooZ sharedInstance]; zooz.sandbox = YES;//set this if working in Sandbox mode ZooZPaymentRequest * req = [zooz createPaymentRequestWithTotal:32.1 invoiceRefNumber:@"1234" delegate:self]; req.currencyCode = @"USD"; [zooz openPayment:req forAppKey:@"app_id"]; }

Categories : Iphone

Golang requirements.txt equivalent
The command go get does exactly what you need: It finds all dependencies and downloads and installs the missing ones. Focus on "all": go get really traverses your dependency graph. Have a look at the documentation: http://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies The Go documentation is really clean, short and well written. I would recommend always to have a look at the documentation first before making assumptions which are based on experience with other tools or tool-chains.

Categories : Shell

How to combine these regex requirements?
You could merge them with an OR in the regex itself: ^(?:01(204|208|254|276|297|298|363|364|384|386|404|420|460|461|480|488|524|527|562|566|606|629|635|647|659|695|726|744|750|768|827|837|884|900|905|935|946|949|963|995)d{5}|0[12]d{9})$ Edited 11 digit regex.

Categories : Regex

jcvl not working due to jcl requirements
Try to add the following to your Search Path(HKCUSoftwareEmbarcaderoBDSx.xLibraryWin32), of course including the correct path prefix: ..jclsource; ..jclsourcecommon; ..jclsourceinclude; ..jclsourcevcl; ..jclsourcewindows; ..jvclcommon; ..jvcl un; You might also be interested in the following link: http://andy.jgknet.de/blog/2013/05/how-to-install-jcl-and-jvcl-for-xe4/

Categories : Delphi

Rvm hangs when installing 'requirements'
bash-3.2$ ?? That looks like the postgres prompt to me. You should be at a prompt like: ~/rails_projects/my_app$ Try typing: bash-3.2$ exit to get back to a prompt you can recognize.

Categories : Ruby On Rails

PHP mail function requirements
In most cases you don't need to do anything more.Just try a sample mail script like this.If it doesn't work then add sendmail_path = /etc/postfix in your php.ini. <?php $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "someonelse@example.com"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?>

Categories : PHP

Python argparse conditional requirements
A subparser (as suggested in comments) might work. Another alternative (since mutually_exclusive_group can't quite do this) is just to code it manually, as it were: import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('-2', dest='two', action='store_true') parser.add_argument('-3', dest='three') parser.add_argument('-4', dest='four') parser.add_argument('-5', dest='five') args = parser.parse_args() if not args.two: if args.three is None or args.four is None: parser.error('without -2, *both* -3 <a> *and* -4 <b> are required') print args return 0 Adding a little driver to this: import sys sys.exit(main()) and run with your examples, it seems to do the right thing; here are two runs:

Categories : Python

Python package seems to ignore my requirements
Python3 uses distutils and setup() will take a requires keyword arguments. From the docs: Dependencies on other Python modules and packages can be specified by supplying the requires keyword argument to setup(). Change install_requires to requires in you setup.py script.

Categories : Python

Find Simulink Requirements and get their contents
Which release are you using? In the latest release (R2013a), there is the System Requirements block. You can also generate (and customize) a requirements report, which should also work in earlier releases (I remember using it in R2011a for example).

Categories : Matlab

Database Design - Storing Requirements
Okay. I think you need a subject list, with a bunch of subject id's. Now, for the query, you will start with (or generate) a bunch of subject id's and grades. The easiest thing to do is to make this into a temporary table with those columns. Now, you can do your query, joining the subject id's, and adding a "where temp.grade <= course.grade. The trick to this is to count the rows. If it has the same number of rows as the course has specified, then you have a successful match. Is that enough to get you going?

Categories : Mysql

Programming language without additional requirements
This answer is for "what language is available on any version of Windows without additional requirements". There are many other options for "what I can use to create application that can be xcopy deployed on any version of Windows". JavaScript is probably your best bet - it is supported on most recent versions of Windows (according to Wikipedia article - Windows Script Host JavaScript available for scripting starting with Windows 98). Allows basic operation with files and HTTP communication - maybe enough for simple patching application. Next would be native Win32 application, but lack of C++ experience will make it hard.

Categories : Windows



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.