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
29,483,498
Is it possible and what would be the most efficient neat method to add a column to Data Frame? More specifically, column may serve as Row IDs for the existing Data Frame. In a simplified case, reading from file and not tokenizing it, I can think of something as below (in Scala), but it completes with errors (at line...
2015/04/07
[ "https://Stackoverflow.com/questions/29483498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2028058/" ]
It's been a while since I posted the question and it seems that some other people would like to get an answer as well. Below is what I found. So the original task was to append a column with row identificators (basically, a sequence `1 to numRows`) to any given data frame, so the rows order/presence can be tracked (e....
not sure if it works in spark 1.3 but in spark 1.5 I use withColumn: ``` import sqlContext.implicits._ import org.apache.spark.sql.functions._ df.withColumn("newName",lit("newValue")) ``` I use this when I need to use a value that is not related to existing columns of the dataframe This is similar to @NehaM's answ...
29,483,498
Is it possible and what would be the most efficient neat method to add a column to Data Frame? More specifically, column may serve as Row IDs for the existing Data Frame. In a simplified case, reading from file and not tokenizing it, I can think of something as below (in Scala), but it completes with errors (at line...
2015/04/07
[ "https://Stackoverflow.com/questions/29483498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2028058/" ]
It's been a while since I posted the question and it seems that some other people would like to get an answer as well. Below is what I found. So the original task was to append a column with row identificators (basically, a sequence `1 to numRows`) to any given data frame, so the rows order/presence can be tracked (e....
You can use [row\_number](https://spark.apache.org/docs/2.0.2/api/java/org/apache/spark/sql/functions.html#row_number()) with [Window function](https://databricks.com/blog/2015/07/15/introducing-window-functions-in-spark-sql.html) as below to get the distinct id for each rows in a dataframe. ``` df.withColumn("ID", ro...
29,483,498
Is it possible and what would be the most efficient neat method to add a column to Data Frame? More specifically, column may serve as Row IDs for the existing Data Frame. In a simplified case, reading from file and not tokenizing it, I can think of something as below (in Scala), but it completes with errors (at line...
2015/04/07
[ "https://Stackoverflow.com/questions/29483498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2028058/" ]
not sure if it works in spark 1.3 but in spark 1.5 I use withColumn: ``` import sqlContext.implicits._ import org.apache.spark.sql.functions._ df.withColumn("newName",lit("newValue")) ``` I use this when I need to use a value that is not related to existing columns of the dataframe This is similar to @NehaM's answ...
I took help from above answer. However, I find it incomplete if we want to change a `DataFrame` and current APIs are little different in `Spark 1.6`. `zipWithIndex()` returns a `Tuple` of `(Row, Long)` which contains each row and corresponding index. We can use it to create new `Row` according to our need. ``` val r...
29,483,498
Is it possible and what would be the most efficient neat method to add a column to Data Frame? More specifically, column may serve as Row IDs for the existing Data Frame. In a simplified case, reading from file and not tokenizing it, I can think of something as below (in Scala), but it completes with errors (at line...
2015/04/07
[ "https://Stackoverflow.com/questions/29483498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2028058/" ]
I took help from above answer. However, I find it incomplete if we want to change a `DataFrame` and current APIs are little different in `Spark 1.6`. `zipWithIndex()` returns a `Tuple` of `(Row, Long)` which contains each row and corresponding index. We can use it to create new `Row` according to our need. ``` val r...
You can use [row\_number](https://spark.apache.org/docs/2.0.2/api/java/org/apache/spark/sql/functions.html#row_number()) with [Window function](https://databricks.com/blog/2015/07/15/introducing-window-functions-in-spark-sql.html) as below to get the distinct id for each rows in a dataframe. ``` df.withColumn("ID", ro...
29,483,498
Is it possible and what would be the most efficient neat method to add a column to Data Frame? More specifically, column may serve as Row IDs for the existing Data Frame. In a simplified case, reading from file and not tokenizing it, I can think of something as below (in Scala), but it completes with errors (at line...
2015/04/07
[ "https://Stackoverflow.com/questions/29483498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2028058/" ]
not sure if it works in spark 1.3 but in spark 1.5 I use withColumn: ``` import sqlContext.implicits._ import org.apache.spark.sql.functions._ df.withColumn("newName",lit("newValue")) ``` I use this when I need to use a value that is not related to existing columns of the dataframe This is similar to @NehaM's answ...
You can use [row\_number](https://spark.apache.org/docs/2.0.2/api/java/org/apache/spark/sql/functions.html#row_number()) with [Window function](https://databricks.com/blog/2015/07/15/introducing-window-functions-in-spark-sql.html) as below to get the distinct id for each rows in a dataframe. ``` df.withColumn("ID", ro...
36,363,197
I develop with Android version 23. But now I like to debug a device having only version 19 installed. To do it I changed my gradle file to ``` apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion "19.1.0" defaultConfig { applicationId "com.mydomain.myapp" ...
2016/04/01
[ "https://Stackoverflow.com/questions/36363197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/575376/" ]
This is a sample of my build.gradle and it runs absolutely fine on an API 19 device. Few things to note are that you don't need to decrement the compile SDK. This is like having Java 8 installed, but compiling Java 6 code. It still works. Also, I think the `appcompat-v7` library depends on the `support-v4` library,...
Remove `compile 'com.android.support:design:19.+'` then try
55,375,489
I have the following dataframe: ``` doc_id is_fulltext 1243 dok:1 1 3310 dok:1 1 4370 dok:1 1 14403 dok:1020 1 17252 dok:1020 1 15977 dok:1020 0 16480 dok:1020 1 16252 dok:1020 1 468 dok:103 ...
2019/03/27
[ "https://Stackoverflow.com/questions/55375489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9683277/" ]
You could [`GroupBy`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.groupby.html) the `doc_id`, apply [`pd.value_counts`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.value_counts.html) to each group and [`unstack`](https://pandas.pydata.org/pandas-docs/stable/r...
I don't know if it's the best approach, but this should work for you: ``` import pandas as pd df = pd.DataFrame({"doc_id":["id1", "id2", "id1", "id2"], "is_fulltext":[1, 0, 1, 1]}) df_grouped = df.groupby("doc_id").sum().reset_index() df_grouped["non_fulltext"] = df.groupby("doc_id").count().reset_...
32,774,210
This method will be passed an integer and return the String “perfect”, “deficient”, or “abundant”. A perfect number is one that is equal to the sum of its factor excluding itself. A number is considered deficient if the sum of its factors excluding itself is less than the number. A number is abundant if the sum of its ...
2015/09/25
[ "https://Stackoverflow.com/questions/32774210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302568/" ]
The sum value is not calculated correctly because you have semicolon after if statement. Remove semicolon after your if statement ``` for(int i=1; i<n; i++){ if(isFactor(i,n)) sum=sum+i; } ```
You have a semi-colon after if(isFactor(i,n)), so it's an if with an empty block, and sum=sum+i is always executed.
32,774,210
This method will be passed an integer and return the String “perfect”, “deficient”, or “abundant”. A perfect number is one that is equal to the sum of its factor excluding itself. A number is considered deficient if the sum of its factors excluding itself is less than the number. A number is abundant if the sum of its ...
2015/09/25
[ "https://Stackoverflow.com/questions/32774210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302568/" ]
The sum value is not calculated correctly because you have semicolon after if statement. Remove semicolon after your if statement ``` for(int i=1; i<n; i++){ if(isFactor(i,n)) sum=sum+i; } ```
You made a careless mistake! The problem is here: ``` if(isFactor(i,n)); sum=sum+i; } ``` Do you see that semi colon? That is the problem! A semi-colon in Java denotes an empty statement aka nothing. That means when `isFactor(i, n)` return true, nothing will be executed! That also means `sum=sum+i` will be execu...
130,772
Found something related [Why aren't application downloads routinely done over HTTPS?](https://security.stackexchange.com/questions/18853/why-arent-application-downloads-routinely-done-over-https) --- This is a question about general security from a noob. I couldn't find anything relevant about this topic via my Googl...
2016/07/22
[ "https://security.stackexchange.com/questions/130772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/118273/" ]
On the mobile side, unless you specifically asked your provider for it, IPs are ***normally*** private (NATed) which makes it quite difficult to reach from outside that network. With the wifi connection, again your connection gets NATed by your router, making the device unreachable directly too. Finally note that an ...
An IP alone is not enough for hacking your phone. And while it doesn't slow an attacker down, the same time it does absolutely nothing to help attacking you. IP addresses are no secrets, quite the opposite. It's just necessary for any (internet) connection to work. And even if this particular software wouldn't show t...
52,621,935
I rarely write SQL (Azure SQL) however I am trying to generate a per month sales total per customer. Customer: ``` |Username |ID | |user1 |1 | |user2 |2 | |user3 |3 | ``` Order: ``` |CustomerId |Month |Total | |1 |1 |275 | ...
2018/10/03
[ "https://Stackoverflow.com/questions/52621935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/434537/" ]
IF you want to have a separate column for each month then try this ``` SELECT customerTable.Username Username ,SUM(iif(ordertable.[month] = 1,orderTable.OrderTotal,0)) TotalJan ,SUM(iif(ordertable.[month] = 2,orderTable.OrderTotal,0)) TotalFeb ,SUM(iif(ordertable.[month] = 3,orderTable.OrderTotal,0)) TotalMar ,SUM(ii...
Something like this: ``` SELECT DATENAME(Month, (orderTable.PaidDateUTC)) MonthName, customerTable.Username Username, SUM(orderTable.OrderTotal) TotalMay FROM "Order" orderTable JOIN Customer customerTable ON orderTable.CustomerId = customerTable.Id GROUP BY DATENAME(Month, (orderTable.PaidDateUTC)), Username ...
52,621,935
I rarely write SQL (Azure SQL) however I am trying to generate a per month sales total per customer. Customer: ``` |Username |ID | |user1 |1 | |user2 |2 | |user3 |3 | ``` Order: ``` |CustomerId |Month |Total | |1 |1 |275 | ...
2018/10/03
[ "https://Stackoverflow.com/questions/52621935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/434537/" ]
you can use case when ``` with t1 as ( select o.CustomerId,o.Month, sum(Total) as total from [Order] group by o.CustomerId,o.Month ) select c.Username, case when t1.month=1 then t1.total else 0 end month1, case when t1.month=2 then t1.total else 0 end month2, case when t1.month=3 then t1....
Something like this: ``` SELECT DATENAME(Month, (orderTable.PaidDateUTC)) MonthName, customerTable.Username Username, SUM(orderTable.OrderTotal) TotalMay FROM "Order" orderTable JOIN Customer customerTable ON orderTable.CustomerId = customerTable.Id GROUP BY DATENAME(Month, (orderTable.PaidDateUTC)), Username ...
52,621,935
I rarely write SQL (Azure SQL) however I am trying to generate a per month sales total per customer. Customer: ``` |Username |ID | |user1 |1 | |user2 |2 | |user3 |3 | ``` Order: ``` |CustomerId |Month |Total | |1 |1 |275 | ...
2018/10/03
[ "https://Stackoverflow.com/questions/52621935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/434537/" ]
IF you want to have a separate column for each month then try this ``` SELECT customerTable.Username Username ,SUM(iif(ordertable.[month] = 1,orderTable.OrderTotal,0)) TotalJan ,SUM(iif(ordertable.[month] = 2,orderTable.OrderTotal,0)) TotalFeb ,SUM(iif(ordertable.[month] = 3,orderTable.OrderTotal,0)) TotalMar ,SUM(ii...
you can use case when ``` with t1 as ( select o.CustomerId,o.Month, sum(Total) as total from [Order] group by o.CustomerId,o.Month ) select c.Username, case when t1.month=1 then t1.total else 0 end month1, case when t1.month=2 then t1.total else 0 end month2, case when t1.month=3 then t1....
52,621,935
I rarely write SQL (Azure SQL) however I am trying to generate a per month sales total per customer. Customer: ``` |Username |ID | |user1 |1 | |user2 |2 | |user3 |3 | ``` Order: ``` |CustomerId |Month |Total | |1 |1 |275 | ...
2018/10/03
[ "https://Stackoverflow.com/questions/52621935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/434537/" ]
IF you want to have a separate column for each month then try this ``` SELECT customerTable.Username Username ,SUM(iif(ordertable.[month] = 1,orderTable.OrderTotal,0)) TotalJan ,SUM(iif(ordertable.[month] = 2,orderTable.OrderTotal,0)) TotalFeb ,SUM(iif(ordertable.[month] = 3,orderTable.OrderTotal,0)) TotalMar ,SUM(ii...
I would simply do `JOIN` with conditional aggregation : ``` SELECT c.Username, SUM(CASE WHEN o.Month = 1 THEN o.Total ELSE 0 END) AS [Month1Total], SUM(CASE WHEN o.Month = 2 THEN o.Total ELSE 0 END) AS [Month2Total], SUM(CASE WHEN o.Month = 3 THEN o.Total ELSE 0 END) AS [Month3Total], . . ...
52,621,935
I rarely write SQL (Azure SQL) however I am trying to generate a per month sales total per customer. Customer: ``` |Username |ID | |user1 |1 | |user2 |2 | |user3 |3 | ``` Order: ``` |CustomerId |Month |Total | |1 |1 |275 | ...
2018/10/03
[ "https://Stackoverflow.com/questions/52621935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/434537/" ]
you can use case when ``` with t1 as ( select o.CustomerId,o.Month, sum(Total) as total from [Order] group by o.CustomerId,o.Month ) select c.Username, case when t1.month=1 then t1.total else 0 end month1, case when t1.month=2 then t1.total else 0 end month2, case when t1.month=3 then t1....
I would simply do `JOIN` with conditional aggregation : ``` SELECT c.Username, SUM(CASE WHEN o.Month = 1 THEN o.Total ELSE 0 END) AS [Month1Total], SUM(CASE WHEN o.Month = 2 THEN o.Total ELSE 0 END) AS [Month2Total], SUM(CASE WHEN o.Month = 3 THEN o.Total ELSE 0 END) AS [Month3Total], . . ...
3,370,221
i am new to php i am in search of a php function in a class that accepts some parameters like size,type etc the class should be such that it should be able to set some default values to the parameters that are not assigned by user for ex the destination folder etc can anybody give me a link or some hint how should i d...
2010/07/30
[ "https://Stackoverflow.com/questions/3370221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/379682/" ]
My way to do this (no external sound needed, since I put my soundfile in my resources-folder): In onCreate: ``` mp = MediaPlayer.create(getBaseContext(), R.raw.sound); /*Gets your soundfile from res/raw/sound.ogg */ mp.start(); //Starts your sound //Continue with your run/thread-code here ``` Remember to have th...
You can play audio files using the [MediaPlayer](http://developer.android.com/reference/android/media/MediaPlayer.html) class. Example ``` MediaPlayer player = new MediaPlayer(); player.setDataSource("/sdcard/audiotrack.mp3"); player.prepare(); player.start(); ```
19,040,113
I have a jquery ui datepicker textbox within an update panel. For some reason I can no longer click on it to load the datepicker. This is what I have. ``` // Datepicker settings $('body').on('load', '#dpWorkWeek', function() { $(this).datepicker({ changeMonth: true, changeYear: true, }); }); <...
2013/09/26
[ "https://Stackoverflow.com/questions/19040113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/173432/" ]
I think what you are experiencing is that your date picker no longer works after an async postback. If this is the case here is one way of solving it - ``` window.onload = function () { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); } function endRequestHandler(sender, args) { ...
Yeah, the JQuery datepicker doesn't work well in an update panel. The problem is because the fields lose their bindings because your `body` `onLoad` function isn't called when the `UpdatePanel` triggers. So you have a few options: * Move the entire field outside the update panel * If you can't simply move it outside...
19,040,113
I have a jquery ui datepicker textbox within an update panel. For some reason I can no longer click on it to load the datepicker. This is what I have. ``` // Datepicker settings $('body').on('load', '#dpWorkWeek', function() { $(this).datepicker({ changeMonth: true, changeYear: true, }); }); <...
2013/09/26
[ "https://Stackoverflow.com/questions/19040113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/173432/" ]
I think what you are experiencing is that your date picker no longer works after an async postback. If this is the case here is one way of solving it - ``` window.onload = function () { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); } function endRequestHandler(sender, args) { ...
This is working in my code please follow this code. ``` ( Company : Infotrack Telematics private limited ) <script type="text/javascript"> $(document).ready(function () { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); }); function endRequest...
19,040,113
I have a jquery ui datepicker textbox within an update panel. For some reason I can no longer click on it to load the datepicker. This is what I have. ``` // Datepicker settings $('body').on('load', '#dpWorkWeek', function() { $(this).datepicker({ changeMonth: true, changeYear: true, }); }); <...
2013/09/26
[ "https://Stackoverflow.com/questions/19040113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/173432/" ]
Yeah, the JQuery datepicker doesn't work well in an update panel. The problem is because the fields lose their bindings because your `body` `onLoad` function isn't called when the `UpdatePanel` triggers. So you have a few options: * Move the entire field outside the update panel * If you can't simply move it outside...
This is working in my code please follow this code. ``` ( Company : Infotrack Telematics private limited ) <script type="text/javascript"> $(document).ready(function () { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); }); function endRequest...
15,192,087
Is there an API that would let me do it in <http://teststack.github.com/White/>? I can't seem to find it. Thanks Pawel
2013/03/03
[ "https://Stackoverflow.com/questions/15192087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3323/" ]
I know this is a very old post. But I though can't hurt to update it. TestStack.White has these functions now: ``` //Takes a screenshot of the entire desktop, and saves it to disk Desktop.TakeScreenshot("C:\\white-framework.png", System.Drawing.Imaging.ImageFormat.Png); //Captures a screenshot of the entire desktop, a...
From looking through the code on GitHub, it doesn't appear to have an API for that (perhaps [add it as a feature request](https://github.com/TestStack/White/issues)?). You can do it fairly simply yourself though using a combination of the [`Screen`](http://msdn.microsoft.com/en-gb/library/system.windows.forms.screen.a...
15,192,087
Is there an API that would let me do it in <http://teststack.github.com/White/>? I can't seem to find it. Thanks Pawel
2013/03/03
[ "https://Stackoverflow.com/questions/15192087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3323/" ]
I know this is a very old post. But I though can't hurt to update it. TestStack.White has these functions now: ``` //Takes a screenshot of the entire desktop, and saves it to disk Desktop.TakeScreenshot("C:\\white-framework.png", System.Drawing.Imaging.ImageFormat.Png); //Captures a screenshot of the entire desktop, a...
The White.Repository project actually records the flow of your test, with screenshots but it is not very well documented and is not released on NuGet yet (it will be soon). Personally I use this class we have put together from a bunch of sources and forget where I got it originally. This captures modal dialogues and ...
113,895
So here is my problem, I'm an intern at a fairly large offices. My supervisor and manager are out of the office for at least another 2 weeks and I've finished the work they have set me. Usually I wouldn't be hugely busy but now I am literally sitting at my desk more or less twiddling my thumbs, or trying new programmin...
2018/06/12
[ "https://workplace.stackexchange.com/questions/113895", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/87998/" ]
You're overthinking this. Didn't your supervisor assign somebody from the team to temporarily manage your tasks? If yes, ask that person. If no, you could ask a senior member of your team: > > Hey, my supervisor assigned tasks to me and I'm already done with them, while my supervisor is still away for at least 2 week...
Finishing your work earlier than expected (*while still performing well*) is seen as something nice. Your supervisor will be happy with this! What I would do, is **send a quick email to your supervisor** (and possibly your manager too, depending on who keeps an eye on whatever you do.) telling him you finished early, ...
113,895
So here is my problem, I'm an intern at a fairly large offices. My supervisor and manager are out of the office for at least another 2 weeks and I've finished the work they have set me. Usually I wouldn't be hugely busy but now I am literally sitting at my desk more or less twiddling my thumbs, or trying new programmin...
2018/06/12
[ "https://workplace.stackexchange.com/questions/113895", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/87998/" ]
Asking for work is never seen as desperate. Quite the opposite, it is seen as proactive. You first go to your colleagues, and if they have nothing for you, then you just walk to the nearest manager. Most have plenty of work that would be useful but not useful enough to justify spending manpower on, so if you offer to...
Finishing your work earlier than expected (*while still performing well*) is seen as something nice. Your supervisor will be happy with this! What I would do, is **send a quick email to your supervisor** (and possibly your manager too, depending on who keeps an eye on whatever you do.) telling him you finished early, ...
15,674,822
I'm trying to learn C# by watching tutorials and when I try to rename my class it gives me this So this first error is basically when I make a new console solution and then declare a class and give it a name and then try to write out to the console it gives me two errors. > > ![1ST:Error 1 Invalid token '(' in class...
2013/03/28
[ "https://Stackoverflow.com/questions/15674822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2180486/" ]
It looks like you have a call to `System.Console.WriteLine` outside of the body of a method. The compiler thinks you are trying to reference a type, which does not exist, and it is also telling you that `(` is not legal at that particular point in the code file. You likely have a class definition that might look some...
You have a couple of issues. Firstly, you are trying to call Console.WriteLine() in an invalid part of the file. You need to declare a `Method` or `Constructor` and place this call inside that. Constructor example: ``` public class Person { public Person() { Console.WriteLine("Hello"); } } ``` ...
15,674,822
I'm trying to learn C# by watching tutorials and when I try to rename my class it gives me this So this first error is basically when I make a new console solution and then declare a class and give it a name and then try to write out to the console it gives me two errors. > > ![1ST:Error 1 Invalid token '(' in class...
2013/03/28
[ "https://Stackoverflow.com/questions/15674822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2180486/" ]
It looks like you have a call to `System.Console.WriteLine` outside of the body of a method. The compiler thinks you are trying to reference a type, which does not exist, and it is also telling you that `(` is not legal at that particular point in the code file. You likely have a class definition that might look some...
It seems that you've blown away the `Main()` method. Also, you shouldn't (can't, I guess) just have a method call floating in a class - it has to be within a method or constructor. Try replacing the contents within `namespace ConsoleApplication1` with the below get you started: ``` class Program { static void Ma...
15,674,822
I'm trying to learn C# by watching tutorials and when I try to rename my class it gives me this So this first error is basically when I make a new console solution and then declare a class and give it a name and then try to write out to the console it gives me two errors. > > ![1ST:Error 1 Invalid token '(' in class...
2013/03/28
[ "https://Stackoverflow.com/questions/15674822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2180486/" ]
It looks like you have a call to `System.Console.WriteLine` outside of the body of a method. The compiler thinks you are trying to reference a type, which does not exist, and it is also telling you that `(` is not legal at that particular point in the code file. You likely have a class definition that might look some...
Anthony Pegram’s answer is correct. Adding the directive `using System;` at the top of any relative c# files, allows the compiler to omit the need to have the **System.** portion of the method namespace in front of `System.Console.WriteLine()`. However, if the console solution is named **TestSolution** and the consol...
15,674,822
I'm trying to learn C# by watching tutorials and when I try to rename my class it gives me this So this first error is basically when I make a new console solution and then declare a class and give it a name and then try to write out to the console it gives me two errors. > > ![1ST:Error 1 Invalid token '(' in class...
2013/03/28
[ "https://Stackoverflow.com/questions/15674822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2180486/" ]
Anthony Pegram’s answer is correct. Adding the directive `using System;` at the top of any relative c# files, allows the compiler to omit the need to have the **System.** portion of the method namespace in front of `System.Console.WriteLine()`. However, if the console solution is named **TestSolution** and the consol...
You have a couple of issues. Firstly, you are trying to call Console.WriteLine() in an invalid part of the file. You need to declare a `Method` or `Constructor` and place this call inside that. Constructor example: ``` public class Person { public Person() { Console.WriteLine("Hello"); } } ``` ...
15,674,822
I'm trying to learn C# by watching tutorials and when I try to rename my class it gives me this So this first error is basically when I make a new console solution and then declare a class and give it a name and then try to write out to the console it gives me two errors. > > ![1ST:Error 1 Invalid token '(' in class...
2013/03/28
[ "https://Stackoverflow.com/questions/15674822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2180486/" ]
Anthony Pegram’s answer is correct. Adding the directive `using System;` at the top of any relative c# files, allows the compiler to omit the need to have the **System.** portion of the method namespace in front of `System.Console.WriteLine()`. However, if the console solution is named **TestSolution** and the consol...
It seems that you've blown away the `Main()` method. Also, you shouldn't (can't, I guess) just have a method call floating in a class - it has to be within a method or constructor. Try replacing the contents within `namespace ConsoleApplication1` with the below get you started: ``` class Program { static void Ma...
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
One of the most common plugins used to do this is [Contact Form 7](http://wordpress.org/extend/plugins/contact-form-7/). There are also [numerous other free plugins](http://wordpress.org/extend/plugins/search.php?q=contact+form&sort=) to add this functionality, as well as paid plugins such as [Gravity Forms](http://www...
Secure Form Mailer Plugin For Wordpress ======================================= For years and years I have been using the form plugin from dagon design: <http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/> for free! (so let me do my happy user giveback thing:) This plugin has a wide range of...
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
One of the most common plugins used to do this is [Contact Form 7](http://wordpress.org/extend/plugins/contact-form-7/). There are also [numerous other free plugins](http://wordpress.org/extend/plugins/search.php?q=contact+form&sort=) to add this functionality, as well as paid plugins such as [Gravity Forms](http://www...
Add me to the Gravity Forms supporters list. Of course it does a lot more than just contact forms. You should definitely check out the feature list and decide if it is worth your $39 dollars. It was a no-brainer for me and I bought the unlimited site developer license. The time that it saves me makes it worth it.
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
See the different- for only a form in one page it is easy and fast (no filter-hook or other) to write a template for a page in WP, for more flexibilty and functions us a plugin. A ready solution or a starter there you can find here: <https://github.com/bueltge/WP-Contact-Form-Template>
Plus one for gravity forms as I have found it to be much easier for my clients to use. Is easier to provide theme support for (ie Easier to customize via CSS) and has fewer conflicts with other plugins
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
Add me to the Gravity Forms supporters list. Of course it does a lot more than just contact forms. You should definitely check out the feature list and decide if it is worth your $39 dollars. It was a no-brainer for me and I bought the unlimited site developer license. The time that it saves me makes it worth it.
Plus one for gravity forms as I have found it to be much easier for my clients to use. Is easier to provide theme support for (ie Easier to customize via CSS) and has fewer conflicts with other plugins
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
Add me to the Gravity Forms supporters list. Of course it does a lot more than just contact forms. You should definitely check out the feature list and decide if it is worth your $39 dollars. It was a no-brainer for me and I bought the unlimited site developer license. The time that it saves me makes it worth it.
Secure Form Mailer Plugin For Wordpress ======================================= For years and years I have been using the form plugin from dagon design: <http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/> for free! (so let me do my happy user giveback thing:) This plugin has a wide range of...
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
Consider using [Gravity Forms](http://www.gravityforms.com/). It's commercial but only $39 per site and it's one of the best $39 I've ever spent for WordPress development.
Plus one for gravity forms as I have found it to be much easier for my clients to use. Is easier to provide theme support for (ie Easier to customize via CSS) and has fewer conflicts with other plugins
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
If you are looking to do a highly custom form, and want complete control over what happens, you can also create a new template for the page, and your form on that template would post back to itself. At the top of the template you could do something like this: ``` <?php if($_POST) { // do something } ?> ``` Not ...
See the different- for only a form in one page it is easy and fast (no filter-hook or other) to write a template for a page in WP, for more flexibilty and functions us a plugin. A ready solution or a starter there you can find here: <https://github.com/bueltge/WP-Contact-Form-Template>
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
[Contact Form 7](http://wordpress.org/extend/plugins/contact-form-7/) is one of the most popular plugins to add a contact form to a WP blog. It supports multiple contact forms and you can add/remove fields as needed. Additional services such as reCAPTCHA and Akismet can be added. I use this on most of my blogs to power...
I've been pleased with the (free) [Deko Boko forms plugin](http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/). Flexible, easy to modify and recaptcha is integrated.
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
[Contact Form 7](http://wordpress.org/extend/plugins/contact-form-7/) is one of the most popular plugins to add a contact form to a WP blog. It supports multiple contact forms and you can add/remove fields as needed. Additional services such as reCAPTCHA and Akismet can be added. I use this on most of my blogs to power...
Add me to the Gravity Forms supporters list. Of course it does a lot more than just contact forms. You should definitely check out the feature list and decide if it is worth your $39 dollars. It was a no-brainer for me and I bought the unlimited site developer license. The time that it saves me makes it worth it.
70
How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress currently lacks this feature, but knowing the wordpress community, it's unlikely that we must do without.
2010/08/11
[ "https://wordpress.stackexchange.com/questions/70", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/92/" ]
[Contact Form 7](http://wordpress.org/extend/plugins/contact-form-7/) is one of the most popular plugins to add a contact form to a WP blog. It supports multiple contact forms and you can add/remove fields as needed. Additional services such as reCAPTCHA and Akismet can be added. I use this on most of my blogs to power...
If you are looking to do a highly custom form, and want complete control over what happens, you can also create a new template for the page, and your form on that template would post back to itself. At the top of the template you could do something like this: ``` <?php if($_POST) { // do something } ?> ``` Not ...
38,970
I've built three buttons with checkbox dropdowns that display categories that filter the content below based on categories. I am currently using the relatedTo function to only display the categories that have any content tagged. However, what I'm trying to achieve is to have the category checkboxes be hidden in real ti...
2022/02/01
[ "https://craftcms.stackexchange.com/questions/38970", "https://craftcms.stackexchange.com", "https://craftcms.stackexchange.com/users/12695/" ]
If I understand you correctly, you're looking to build a [faceted search](https://en.wikipedia.org/wiki/Faceted_search), right? So the available filters (checkboxes in this case) are reduced based on the currently active filters to only show those that would yield any results. In your setup, the key to that is to get ...
I was able to do something similar by bringing in the [Preparse Field](https://github.com/besteadfast/craft-preparse-field/blob/master/README.md) plugin. Within the category, add a preparse field to count the number of related entries. {{craft.entries().section('blog').relatedTo(element).count() }} And then, in the t...
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You can use the `enumitem` package. If you don't want to use additional packages, you can simply redefine `\labelenumi`: ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \renewcommand\labelenumi{\bfseries\theenumi} \item First item. \item Second item. \item Third i...
You should use a package like `enumitem`. The package allows to modify the `item` by a key-value-syntax. ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\textbf{\arabic*},start=0] \item First item \item Second item \item Third item \end{enumerate} \end{document} ```...
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You should use a package like `enumitem`. The package allows to modify the `item` by a key-value-syntax. ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\textbf{\arabic*},start=0] \item First item \item Second item \item Third item \end{enumerate} \end{document} ```...
It's not a good idea to redefine `\item`, as it's used in many parts of LaTeX. Here is a `\benumerate` environment in which you can use the `\bolditem` command alternating it to the normal one. ``` \documentclass[a4paper]{article} \let\ifbolditem\iffalse \def\bolditemtrue{\global\let\ifbolditem\iftrue} \def\bolditemf...
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You should use a package like `enumitem`. The package allows to modify the `item` by a key-value-syntax. ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\textbf{\arabic*},start=0] \item First item \item Second item \item Third item \end{enumerate} \end{document} ```...
This is *almost* the same answer I posted to a related (identical?) question [here](https://tex.stackexchange.com/a/347965/103825). I am re-posting most of it here for the sake of those finding these posts via Google search. There are two different solutions, one local and one global, using the `enumitem` package. Th...
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You should use a package like `enumitem`. The package allows to modify the `item` by a key-value-syntax. ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\textbf{\arabic*},start=0] \item First item \item Second item \item Third item \end{enumerate} \end{document} ```...
By using `enumerate` package you can also use this command. ``` \documentclass{article} \usepackage{enumerate} \begin{document} \begin{enumerate}[\bfseries a.] \item one \item two \item three \end{enumerate} \end{document} ```
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You can use the `enumitem` package. If you don't want to use additional packages, you can simply redefine `\labelenumi`: ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \renewcommand\labelenumi{\bfseries\theenumi} \item First item. \item Second item. \item Third i...
It's not a good idea to redefine `\item`, as it's used in many parts of LaTeX. Here is a `\benumerate` environment in which you can use the `\bolditem` command alternating it to the normal one. ``` \documentclass[a4paper]{article} \let\ifbolditem\iffalse \def\bolditemtrue{\global\let\ifbolditem\iftrue} \def\bolditemf...
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You can use the `enumitem` package. If you don't want to use additional packages, you can simply redefine `\labelenumi`: ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \renewcommand\labelenumi{\bfseries\theenumi} \item First item. \item Second item. \item Third i...
This is *almost* the same answer I posted to a related (identical?) question [here](https://tex.stackexchange.com/a/347965/103825). I am re-posting most of it here for the sake of those finding these posts via Google search. There are two different solutions, one local and one global, using the `enumitem` package. Th...
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
You can use the `enumitem` package. If you don't want to use additional packages, you can simply redefine `\labelenumi`: ``` \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \renewcommand\labelenumi{\bfseries\theenumi} \item First item. \item Second item. \item Third i...
By using `enumerate` package you can also use this command. ``` \documentclass{article} \usepackage{enumerate} \begin{document} \begin{enumerate}[\bfseries a.] \item one \item two \item three \end{enumerate} \end{document} ```
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
It's not a good idea to redefine `\item`, as it's used in many parts of LaTeX. Here is a `\benumerate` environment in which you can use the `\bolditem` command alternating it to the normal one. ``` \documentclass[a4paper]{article} \let\ifbolditem\iffalse \def\bolditemtrue{\global\let\ifbolditem\iftrue} \def\bolditemf...
By using `enumerate` package you can also use this command. ``` \documentclass{article} \usepackage{enumerate} \begin{document} \begin{enumerate}[\bfseries a.] \item one \item two \item three \end{enumerate} \end{document} ```
23,726
Using this preamble: ``` \documentclass[pdftex,11pt,a4paper,openany]{memoir} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{amsmath,amssymb,amsfonts,wasysym} \usepackage[pdftex]{graphicx} \usepackage{wrapfig} \usepackage[left=3...
2011/07/21
[ "https://tex.stackexchange.com/questions/23726", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3186/" ]
This is *almost* the same answer I posted to a related (identical?) question [here](https://tex.stackexchange.com/a/347965/103825). I am re-posting most of it here for the sake of those finding these posts via Google search. There are two different solutions, one local and one global, using the `enumitem` package. Th...
By using `enumerate` package you can also use this command. ``` \documentclass{article} \usepackage{enumerate} \begin{document} \begin{enumerate}[\bfseries a.] \item one \item two \item three \end{enumerate} \end{document} ```
59,899,713
I have a sheet of raw data with the average located at the bottom, I want to run through every column on a summary sheet, and place the average given on the raw data sheet below. what I have: ``` On Error Resume Next Application.DisplayAlerts = False Sheets.Add After:=Worksheets("Raw PivotTable") ActiveSheet.Name = "...
2020/01/24
[ "https://Stackoverflow.com/questions/59899713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12776309/" ]
Instead of the copy-paste, you might do the following: ``` cell. ... .Offset(1, 0).Value = PSheet. ... .End(xlDown).Value ```
I fixed the issue! Instead of trying to find an exact cell I selected the entire column, and selected the last cell. My code: ``` For Each cell In SSheet.Range("A1:" & SSheet.Range("A1").End(xlToRight).Address) With Sheets(PSheet) PSheetVal = PSheet.Columns(C).End(xlDown).Value End With ...
332,324
After georeferencing a black and white TIFF image, the QGIS Raster Georeferencer fills the corners with black pixels, creating black elongated triangles along the edges of the new image. I could not find anything in the Georeferencer settings to force these filler pixels to be while. I want to set all white pixels tran...
2019/08/19
[ "https://gis.stackexchange.com/questions/332324", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/93736/" ]
If image gets rotated in the georeferencing process it is inevident that triangle shaped nodata areas appear at the corners of the georeferenced image. There are a few different ways to deal with the nodata area. I clipped a part of your image to be used as a test case. [![enter image description here](https://i.stack...
In the Georeferencer, check the 'Use 0 for transparency when needed' which will make the black pixels go away. To avoid white pixels, go to Layer properties and set 255 as the additional nodata value. [![enter image description here](https://i.stack.imgur.com/7bCKX.png)](https://i.stack.imgur.com/7bCKX.png)
332,324
After georeferencing a black and white TIFF image, the QGIS Raster Georeferencer fills the corners with black pixels, creating black elongated triangles along the edges of the new image. I could not find anything in the Georeferencer settings to force these filler pixels to be while. I want to set all white pixels tran...
2019/08/19
[ "https://gis.stackexchange.com/questions/332324", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/93736/" ]
It's a super hack, but it works. 1. Do the georeferencing as normal. 2. Open the created \_modified.tif file in Paint.NET (<https://www.getpaint.net/download.html>) FREE! 3. Bucket fill the black corner triangles with white. Save file as new TIFF (just in case). 4. Drag-drop new TIFF into QGIS. It'll maintain the geor...
In the Georeferencer, check the 'Use 0 for transparency when needed' which will make the black pixels go away. To avoid white pixels, go to Layer properties and set 255 as the additional nodata value. [![enter image description here](https://i.stack.imgur.com/7bCKX.png)](https://i.stack.imgur.com/7bCKX.png)
332,324
After georeferencing a black and white TIFF image, the QGIS Raster Georeferencer fills the corners with black pixels, creating black elongated triangles along the edges of the new image. I could not find anything in the Georeferencer settings to force these filler pixels to be while. I want to set all white pixels tran...
2019/08/19
[ "https://gis.stackexchange.com/questions/332324", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/93736/" ]
If image gets rotated in the georeferencing process it is inevident that triangle shaped nodata areas appear at the corners of the georeferenced image. There are a few different ways to deal with the nodata area. I clipped a part of your image to be used as a test case. [![enter image description here](https://i.stack...
It's a super hack, but it works. 1. Do the georeferencing as normal. 2. Open the created \_modified.tif file in Paint.NET (<https://www.getpaint.net/download.html>) FREE! 3. Bucket fill the black corner triangles with white. Save file as new TIFF (just in case). 4. Drag-drop new TIFF into QGIS. It'll maintain the geor...
554,488
I am writing a paper and I am lost for a phrase to describe the set of topics a person is knowledgeable about. For example: "If someone knows about topic A and also knows about topic B, then topics A and B are [phrase relating the topics and the user's state of knowing]."
2020/12/11
[ "https://english.stackexchange.com/questions/554488", "https://english.stackexchange.com", "https://english.stackexchange.com/users/408275/" ]
Those topics can be said to be “*in his **wheelhouse***” Defined in [Dictionary.com](https://www.dictionary.com/browse/wheelhouse) as: > > within one’s area of expertise or interest: > > *There are some subjects that are in your wheelhouse and some that are not.* > > >
They are his or her specialities. > > Specialty = a subject that someone knows a lot about > > > [Cambridge doctionary](https://dictionary.cambridge.org/dictionary/english/specialty) > > >
554,488
I am writing a paper and I am lost for a phrase to describe the set of topics a person is knowledgeable about. For example: "If someone knows about topic A and also knows about topic B, then topics A and B are [phrase relating the topics and the user's state of knowing]."
2020/12/11
[ "https://english.stackexchange.com/questions/554488", "https://english.stackexchange.com", "https://english.stackexchange.com/users/408275/" ]
They are his or her specialities. > > Specialty = a subject that someone knows a lot about > > > [Cambridge doctionary](https://dictionary.cambridge.org/dictionary/english/specialty) > > >
The answer to your question will depend on the precise area(s) of knowledge you're referring to, the level or degree of expertise of the knower, and the intended register. One option not previously mentioned is the word "bailiwick," which is fairly productive, as it can be used both phrasally and as a stand-alone noun...
554,488
I am writing a paper and I am lost for a phrase to describe the set of topics a person is knowledgeable about. For example: "If someone knows about topic A and also knows about topic B, then topics A and B are [phrase relating the topics and the user's state of knowing]."
2020/12/11
[ "https://english.stackexchange.com/questions/554488", "https://english.stackexchange.com", "https://english.stackexchange.com/users/408275/" ]
Those topics can be said to be “*in his **wheelhouse***” Defined in [Dictionary.com](https://www.dictionary.com/browse/wheelhouse) as: > > within one’s area of expertise or interest: > > *There are some subjects that are in your wheelhouse and some that are not.* > > >
The answer to your question will depend on the precise area(s) of knowledge you're referring to, the level or degree of expertise of the knower, and the intended register. One option not previously mentioned is the word "bailiwick," which is fairly productive, as it can be used both phrasally and as a stand-alone noun...
11,158,401
I'm having problems multiplying two matrices of dimensions 5000x1024. I tried to do it through loops in a conventional manner, but it takes forever. Is there any good library with implemented and optimized matrix operations, or any algorithm that does it without 3 loops?
2012/06/22
[ "https://Stackoverflow.com/questions/11158401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1473418/" ]
Have you looked into using OpenCL? One of the examples in the Cloo (C# OpenCL library) distribution is a large 2D matrix multiplication. Unlike CUDA, OpenCL kernels will run on your GPU (if available and supported) or the CPU. On the GPU you'll see really, really, really dramatic speed increases. I mean, *really* dra...
Take a look at [Strassen algorithm](http://en.wikipedia.org/wiki/Strassen_algorithm) which has a runtime of approx. O(n2.8) instead of O(n3) with a naive method of multiplying matrices. One problem is that is not always stable but works fine for really high dimensions. Furthermore it is really complex so I would sugges...
46,961,876
I am building a c++ class library for embedded projects. One concept I have is a class named Task. Task has 2 members: An integer id and a callback function pointer The callbacks are created by the user and given to the constructor of the class. I want to give the following options to the user: * The user may use ...
2017/10/26
[ "https://Stackoverflow.com/questions/46961876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8839561/" ]
> > So is it that bad to call a functions that takes no arguments with an argument? > > > Yes of course! > > It worked for me, but I suppose that it is a really bad practice > > > "It worked for me" isn't a very valid argument if your program has undefined behavior. Because it might not work for me. > > An...
If you cannot use `std::function` due to limitation of embedded platform use `union` and a tag, then properly set `type` by overloaded setter or ctor and in call use a `switch` on `type`: ``` struct Task { enum CallbackType { cbVoid, cbId }; using VoidCb = void(*)(void); using IdCb = void(...
46,961,876
I am building a c++ class library for embedded projects. One concept I have is a class named Task. Task has 2 members: An integer id and a callback function pointer The callbacks are created by the user and given to the constructor of the class. I want to give the following options to the user: * The user may use ...
2017/10/26
[ "https://Stackoverflow.com/questions/46961876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8839561/" ]
> > So is it that bad to call a functions that takes no arguments with an argument? > > > Yes of course! > > It worked for me, but I suppose that it is a really bad practice > > > "It worked for me" isn't a very valid argument if your program has undefined behavior. Because it might not work for me. > > An...
Calling a function through a function pointer that has been casted to a different type invokes undefined behaviour (cf. [thins online C++ standard draft](https://timsong-cpp.github.io/cppwp/n3337/expr.reinterpret.cast#6) concerning casting of function pointers): > > A function pointer can be explicitly converted to a...
46,961,876
I am building a c++ class library for embedded projects. One concept I have is a class named Task. Task has 2 members: An integer id and a callback function pointer The callbacks are created by the user and given to the constructor of the class. I want to give the following options to the user: * The user may use ...
2017/10/26
[ "https://Stackoverflow.com/questions/46961876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8839561/" ]
> > So is it that bad to call a functions that takes no arguments with an argument? > > > Yes of course! > > It worked for me, but I suppose that it is a really bad practice > > > "It worked for me" isn't a very valid argument if your program has undefined behavior. Because it might not work for me. > > An...
You can create something under the covers that looks like the same interface. That is, auto-create helper wrapper functions that can throw away the task id if the callback doesn't want it. ``` class Task { template <void (*CB)(void)> struct task_void { static void cb (int) { CB(); } operator Task ...
46,961,876
I am building a c++ class library for embedded projects. One concept I have is a class named Task. Task has 2 members: An integer id and a callback function pointer The callbacks are created by the user and given to the constructor of the class. I want to give the following options to the user: * The user may use ...
2017/10/26
[ "https://Stackoverflow.com/questions/46961876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8839561/" ]
If you cannot use `std::function` due to limitation of embedded platform use `union` and a tag, then properly set `type` by overloaded setter or ctor and in call use a `switch` on `type`: ``` struct Task { enum CallbackType { cbVoid, cbId }; using VoidCb = void(*)(void); using IdCb = void(...
You can create something under the covers that looks like the same interface. That is, auto-create helper wrapper functions that can throw away the task id if the callback doesn't want it. ``` class Task { template <void (*CB)(void)> struct task_void { static void cb (int) { CB(); } operator Task ...
46,961,876
I am building a c++ class library for embedded projects. One concept I have is a class named Task. Task has 2 members: An integer id and a callback function pointer The callbacks are created by the user and given to the constructor of the class. I want to give the following options to the user: * The user may use ...
2017/10/26
[ "https://Stackoverflow.com/questions/46961876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8839561/" ]
Calling a function through a function pointer that has been casted to a different type invokes undefined behaviour (cf. [thins online C++ standard draft](https://timsong-cpp.github.io/cppwp/n3337/expr.reinterpret.cast#6) concerning casting of function pointers): > > A function pointer can be explicitly converted to a...
You can create something under the covers that looks like the same interface. That is, auto-create helper wrapper functions that can throw away the task id if the callback doesn't want it. ``` class Task { template <void (*CB)(void)> struct task_void { static void cb (int) { CB(); } operator Task ...
128,732
I'm going to a concert to Vienna on Saturday (two days). I just realized that there aren't any trains back to my home in the night so I'd have to wait til the morning until the first train leaves again (5.43 AM). I don't know when the concert will end, but expect it to be somewhere between midnight and 2 AM. Now, I ...
2018/12/20
[ "https://travel.stackexchange.com/questions/128732", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/70911/" ]
Update May 2022: both McDonald's are closed overnight. --- There are only 2 McDonald's in/near Vienna that are open 24/7 (and even on [the Chistmas and New Year holidays](https://www.mcdonalds.at/downloads/oeffnungszeiten_2018.pdf)): * at the aiport, Objekt 115 * in Wiener Neustadt, Pottendorfer Str. 45 Their [rest...
If your main concern is that you have to pay for a hotel room for the entire day but would spend only a couple of hours in it, maybe you could opt to leave Vienna later in the day or early evening instead of early morning. That way you can relax after a possibly tiresome concert, wake up fresh, then either spend time...
128,732
I'm going to a concert to Vienna on Saturday (two days). I just realized that there aren't any trains back to my home in the night so I'd have to wait til the morning until the first train leaves again (5.43 AM). I don't know when the concert will end, but expect it to be somewhere between midnight and 2 AM. Now, I ...
2018/12/20
[ "https://travel.stackexchange.com/questions/128732", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/70911/" ]
Update May 2022: both McDonald's are closed overnight. --- There are only 2 McDonald's in/near Vienna that are open 24/7 (and even on [the Chistmas and New Year holidays](https://www.mcdonalds.at/downloads/oeffnungszeiten_2018.pdf)): * at the aiport, Objekt 115 * in Wiener Neustadt, Pottendorfer Str. 45 Their [rest...
As you are staying on a weekend, there will be plenty of bars, clubs and other entertainment locations open till the early morning. Some of them may be loud, some quiet, so you can pick depending on what you are likely to be in a mood in after the concert. Here's an english website listing many options: <https://www.w...
128,732
I'm going to a concert to Vienna on Saturday (two days). I just realized that there aren't any trains back to my home in the night so I'd have to wait til the morning until the first train leaves again (5.43 AM). I don't know when the concert will end, but expect it to be somewhere between midnight and 2 AM. Now, I ...
2018/12/20
[ "https://travel.stackexchange.com/questions/128732", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/70911/" ]
For 5.8€, you could get a transit day pass that allows for unlimited travel on the transit network, including night buses – (especially) if you take a seat next to the bus operator, you'll definitely be safe, and you'll also see some more of Vienna.
If your main concern is that you have to pay for a hotel room for the entire day but would spend only a couple of hours in it, maybe you could opt to leave Vienna later in the day or early evening instead of early morning. That way you can relax after a possibly tiresome concert, wake up fresh, then either spend time...
128,732
I'm going to a concert to Vienna on Saturday (two days). I just realized that there aren't any trains back to my home in the night so I'd have to wait til the morning until the first train leaves again (5.43 AM). I don't know when the concert will end, but expect it to be somewhere between midnight and 2 AM. Now, I ...
2018/12/20
[ "https://travel.stackexchange.com/questions/128732", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/70911/" ]
For 5.8€, you could get a transit day pass that allows for unlimited travel on the transit network, including night buses – (especially) if you take a seat next to the bus operator, you'll definitely be safe, and you'll also see some more of Vienna.
As you are staying on a weekend, there will be plenty of bars, clubs and other entertainment locations open till the early morning. Some of them may be loud, some quiet, so you can pick depending on what you are likely to be in a mood in after the concert. Here's an english website listing many options: <https://www.w...
128,732
I'm going to a concert to Vienna on Saturday (two days). I just realized that there aren't any trains back to my home in the night so I'd have to wait til the morning until the first train leaves again (5.43 AM). I don't know when the concert will end, but expect it to be somewhere between midnight and 2 AM. Now, I ...
2018/12/20
[ "https://travel.stackexchange.com/questions/128732", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/70911/" ]
If your main concern is that you have to pay for a hotel room for the entire day but would spend only a couple of hours in it, maybe you could opt to leave Vienna later in the day or early evening instead of early morning. That way you can relax after a possibly tiresome concert, wake up fresh, then either spend time...
As you are staying on a weekend, there will be plenty of bars, clubs and other entertainment locations open till the early morning. Some of them may be loud, some quiet, so you can pick depending on what you are likely to be in a mood in after the concert. Here's an english website listing many options: <https://www.w...
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
It depends on the stack. The slider interface exposed via the website doesn't let you control Cedar stack applications, one of the following should do the trick though: ``` heroku ps:stop worker ``` or ``` heroku ps:workers 0 ```
New way on Cedar apps is `heroku scale worker=0`
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
The one that worker for me is `heroku scale worker=0`
The easiest way: ``` heroku workers 0 ```
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
Have you tried logging into the web interface and manually changing the number of workers to zero via the up/down slider? That is, log into heroku, go to your app's `Resources` page, and drag the "Worker Dynos" slider to zero, then save the changes via the "Save and Apply" button on the top-right. ![enter image descr...
The current way of scaling dynos is: ``` heroku ps:scale worker=0 ```
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
New way on Cedar apps is `heroku scale worker=0`
The easiest way: ``` heroku workers 0 ```
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
It depends on the stack. The slider interface exposed via the website doesn't let you control Cedar stack applications, one of the following should do the trick though: ``` heroku ps:stop worker ``` or ``` heroku ps:workers 0 ```
Have you tried logging into the web interface and manually changing the number of workers to zero via the up/down slider? That is, log into heroku, go to your app's `Resources` page, and drag the "Worker Dynos" slider to zero, then save the changes via the "Save and Apply" button on the top-right. ![enter image descr...
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
Have you tried logging into the web interface and manually changing the number of workers to zero via the up/down slider? That is, log into heroku, go to your app's `Resources` page, and drag the "Worker Dynos" slider to zero, then save the changes via the "Save and Apply" button on the top-right. ![enter image descr...
The one that worker for me is `heroku scale worker=0`
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
It depends on the stack. The slider interface exposed via the website doesn't let you control Cedar stack applications, one of the following should do the trick though: ``` heroku ps:stop worker ``` or ``` heroku ps:workers 0 ```
The one that worker for me is `heroku scale worker=0`
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
It depends on the stack. The slider interface exposed via the website doesn't let you control Cedar stack applications, one of the following should do the trick though: ``` heroku ps:stop worker ``` or ``` heroku ps:workers 0 ```
The current way of scaling dynos is: ``` heroku ps:scale worker=0 ```
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
It depends on the stack. The slider interface exposed via the website doesn't let you control Cedar stack applications, one of the following should do the trick though: ``` heroku ps:stop worker ``` or ``` heroku ps:workers 0 ```
The easiest way: ``` heroku workers 0 ```
8,350,687
How do you kill all heroku workers? I have tried: `heroku scale worker=0` and it doesn't work.
2011/12/02
[ "https://Stackoverflow.com/questions/8350687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1013369/" ]
Have you tried logging into the web interface and manually changing the number of workers to zero via the up/down slider? That is, log into heroku, go to your app's `Resources` page, and drag the "Worker Dynos" slider to zero, then save the changes via the "Save and Apply" button on the top-right. ![enter image descr...
The easiest way: ``` heroku workers 0 ```
8,207,519
I have a simple login form and it does return the "success" text in the function, but now I want to be able to add the text provided in the .php file. How can I do this? html ``` <script> $(function(){ $("#submitlogin").click(function() { inputs = { "logInUsername" : $('input[name=logInU...
2011/11/21
[ "https://Stackoverflow.com/questions/8207519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/710502/" ]
``` $.ajax({ type: "POST", url: "loggnow.php", data: inputs, dataType: "html", success: function (data) { $("#login").html(data); }, error : function (jqXHR, textStatus, errorThrown) { alert("error " + textStatus + ": " + err...
The docs on jquery web sites says that the sucess function will be passed the data. (See quoted). So you can just use the content passed back in the "data" variable, and put it in there. > > > ``` > success(data, textStatus, jqXHR) > > A function to be called if the request succeeds. The function gets passed > thr...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
"The standard model for user authentication on websites involves a "login" authentication event, after which (if successful) a user is "inside the wall" with a persistent secure session" 1. This isn't really correct. It's partly true, but only for web sites that invent their own authentication. 2. If you use "digest a...
If your RESTful framework is only going to be used by your web application, and will not be used as an API for third parties, I see no reason why you cannot use the same authentication scheme as the rest of your application. You could think of this authentication as a lower-level layer than the "application" level. The...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
One option to preserve cachability in intermediaries for pages with user-specific elements is to add the user-specific markup via Ajax. You serve every use the same page, including some JavaScript that will do an XHR request to a resource that returns something different based on the user login. You then merge this int...
If your RESTful framework is only going to be used by your web application, and will not be used as an API for third parties, I see no reason why you cannot use the same authentication scheme as the rest of your application. You could think of this authentication as a lower-level layer than the "application" level. The...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
> > This persistence of authentication > seems to break RESTful-ness > > > Instead of authenticating a user, you may think about creating a session. You will be returned a new "Session ID", along with the appropriate HTTP status code (200: OK, 403: Forbidden, etc). > > The user will probably see HTML which is >...
"The standard model for user authentication on websites involves a "login" authentication event, after which (if successful) a user is "inside the wall" with a persistent secure session" 1. This isn't really correct. It's partly true, but only for web sites that invent their own authentication. 2. If you use "digest a...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
> > This persistence of authentication > seems to break RESTful-ness > > > Instead of authenticating a user, you may think about creating a session. You will be returned a new "Session ID", along with the appropriate HTTP status code (200: OK, 403: Forbidden, etc). > > The user will probably see HTML which is >...
Re: Daniel's answer: If a session is a transient object that gets quickly deleted, this is not very cachable, as any cache you create would only have a useful lifetime of maybe a day, but also continue to use up space in the cache anyway. Wouldn't it be better to create the USER as an object, and authenticate using...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
"The standard model for user authentication on websites involves a "login" authentication event, after which (if successful) a user is "inside the wall" with a persistent secure session" 1. This isn't really correct. It's partly true, but only for web sites that invent their own authentication. 2. If you use "digest a...
"This persistence of authentication seems to break RESTful-ness. Caching and statelessness appear to be broken, because the authenticated user will probably see HTML which is different from that which a non-authenticated user will see for the same request" It is ok if the representation of the resource is slightly dif...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
"This persistence of authentication seems to break RESTful-ness. Caching and statelessness appear to be broken, because the authenticated user will probably see HTML which is different from that which a non-authenticated user will see for the same request" It is ok if the representation of the resource is slightly dif...
If your RESTful framework is only going to be used by your web application, and will not be used as an API for third parties, I see no reason why you cannot use the same authentication scheme as the rest of your application. You could think of this authentication as a lower-level layer than the "application" level. The...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
One option to preserve cachability in intermediaries for pages with user-specific elements is to add the user-specific markup via Ajax. You serve every use the same page, including some JavaScript that will do an XHR request to a resource that returns something different based on the user login. You then merge this int...
"This persistence of authentication seems to break RESTful-ness. Caching and statelessness appear to be broken, because the authenticated user will probably see HTML which is different from that which a non-authenticated user will see for the same request" It is ok if the representation of the resource is slightly dif...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
> > This persistence of authentication > seems to break RESTful-ness > > > Instead of authenticating a user, you may think about creating a session. You will be returned a new "Session ID", along with the appropriate HTTP status code (200: OK, 403: Forbidden, etc). > > The user will probably see HTML which is >...
If your RESTful framework is only going to be used by your web application, and will not be used as an API for third parties, I see no reason why you cannot use the same authentication scheme as the rest of your application. You could think of this authentication as a lower-level layer than the "application" level. The...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
> > This persistence of authentication > seems to break RESTful-ness > > > Instead of authenticating a user, you may think about creating a session. You will be returned a new "Session ID", along with the appropriate HTTP status code (200: OK, 403: Forbidden, etc). > > The user will probably see HTML which is >...
I think about it like this: The "noun" in user authentication is a session. So your login form uses a POST request to "create" a new session, and logging out uses a DELETE request to "delete" the session. I know what you mean about the persistence of authentication going against RESTfulness, but the cookies (which giv...
2,010,699
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept. I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' fro...
2010/01/06
[ "https://Stackoverflow.com/questions/2010699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82257/" ]
I think about it like this: The "noun" in user authentication is a session. So your login form uses a POST request to "create" a new session, and logging out uses a DELETE request to "delete" the session. I know what you mean about the persistence of authentication going against RESTfulness, but the cookies (which giv...
If your RESTful framework is only going to be used by your web application, and will not be used as an API for third parties, I see no reason why you cannot use the same authentication scheme as the rest of your application. You could think of this authentication as a lower-level layer than the "application" level. The...
50,401,381
I am in the process of development of an augmented reality app. I would like to put in the app multiple image targets e multiple 3d models, connecting specific images targets with specific 3D models. For that I would like to use the assetbundle to store the 3D models in a server and the cloudrecognition to store the im...
2018/05/17
[ "https://Stackoverflow.com/questions/50401381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9808768/" ]
I use this script attached to the cloudreco: ``` using Vuforia; using UnityEngine; public class SimpleCloudHandler : MonoBehaviour, ICloudRecoEventHandler { private CloudRecoBehaviour mCloudRecoBehaviour; private bool mIsScanning = false; private string mTargetMetadata = ""; // Use this for initializa...
1) <https://library.vuforia.com/articles/Training/Cloud-Recognition-Guide.html#metadata> 2)<https://library.vuforia.com/articles/Solution/Working-with-Vuforia-and-Unity.html#using-asset-bundles> Go through this links and still it not works post your script or error.
42,856,659
I a using NetworkX for a network analysis in python. I determine the weight for every edge and add that edge to the graph in the following way: ``` import matplotlib.pyplot as plt import networkx as nx import numpy as np airports = ['ATL','LAX','ORD'] weights = [500,200,150] #Note that in my real code I I calculated...
2017/03/17
[ "https://Stackoverflow.com/questions/42856659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7292389/" ]
Use: ``` edges=sorted(G.edges(data=True), key=lambda t: t[2].get('weight', 1)) ```
Put all the edge data in a list and then sort it with a custom key function (this is very easy to look up). NetworkX probably doesn't have any functionality to do what you want because it doesn't need to.
42,856,659
I a using NetworkX for a network analysis in python. I determine the weight for every edge and add that edge to the graph in the following way: ``` import matplotlib.pyplot as plt import networkx as nx import numpy as np airports = ['ATL','LAX','ORD'] weights = [500,200,150] #Note that in my real code I I calculated...
2017/03/17
[ "https://Stackoverflow.com/questions/42856659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7292389/" ]
Adding to the selected answer since it can feel somewhat complicated... (can't comment due to insufficient reputation and edit request rejected ¯\*(ツ)*/¯) `G.edges` returns a list of edges added to graph `G` (each edge represented by a ***tuple*** of two elements: the start node and the end node), setting its `data` a...
Put all the edge data in a list and then sort it with a custom key function (this is very easy to look up). NetworkX probably doesn't have any functionality to do what you want because it doesn't need to.
42,856,659
I a using NetworkX for a network analysis in python. I determine the weight for every edge and add that edge to the graph in the following way: ``` import matplotlib.pyplot as plt import networkx as nx import numpy as np airports = ['ATL','LAX','ORD'] weights = [500,200,150] #Note that in my real code I I calculated...
2017/03/17
[ "https://Stackoverflow.com/questions/42856659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7292389/" ]
Use: ``` edges=sorted(G.edges(data=True), key=lambda t: t[2].get('weight', 1)) ```
Adding to the selected answer since it can feel somewhat complicated... (can't comment due to insufficient reputation and edit request rejected ¯\*(ツ)*/¯) `G.edges` returns a list of edges added to graph `G` (each edge represented by a ***tuple*** of two elements: the start node and the end node), setting its `data` a...
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
C-Free is also a Nice one u can go for it
use Gcc with CodeBlocks, this is the best solution for C programming in Windows 7/8/Vista Get it from here. <http://www.codeblocks.org/downloads/26> But if you want to run Turbo C, you can do it via Dos Emulator DOS-Box (as answered by Chaitanya) However I will strongly recommend to use Code Blocks You may need to ...
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
GCC from either MinGW or Cygwin should work fine under Windows 7.
C-Free is also a Nice one u can go for it
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
[Microsoft Visual C++ 2010 Express](http://www.microsoft.com/express/Downloads/#2010-Visual-CPP), which is free.
[lcc-win32](http://www.cs.virginia.edu/~lcc-win32/) is a free compiler for Windows.
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
C-Free is also a Nice one u can go for it
[lcc-win32](http://www.cs.virginia.edu/~lcc-win32/) is a free compiler for Windows.
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
[Microsoft Visual C++ 2010 Express](http://www.microsoft.com/express/Downloads/#2010-Visual-CPP), which is free.
use Gcc with CodeBlocks, this is the best solution for C programming in Windows 7/8/Vista Get it from here. <http://www.codeblocks.org/downloads/26> But if you want to run Turbo C, you can do it via Dos Emulator DOS-Box (as answered by Chaitanya) However I will strongly recommend to use Code Blocks You may need to ...
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
You can get Turbo C working on Windows 7 with [DOSBox](http://www.dosbox.com/). Some of the applications where I work were made in-house years ago, and only work on operating systems that support full screen DOS applications, which means anything prior to Windows Vista. Since deploying Windows XP on new systems was not...
You can try [Qt Creator](http://qt.nokia.com/products/developer-tools/). As a bonus you'll get whole Qt, which is platform independent C++ GUI library.
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
GCC from either MinGW or Cygwin should work fine under Windows 7.
You can try [Qt Creator](http://qt.nokia.com/products/developer-tools/). As a bonus you'll get whole Qt, which is platform independent C++ GUI library.
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
You can get Turbo C working on Windows 7 with [DOSBox](http://www.dosbox.com/). Some of the applications where I work were made in-house years ago, and only work on operating systems that support full screen DOS applications, which means anything prior to Windows Vista. Since deploying Windows XP on new systems was not...
[lcc-win32](http://www.cs.virginia.edu/~lcc-win32/) is a free compiler for Windows.
200,435
I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate.
2010/10/17
[ "https://superuser.com/questions/200435", "https://superuser.com", "https://superuser.com/users/52642/" ]
You can get Turbo C working on Windows 7 with [DOSBox](http://www.dosbox.com/). Some of the applications where I work were made in-house years ago, and only work on operating systems that support full screen DOS applications, which means anything prior to Windows Vista. Since deploying Windows XP on new systems was not...
use Gcc with CodeBlocks, this is the best solution for C programming in Windows 7/8/Vista Get it from here. <http://www.codeblocks.org/downloads/26> But if you want to run Turbo C, you can do it via Dos Emulator DOS-Box (as answered by Chaitanya) However I will strongly recommend to use Code Blocks You may need to ...