w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Git: Remote Branch Availability on Clone of Clone
You and #2 will have the Gatekeeper repo as a remote, and fetch from that. When you do you will only get the state of the local branches of Gatekeeper, at their current respective commit. So, Gatekeeper would need to git pull relevant branches to get up to date changes from the Developer repo. Then you can pull from Gatekeeper to get the latest changes. It seems inconvenient to me, since it depends on the Gatekeeper regularly pulling so that you can pull. Also, what is Gatekeeper supposed to do if there is a change he does not like? git revert it? A possibly better alternative to your workflow, would be the Integration-Manager Workflow. The Gatekeeper could be the integration manager, and you, #2 and Developer could be contributors. What is best depends a lot on the role of Gatekeeper

Categories : GIT

See how many aws instances are in each availability zone
As far as i know there's no way to check the amount of instances in an AZ. What you could do is use an Autoscaling group and specify the AZs that you want when creating it. Autoscaling will then disperse the instance load evenly amongst listed AZs AZ = Availability zone

Categories : Amazon

Is using clone() -Node class method- good for performance?
Hard to say without real data, how about benchmarking it? But it only worth the work if you have a performance problem – don't do premature optimization! But if you do a benchmark in Dart, you should read this guide. The internal of the Dart VM make real benchmarking with correct results difficult. Your code won't get optimized until it's hot (has run some times). Running the VM in checked mode makes a difference, too!

Categories : Dart

What's a good way to implement simple clone() based multithread library?
1) You are using an example of LinuxThreads. I will not rewrite good references for directions, but I advise you "The Linux Programming interface" of Michael Kerrisk, chapter 28. It explains in 25 pages, what you need. 2) If you set the CLONE_CHILD_CLEARID flag, when the child terminates, the ctid argument of clone is cleared. If you treat that pointer as a futex, you can implement the join primitive. Good luck :-) If you don't want to use futexes, have also a look to wait3 and wait4. 3) I do not know what you want to cleanup, but you can use the clone tls arugment. This is a thread local storage buffer. If the thread is finished, you can clean that buffer. 4) See getrusage.

Categories : C

How do you clone a git repo over HTTP using the Bitnami Gitorious stack?
Looks like I found a solution, but it's kind of sucky. I changed XSendFilePath /opt/gitorious-2.4.12-1/apps/gitorious/tarballs to XSendFilePath /opt/gitorious-2.4.12-1/apps/gitorious/repositories Which caused the following error: Wed Jul 03 12:18:51 2013] [error] [client 143.122.172.123] (13)Permission denied: xsendfile: cannot open file: /opt/gitorious-2.4.12-1/apps/gitorious/repositories/test/test.git/ I solved this by running sudo chmod 775 /opt/gitorious-2.4.12-1/apps/gitorious/repositories Nothing else I tried worked. I'm not sure if those permissions are safe, but they let me clone over HTTP. I cannot push but Gitorious doesn't support that over HTTP anyway.

Categories : GIT

Is it a good practice to store C structures on the stack?
You have probably been reading older textbooks from back when the stack was a few kilobytes and "stack overflow" was a common error, not a web site. The stack on a modern PC will be several MB by default; on a Linux box, try ulimit -s. Last I checked on my netbook, I could write all of Shakespeare's tragedies to the stack without any difficulties. Yes, there are data sets easily bigger than that, but you describe your structs are relatively small, so you can probably fit tens of thousands (if not millions) of your structs on the stack without any problem at all. As mentioned in the comments, writing structs directly to the stack also has the usual conveniences of not needing to allocate or free memory.

Categories : C

Joda: How to compare date instances in same time zone with different time zone representations?
Just found the answer myself. There's an option for DateTimeFormatter that prevents it from resolving time zone offsets: ISODateTimeFormat.dateTime().withOffsetParsed()

Categories : Misc

Clone dynamically added html content with JQuery clone() method
First of all, you should use $('a#modify1'), since modify1 is ID and not class. You are running showModal, without checking if load method completed, and so it couldnt find any <form> to clone. Try putting showModal as a callback to the load function: $('a#modify').click(function() { $('#formContainer).load('getuserupdateform.php?user_id=X', function(){ return showModal($(#formContainer)); }); }); This way, showModal will run ONLY when the load request has completed. Detailed explanation on how callback works : http://api.jquery.com/load/

Categories : Jquery

How to clone/copy a sql record with CakePhp, and then grab the ID of the clone?
you can also get the last inserted record id in these ways. $cloneId = $this->Contract->id; or $cloneId = $this->Contract->getLastInsertID(); or $contract = $this->Contract->save($contract); $cloneId = $contract['Contract']['id']

Categories : PHP

jQuery clone a div and increment the ID but limit the clone to 3 times
Just add a check to see if you already reached your third element with id=2 $('#btn').click(function(){ if(current_id < 2) nextElement($('#Outer_00')); }); Demo fiddle

Categories : Jquery

How to handle time zone issue without storing date time as TIMESTAMP WITH TIME ZONE
If you have the names of the time zones, you can use a query similar to the following to adjust alter timestamps: SELECT e.last_updated_date AS cst_last_updated_date, (FROM_TZ(e.last_updated_date, 'US/Central') AT TIME ZONE 'US/Eastern') AS est_last_updated_date FROM events_tbl e; In my experience this will automatically account for DST based on the locale. If you're working with DATES and not TIMESTAMPS, you can also do the following: select CAST (e.last_updated_date AS TIMESTAMP) AS cst_last_updated_date, (FROM_TZ(CAST (e.last_updated_date AS TIMESTAMP), 'US/Central') AT TIME ZONE 'US/Eastern') AS est_last_updated_date from events_tbl e;

Categories : C#

Good Dynamics: How can a third party create an IPA consumable by the Good Wrapping server?
The second flow is the correct one. Application wrapping is mostly intended for in-house developers. Just be aware that your particular scenario, where the customer provides you with their certificate, might not be Apple approved.

Categories : Misc

Is it possible to clone a git repository, and split the clone repo, keeping track of the changes from original repo?
Sparse checkouts may be of help here. You need to clone the repository A. You then have to configure sparse checkout (after cloning): git config core.sparsecheckout true echo project1/ > .git/info/sparse-checkout Then you need to call git read-tree -m -u HEAD Notes However the sparse checkout is not truly independent. Let us say you want only project1. Changes introduced by project2 or project3 in your case will suggest that your sparse checkout has changed. References Checkout sub directories in git

Categories : GIT

Draggable helper -> drop clone at position of mouseup -> draggable clone
Here is a starting point: fiddle but this is a very general solution, so in case you have a more specific use case let me know ! .js $("#container").droppable({ // accept draggables only from #toolbox, // this will prevent cloning of the draggables(inside drop event handler), // that already have been dropped inside #container accept: "#toolbox .draggable", drop: function (event, ui) { // when a draggable is dropped: // 1: clone it's helper // 2: Make the helper draggable // 3: set containment to #container $(this).append($(ui.helper).clone().draggable({ containment: "parent" })); } }); $(".draggable").draggable({ revert: "invalid", helper: "clone" }); .html <div id="toolbox"> <div class="draggable">drag&l

Categories : Javascript

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

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

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

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

User name availability
The call to First throws an exception when no result is found, so I guess that is why it stops executing in your case. You should call FirstOrDefault instead, which returns null if there is no matching username. var u = cx.signups.FirstOrDefault(x => x.username.Equals(userName)); if (u != null) //Found return this.Json(true, JsonRequestBehavior.AllowGet); else //Not found return this.Json(false, JsonRequestBehavior.AllowGet);

Categories : C#

MSDTC in Always On Availability Groups
I recently asked a similar question at: http://dba.stackexchange.com/questions/47108/alwayson-ag-dtc-with-failover > What options do we have (Shelve or open source Product/Code change)? I think you have two options: Change your app so that it does not need DTC. Change your database setup so that it does not use Availability Groups. In my circumstance, we're using a commercial app so option 1 is not viable. We are currently using database mirroring and based on recent research I now understand that that is also not supported. My take away is that it is possible to make it work. But it's not simple to do and it puts you in an unsupported situation - which is not acceptable for us. Therefore, I plan to look at utilizing log shipping and change from having a hot standby (with mirrori

Categories : SQL

Kestore availability in public
If some one got my key store password but not the file itself? The person could do nothing with it. If some one got my key store password with key store file and all the info? If the person has access to your google play developer account, then he/she can upload an update to your app. Either way he/she can sign an .apk and if someone, who has previously installed your app, installs it (through side loading or third party sources), then the app will get updated without any conflicts If it effects on my application available on Google Store? If you loose your keystore then you can't update the app you signed with it on the play store, so always keep it backuped. Or any other drawback of keeping simple passwords for the key store file? Like already said, nothing can hap

Categories : Android

Availability calendar .net jquery
Inline week picker using jQuery UI DataPicker (requires jQuery UI 1.8+) See Reference <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css"> <script type="text/javascript"> $(function() { var startDate; var endDate; var selectCurrentWeek = function() {

Categories : C#

AJAX username Availability
Since you didn't specify dataType the response is probably treated as text or html and in that case it might be wise to do the comparison as a string: if (response == "1") {...} instead of a number. Or use parseInt(response, 10) == 1 if you compare it as a number.

Categories : PHP

High Availability for WSO2 ELB
Yes you can run the ELB in a cluster. Please follow this link to get detailed steps, http://docs.wso2.org/display/ELB210/Using+Load+Balancer+in+a+Cluster

Categories : Wso2

Checking availability of product
You should pick up cameras that have Rentals.startdate >= enddate Or Rentals.enddate <= startdate The choice between <= or < depends on the semantics of startdate (being inclusive or not)

Categories : PHP

Availability of bidictionary structure?
You can do it with a NSDictionary: allKeysForObject: Returns a new array containing the keys corresponding to all occurrences of a given object in the dictionary. (NSArray *)allKeysForObject:(id)anObject Parameters anObject The value to look for in the dictionary. Return Value A new array containing the keys corresponding to all occurrences of anObject in the dictionary. If no object matching anObject is found, returns an empty array. Discussion Each object in the dictionary is sent an isEqual: message to determine if it’s equal to anObject. And: objectForKey: Returns the value associated with a given key. (id)objectForKey:(id)aKey Parameters aKey The key for which to return the corresponding value. Return Value The value associated with aKey

Categories : IOS

Magento product availability
May be you have deleted this line from your view.phtml file <?php echo $this->getChildHtml('product_type_data') ?> this in turn call this block <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml"> This is responsible for display stock message on product page.

Categories : Magento

Redis availability check
Use the predis client and the PING command. return true if PONG is received as response. return false on CommunicationException.

Categories : PHP

Check Username Availability Error
Well first I'd like to give you a tip on using parameters in your queries, second, I think you meant to write COUNT() in your SQL: OleDbCommand cmd = new OleDbCommand("SELECT COUNT([Username]) FROM [Member] WHERE [Username] = ?", conn); cmd.Parameters.Add(textBox1.Text);

Categories : C#

Testing WebApi availability from Javascript or C#
It makes sense to do this on the client side using the jQuery ajax method. I think it is best practice to do any client-side validation when you can to avoid round trips to the server. If I understand what you are trying to do, it is to validate that the user has entered a valid base URI that points them to your Web API. This validation can easily be done on the client with jQuery ajax as long as the Web API call you make does not update any state information on the server. Just have the javascript functions associated with the success and error events on the ajax method. If it hits success function then the validation is successful; if it hits the error function then validation fails.

Categories : Javascript

how to submit the form after name check availability?
I think that you should use submit event... <form action="<%=editCourseURL%>" method="post" id="register-form" > <div class="label1">Course Name</div> <input type="text" id="cname" name="cname" value=" "/>&nbsp; <input type="submit" id="submit1" value="check availability" />&nbsp; <div id="message" ></div> <br /> <div class="label2">Course Description</div> <input type="text" id="cdesc" name="cdesc" value=""/><br/> <div class="label3">Start Date</div> <input type="date" name="sdate" id="sdate" value=""/><br/> <div class="label4">End Date</div> <input type="date" id="edate" name="edate" value="" /><br /> <i

Categories : Jquery

Hadoop namenode High Availability
For ASF Hadoop 1.1.2, there are no solid NameNode HA options. These were released for 2.0 and are included in popular distributions like Cloudera's CDH4. The options for NameNode HA include running a primary NameNode and a hot standby NameNode. They share an edits log, either on a NFS mount, or through quorum journal mode in HDFS itself. The former gives you the benefit of having an external source for storing your HDFS metadata, while the latter gives you the benefit of having no dependencies external to Hadoop. Personally, I like the NFS option, as you can easily snapshot/backup the data resident the file server. The disadvantage to this approach is potentially inconsistent performance in terms of latency. For more detail, check out the following articles: http://www.slideshare.

Categories : Hadoop

EWS - Exchange Server - Availability Options
Simplified version is presented here: http://www.independentsoft.de/exchangewebservices/tutorial/getavailability.html

Categories : C#

WSO2 ESB/GREG High Availability
You can refer this documentation for information on deploying a cluster of Governance Registry instances to achieve load balancing and high availability. To avoid the risk of system downtime due to failure of the ELB, you can implement a fail-proof ELB deployment. This documentation explains how to implement failover using two identical ELB setups running in active and passive modes respectively.

Categories : Wso2

Strategy For Font Family Availability
Different browsers use different formats for fonts. For example, IE uses .eot files where as other browsers use .otf, .ttf, or even svg. Your best bet is to store multiple types of a font that would want to use and then declare them all in the @font-face block. A good article about this can be found: http://www.paulirish.com/2009/bulletproof-font-face-implementation-syntax/

Categories : CSS

Check username availability ajax
I found this useful for you.You can check for your solution on the following link Click Here or Here

Categories : PHP

What are the decisions behind type availability for particular platform?
It is a pretty mechanical process. Simply intersect the set of types available in each of the platforms that you selected for the PCL project. Remove every type that's not available in one of the targets. What you got left is what you can use. CancelEventHandler might look like a strange omission, until you take a closer look at the type. It has an attribute, HostProtectionAttribute is not widely supported. So PCL just helps you avoid the "oh shoot!" moment when you've heavily committed to using a type in a class library. To find out later that you can't make your library work on another target. That's very ugly, potentially destroying a lot of time spent on writing and testing the code. Getting an early heads-up about that problem can save you an enormous amount of pain and suffe

Categories : Dotnet



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