qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
The problem with Java is that since it does the garbage collection automatically, and you can only induce it to happen, you cannot free resources at the exact moment you want them to be freed. The advantage is that you do not have to worry about objects being left behind, because they won't affect your memory in the lo...
Programmer managed memory in c and c++ is the root cause of many software bugs in programs written in those languages. This is one of the main reasons modern languages like Java and C# have garbage collection.
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
As for internal memory management, Java has the best of the three, since it automates disposing of objects. If your question aims at performance, C or C++ would be a better bet. You would have to do all of the memory management yourself, but at the same time wouldn't have to wait for a Garbage Collector to do it's job...
Programmer managed memory in c and c++ is the root cause of many software bugs in programs written in those languages. This is one of the main reasons modern languages like Java and C# have garbage collection.
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
Java has memory management. C and C++ don't, so it's memory management is a function of the programmer.
The problem with Java is that since it does the garbage collection automatically, and you can only induce it to happen, you cannot free resources at the exact moment you want them to be freed. The advantage is that you do not have to worry about objects being left behind, because they won't affect your memory in the lo...
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
Java has memory management. C and C++ don't, so it's memory management is a function of the programmer.
As for internal memory management, Java has the best of the three, since it automates disposing of objects. If your question aims at performance, C or C++ would be a better bet. You would have to do all of the memory management yourself, but at the same time wouldn't have to wait for a Garbage Collector to do it's job...
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
Thats a apples to oranges question in my book. C/c++ don't have memory management at least not in the language thats your job. That being said java will allocate and destroy memory for you all the live long day but at the cost of control. For the standard business app this is not at issue. You are going to load some bl...
Java and C# have both garbage collection. This is a good thing because the programmer has less problems with memory management, and can concentrate on other problems. In C and C++ you must manually manage memory - for this you need much time and patience and experience. JVM's garbage collector is fast enough, hence you...
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
Thats a apples to oranges question in my book. C/c++ don't have memory management at least not in the language thats your job. That being said java will allocate and destroy memory for you all the live long day but at the cost of control. For the standard business app this is not at issue. You are going to load some bl...
Programmer managed memory in c and c++ is the root cause of many software bugs in programs written in those languages. This is one of the main reasons modern languages like Java and C# have garbage collection.
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
The problem with Java is that since it does the garbage collection automatically, and you can only induce it to happen, you cannot free resources at the exact moment you want them to be freed. The advantage is that you do not have to worry about objects being left behind, because they won't affect your memory in the lo...
Java and C# have both garbage collection. This is a good thing because the programmer has less problems with memory management, and can concentrate on other problems. In C and C++ you must manually manage memory - for this you need much time and patience and experience. JVM's garbage collector is fast enough, hence you...
3,910,625
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++...
2010/10/11
[ "https://Stackoverflow.com/questions/3910625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472777/" ]
Java has memory management. C and C++ don't, so it's memory management is a function of the programmer.
Java and C# have both garbage collection. This is a good thing because the programmer has less problems with memory management, and can concentrate on other problems. In C and C++ you must manually manage memory - for this you need much time and patience and experience. JVM's garbage collector is fast enough, hence you...
134,478
I would like to attach an eyebolt to the ridgeline of my metal roof. I can then attach a rope to that when I need to work on the roof. I am a climber and have the knowledge and gear to secure myself. The rope is mainly to allow me to get up the 10/12 central part of the roof (the ridgeline of which I'll mount the eye-b...
2018/03/13
[ "https://diy.stackexchange.com/questions/134478", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/34111/" ]
If I may suggest an alternative since putting a hole in any roof is better avoided. I have a 10/12 pitched roof and I use an extension ladder with a stand-off stabilizer to reach the peak. [![stand-off stabilizer ](https://i.stack.imgur.com/gLCUR.jpg)](https://i.stack.imgur.com/gLCUR.jpg) The ladder is laid flat on ...
Here's what I ended up doing: 1. I mounted a piece of 6x6 oak between two rafters, just down from the ridgeline, butted flat against the roof underlayment, and secured with three anodized 4" timber screws through the rafters at each end. I did two of these, one of each side of the ridgeline. 2. I sourced some 1/2" by ...
134,478
I would like to attach an eyebolt to the ridgeline of my metal roof. I can then attach a rope to that when I need to work on the roof. I am a climber and have the knowledge and gear to secure myself. The rope is mainly to allow me to get up the 10/12 central part of the roof (the ridgeline of which I'll mount the eye-b...
2018/03/13
[ "https://diy.stackexchange.com/questions/134478", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/34111/" ]
It may not look the best, but if you're going to install a fall arrest system on your roof this seems like a cheaper and tested solution. It's best not to try to MacGyver solutions when life safety is involved. I'd suggest covering the fasteners with a waterproofing tape once the system is installed to prevent as much ...
Here's what I ended up doing: 1. I mounted a piece of 6x6 oak between two rafters, just down from the ridgeline, butted flat against the roof underlayment, and secured with three anodized 4" timber screws through the rafters at each end. I did two of these, one of each side of the ridgeline. 2. I sourced some 1/2" by ...
17,220,607
I have a stored procedure like this: ``` create proc calcaulateavaerage @studentid int as begin -- some complicated business and query return @result -- single decimal value end ``` and then I want to create proc the whole result ``` select * , ................................ from X where X.value > (calcula...
2013/06/20
[ "https://Stackoverflow.com/questions/17220607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712104/" ]
You don't want a stored procedure. You want a function.
Use Output variables to output the data out of stored procedure: ``` create proc calcaulateavaerage @studentid int, @result int as begin -- some complecated business and query select @result = id from sometable; end -- Declaring output variable named result; declare @result int; -- Passing output variable to stored...
11,242,592
I am facing a problem for several days and after many research I couldn't find anything that fit with my case. Here's the thing : I'm working with Visual Studio 2010 on a solution that contains several projects and a Setup Project. I want the setup project to create a MSI file to update the product from version 1.5 to...
2012/06/28
[ "https://Stackoverflow.com/questions/11242592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1488053/" ]
This appears to be a bug with the plugin "Microsoft Visual Studio 2017 Installer Projects". The msi file gets built with an incorrect sequence number (too high). The uninstall of older products happens *after* the install of new files, so new files get incorrectly deleted. Manual fix: Change the sequence so that un...
That article is just out of date in two respects: 1. It doesn't explain that the upgrade in later versions of Visual Studio setup projects was changed to be "on top" of the existing files, after which the older product is removed. This is not a bug, it's a feature. Example: If you installed a product with a database t...
4,529,129
We have the following recursive definition of a set 1. The number 1 belongs to set S 2. if x belongs to set S, then so does x+x 3. Only those elements defined by above rules belong to set S Now, suppose x and y are two elements of set S. Prove that x\*y also belongs to set S. I realize that the set defined by three ...
2022/09/11
[ "https://math.stackexchange.com/questions/4529129", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1093790/" ]
Since only the elements defined in this way are in the set, if $x\in S$ and $x\neq 1$, then $x/2\in S$. Suppose that $x\in S$ is the smallest element such that there exists $y\in S$ with $xy\not \in S$. We can't have $x$ or $y$ equal to $1$, so $x/2 \in S$. Then $(x/2)\*(2y)=xy\not \in S$, contradicting minimality of $...
Fix $x \in S$ and use induction on the recursive definition of the assertion that $y \in S$. In the base case, $y = 1$ and $x \times y = x \in S$, by assumption. In the inductive step $y = y' + y'$ where $y' \in S$ and the inductive hypothesis gives us that $x \times y' \in S$, but then $x\times y = (x \times y') + (x ...
24,207,428
For my current project, I need to drop some pins on a image(NOT a map), and also should be able to click the pin to add some comments to this pin. I wonder if I can use MKAnnotation/MKAnnotationView to do this. I have searched on Internet for a while. I only find tutorials about how to customize MKAnnotation with other...
2014/06/13
[ "https://Stackoverflow.com/questions/24207428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3727706/" ]
Finally I found that when I want to read attribute user.MYATTR, i have to use name MYATTR. I just wanna mention what interesting behaviour I found, that may lead to mystakes and i wanna warn you :) My file has these two attributes: user.MYATTR1 user.somethingElse.MYATTR2 When I was listing attributes using view.li...
Did you read the [docs](http://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/UserDefinedFileAttributeView.html) to the class `UserDefinedFileAttributeView`? Reading carefully gives a few hints, why your code doesn't work properly. For example you can check that: > > ... This *FileAttributeView* is not i...
5,248,028
jQuery 1.4 added [a shorthand way for constructing new DOM Elements](http://api.jquery.com/jQuery/#jQuery2) and filling in some of their attributes: > > `jQuery( html, props )` > > > `html`: A string defining a single, standalone, HTML element (e.g. or ). > > > `props`: A map of attributes, events, and methods to...
2011/03/09
[ "https://Stackoverflow.com/questions/5248028", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
From the [docs](http://api.jquery.com/jQuery/#jQuery2): > > As of jQuery 1.4, the second argument > can accept a map consisting of a > superset of the properties that can be > passed to the `.attr()` method. > Furthermore, any event type can be > passed in, and the following jQuery > methods can be called: val,...
The short way should be : ``` $("<img />", { height: 4 }).height(); ```
5,248,028
jQuery 1.4 added [a shorthand way for constructing new DOM Elements](http://api.jquery.com/jQuery/#jQuery2) and filling in some of their attributes: > > `jQuery( html, props )` > > > `html`: A string defining a single, standalone, HTML element (e.g. or ). > > > `props`: A map of attributes, events, and methods to...
2011/03/09
[ "https://Stackoverflow.com/questions/5248028", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
From the [docs](http://api.jquery.com/jQuery/#jQuery2): > > As of jQuery 1.4, the second argument > can accept a map consisting of a > superset of the properties that can be > passed to the `.attr()` method. > Furthermore, any event type can be > passed in, and the following jQuery > methods can be called: val,...
The difference is setting the attr will add a height attribute, the other forms set the height style property. So the shorthand version sets the style rather than the `height` attribute: ``` $("<img />", { height: 4 }); // creates <img style="height:4px;"> $("<img />").height(4); // creates <img style...
753,813
I'm trying to lay out some images in code using addSubview, and they are not showing up. I created a class (myUIView) that subclasses UIView, and then changed the class of the nib file in IB to be myUIView. Then I put in the following code, but am still getting a blank grey screen. ``` - (id)initWithFrame:(CGRect...
2009/04/15
[ "https://Stackoverflow.com/questions/753813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82780/" ]
yes, just implement initWithCoder. initWithFrame is called when a UIView is created dynamically, from code. a view that is loaded from a .nib file is always instantiated using initWithCoder, the coder takes care of reading the settings from the .nib file i took the habit to do the initialization in a separate method,...
try implementing `initWithCoder:` sometimes I've had trouble with IB and `initWithFrame:` or at least add a logging call to see if your init method is executed
1,738,022
Assume M has only a countable or finite number of points and M is connected. Prove that every continuous function f:M->R is a constant function on all of M. Here is what I have so far: If f: M->R is continuous and M is connected then f(M) is connected in R. Hence f(M) is an interval because it is a connected subset ...
2016/04/11
[ "https://math.stackexchange.com/questions/1738022", "https://math.stackexchange.com", "https://math.stackexchange.com/users/317811/" ]
The cardinality of $f(M)$ is at most the cardinality of $M$, thus countable or finite. The only nonempty intervals of $\mathbb R$ that are countable or finite are singletons.
$M$ finite implies $|f(M)|< \infty$. Since $f(M)$ is connected then it can't be a union of singletons because that is a disconnected space. Therefore, $|f(M)| = 1$ i.e $f$ is constant.
32,179,545
I have 2 input boxes for first name and last name of passengers travelling. There could be maximum 9 number of passengers. It is not allowed to have two passengers with same name(first and last combined) How can I check if none of the passenger have same names(first and last name combined) ``` <input type="text"...
2015/08/24
[ "https://Stackoverflow.com/questions/32179545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4895885/" ]
You can add a verification javascript function , but first u need to have specific names for all input boxes . U can try something like this : ``` <input type="text" name="adultFirstName1" id="adultFirstName1" class="form-control input-sm" placeholder="" style="width:100%; padding:5px;" OnClick="Verify();"> . . . <i...
Are there 2 input boxes for each passenger? If so, try something like this: ``` $(document).ready(function(){ $("button").click(function(){ if($("#adultFirstName1").val() == $("#adultFirstName2").val() && $("#adultLastName1").val() == $("#adultLastName2").val()) { //Names are the...
32,179,545
I have 2 input boxes for first name and last name of passengers travelling. There could be maximum 9 number of passengers. It is not allowed to have two passengers with same name(first and last combined) How can I check if none of the passenger have same names(first and last name combined) ``` <input type="text"...
2015/08/24
[ "https://Stackoverflow.com/questions/32179545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4895885/" ]
``` var name=[]; var sameName=false; for(var i=1;i<=<%=detailsModel.getNumberOfAdult()%>;i++) { var fullName = document.getElementById("adultFirstName"+i).value+" "+document.getElementById("adultLastName"+i).value name.push(fullName); } for(var i=1;i<=<%=detailsModel.getNumberOfChild()%>;i++) { var fullName = docu...
Are there 2 input boxes for each passenger? If so, try something like this: ``` $(document).ready(function(){ $("button").click(function(){ if($("#adultFirstName1").val() == $("#adultFirstName2").val() && $("#adultLastName1").val() == $("#adultLastName2").val()) { //Names are the...
32,179,545
I have 2 input boxes for first name and last name of passengers travelling. There could be maximum 9 number of passengers. It is not allowed to have two passengers with same name(first and last combined) How can I check if none of the passenger have same names(first and last name combined) ``` <input type="text"...
2015/08/24
[ "https://Stackoverflow.com/questions/32179545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4895885/" ]
``` var name=[]; var sameName=false; for(var i=1;i<=<%=detailsModel.getNumberOfAdult()%>;i++) { var fullName = document.getElementById("adultFirstName"+i).value+" "+document.getElementById("adultLastName"+i).value name.push(fullName); } for(var i=1;i<=<%=detailsModel.getNumberOfChild()%>;i++) { var fullName = docu...
You can add a verification javascript function , but first u need to have specific names for all input boxes . U can try something like this : ``` <input type="text" name="adultFirstName1" id="adultFirstName1" class="form-control input-sm" placeholder="" style="width:100%; padding:5px;" OnClick="Verify();"> . . . <i...
13,080,956
I have seen that it is possible but not easy to configure cross-compiling with Free Pascal, as there have to be libraries of the target OS on the system. But I only need a quick syntax-check to verify that the project can be compiled, linking an executable is not required. So: are there compiler options which I can u...
2012/10/26
[ "https://Stackoverflow.com/questions/13080956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80901/" ]
Do you ever call init for any instance of that class ? somewhere in your code you should have : ``` untitled *myObj = [[untitled alloc] init]; ``` If not, then this is the reason why it is not called.
I apologize to all who wasted time looking at the result of my bonehead errors. Several combined, but mainly I realized that those authors were using an NSView class with initWithFrame, which runs at startup like it should with no additions to UntitledAppDelegate. I still haven't figured out why a simple init in an...
13,080,956
I have seen that it is possible but not easy to configure cross-compiling with Free Pascal, as there have to be libraries of the target OS on the system. But I only need a quick syntax-check to verify that the project can be compiled, linking an executable is not required. So: are there compiler options which I can u...
2012/10/26
[ "https://Stackoverflow.com/questions/13080956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80901/" ]
Do you ever call init for any instance of that class ? somewhere in your code you should have : ``` untitled *myObj = [[untitled alloc] init]; ``` If not, then this is the reason why it is not called.
``` untitled *object = [untitled new]; ```
41,922,466
I would like to automatically route to a login page if the user is not logged in. app.module.ts ============= ``` import { RouterModule, Routes } from '@angular/router'; import { AppComponent } from './app.component'; import { LoginComponent } from './login/login.component'; import { DashBoardComponent} from './dashb...
2017/01/29
[ "https://Stackoverflow.com/questions/41922466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6865232/" ]
Here are 3 ways to do what you asked, from least preferred to favorite: **Option 1. Imperatively redirect the user in `AppComponent`** ```ts @Component({ selector: 'app-root', template: `...` }) export class AppComponent { constructor(authService: AuthService, router: Router) { if (authService.isLoggedIn())...
You can also do something like this: ``` { path: 'home', component: getHomeComponent(), data: { requiresLogin: true }, canActivate: [ AccessGuard ] } ``` And then: ``` export function getHomeComponent(): Type<Component> { if (User.isLoggedIn) { return <Type<Component>>HomeComponent; } else{ re...
28,470,591
I am trying to upload images to DB using below code, MyJsp.jsp ``` <form action="ImageUploadToDB" method="post" enctype="multipart/form-data"> <div> <img alt="Image1" id="Image11" src="" width="130px" height="90px" class="imgtotxt"><br><br> <input type="file" id="files11" class="fileUploadimgtotxt" na...
2015/02/12
[ "https://Stackoverflow.com/questions/28470591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3766129/" ]
Since you are using `LinkedHashMap` with the names of files as keys, when you add two files of the same name (two entries with the same key), the latter will replace the former. This is causing the entries with duplicate names to be replaced. Consider using an ArrayList of a class (that you create) containing the file ...
Finally i got answer using below code, ``` Connection con1 =null; Statement stmt=null; int GetUniqueId=0; System.out.println("Entered successfully 1:"); try { Class.forName("com.mysql.jdbc.Driver"); con1 = DriverManager.getConnection("jdbc:mysql://localh...
28,470,591
I am trying to upload images to DB using below code, MyJsp.jsp ``` <form action="ImageUploadToDB" method="post" enctype="multipart/form-data"> <div> <img alt="Image1" id="Image11" src="" width="130px" height="90px" class="imgtotxt"><br><br> <input type="file" id="files11" class="fileUploadimgtotxt" na...
2015/02/12
[ "https://Stackoverflow.com/questions/28470591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3766129/" ]
While putting values in map > > ... > > > fileMap.put(item.getName(), item.getInputStream()); > > > .... > > > You have kept "File Name" as key and map keep only last added value, in case of duplicate key. So, I suggest you to replace your file Name with a unique key.
Finally i got answer using below code, ``` Connection con1 =null; Statement stmt=null; int GetUniqueId=0; System.out.println("Entered successfully 1:"); try { Class.forName("com.mysql.jdbc.Driver"); con1 = DriverManager.getConnection("jdbc:mysql://localh...
28,470,591
I am trying to upload images to DB using below code, MyJsp.jsp ``` <form action="ImageUploadToDB" method="post" enctype="multipart/form-data"> <div> <img alt="Image1" id="Image11" src="" width="130px" height="90px" class="imgtotxt"><br><br> <input type="file" id="files11" class="fileUploadimgtotxt" na...
2015/02/12
[ "https://Stackoverflow.com/questions/28470591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3766129/" ]
You need uniqe image name for each image other wise image with same name will overwrite value of old image in your map as keys are unique in map ``` fileMap.put(item.getName(), item.getInputStream()); ``` one solution is you can append current time with your file name to make them unique ``` fileMap.put((item.g...
Finally i got answer using below code, ``` Connection con1 =null; Statement stmt=null; int GetUniqueId=0; System.out.println("Entered successfully 1:"); try { Class.forName("com.mysql.jdbc.Driver"); con1 = DriverManager.getConnection("jdbc:mysql://localh...
29,533
I need to have a special class for example for body element which will be showing me on which site from multisite installation I am in. Here is a [solution](https://drupal.stackexchange.com/questions/17009/load-domain-specific-css-file-on-a-multisite) loading different css files but is there a way to have a simple clas...
2012/04/27
[ "https://drupal.stackexchange.com/questions/29533", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/5551/" ]
Well i decided to use different .css files with this code: ``` // Allow a site-specific user defined CSS file (useful for multisite installations): // If a CSS file "local-[SITE].css" is residing in the "css" directory (beside "local.css"), // it will be loaded after "local.css". SITE is the site's host name, without ...
I would recommend you to create a custom module where you can store individual settings for each domain. Create for example a simple textfield where you can enter the class you would like to have in your body tag from this site. Use these settings then in your template preprocessor to add for example a class to the bod...
26,463,915
I have e.g. following `Lists`: ``` List<tst> listx; // tst object has properties: year, A, B, C, D year A B C D ------------ 2013 5 0 0 0 // list1 2014 3 0 0 0 2013 0 8 0 0 // list2 2014 0 1 0 0 2013 0 0 2 0 // list3 2014 0 0 3 0 2013 0 0 0 1 // list4 2014 0 0 0 5 ``` if I use `addAll` method, the `listTotal` w...
2014/10/20
[ "https://Stackoverflow.com/questions/26463915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/731696/" ]
Use a `Map<Integer, Tst>` containing, for each year (the key of the map) the `Tst` you want for this year as a result. Iterate through your `listTotal` and, for each Tst: * if the year of the `Tst` isn't in the map yet, then store the `Tst` for this year * else, get the Tst from the map and merge it with the current...
use a map to maintain a mapping from year to the TST structure. iterate each item of the lists, retrieve the corresponding TST structure and update the A/B/C/D attributes manually
26,463,915
I have e.g. following `Lists`: ``` List<tst> listx; // tst object has properties: year, A, B, C, D year A B C D ------------ 2013 5 0 0 0 // list1 2014 3 0 0 0 2013 0 8 0 0 // list2 2014 0 1 0 0 2013 0 0 2 0 // list3 2014 0 0 3 0 2013 0 0 0 1 // list4 2014 0 0 0 5 ``` if I use `addAll` method, the `listTotal` w...
2014/10/20
[ "https://Stackoverflow.com/questions/26463915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/731696/" ]
Use a `Map<Integer, Tst>` containing, for each year (the key of the map) the `Tst` you want for this year as a result. Iterate through your `listTotal` and, for each Tst: * if the year of the `Tst` isn't in the map yet, then store the `Tst` for this year * else, get the Tst from the map and merge it with the current...
You should be able to do it by defining a custom merge method: ``` List<tst> merge (List<tst> listA, List<tst> listB) ``` which merges the properties of each element in listA with the element of the same index in listB. Call this method iteratively on list1, ...list4 to get listRequired.
34,847,380
I'm using `AWS VPC` with `ELB` in-front. As far as i understand, only the `Network Access Control List (ACL)` can do the Inbound **Blocking**, by IPs. But again the problem there is: * The limitation of the number of Rules inside ACL. Which is only 40 max total. Again the Security Groups can not do "blocking". So wha...
2016/01/18
[ "https://Stackoverflow.com/questions/34847380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/775856/" ]
Your success function is overwriting the whole `$scope` variable instead of placing values in it. You need to do the latter in order for anything to actually be accessible to your view: ``` success: function(results) { $scope.price = results.price; $scope.priceDescription = results.priceDescription; consol...
From what I can tell, you are overwriting the entire `$scope` object, which has certain properties you need to maintain to keep your Angular application running correctly and keep the bindings intact. What you will want to do is store the returned values as properties on the `$scope` object. Instead of `$scope = resul...
34,847,380
I'm using `AWS VPC` with `ELB` in-front. As far as i understand, only the `Network Access Control List (ACL)` can do the Inbound **Blocking**, by IPs. But again the problem there is: * The limitation of the number of Rules inside ACL. Which is only 40 max total. Again the Security Groups can not do "blocking". So wha...
2016/01/18
[ "https://Stackoverflow.com/questions/34847380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/775856/" ]
Your success function is overwriting the whole `$scope` variable instead of placing values in it. You need to do the latter in order for anything to actually be accessible to your view: ``` success: function(results) { $scope.price = results.price; $scope.priceDescription = results.priceDescription; consol...
Several problems are: Parse is not part of angular core so you need to tell angular to update the view when making scope changes. You should assign the data to properties of scope, not overwrite the scope object. A simple way to do that is `angular.extend()` which will update `$scope` with the same properties and val...
34,847,380
I'm using `AWS VPC` with `ELB` in-front. As far as i understand, only the `Network Access Control List (ACL)` can do the Inbound **Blocking**, by IPs. But again the problem there is: * The limitation of the number of Rules inside ACL. Which is only 40 max total. Again the Security Groups can not do "blocking". So wha...
2016/01/18
[ "https://Stackoverflow.com/questions/34847380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/775856/" ]
UPDATE: Find working version of your fiddle here: <https://jsfiddle.net/h4od21fs/1/> So you have number of issues here: * as others have said Parse and angular doesn't know about each other without angular plugin, so in your case you need to call `$scope.$apply()` after you got data * you have handlebars plugged in t...
From what I can tell, you are overwriting the entire `$scope` object, which has certain properties you need to maintain to keep your Angular application running correctly and keep the bindings intact. What you will want to do is store the returned values as properties on the `$scope` object. Instead of `$scope = resul...
34,847,380
I'm using `AWS VPC` with `ELB` in-front. As far as i understand, only the `Network Access Control List (ACL)` can do the Inbound **Blocking**, by IPs. But again the problem there is: * The limitation of the number of Rules inside ACL. Which is only 40 max total. Again the Security Groups can not do "blocking". So wha...
2016/01/18
[ "https://Stackoverflow.com/questions/34847380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/775856/" ]
UPDATE: Find working version of your fiddle here: <https://jsfiddle.net/h4od21fs/1/> So you have number of issues here: * as others have said Parse and angular doesn't know about each other without angular plugin, so in your case you need to call `$scope.$apply()` after you got data * you have handlebars plugged in t...
Several problems are: Parse is not part of angular core so you need to tell angular to update the view when making scope changes. You should assign the data to properties of scope, not overwrite the scope object. A simple way to do that is `angular.extend()` which will update `$scope` with the same properties and val...
25,887,511
Volley gives us better efficiency, however it uses the "url" ``` JsonObjectRequest j = new JsonObjectRequest((int method, String url, JSONObject jsonRequest, Listener<JSONObject> listener, ErrorListener errorListener); ``` But if I have to use HttpPost or HttpGet object as I have to set Header and Entity etc. How c...
2014/09/17
[ "https://Stackoverflow.com/questions/25887511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3174460/" ]
Create an ErrorController - this allows you to tailor your end-user error pages and status codes. Each action result accepts an exception which you can add to your route data in your application\_error method in your global.asax. It doesn't have to be the exception object, it can be anything you like - just add it to t...
BaseController : ``` using System.Web; using System.Web.Mvc; namespace YourNamespace.Controllers { public class BaseController : Controller { public BaseController() { ViewBag.MetaDescription = Settings.metaDescription; ViewBag.MetaKeywords = Settings.metaKeywords; ...
27,026,866
I want to convert an image to 2D array with 5 columns where each row is of the form `[r, g, b, x, y]`. x, y is the position of the pixel and r,g,b are the pixel values. (I will be using this array as input to a machine learning model). Is there a more efficient implementation than this in python? ``` import Image impo...
2014/11/19
[ "https://Stackoverflow.com/questions/27026866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344013/" ]
I had to write this recently and ended up with ``` indices = np.dstack(np.indices(im.shape[:2])) data = np.concatenate((im, indices), axis=-1) ``` Where `im` is a numpy array. You are probably better off reading the images straight into numpy arrays with ``` from scipy.misc import imread im = imread("farm.jpg") ``...
I am not sure if this is the very efficient. But here you go, say `arr = np.array(im)`; then you can do something like this. ``` >>> arr = np.arange(150).reshape(5, 10, 3) >>> x, y, z = arr.shape >>> indices = np.vstack(np.unravel_index(np.arange(x*y), (y, x))).T #or indices = np.hstack((np.repeat(np.arange(y), x)[:,n...
27,026,866
I want to convert an image to 2D array with 5 columns where each row is of the form `[r, g, b, x, y]`. x, y is the position of the pixel and r,g,b are the pixel values. (I will be using this array as input to a machine learning model). Is there a more efficient implementation than this in python? ``` import Image impo...
2014/11/19
[ "https://Stackoverflow.com/questions/27026866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344013/" ]
I am not sure if this is the very efficient. But here you go, say `arr = np.array(im)`; then you can do something like this. ``` >>> arr = np.arange(150).reshape(5, 10, 3) >>> x, y, z = arr.shape >>> indices = np.vstack(np.unravel_index(np.arange(x*y), (y, x))).T #or indices = np.hstack((np.repeat(np.arange(y), x)[:,n...
I used "+" to combine two tuple, and use `.append()` to make "data" list.No need to use Numpy here. ``` row,col = im.size data=[] #r,g,b,i,j pixels=im.load() for i in range(row): for j in range(col): data.append(pixels[i,j]+(i,j)) ```
27,026,866
I want to convert an image to 2D array with 5 columns where each row is of the form `[r, g, b, x, y]`. x, y is the position of the pixel and r,g,b are the pixel values. (I will be using this array as input to a machine learning model). Is there a more efficient implementation than this in python? ``` import Image impo...
2014/11/19
[ "https://Stackoverflow.com/questions/27026866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344013/" ]
I am not sure if this is the very efficient. But here you go, say `arr = np.array(im)`; then you can do something like this. ``` >>> arr = np.arange(150).reshape(5, 10, 3) >>> x, y, z = arr.shape >>> indices = np.vstack(np.unravel_index(np.arange(x*y), (y, x))).T #or indices = np.hstack((np.repeat(np.arange(y), x)[:,n...
steps are : 1. convert images to grayscale (opencv) 2. convert grayscale to binary image (opencv) 3. convert to binary 2D matrix (scipy , pillow, numpy) ```py from scipy.ndimage import zoom from PIL import Image import numpy as np srcImage = Image.open("image_in_binary_color.jpg") grayImage = srcImage.convert('L') a...
27,026,866
I want to convert an image to 2D array with 5 columns where each row is of the form `[r, g, b, x, y]`. x, y is the position of the pixel and r,g,b are the pixel values. (I will be using this array as input to a machine learning model). Is there a more efficient implementation than this in python? ``` import Image impo...
2014/11/19
[ "https://Stackoverflow.com/questions/27026866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344013/" ]
I had to write this recently and ended up with ``` indices = np.dstack(np.indices(im.shape[:2])) data = np.concatenate((im, indices), axis=-1) ``` Where `im` is a numpy array. You are probably better off reading the images straight into numpy arrays with ``` from scipy.misc import imread im = imread("farm.jpg") ``...
I used "+" to combine two tuple, and use `.append()` to make "data" list.No need to use Numpy here. ``` row,col = im.size data=[] #r,g,b,i,j pixels=im.load() for i in range(row): for j in range(col): data.append(pixels[i,j]+(i,j)) ```
27,026,866
I want to convert an image to 2D array with 5 columns where each row is of the form `[r, g, b, x, y]`. x, y is the position of the pixel and r,g,b are the pixel values. (I will be using this array as input to a machine learning model). Is there a more efficient implementation than this in python? ``` import Image impo...
2014/11/19
[ "https://Stackoverflow.com/questions/27026866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344013/" ]
I had to write this recently and ended up with ``` indices = np.dstack(np.indices(im.shape[:2])) data = np.concatenate((im, indices), axis=-1) ``` Where `im` is a numpy array. You are probably better off reading the images straight into numpy arrays with ``` from scipy.misc import imread im = imread("farm.jpg") ``...
steps are : 1. convert images to grayscale (opencv) 2. convert grayscale to binary image (opencv) 3. convert to binary 2D matrix (scipy , pillow, numpy) ```py from scipy.ndimage import zoom from PIL import Image import numpy as np srcImage = Image.open("image_in_binary_color.jpg") grayImage = srcImage.convert('L') a...
27,026,866
I want to convert an image to 2D array with 5 columns where each row is of the form `[r, g, b, x, y]`. x, y is the position of the pixel and r,g,b are the pixel values. (I will be using this array as input to a machine learning model). Is there a more efficient implementation than this in python? ``` import Image impo...
2014/11/19
[ "https://Stackoverflow.com/questions/27026866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344013/" ]
I used "+" to combine two tuple, and use `.append()` to make "data" list.No need to use Numpy here. ``` row,col = im.size data=[] #r,g,b,i,j pixels=im.load() for i in range(row): for j in range(col): data.append(pixels[i,j]+(i,j)) ```
steps are : 1. convert images to grayscale (opencv) 2. convert grayscale to binary image (opencv) 3. convert to binary 2D matrix (scipy , pillow, numpy) ```py from scipy.ndimage import zoom from PIL import Image import numpy as np srcImage = Image.open("image_in_binary_color.jpg") grayImage = srcImage.convert('L') a...
15,072,038
Good morning everyone, I have a macro that I want to sort data. A button in my workbook calls a small userform with 10 checkboxes. The user should pick those categories that he wants to review and click sort. The result I want is for only the categories he chose to be displayed but I am getting an all or nothing resu...
2013/02/25
[ "https://Stackoverflow.com/questions/15072038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2030282/" ]
You are actually filtering, not sorting. Which raises the question, why not just let the user the Excel's `Filter` button and dialog? To answer your question, your code will only ever work if one `Checkbox` is checked. For every Checkbox that's checked your code is hiding the rows for all other categories. So only th...
I wanted to share the solution that @AlphaFrog provided me with, it works perfectly: ``` Private Sub cmdSort_Click() Dim i As Long, rng As Range, arrCriteria As Variant Set rng = Rows(3) 'Headers arrCriteria = Array("Fire Extinguishers", "Chem", "FL", "Elec", "FP", _ "Lift", "PPE", "PS", "STF", "Ergonomics") Ap...
45,294,027
I'm trying to select a specific sheet (by name or index) with my excel Add-In with no avail. My addin file `ThisAddIn.cs` has: ``` public Excel.Workbook GetActiveWorkbook() { return (Excel.Workbook)Application.ActiveWorkbook; } ``` And my `Ribbon1.cs` has: ``` namespace Test3 { public partial class Ribbon...
2017/07/25
[ "https://Stackoverflow.com/questions/45294027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3478500/" ]
It all has to do with what is in the accumulator (`high`). If you don't provide the second argument to `reduce`, the accumulator starts off as the first object, and the current element is the second element. In your first iteration, you treat the accumulator as the object, fetching the grade using `high.grade`; but the...
The issue here is the accumulator (high) after the first pass is a number (what gets returned by math.max), yet each pass requires that high be an object with grade as a number property. So by the second call you're calling `Math.max(undefined, 73)` - which will return `NaN`. Instead I'd recommend initializing the accu...
10,422,174
I used ctrl-6 to jump between two files and compare these two files page by page, But each time when I switch back, the page content is changed. That is, a new page with previous cursor line in the middle of screen now is shown instead. Is there a way to keep the page position in the screen unchanged when I switched b...
2012/05/02
[ "https://Stackoverflow.com/questions/10422174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/724472/" ]
May I suggest using tabs (`C-PgUp` and `C-PgDn` to switch)? You can always start by doing `C-w``s``C-^``C-w``T` Otherwise see this odler answer of mine for hints on restoring cursor positions: * [After a :windo, how do I get the cursor back where it was?](https://stackoverflow.com/questions/9984032/after-a-windo-ho...
This might not be what you're looking for, but just in case: For a different approach to the task you're doing (visually comparing two files), see `:help scrollbind`. You would do `:set scrollbind` in two side-by-side windows and open one file in each, then scroll through them together, linked. See also `vimdiff` for e...
54,840,020
I'm trying to display the info of the user when I get the id using `$routeParams.id`, I already displayed the user's info using texts only but how can I display the user's image using `img src`? **In my controller I did this to get the selected user.** ``` .controller('editbloodrequestCtrl', function($scope,$routePar...
2019/02/23
[ "https://Stackoverflow.com/questions/54840020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7294541/" ]
No need to bind ng-model to your image, just use the src with the absolute path of the image ``` <img src ="{{newImg}}" name="img"> ```
No need to bind ng-model to your image, just use the src with the absolute path of the image..ng-model using only input tags. ``` <img ng-src ="newImg" name="newimg" /> ```
16,480,300
at the moment I have script which prints out numeric values into bits so for example ``` print((short) 1); ``` I get a value of `00000001`, but how can I get for this a value like `00000001 00000000` and in case if I print `print((int) 1);` I get a value of `00000001 00000000 00000000 00000000`. Here is my code: `...
2013/05/10
[ "https://Stackoverflow.com/questions/16480300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363241/" ]
You can just use `sizeof(T)` within `print` to determine how many bytes to process and then call `printbyte` for each byte, e.g. ``` #include <iostream> #include <climits> using namespace std; void printbyte(unsigned char x) { for (int i = 0; i < CHAR_BIT; i++) { cout << ((x & 0x80) != 0); x ...
You can use bitset, it's the easiest way. Here's an example: ``` #include <iostream> #include <bitset> using namespace std; int main () { int number; cin>>number; bitset <16> end (number); cout<<number<<" --> "<<end<<'\n'; return 0; } ``` Or reference: <http://www.cplusplus.com/reference/bitset/bitset/> If y...
16,480,300
at the moment I have script which prints out numeric values into bits so for example ``` print((short) 1); ``` I get a value of `00000001`, but how can I get for this a value like `00000001 00000000` and in case if I print `print((int) 1);` I get a value of `00000001 00000000 00000000 00000000`. Here is my code: `...
2013/05/10
[ "https://Stackoverflow.com/questions/16480300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363241/" ]
You can just use `sizeof(T)` within `print` to determine how many bytes to process and then call `printbyte` for each byte, e.g. ``` #include <iostream> #include <climits> using namespace std; void printbyte(unsigned char x) { for (int i = 0; i < CHAR_BIT; i++) { cout << ((x & 0x80) != 0); x ...
I think you should use [std::bitset](http://www.cplusplus.com/reference/bitset/bitset/), but you always have to specify the size at compile time. To avoid that, you can use a template function like this (note that this is C++11): ``` #include <iostream> #include <bitset> #include <limits> template <class T> void Prin...
16,480,300
at the moment I have script which prints out numeric values into bits so for example ``` print((short) 1); ``` I get a value of `00000001`, but how can I get for this a value like `00000001 00000000` and in case if I print `print((int) 1);` I get a value of `00000001 00000000 00000000 00000000`. Here is my code: `...
2013/05/10
[ "https://Stackoverflow.com/questions/16480300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363241/" ]
You can use bitset, it's the easiest way. Here's an example: ``` #include <iostream> #include <bitset> using namespace std; int main () { int number; cin>>number; bitset <16> end (number); cout<<number<<" --> "<<end<<'\n'; return 0; } ``` Or reference: <http://www.cplusplus.com/reference/bitset/bitset/> If y...
I think you should use [std::bitset](http://www.cplusplus.com/reference/bitset/bitset/), but you always have to specify the size at compile time. To avoid that, you can use a template function like this (note that this is C++11): ``` #include <iostream> #include <bitset> #include <limits> template <class T> void Prin...
12,511,202
I have Python 2.7.3 installed on RHEL 6, and when I tried to install pysvn-1.7.6, I got an error. What should I do? ``` /search/python/pysvn-1.7.6/Import/pycxx-6.2.4/CXX/Python2/Objects.hxx:2912: warning: deprecated conversion from string constant to 'char*' Compile: pysvn_svnenv.cpp into pysvn_svnenv.o Compile: pysvn...
2012/09/20
[ "https://Stackoverflow.com/questions/12511202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1685704/" ]
I solved this problem, the reason is that i have made a mistake. i just executed the following command, it is not in the instruction. ``` python setup.py install ``` the installation steps are (**the Source is the dir name in pysvn directory**): ``` cd Source python setup.py configure make cd ../Tests make cd Sourc...
I had a same problem. and I find this solution and it is working. Download the latest epel-release rpm from <http://dl.fedoraproject.org/pub/epel/6/x86_64/> for now : `wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm` Install epel-release rpm: `rpm -Uvh epel-release*rpm` Install pys...
4,244,321
in my application i am using array of button and i need to get the specified button which was pressed in the array. how to get. Note: not in table view
2010/11/22
[ "https://Stackoverflow.com/questions/4244321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/489687/" ]
All UIViews have a integer `tag` property you can use to identify them. So in your button click handler (assuming it is the same function for all your buttons) you can get that tag and use it to differentiate between your buttons, e.g.: ``` -(void) myButtonClicked:(UIButton*)sender{ switch(sender.tag){ //Perform...
Two ways: Either set up a diffrent selector/method for each button. or You could set the .tag property and detect on that in your method
111,749
How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If y...
2016/04/03
[ "https://mathematica.stackexchange.com/questions/111749", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/5615/" ]
The following guide shows how to conduct communication between [nanohttpd](https://github.com/NanoHttpd/nanohttpd), an http server for Java, and *Mathematica*. The result is a server that, if you go to its address in a web browser, displays the result of `SessionTime[]`, i.e. the time since the *Mathematica* kernel ass...
Starting in Mathematica 12, there is a built-in function [`SocketListen`](https://reference.wolfram.com/language/ref/SocketListen.html) that can start a web server and respond to HTTP requests. `SocketListen` is also available in Mathematica 11.2, but only on an experimental basis. Further reading: [Network Programmi...
111,749
How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If y...
2016/04/03
[ "https://mathematica.stackexchange.com/questions/111749", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/5615/" ]
The following guide shows how to conduct communication between [nanohttpd](https://github.com/NanoHttpd/nanohttpd), an http server for Java, and *Mathematica*. The result is a server that, if you go to its address in a web browser, displays the result of `SessionTime[]`, i.e. the time since the *Mathematica* kernel ass...
The following is a sample implementation of a simple HTTP server in Wolfram Language code only: <https://github.com/arnoudbuzing/wolfram-server> You send it a POST request where the body data of the HTTP request contains the Wolfram Language code you wish to evaluate. The (running) wolframserver.wls script processes...
111,749
How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If y...
2016/04/03
[ "https://mathematica.stackexchange.com/questions/111749", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/5615/" ]
The following guide shows how to conduct communication between [nanohttpd](https://github.com/NanoHttpd/nanohttpd), an http server for Java, and *Mathematica*. The result is a server that, if you go to its address in a web browser, displays the result of `SessionTime[]`, i.e. the time since the *Mathematica* kernel ass...
Yes (and using pure Mathematica or WolframEngine) <https://jerryi.github.io/tinyweb-mathematica/>
111,749
How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If y...
2016/04/03
[ "https://mathematica.stackexchange.com/questions/111749", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/5615/" ]
The following is a sample implementation of a simple HTTP server in Wolfram Language code only: <https://github.com/arnoudbuzing/wolfram-server> You send it a POST request where the body data of the HTTP request contains the Wolfram Language code you wish to evaluate. The (running) wolframserver.wls script processes...
Starting in Mathematica 12, there is a built-in function [`SocketListen`](https://reference.wolfram.com/language/ref/SocketListen.html) that can start a web server and respond to HTTP requests. `SocketListen` is also available in Mathematica 11.2, but only on an experimental basis. Further reading: [Network Programmi...
111,749
How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If y...
2016/04/03
[ "https://mathematica.stackexchange.com/questions/111749", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/5615/" ]
Starting in Mathematica 12, there is a built-in function [`SocketListen`](https://reference.wolfram.com/language/ref/SocketListen.html) that can start a web server and respond to HTTP requests. `SocketListen` is also available in Mathematica 11.2, but only on an experimental basis. Further reading: [Network Programmi...
Yes (and using pure Mathematica or WolframEngine) <https://jerryi.github.io/tinyweb-mathematica/>
111,749
How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If y...
2016/04/03
[ "https://mathematica.stackexchange.com/questions/111749", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/5615/" ]
The following is a sample implementation of a simple HTTP server in Wolfram Language code only: <https://github.com/arnoudbuzing/wolfram-server> You send it a POST request where the body data of the HTTP request contains the Wolfram Language code you wish to evaluate. The (running) wolframserver.wls script processes...
Yes (and using pure Mathematica or WolframEngine) <https://jerryi.github.io/tinyweb-mathematica/>
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
> > Are these valid statements? > > > Yes ... taken as Java expressions in the context of a normal Java program. In the context of an Eclipse debugger's expression evaluator, I'm not sure. > > If so, why am I getting an exception? > > > I don't know for sure, but I suspect that it is something to do with ...
I do not think it is related to parseInt or parseLong. The exception clearly specifies "Exception processing async thread queue" Older versions of Eclipse has been known to throw similar exceptions, when it is being used in Debug mode. But I think these were fixed in the newer version. I know that your code is ok, be...
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
> > Are these valid statements? > > > Yes ... taken as Java expressions in the context of a normal Java program. In the context of an Eclipse debugger's expression evaluator, I'm not sure. > > If so, why am I getting an exception? > > > I don't know for sure, but I suspect that it is something to do with ...
Exception is the declared type of `e` and that is what is normally displayed in the tooltip in Java perspective. If eclipse doesn't tell you more, first make sure you are in debug perspective (not in Java perspective). I guess you have a problem with the configuration of eclipse tooltips. You should see more informat...
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
I do not think it is related to parseInt or parseLong. The exception clearly specifies "Exception processing async thread queue" Older versions of Eclipse has been known to throw similar exceptions, when it is being used in Debug mode. But I think these were fixed in the newer version. I know that your code is ok, be...
I think you should first try to parse the text variable and put it in another long variable and print. So that you can know whether the parsing is done or not. So that you will know where the problem is.
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
I do not think it is related to parseInt or parseLong. The exception clearly specifies "Exception processing async thread queue" Older versions of Eclipse has been known to throw similar exceptions, when it is being used in Debug mode. But I think these were fixed in the newer version. I know that your code is ok, be...
Exception is the declared type of `e` and that is what is normally displayed in the tooltip in Java perspective. If eclipse doesn't tell you more, first make sure you are in debug perspective (not in Java perspective). I guess you have a problem with the configuration of eclipse tooltips. You should see more informat...
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
According to [java docs](http://download.oracle.com/javase/6/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) parseInt can throw only NumberFormatException,it means UnsupportedException comes from different place in your code. **parseInt** ``` public static int parseInt(String s) th...
Exception is the declared type of `e` and that is what is normally displayed in the tooltip in Java perspective. If eclipse doesn't tell you more, first make sure you are in debug perspective (not in Java perspective). I guess you have a problem with the configuration of eclipse tooltips. You should see more informat...
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
I do not think it is related to parseInt or parseLong. The exception clearly specifies "Exception processing async thread queue" Older versions of Eclipse has been known to throw similar exceptions, when it is being used in Debug mode. But I think these were fixed in the newer version. I know that your code is ok, be...
try to put sysout in catch block which shows the type of the exception. ``` System.out.println(e); ``` and moreover as suresh mention it can throw only NumberFormatException
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
> > Are these valid statements? > > > Yes ... taken as Java expressions in the context of a normal Java program. In the context of an Eclipse debugger's expression evaluator, I'm not sure. > > If so, why am I getting an exception? > > > I don't know for sure, but I suspect that it is something to do with ...
try to put sysout in catch block which shows the type of the exception. ``` System.out.println(e); ``` and moreover as suresh mention it can throw only NumberFormatException
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
According to [java docs](http://download.oracle.com/javase/6/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) parseInt can throw only NumberFormatException,it means UnsupportedException comes from different place in your code. **parseInt** ``` public static int parseInt(String s) th...
try to put sysout in catch block which shows the type of the exception. ``` System.out.println(e); ``` and moreover as suresh mention it can throw only NumberFormatException
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
According to [java docs](http://download.oracle.com/javase/6/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) parseInt can throw only NumberFormatException,it means UnsupportedException comes from different place in your code. **parseInt** ``` public static int parseInt(String s) th...
I think you should first try to parse the text variable and put it in another long variable and print. So that you can know whether the parsing is done or not. So that you will know where the problem is.
5,509,793
`Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window. ![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png) I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the ...
2011/04/01
[ "https://Stackoverflow.com/questions/5509793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23566/" ]
> > Are these valid statements? > > > Yes ... taken as Java expressions in the context of a normal Java program. In the context of an Eclipse debugger's expression evaluator, I'm not sure. > > If so, why am I getting an exception? > > > I don't know for sure, but I suspect that it is something to do with ...
I think you should first try to parse the text variable and put it in another long variable and print. So that you can know whether the parsing is done or not. So that you will know where the problem is.
123,318
I have a list 'choiceOpt' which contains a choice field 'choiceOptions' having Yes ad No as options. I want to retrieve this Yes and No programmatically (javascript) . Kindly help.
2014/12/05
[ "https://sharepoint.stackexchange.com/questions/123318", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/35506/" ]
After the first query that creates `Folder` object you could perform the `second` REST request: ``` http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/listItemAllFields ``` to retrieve the associated `List Item` with a `Folder`. The following JavaScript example demonstrates that approach: ...
I've found using the following GetByUrl or GetFolderByServerRelativeUrl with a number of folders can lead to the below. "The length of the URL for this request exceeds the configured maxUrlLength value." By using GetFolderById('guid')/listItemAllFields I was able to accomplish my task of assigning permissions and upd...
1,647,927
For the sake of education, and programming practice, I'd like to write a simple library that can handle raw keyboard input, and output to the terminal in 'real time'. I'd like to stick with ansi C as much as possible, I just have no idea where to start something like this. I've done several google searches, and 99% of...
2009/10/30
[ "https://Stackoverflow.com/questions/1647927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/101946/" ]
Sticking with Standard C as much as possible is a good idea, but you are not going to get very far with your adopted task using just Standard C. The mechanisms to obtain characters from the terminal one at a time are inherently platform specific. For POSIX systems (MacOS X), look at the [`<termios.h>`](http://www.openg...
This is not possible using only standard ISO C. However, you can try using the following: ``` #include <stdio.h> void setbuf(FILE * restrict stream, char * restrict buf); ``` and related functions. Your best bet though is to use the `ncurses` library.
1,647,927
For the sake of education, and programming practice, I'd like to write a simple library that can handle raw keyboard input, and output to the terminal in 'real time'. I'd like to stick with ansi C as much as possible, I just have no idea where to start something like this. I've done several google searches, and 99% of...
2009/10/30
[ "https://Stackoverflow.com/questions/1647927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/101946/" ]
To set an open stream to be non-buffered using ANSI C, you can do this: ``` #include <stdio.h> if (setvbuf(fd, NULL, _IONBF, 0) == 0) printf("Set stream to unbuffered mode\n"); ``` (Reference: C89 4.9.5.6) However, after that you're on your own. :-)
This is not possible using only standard ISO C. However, you can try using the following: ``` #include <stdio.h> void setbuf(FILE * restrict stream, char * restrict buf); ``` and related functions. Your best bet though is to use the `ncurses` library.
1,647,927
For the sake of education, and programming practice, I'd like to write a simple library that can handle raw keyboard input, and output to the terminal in 'real time'. I'd like to stick with ansi C as much as possible, I just have no idea where to start something like this. I've done several google searches, and 99% of...
2009/10/30
[ "https://Stackoverflow.com/questions/1647927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/101946/" ]
Sticking with Standard C as much as possible is a good idea, but you are not going to get very far with your adopted task using just Standard C. The mechanisms to obtain characters from the terminal one at a time are inherently platform specific. For POSIX systems (MacOS X), look at the [`<termios.h>`](http://www.openg...
To set an open stream to be non-buffered using ANSI C, you can do this: ``` #include <stdio.h> if (setvbuf(fd, NULL, _IONBF, 0) == 0) printf("Set stream to unbuffered mode\n"); ``` (Reference: C89 4.9.5.6) However, after that you're on your own. :-)
43,314
Is there a difference when the adverbs '*always, continually,forever,etc..*' are used with past simple and past progressive? For example : 1. He **always/ continually** worked there. 2. He was **always/ continually** working there. (What is the difference between the above two sentences?)
2014/12/17
[ "https://ell.stackexchange.com/questions/43314", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/10435/" ]
Let's say that a colleague mistakenly believes that Joe is a new hire. We might say: *Joe has always worked here.* to mean nothing more than the fact that Joe is not a new employee. He has been here for some while. If we want to say that Joe never slacked off when he was working at Acme Widgets, but always took his ...
/simple past/ means **perfect** or done. /always/ can be used in past form when we want to **emphasize** the event. past progressive follows simple past. for ex: *I was reading a novel* when *he knocked the door*. you could also say: He knocked the door while I was reading a novel. as long as I know, adverb of freq /...
43,314
Is there a difference when the adverbs '*always, continually,forever,etc..*' are used with past simple and past progressive? For example : 1. He **always/ continually** worked there. 2. He was **always/ continually** working there. (What is the difference between the above two sentences?)
2014/12/17
[ "https://ell.stackexchange.com/questions/43314", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/10435/" ]
Sometimes, we use the past continuous as an alternative to the past simple for repeated or routine actions, with a little difference in meaning. He always/continually worked there. He was always/continually working there. The first sentence literally implies that he always worked there, whereas, the second sentence ...
/simple past/ means **perfect** or done. /always/ can be used in past form when we want to **emphasize** the event. past progressive follows simple past. for ex: *I was reading a novel* when *he knocked the door*. you could also say: He knocked the door while I was reading a novel. as long as I know, adverb of freq /...
43,314
Is there a difference when the adverbs '*always, continually,forever,etc..*' are used with past simple and past progressive? For example : 1. He **always/ continually** worked there. 2. He was **always/ continually** working there. (What is the difference between the above two sentences?)
2014/12/17
[ "https://ell.stackexchange.com/questions/43314", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/10435/" ]
Let's say that a colleague mistakenly believes that Joe is a new hire. We might say: *Joe has always worked here.* to mean nothing more than the fact that Joe is not a new employee. He has been here for some while. If we want to say that Joe never slacked off when he was working at Acme Widgets, but always took his ...
Sometimes, we use the past continuous as an alternative to the past simple for repeated or routine actions, with a little difference in meaning. He always/continually worked there. He was always/continually working there. The first sentence literally implies that he always worked there, whereas, the second sentence ...
5,764,693
Only info I found was this: <http://forrst.com/posts/Node_js_Jade_Import_Jade_File-CZW> I replicated the suggested folder structure (views/partials) But it didn't work, as soon as I put ``` !=partial('header', {}) !=partial('menu', {}) ``` into index.jade, I get a blank screen, the error message I receive from ja...
2011/04/23
[ "https://Stackoverflow.com/questions/5764693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335355/" ]
Jade has a command called include. Just use ``` include _form ``` given that the filename of the partial is \*\_form.jade\*, and is in the same directory
I think partial rendering is done in express, so you will have to snag that code or write your own. I have my own helper class for jade rendering with partials that you can use or get some ideas from [here](https://gist.github.com/938647), (it's using [Joose](http://joose.it) and [Cactus](https://github.com/Raevel/Cac...
5,764,693
Only info I found was this: <http://forrst.com/posts/Node_js_Jade_Import_Jade_File-CZW> I replicated the suggested folder structure (views/partials) But it didn't work, as soon as I put ``` !=partial('header', {}) !=partial('menu', {}) ``` into index.jade, I get a blank screen, the error message I receive from ja...
2011/04/23
[ "https://Stackoverflow.com/questions/5764693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335355/" ]
As of August 2012 (possibly earlier) Partials have been removed from Express. A lot of tutorials are now out of date. It seems that you can replicate much of the partial functionality with include. Eg. movies.jade ``` div(id='movies') - each movie in movies include movie ``` movie.jade ``` h2= movie.title ...
I think partial rendering is done in express, so you will have to snag that code or write your own. I have my own helper class for jade rendering with partials that you can use or get some ideas from [here](https://gist.github.com/938647), (it's using [Joose](http://joose.it) and [Cactus](https://github.com/Raevel/Cac...
5,764,693
Only info I found was this: <http://forrst.com/posts/Node_js_Jade_Import_Jade_File-CZW> I replicated the suggested folder structure (views/partials) But it didn't work, as soon as I put ``` !=partial('header', {}) !=partial('menu', {}) ``` into index.jade, I get a blank screen, the error message I receive from ja...
2011/04/23
[ "https://Stackoverflow.com/questions/5764693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335355/" ]
Jade has a command called include. Just use ``` include _form ``` given that the filename of the partial is \*\_form.jade\*, and is in the same directory
With the latest node/express I get the following movies.jade template to call partials: ``` div(id='movies') - each movie in movies !=partial('movie', movie) ``` where I have movie.jade in the views directory alongside movies.jade. movies.jade is called from app.js with: `res.render('movies', { movies: [{ ti...
5,764,693
Only info I found was this: <http://forrst.com/posts/Node_js_Jade_Import_Jade_File-CZW> I replicated the suggested folder structure (views/partials) But it didn't work, as soon as I put ``` !=partial('header', {}) !=partial('menu', {}) ``` into index.jade, I get a blank screen, the error message I receive from ja...
2011/04/23
[ "https://Stackoverflow.com/questions/5764693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335355/" ]
As of August 2012 (possibly earlier) Partials have been removed from Express. A lot of tutorials are now out of date. It seems that you can replicate much of the partial functionality with include. Eg. movies.jade ``` div(id='movies') - each movie in movies include movie ``` movie.jade ``` h2= movie.title ...
With the latest node/express I get the following movies.jade template to call partials: ``` div(id='movies') - each movie in movies !=partial('movie', movie) ``` where I have movie.jade in the views directory alongside movies.jade. movies.jade is called from app.js with: `res.render('movies', { movies: [{ ti...
5,764,693
Only info I found was this: <http://forrst.com/posts/Node_js_Jade_Import_Jade_File-CZW> I replicated the suggested folder structure (views/partials) But it didn't work, as soon as I put ``` !=partial('header', {}) !=partial('menu', {}) ``` into index.jade, I get a blank screen, the error message I receive from ja...
2011/04/23
[ "https://Stackoverflow.com/questions/5764693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335355/" ]
Jade has a command called include. Just use ``` include _form ``` given that the filename of the partial is \*\_form.jade\*, and is in the same directory
As of August 2012 (possibly earlier) Partials have been removed from Express. A lot of tutorials are now out of date. It seems that you can replicate much of the partial functionality with include. Eg. movies.jade ``` div(id='movies') - each movie in movies include movie ``` movie.jade ``` h2= movie.title ...
49,288,411
I have a map with a lot of sprites. I could add a material to the sprite with diffuse shading and than add lots of lights. But that won't give me the result I want. And is performance heavy. --- Examples -------- In the first image you can see that light is generated by torches. It's expanding its light at its best ...
2018/03/14
[ "https://Stackoverflow.com/questions/49288411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6086226/" ]
I can mention 2 main elements about 2d Dynamic Lighting for unity. 1. One of the main asset used for 2d lighting in unity essentials is [DDL light](https://assetstore.unity.com/packages/tools/particles-effects/2ddl-pro-2d-dynamic-lights-and-shadows-25933), with an official tutorial [here](https://learn.unity.com/tutor...
Apparently, there are several packages on [the Unity Asset Store](https://assetstore.unity.com/). Search for "2d lighting" or "2d shader". You can easily import the source code of these packages and test it in Unity yourself. If you like a package after testing, you can use it. I highly advise you not to import it dir...
18,059,797
Hi I am currently working with a report in Visual Studio 2008. I use the query below to create a data set. This works correctly in SQL / SMSS and in the dataset when I test the query. ``` SELECT CASE WHEN Make LIKE 'FO%' THEN 'Ford' WHEN Make LIKE 'HON%' THEN 'Honda' END Make, CASE WHEN model LIKE 'CIV%' THE...
2013/08/05
[ "https://Stackoverflow.com/questions/18059797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1902937/" ]
The WHATWG (the organization who specifies browser behavior, alongside the W3C) has a [list of known script MIME types](http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#scriptingLanguages) and some blacklisted MIME types that must not be treated as scripting languages: > > The following li...
If you specify your script as "text/plain" the browser wont do anything with it. You must specify it as "script/javascript" to have it execute as JavaScript.
49,953,590
Quick Context: I have a basic excel Spreadsheet with three fields: Client\_URL, Client\_Name and AHREFs\_Rank. When a URL is entered into Client\_URL I want to: 1. Login to AHREFs; 2. Paste and enter the client URL into a web form field using the value of cell Client\_URL; 3. Pull the AHREF's Rank number for the inne...
2018/04/21
[ "https://Stackoverflow.com/questions/49953590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2613371/" ]
This helped me: ``` .fa { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg); } ```
Use `transform` css to achieve this: ``` .fa { transform: rotateZ(180deg); } ```
49,953,590
Quick Context: I have a basic excel Spreadsheet with three fields: Client\_URL, Client\_Name and AHREFs\_Rank. When a URL is entered into Client\_URL I want to: 1. Login to AHREFs; 2. Paste and enter the client URL into a web form field using the value of cell Client\_URL; 3. Pull the AHREF's Rank number for the inne...
2018/04/21
[ "https://Stackoverflow.com/questions/49953590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2613371/" ]
Use `transform` css to achieve this: ``` .fa { transform: rotateZ(180deg); } ```
> > You can use the `transform` css option combine it with `rotate()` function. > [See it in action](https://jsfiddle.net/Roland1993/4zrnghpq/4/) > > >
49,953,590
Quick Context: I have a basic excel Spreadsheet with three fields: Client\_URL, Client\_Name and AHREFs\_Rank. When a URL is entered into Client\_URL I want to: 1. Login to AHREFs; 2. Paste and enter the client URL into a web form field using the value of cell Client\_URL; 3. Pull the AHREF's Rank number for the inne...
2018/04/21
[ "https://Stackoverflow.com/questions/49953590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2613371/" ]
This helped me: ``` .fa { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg); } ```
> > You can use the `transform` css option combine it with `rotate()` function. > [See it in action](https://jsfiddle.net/Roland1993/4zrnghpq/4/) > > >
33,010,655
I just wanted to append `td` in the `tr` **Table** ``` <table class="u-full-width" id="result"> <thead> <tr> <th>Project Name</th> <th>Id</th> <th>Event</th> </tr> </thead> <tbody> <tr> <td>Dave Gamache</td> <td>26</td> <td>Male</td> </tr> </tbody> </table>...
2015/10/08
[ "https://Stackoverflow.com/questions/33010655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The last line is wrong. You should append the `tr` to the table, not all the `td`s. ``` document.getElementById("result").appendChild(tr); ```
document.getElementById("result").appendChild(td1, td2, td3); seems you are appending your tds directly to the table, not a tr in the tbody.
33,010,655
I just wanted to append `td` in the `tr` **Table** ``` <table class="u-full-width" id="result"> <thead> <tr> <th>Project Name</th> <th>Id</th> <th>Event</th> </tr> </thead> <tbody> <tr> <td>Dave Gamache</td> <td>26</td> <td>Male</td> </tr> </tbody> </table>...
2015/10/08
[ "https://Stackoverflow.com/questions/33010655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The last line is wrong. You should append the `tr` to the table, not all the `td`s. ``` document.getElementById("result").appendChild(tr); ```
Try this way to bind your data ``` <table class="u-full-width" id="result"> <thead> <tr> <th>Project Name</th> <th>Id</th> <th>Event</th> </tr> </thead> <tbody id="bodytable"> </tbody> </table> socket.on('message', function(data){ console.log(data); var _html=''...
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
Since you don't want to define a custom struct or class, I assume that you want the return value to be only point. So, I suggest you to use an optional pointer argument, it's default value is NULL, and if it is not NULL you store the distance in the variable pointed by it. ``` point3D findIntersect(const vec3 &v1, con...
Straustrup and Sutter are recommending using `tuple/tie` for this: [F.41: Prefer to return tuples to multiple out-parameters](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f41-prefer-to-return-tuples-to-multiple-out-parameters) ``` Point3D point3D; double distance; std::tie(point3D, dis...
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
You sure can use [pairs](http://www.cplusplus.com/reference/utility/pair/). ``` std::pair<point3D, double> findIntersect(const vec3& vector1, const vec3& vector2); ```
I still think that you can and should create the struct for your code (if your code is not a real time..) Stucts are very common and gives you robastics and flexibility in case you would need to expend your code. To be depends on on these key value pair in you code and then realize after few months that you need to cha...
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
Since you don't want to define a custom struct or class, I assume that you want the return value to be only point. So, I suggest you to use an optional pointer argument, it's default value is NULL, and if it is not NULL you store the distance in the variable pointed by it. ``` point3D findIntersect(const vec3 &v1, con...
C++ lets you overload the function, i.e. use the same name, but different parameter types. You can return `point3D` as the return value, and make the `length` reference parameter appear "optional" by providing a separate overload: ``` point3D findIntersect(const vec3& vector1, const vec3& vector2) { double ignore;...
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
C++ lets you overload the function, i.e. use the same name, but different parameter types. You can return `point3D` as the return value, and make the `length` reference parameter appear "optional" by providing a separate overload: ``` point3D findIntersect(const vec3& vector1, const vec3& vector2) { double ignore;...
You sure can use [pairs](http://www.cplusplus.com/reference/utility/pair/). ``` std::pair<point3D, double> findIntersect(const vec3& vector1, const vec3& vector2); ```
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
Straustrup and Sutter are recommending using `tuple/tie` for this: [F.41: Prefer to return tuples to multiple out-parameters](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f41-prefer-to-return-tuples-to-multiple-out-parameters) ``` Point3D point3D; double distance; std::tie(point3D, dis...
You could use a `std::pair<point3D, double>`. There is also a `std::tuple`, when you need to return more than two values. (Notice there is no such thing as same type for the pair or tuple values, as you mentioned.)
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
C++ lets you overload the function, i.e. use the same name, but different parameter types. You can return `point3D` as the return value, and make the `length` reference parameter appear "optional" by providing a separate overload: ``` point3D findIntersect(const vec3& vector1, const vec3& vector2) { double ignore;...
I still think that you can and should create the struct for your code (if your code is not a real time..) Stucts are very common and gives you robastics and flexibility in case you would need to expend your code. To be depends on on these key value pair in you code and then realize after few months that you need to cha...
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
You could use a `std::pair<point3D, double>`. There is also a `std::tuple`, when you need to return more than two values. (Notice there is no such thing as same type for the pair or tuple values, as you mentioned.)
I still think that you can and should create the struct for your code (if your code is not a real time..) Stucts are very common and gives you robastics and flexibility in case you would need to expend your code. To be depends on on these key value pair in you code and then realize after few months that you need to cha...
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
C++ lets you overload the function, i.e. use the same name, but different parameter types. You can return `point3D` as the return value, and make the `length` reference parameter appear "optional" by providing a separate overload: ``` point3D findIntersect(const vec3& vector1, const vec3& vector2) { double ignore;...
You could use a `std::pair<point3D, double>`. There is also a `std::tuple`, when you need to return more than two values. (Notice there is no such thing as same type for the pair or tuple values, as you mentioned.)
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
Straustrup and Sutter are recommending using `tuple/tie` for this: [F.41: Prefer to return tuples to multiple out-parameters](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f41-prefer-to-return-tuples-to-multiple-out-parameters) ``` Point3D point3D; double distance; std::tie(point3D, dis...
You sure can use [pairs](http://www.cplusplus.com/reference/utility/pair/). ``` std::pair<point3D, double> findIntersect(const vec3& vector1, const vec3& vector2); ```
32,801,983
The backstory. In VBA in Excel I created a function that calculate the shortest distance between two lines (vectors). This function returns the apparent intersection point, and the actual distance between them. To make this work I ended up passing out an array, then sorting out what went where afterwards. It works, but...
2015/09/26
[ "https://Stackoverflow.com/questions/32801983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5380126/" ]
Straustrup and Sutter are recommending using `tuple/tie` for this: [F.41: Prefer to return tuples to multiple out-parameters](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f41-prefer-to-return-tuples-to-multiple-out-parameters) ``` Point3D point3D; double distance; std::tie(point3D, dis...
I still think that you can and should create the struct for your code (if your code is not a real time..) Stucts are very common and gives you robastics and flexibility in case you would need to expend your code. To be depends on on these key value pair in you code and then realize after few months that you need to cha...
4,354,341
Could someone please help with the following jQuery ***I need all jQuery UI buttons that are not children of two tables #id1 and #id2 and not of classid=x*** What I have come up with so far is ``` $(":button(.ui-button .ui-widget):not(#table1 #table2):not(.MyCustomClass)") ``` but this doesnt seem to work... Wh...
2010/12/04
[ "https://Stackoverflow.com/questions/4354341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/314661/" ]
I think you want: ``` $(':button.ui-button, :button.ui-widget').not('#table1 *, #table2 *').not('.MyCustomClass') ``` It's usually faster to break the qualifiers out of the selector.
Try ([demo](http://jsfiddle.net/Mottie/63Nrx/)): ``` $('table:not(#table1, #table2) .ui-button:not(.MyCustomClass)') ```
4,253,815
i try to deserialize a json string with the help of gson. While gson.fromJson I get the following error: > > No-args constructor for class xyz; does not exist. Register an InstanceCreator with Gson for this type to fix this problem > > > I tried to work with an InstanceCreate but I didn't get this running. I hope...
2010/11/23
[ "https://Stackoverflow.com/questions/4253815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/517123/" ]
Try making your constructor public, so that gson can actually access it. ``` public License() { this.computername = ""; this.date = ""; this.name = ""; this.prog = ""; // no-args constructor } ``` but since Java creates a default constructor, you could just use: ``` public class License { public Strin...
it is unbelievable... now I tried it not so ``` j = new JSONObject(JSONSerializedResources); lic = gson.fromJson(j.toString(), License[].class); ``` but directly so ``` lic = gson.fromJson(JSONSerializedResources, License[].class); ``` with my old original json string with starting and ending "[" & "]" and it w...
4,253,815
i try to deserialize a json string with the help of gson. While gson.fromJson I get the following error: > > No-args constructor for class xyz; does not exist. Register an InstanceCreator with Gson for this type to fix this problem > > > I tried to work with an InstanceCreate but I didn't get this running. I hope...
2010/11/23
[ "https://Stackoverflow.com/questions/4253815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/517123/" ]
Try making your constructor public, so that gson can actually access it. ``` public License() { this.computername = ""; this.date = ""; this.name = ""; this.prog = ""; // no-args constructor } ``` but since Java creates a default constructor, you could just use: ``` public class License { public Strin...
Try removing the constructors if you don't need I tried using two classes Class A having list of Class B Removed all the constructors and just worked fine for me.
4,253,815
i try to deserialize a json string with the help of gson. While gson.fromJson I get the following error: > > No-args constructor for class xyz; does not exist. Register an InstanceCreator with Gson for this type to fix this problem > > > I tried to work with an InstanceCreate but I didn't get this running. I hope...
2010/11/23
[ "https://Stackoverflow.com/questions/4253815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/517123/" ]
it is unbelievable... now I tried it not so ``` j = new JSONObject(JSONSerializedResources); lic = gson.fromJson(j.toString(), License[].class); ``` but directly so ``` lic = gson.fromJson(JSONSerializedResources, License[].class); ``` with my old original json string with starting and ending "[" & "]" and it w...
Try removing the constructors if you don't need I tried using two classes Class A having list of Class B Removed all the constructors and just worked fine for me.
52,324,863
For example, turn this: ``` const enums = { ip: 'ip', er: 'er' }; const obj = { somethingNotNeeded: {...}, er: [ { a: 1}, { b: 2} ], somethingElseNotNeeded: {...}, ip: [ { a: 1}, { b: 2} ] } ``` Into this: ``` [ { a: 1}, { b: 2}, { a: 1}, { b: 2} ] ``` I'm already doing this i...
2018/09/14
[ "https://Stackoverflow.com/questions/52324863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/391600/" ]
Get the `enums` properties with [`Object.values()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Object/values) (or [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys) if they are always identical). Use [`Array.map()`](https...
```js const props = ['ip', 'er']; // An array of the properties you are interested in const obj = { somethingNotNeeded: {}, er: [ { a: 1}, { b: 2} ], somethingElseNotNeeded: {}, ip: [ { a: 1}, { b: 2} ] } const flatten = (array) => array ? array.reduce((output, array) => [...o...