w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Copy Formula till data ends
You need to use your worksheet variable to get the cells and ranges. Also xlUP = -4162 according to the documentation. Dim ws = objworkbook2.Worksheets("Test USD") ws.Range ("C2") = "USD" ws.Range("C2").Copy (ws.Range("C3", ws.Cells(ws.Rows.Count, "B").End(-4162).Offset(0, 1)))

Categories : Vb.Net

How to Copy all the data that is referenced in the Excel Formula?
Select Worksheet1, now press Ctrl and select Worksheet2 as well. go to A3, edit the formula and press enter. Now the formula sits in A3 on Worksheet2 as well. You can even select more sheets (up to ALL sheets) and do this across the sheets selected.

Categories : Excel

Error in terms.formula(formula) : '.' in formula and no 'data' argument
As my comment states, this looks like a bug in the non-exported function neuralnet:::generate.initial.variables. As a work around, just build a long formula from the names of dt, excluding y, e.g. n <- names(dt) f <- as.formula(paste("y ~", paste(n[!n %in% "y"], collapse = " + "))) f ## gives > f y ~ x1 + x2 ## fit model using `f` model <- neuralnet(f, data = dt, hidden=10, threshold=0.01) > model Call: neuralnet(formula = f, data = dt, hidden = 10, threshold = 0.01) 1 repetition was calculated. Error Reached Threshold Steps 1 53975276.25 0.00857558698 1967

Categories : R

when applying the BMA packages in R : Error in terms.formula(formula, special, data = data) : '.' in formula and no 'data' argument
Here is your answer: test.bic.surv <- bic.surv( x[, 3:ncol(x)], x$crisis1, x$cen1, factor.type=FALSE, strict=FALSE, nbest=2000, maxCol=50 ) You have to provide maxCol parameter. Default is 30 so it is probably not enough for your needs.

Categories : R

How to make a sprite spiral to the center (in Java but if you know a formula, it would help too)
One simple way of making a sprite appear to spiral is to pretend that it is attached to an arm, like the hand of a clock, that rotates around the center of the spiral. As that arm rotates, slowly move the sprite down the arm towards the center. What you end up with is a classic Archimedan Spiral I can mock up some code for you, but that's going to take a few minutes. Okay, here's the code. public static double getArmX(double length, double angle) { return Math.cos(angle) * length; } public static double getArmY(double length, double angle) { return Math.sin(angle) * length; } These are the core of the math. They return the x and y values of an entity that is at the specified distance from the center (length) and angle from the center (angle). Now, I don't know how you have

Categories : Java

For an Excel Formula's variable taking a Range, input row number by the result of a formula
Try using the INDIRECT function:) say you have three cell that can dynamically calculate the address of your input range. something like what you suggested and it is in the cell A1 ="$BB$2:$BB$" & COUNTA(BB2:BB1000) ---> in cell A1 You can use the Indirect function like this: =SERIES(INDIRECT(A1),[RANGE],[RANGE]) Hope this helps!

Categories : Excel

Excel formula -> how to change SUMPRODUCT formula to skip null cells
In the sumproduct, to exclude empty cells, suppose you're using it on range A1:A100, you could do the following: = Sumproduct((A1:A100),--(A1:A100<>"")) That second criteria will ensure that you're only looking at cells that have a value in them... As an explanation (A1:A100<>"") will return an array of True False, where, if there is a value in the cell, it returns true, otherwise, false. Then, including the -- before it, it converts True/False to 1/0. So, in effect, you're multiplying empty cells by a zero (excluding from the formula) and non-empty cells by 1 (including them in the formula). The --(logical statement for my array) is a very useful trick to use with SumProduct() in MANY different ways!!

Categories : Excel

Convert Java/C style formula to excel formula
You can use built in Excel functions to substitute desired strings instead of other determined strings, such as: =SUBSTITUTE(D2,"AND"," == ") You can also read the formula into a string in VBA, perform the same operation, and place the formula back in excel. The strFormula = Cells(2, 4).Formula strFormula = Replace(strFormula, "AND", " == ") Cells(2, 4).Formula = strFormula I hope this helps.

Categories : Misc

Make outer tokens change inner tokens in a chemical formula using pyparsing
I guess I have found the solution myself. I had to create a recursive function to analyze the results and output the list as I wanted it, with each element and its stoichiometry without nesting. I had to modify slightly my starting code, and use named results for my purposes: from pyparsing import Word, Group, ZeroOrMore, Combine, Optional, OneOrMore, ParseException, Literal, nums, Suppress, Dict, Forward caps = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" lowers = caps.lower() digits = "0123456789" integer = Word( digits ) parl = Literal("(").suppress() parr = Literal(")").suppress() element = Word( caps, lowers ) separator = Literal( "," ).setParseAction(lambda s,l,t: t[0].replace(',','.')) | Literal( "." ) nreal = (Combine( integer + Optional( separator + Optional( integer ) )) |

Categories : Python

How can I make a copy of a CookieContainer?
You may use Reflection to get all cookies related to all Uris and then create new CookieContainer and add them to it, maybe such as here : public static CookieContainer DeepClone(CookieContainer src) { CookieContainer cookieContainer = new CookieContainer(); Hashtable table = (Hashtable)src.GetType().InvokeMember("m_domainTable", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance, null, src, new object[] { }); foreach (var tableKey in table.Keys) { String str_tableKey = (string)tableKey; if (str_tableKey[0] == '.') str_tableKey = str_tableKey.Substring(1); SortedList list = (SortedList)table[tableKey].GetType().InvokeMember("m_list", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance, null, tab

Categories : C#

SQL Formula Answer is Different from Excel Formula
Firstly, the question is tagged with MySQL, but the syntax used looks suspiciously like SQL-Server, as such I will do all the demonstrations with SQL-Server syntax. Secondly, based on the magnitude of the error (to the order of 10), I think you have your calculations mixed up, you appear to be saying that in the below 3 columns sum ([Impacts]) as 'column1', sum (nullif([Resp 2],0)) as 'column2', sum (nullif([Resp 2],0)/nullif([Impacts]*1000,0)) as 'column3' the third column is not giving you the same result as if you did the (column2 / (column1 * 1000) in excel, however this is not the same formula. I think what you need is: NULLIF(SUM([Resp 2]), 0) / (NULLIF(SUM(Impacts) * 1000, 0) AS [Resp 2%] Imagine this simple example (I have removed the NULLIF operators to make the difference

Categories : SQL

How to make a send yourself a copy check box
See the Add this comment below. //If there is no error, send the email if(!isset($hasError)) { $emailTo = 'myemail@domain.com'; // Put your own email address here $body = "Name: $name Email: $email Subject: $subject Site: Comments: $comments"; $headers = 'From: BTSyncrets Contact <'.$emailTo.'>' . " " . 'Reply-To: ' . $email; // Add this if (isset($_POST['copy'])) { $headers .= " Bcc: myemailaddress@example.com"; } mail($emailTo, $subject, $body, $headers); $emailSent = true; }

Categories : PHP

How to make a deep copy of an OWLOntology
There's indeed no method to deep copy as far as I know. One solution is to add all the axioms present in your first ontology to a newly created ontology instance. This way you keep everything in memory and no needs to re-read the files. The OWL entities (classes, properties, etc...) should be copied too. The following code should work (not tested): manager.addAxioms(newOntology, oldOntology.getAxioms());

Categories : Java

Can't make NSArray deep copy
NSArray *temp = [[NSMutableArray alloc] initWithArray:filters copyItems:YES]; (The above works for one-level-deep copy) For deep copying the best way I've found so far is NSMutableArray *deepCopyArray = (NSMutableArray*)CFBridgingRelease(CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (CFDictionaryRef)filters, kCFPropertyListMutableContainers));

Categories : IOS

Make copy a vs application project
It looks like VS is telling you it can't find the file Site.Master. Check that it (and any others) is included in the project by: Click the "Show all files" icon in the Solution Explorer. This will show if any files are not included in the project; The right click on the files/folders that are greyed out (not included) Select "Include in project".

Categories : C#

Is there anyway to make copy in Excel behave like cut?
If the cell references need to be constant regardless of where the equations are moved to, use something like $A$1:$A$5 for your range to fix the rows and columns in place. (the $ is an indication to Excel to not adjust the value of the index that follows it [either row or column], so if you have an equation in cell A1 that references the range $C3:$C19, copying the equation to cell B2 would result in the equation referencing range $C4:$C20, and if the range was C$3:C$19 then copying the equation to cell B2 would result in the equation referencing range D$3:D$19, while using $C$3:$C$19 would result in the referenced range being unchanged). You could also look into using R1C1 notation, but I don't think that's necessary for you.

Categories : Excel

How do you make text or other elements copy something other than that?
This is not so simple as it would seem to be. I've done this before so I will show you how to do it using jquery and the rangy selection library (https://code.google.com/p/rangy/) Basically you do this: take the current selection copy it in some invisible element add your text on that element select the invisible element restore the selection state with a setTimeout Here's a fiddle and the code: http://jsfiddle.net/P4yfw/ $("body").on("copy", function() { var selection = rangy.getSelection(); var ranges = selection.getAllRanges(); var container = $("<div>"); for (var i = 0; i < ranges.length; i++) container.append(ranges[i].cloneContents()); container.append(" - whatever text you want to append"); var wnd = $(window); var scrollTop = w

Categories : HTML

How to make a copy of a procedure in Scheme?
List in an implementation is defined as (define (list . l) l) However, this is using a lot of the underlying implementation. E.g. to work it uses the native cons. cons as defined in SICP is a thought experiment so you're implementation needs a little correction: (define (my-cons x y) (lambda (m) (m x y))) (define (my-car z) (z (lambda (p q) p))) (define (my-cdr z) (z (lambda (p q) q))) (define (my-list . l) (define (my-list-aux l) (if (null? l) '() (my-cons (car l) (my-list-aux (cdr l))))) (my-list-aux l)) ;; optional, update binding (define car my-car) (define cdr my-cdr) (define list my-list) my-cons my-car, my-cdr and my-list are as defined in your question. Only change is reference to correct procedure (with name not confli

Categories : List

make a copy of dead thread
Put an infinite loop in the daemon and check the isAlive()/is_alive() method if something has gone wrong. If it has just start up a new object using the same values. Another way to solve your problem would be to catch the real problem within the thread object and just take care of the problem there. I assume you have a loop in your run() method. Just put everything within the loop in a try/except clause that will re-initialize whatever you are doing to check the other servers. Something like this: def run(self): while 1: try: if not server.isconnected(): server.connect() server.getsomeinfo() except server.error as x: server.disconnect() time.sleep(1) This will reconnect as soon as it is an error of type

Categories : Multithreading

To create a copy of object in java w/o clone,copy constructor and copy factory
You can just create a new object for NewDog using OldDog Have you considered something like this? NewDog dog = new NewDog(someOldDogObject); While constructor of NewDog can be. public NewDog(OldDog oldDog){ this.dogWeight = oldDog.dogWeight; // keeping the same weight this.dogName = "newDog" + oldDog.dogName; // changing your dog name as per rquirement. }

Categories : Java

Make a derived object copy from pointer
The cloning virtual function is the most typical approach for this, for example as class Base { public: virtual Base* clone() { return new Base(*this); } }; class Derived : public Base { public: virtual Base* clone() { return new Derived(*this); } }; Sometimes however, when you have a pointer to Derived and you clone it, you suddenly have a pointer to Base while you know that it is derived. A down-cast is then needed, if you want to access Derived-specific members. According to C++98-standard you can actually change the return type to the derived type, e.g. class Base { public: virtual Base* clone() { return new Base(*this); } }; class Derived : Base { public: virtual Derived* clone() { return new Derived(*this); } //will overload Base::clone };

Categories : C++

Easy way to make a static copy of a web app for JSFiddle?
The quickest way to get all HTML on the page as-is is to paste this in the address bar: javascript:alert(document.body.outerHTML) You can also use the console, of course, but the above works even in old IE versions and is easier to copy/paste. I don't think there's a good way to get the CSS at all, but you could try using a jQuery selector or similar to get the URLs: $('link[type="text/css"]') .each(function(x, link){ console.log(link.attributes.href.value)}); And downloading and concatenating the CSS.

Categories : CSS

Make a copy of the entity dbcontext files
after looking around pieced this together, someone else may be interested /// <summary> Detach a database from LocalDB. This MUST be done prior to deleting it. It must also be done after a inadvertent (or ill advised) manual delete.</summary> /// <param name="dbName">The NAME of the database, not its filename.</param> /// <param name="directory"></param> /// <param name="newname"></param> /// <param name="newdirectory"></param> /// <remarks></remarks> public static void CopyDatabase(string dbName, string directory, string newname = null, string newdirectory = null) { string dbfilename = null; // Connect to the MASTER database in order to excute the detach command on

Categories : Entity Framework

How to make a deep copy of Object with get and set operators in JS
In ES5, you can use Object.getOwnPropertyDescriptor to get a copy of the getters and setters that may exist on an object. You can then pass those descriptors to Object.defineProperty to recreate them on a new object. Note that if those getters or setters rely on lexically scoped variables the new clone will share those variables with the original object. The new object will not get its own copy of those variables.

Categories : Javascript

Copy rows from one table to another and make a relationship of many to many
Assuming that ID is an identity in users and that the admin role exists in roles and there are no existing users, something like insert into users( name ) select name from ImportUsers insert into UsersToRoles ( UserID, RoleID ) select users.id , role.id from users, roles where role.name = 'admin'

Categories : Sql Server

Make an image copy another images movements
You can track the frame of the Imageview within which you have the image. For that you can use KVO. Its already explained in http://stackoverflow.com/a/4874289/1029360

Categories : IOS

Make flashbuilder automatically copy compiled swf
This is a very simple build.xml for Ant, which compiles your MXML application and copies the SWF to a specific folder. Put it into your projects' root folder and replace bin-release with your desired export folder. Also adjust the path to your Flex SDK as well as to flexTasks.jar and Application.mxml. <?xml version="1.0" encoding="utf-8"?> <project name="Builder" basedir="." default="build"> <target name="init"> <property name="FLEX_HOME" value="C:/Program Files/Adobe/Adobe Flash Builder 4.6/sdks/4.6.0" /> <taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasks.jar" /> </target> <target name="compile"> <mxmlc file="${basedir}/src/Application.mxml" output="app.swf" keep-generated-actionscript="fals

Categories : Ant

How can I make a unencrypted copy of an encrypted PDF in ruby?
In a project I worked on in the past where we needed to modify PDFs uploaded by users, which were in some cases encrypted, we used the program ps2pdfwr which is part of the ghostscript package to remove the protections from the originals. Despite the name it will accept PDF files as the input.

Categories : Ruby On Rails

Get current textBox to make a copy/paste
Im not familiar with silverlight but think this question should give you the needed answers: Detecting a control's focus in Silverlight

Categories : C#

Make a copy of an aspx page without Ambiguity errors
Just change the name of the code-behind class. For example, from: public class SomePage : Page { To: public class SomePagePublic : Page {

Categories : Asp Net

c++ make implicit copy constructor use initialization list
We all know that the implicit copy constructor operates as follows: default construct all member variables, then assign each member variable the appropriate corresponding value. No, it does not really work like that. Paragraph 12.8/15 of the C++11 Standard specifies: The implicitly-defined copy/move constructor for a non-union class X performs a memberwise copy/move of its bases and members. [...] Each base or non-static data member is copied/moved in the manner appropriate to its type: — if the member is an array, each element is direct-initialized with the corresponding subobject of x; — if a member m has rvalue reference type T&&, it is direct-initialized with static_cast<T&&>(x.m); — otherwise, the base or member is direct-initial

Categories : C++

How to make NSTextFieldCell Accept Keyboard copy/paste(cmd+c / cmd+v)
the edit menu items for copy / cut / paste etc, are what map the shortcuts to the actions. see the similar question here: Cocoa Keyboard Shortcuts in Dialog without an Edit Menu

Categories : Osx

How can I make people can click a image and copy the related codes in my GIthubPage?
This is what I do @HyperGroups. But just a sample, you can modify depending on your case. Especially the text what will you show. I suggest to use AJAX. I use jquery dialog for popup. and a function for receive the parameter. HTML <div id="popup"></div> .... jQuery function show_popup(particular_id){.... CSS img{ display: inline-b... Open this fiddle to see the result.

Categories : Javascript

Make subfolder names from part of file name and copy files with Robocopy
@ECHO OFF SETLOCAL SET "sourcedir=." SET "destdir=c:destdir" FOR /f "tokens=1*delims=_" %%i IN ( 'dir /b /a-d "%sourcedir%*_*."' ) DO XCOPY /b "%sourcedir%\%%i_%%j" "%destdir%\%%i" GOTO :EOF This should accomplish the task described. You'd need to set up the source and destination directories to suit, of course. Add >nul to the end of the XCOPY line to suppress 'copied' messages.

Categories : Windows

how to test a formula to see if a particular value is used in that formula
Try this: Sub findIt() mesage = "" For Each r In Intersect(Range("C:C"), ActiveSheet.UsedRange) If r.HasFormula Then v = r.Formula If InStr(v, ".75") > 0 Then mesage = mesage & vbCrLf & r.Address End If End If Next MsgBox mesage End Sub

Categories : Excel

"Target folder cannot be created" when trying to make Netbeans copy sources folder
As I had guessed, it was a Windows permissions issue. After doing pretty much the same thing over and over without the change sticking, it finally stuck, and I was able to get things working the way I wanted. Sigh...

Categories : PHP

What service will copy a third-party JSON feed every few seconds so users can access the copy?
Check out Feed the Fire, which reads RSS feeds into Firebase. I think you'll find it a great idea bank and a close fit for your needs. Essentially, it uses a node.js process to read the source feeds on a regular interval and inject them into Firebase for consumption. The code involved is rather trivial: Var Firebase = require('firebase'); setInterval(function() { var jsonData = /* get data from your JSON feed */; new Firebase(URL).set( jsonData ); }, FREQUENCY_OF_CHECK_IN_MILLISECONDS );

Categories : Javascript

Write a function to dynamically create a new copy of string and return a pointer to the new copy (C)
I should start by pointing out that in my opinion, given the number and (especially) nature of the mistakes in this code, you probably need to get a good book on C. Your newString = s; overwrites the pointer instead of copying the string into the space you just allocated. Thus, you lose the pointer to what you just allocating (leaking the memory) without making a copy. You probably want to use strcpy instead of direct assignment. Your computation of the size you allocate isn't what you really want either. Typically, for a string of length N, you want to allocate N+1 bytes. You're currently attempting to allocat sizeof(int * strlen(s)) bytes, which shouldn't even compile.

Categories : C

Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
ITEMS needs a definition available in the same translation unit to be used as an array size. Change its declaration (extern int const ITEMS;) to also be a definition: int const ITEMS = 9;

Categories : C++

how to use ZeroClipboard.js to copy static word when page load copy to clipboard
As mentioned in the comments, this requires a user interaction. I recommend having a div with this style. .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; text-align: center; background: rgba(255, 255, 255, .5); } Bind zero clipboard to that, and instruct the user to click to copy the text and continue. Users should always be notified of their clipboard modifications. If you end up replacing their college thesis with some arbitrary text, without warning, they might not be so happy...

Categories : Javascript



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