qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
64,577,319
I have a working Postgres function that take a multi-line text parameter "\_list" and uses `regexp_split_to_table(TRIM(_list), '\r\n')` to create a table with each line of text as a row. I now want to call this from VB.NET reading the value from a textarea. I am using `pgCmd.Parameters.AddWithValue("_list", NpgsqlDbTy...
2020/10/28
[ "https://Stackoverflow.com/questions/64577319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3898389/" ]
`regex_split_to_table` looks to take a regex as its split matcher.. ..so just make it `regexp_split_to_table(TRIM(_list), '\r?\n')` (added a question mark after `\r`) so that it matches 0 or 1 carriage returns followed by a line feed when splitting. This way it doesn't matter if your program, or any other program, sup...
Using `pgCmd.Parameters.AddWithValue("_list", NpgsqlDbType.Text, my_list.Replace(vbLf, vbCrLf))` has solved the problem
20,415,231
**What am I trying to do?** Hi! I am writing a script that can accept 2 parameters, ComputerName and CheckWhatFile. The script will then access the computer (file server) specified by ComputerName and look for open file handles of CheckWhatFile. The problem is the script needs to be executed by an administrative user...
2013/12/06
[ "https://Stackoverflow.com/questions/20415231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201158/" ]
In order to meaningfully use a struct type, i.e in order to be able to access its contents, to define objects of that struct type, to know the size of that struct type you have to *define* that struct type. The definition has to be visible in every translation unit in which you want to use the struct type as mentioned ...
OP:My question is: why is it so common to define structs in header files? Structure that are used by multiple .c files need to share the same definition and so are in .h files. Structures that are local to a single .c file (making them effectively "static" or of local scope) should be declared in the .c file and not ...
70,679,346
I have a Parent Class Item and multiple child classes itemA, itemB etc. Now I want to have a method which takes 2 ArrayLists of the same classtype (for example itemA,itemA) and map the items based on a method in the parent class( so my idea was to make a method which takes in 2 Arraylists of the parent class so it acc...
2022/01/12
[ "https://Stackoverflow.com/questions/70679346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17271081/" ]
You need something like this: ``` <T extends Item> HashMap<T, T> mapping(ArrayList<T> prop1, ArrayList<T> prop2) { // ... } ``` then ``` Arraylist<ItemA> list1 = ...; ArrayList<ItemA> list2 = ...; HashMap<ItemA, ItemA> map = mapping(list1, list2); ``` Note that the typ...
```java <T extends Item> HashMap<T,T> mapping(ArrayList<T> prop1, ArrayList<T> prop2) { //Content of the method not that important } ```
32,541,864
I'm looking for the way to restart nested loop in java basically that is what I'm thinking: ``` for(int i = 0; i < value; i++) { for(int j = 0;j < value2;j++) { if(condition) { i=-1; break; } //some code here } } ``` But maybe you can suggest something better?
2015/09/12
[ "https://Stackoverflow.com/questions/32541864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4074767/" ]
This is my working code example that deletes, parses, and also updates table data automatically. ``` //delete records function func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if editingStyle == UITableViewCellEditingSty...
If you force unwrap an Optional that contains nil, your app will crash. Try using `?` to unwrap instead of `!`. (Same for `as?` vs `as!`) Maybe something like this? ``` func fetchAllObjectsFromLocalDatastore() { var query: PFQuery = PFQuery(className: "Note") query.fromLocalDatastore() query.whereKey("u...
16,984,106
I am developing an ASP.NET MVC application. The application runs perfectly. I can view, add, update and delete records, but when I run the unit tests, it shows an error on every test method. The error is: > > The underlying provider failed on Open. > > > Error details: > > {"Connection Timeout Expired. The t...
2013/06/07
[ "https://Stackoverflow.com/questions/16984106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1650894/" ]
This might not be an answer/solution to your actual problem, but a good tip in general. I strongly recommend not hitting the DB in every unit test, the same applies to the file system and other slow IO operations. Use a simple pattern like the [Repository Pattern](http://www.remondo.net/repository-pattern-example-c...
Unit Test, use don't hit the database. You use a mocking framework like Moq or RhinoMocks. If you are wanting to hit the database this is calling an integration test. Integration test are very time consuming, so tons of these cannot end up running through the night hours on automation , but a handful of them are good...
37,614,343
I am getting error > > 'Main': member names cannot be the same as their enclosing type while > executing this code. > > > This code is generated from a project migrated from VB6 to CSharp. Also, please let me know best way for code migration from VB6toCS ``` using System.ComponentModel; using System.Drawing; u...
2016/06/03
[ "https://Stackoverflow.com/questions/37614343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1796804/" ]
You `static void Main()` method conflicts with the `Main` class name. I would suggest to move the `Main` method to a separate class in a file named `Program.cs` (which is the standard). Something like this: ``` public class Program { [STAThread] public static void Main(string[] args) { Applicatio...
The error says it all. rename this to something else or rename the class. ``` [STAThread] static void Main() { Application.Run(new Main()); } ```
37,614,343
I am getting error > > 'Main': member names cannot be the same as their enclosing type while > executing this code. > > > This code is generated from a project migrated from VB6 to CSharp. Also, please let me know best way for code migration from VB6toCS ``` using System.ComponentModel; using System.Drawing; u...
2016/06/03
[ "https://Stackoverflow.com/questions/37614343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1796804/" ]
You `static void Main()` method conflicts with the `Main` class name. I would suggest to move the `Main` method to a separate class in a file named `Program.cs` (which is the standard). Something like this: ``` public class Program { [STAThread] public static void Main(string[] args) { Applicatio...
In a standard Windows Forms project, Program.cs looks just like your static main method. Here is an exert from a new project called "Test" I just made: ``` namespace Test { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThre...
4,130,205
For example, my src.tex is **SectionType \*p = NULL;** and I want it change to **section\_type \*p = NULL;** what I want to do is just change the **SectionType**, but remains the **NULL** unchanged, I used **y/[A-Z]/[a-z]**, but this will change all the line. My sed do not support \L,\l,\U and \u functions, it ver...
2010/11/09
[ "https://Stackoverflow.com/questions/4130205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/342348/" ]
I managed to do it by installing ClamWin on the Windows 2008 Server. (clamwin-0.97.6). I created the **eicar.txt** file in order to test detection: ``` X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* ``` Created **test.php** file: ``` <?php $file = 'C:/Users/Localadmin/Desktop/testfile/eicar.tx...
You can install clamav for windows (clamwin), and use php's passthru function to scan a file via commandline and get the output back. Parse it then display your message. You will have to adjust your php timeout value, or configure your application to upload, get the user to constantly refresh for the status while a bac...
23,802,882
Currently I am trying sending an uncompressed bitmap byte array to a third party library, when I get this byte array back I would like to convert it back to a Bitmap. Currently a working solution is to loop over the byte array and draw pixel by pixel into a bitmap but obviously the performance for this is terrible. T...
2014/05/22
[ "https://Stackoverflow.com/questions/23802882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034618/" ]
You could use [docx4j.NET](http://www.nuget.org/packages/docx4j.NET/3.0.1) That's a .NET version of docx4j, which is a Java library which converts docx to PDF using FOP. See [ConvertOutPDF.java](https://github.com/plutext/docx4j/blob/master/src/samples/docx4j/org/docx4j/samples/ConvertOutPDF.java) Before you go to t...
An ugly solution would be to make a "save as" using microsoft office interop... Read more [here](http://msdn.microsoft.com/en-us/library/bb412305%28v=office.12%29.aspx) And find the related stackoverflow post [here](https://stackoverflow.com/questions/3651880/save-open-xml-as-pdf)
23,802,882
Currently I am trying sending an uncompressed bitmap byte array to a third party library, when I get this byte array back I would like to convert it back to a Bitmap. Currently a working solution is to loop over the byte array and draw pixel by pixel into a bitmap but obviously the performance for this is terrible. T...
2014/05/22
[ "https://Stackoverflow.com/questions/23802882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034618/" ]
You could use [docx4j.NET](http://www.nuget.org/packages/docx4j.NET/3.0.1) That's a .NET version of docx4j, which is a Java library which converts docx to PDF using FOP. See [ConvertOutPDF.java](https://github.com/plutext/docx4j/blob/master/src/samples/docx4j/org/docx4j/samples/ConvertOutPDF.java) Before you go to t...
I have found one library that can convert XML to PDF in C#/.NET and vice versa known as **[Aspose.PDF for .NET](http://www.aspose.com/.net/pdf-component.aspx)** . I hope it will solve your problem.
38,549
Your gambling friend has come to stay with you and offers to play a game with you as many times as you wish: * He chooses an integer $x$ between $1$ and $9$ inclusive, and makes a wager of $\$1$ with you * You have a computer: + pick a uniformly distributed random integer, $n$, between $0$ and $10,000,000$ inclusive;...
2016/07/28
[ "https://puzzling.stackexchange.com/questions/38549", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/26864/" ]
Here's a simple proof: > > $\{\cdot\}$ denotes the fractional part. > > > > $\log\_{10}2$ is irrational, so $\{n\log\_{10}2\}$ is evenly distributed across $[0,1)$. The leading digit of $2^n$ is $\lfloor10^{\{n\log\_{10}2\}}\rfloor$, so it is $x$ iff $\{n\log\_{10}2\}$ is in the interval $[\log\_{10}x,\log\_{1...
For an answer to this question you can look up [Benford's law](https://en.wikipedia.org/wiki/Benford's_law) which describes a mathematical phenomenon that applies to all forms of naturally growing values. I don't know enough about it to provide a prove right now (maybe somebody else could do so) but the distribution s...
38,549
Your gambling friend has come to stay with you and offers to play a game with you as many times as you wish: * He chooses an integer $x$ between $1$ and $9$ inclusive, and makes a wager of $\$1$ with you * You have a computer: + pick a uniformly distributed random integer, $n$, between $0$ and $10,000,000$ inclusive;...
2016/07/28
[ "https://puzzling.stackexchange.com/questions/38549", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/26864/" ]
For an answer to this question you can look up [Benford's law](https://en.wikipedia.org/wiki/Benford's_law) which describes a mathematical phenomenon that applies to all forms of naturally growing values. I don't know enough about it to provide a prove right now (maybe somebody else could do so) but the distribution s...
A small simulation ($n$ up to 100,000) to demonstrate f'''s proof: 1: 30103, 2: 17611, 3: 12492, 4: 9692, 5: 7919, 6: 6695, 7: 5797, 8: 5116, 9: 4575. And in graph form: [![enter image description here](https://i.stack.imgur.com/Hc2q2.png)](https://i.stack.imgur.com/Hc2q2.png)
38,549
Your gambling friend has come to stay with you and offers to play a game with you as many times as you wish: * He chooses an integer $x$ between $1$ and $9$ inclusive, and makes a wager of $\$1$ with you * You have a computer: + pick a uniformly distributed random integer, $n$, between $0$ and $10,000,000$ inclusive;...
2016/07/28
[ "https://puzzling.stackexchange.com/questions/38549", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/26864/" ]
Here's a simple proof: > > $\{\cdot\}$ denotes the fractional part. > > > > $\log\_{10}2$ is irrational, so $\{n\log\_{10}2\}$ is evenly distributed across $[0,1)$. The leading digit of $2^n$ is $\lfloor10^{\{n\log\_{10}2\}}\rfloor$, so it is $x$ iff $\{n\log\_{10}2\}$ is in the interval $[\log\_{10}x,\log\_{1...
A small simulation ($n$ up to 100,000) to demonstrate f'''s proof: 1: 30103, 2: 17611, 3: 12492, 4: 9692, 5: 7919, 6: 6695, 7: 5797, 8: 5116, 9: 4575. And in graph form: [![enter image description here](https://i.stack.imgur.com/Hc2q2.png)](https://i.stack.imgur.com/Hc2q2.png)
13,040,725
I am trying to make my first iOS app after doing a few tutorials. I am making a simple headline/news reader that pulls New Orleans Saints headlines and stories as json from an ESPN API, displays the headlines in a table view, and then displays the text of the story in a detail view when the user taps a headline. The ...
2012/10/23
[ "https://Stackoverflow.com/questions/13040725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/821742/" ]
i would inject piece of js to be confident in resolving this issue: first of all locate element using DOM (verify in firebug): ![locating](https://i.stack.imgur.com/q6TiC.png) ``` public void jsClick(){ JavascriptExecutor js = (JavascriptExecutor) driver; StringBuilder stringBuilder = new StringBuild...
Are you sure that using this CSS-selector (`input[value=Search]`) on your page you have only one result?
13,040,725
I am trying to make my first iOS app after doing a few tutorials. I am making a simple headline/news reader that pulls New Orleans Saints headlines and stories as json from an ESPN API, displays the headlines in a table view, and then displays the text of the story in a detail view when the user taps a headline. The ...
2012/10/23
[ "https://Stackoverflow.com/questions/13040725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/821742/" ]
i would inject piece of js to be confident in resolving this issue: first of all locate element using DOM (verify in firebug): ![locating](https://i.stack.imgur.com/q6TiC.png) ``` public void jsClick(){ JavascriptExecutor js = (JavascriptExecutor) driver; StringBuilder stringBuilder = new StringBuild...
Please use the below code. driver.findElement(By.cssSelector("input[value=\"Search\"]")).click(); It works for me. And make sure that the name is "Search", coz it is case sensitive. Thanks
13,040,725
I am trying to make my first iOS app after doing a few tutorials. I am making a simple headline/news reader that pulls New Orleans Saints headlines and stories as json from an ESPN API, displays the headlines in a table view, and then displays the text of the story in a detail view when the user taps a headline. The ...
2012/10/23
[ "https://Stackoverflow.com/questions/13040725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/821742/" ]
i would inject piece of js to be confident in resolving this issue: first of all locate element using DOM (verify in firebug): ![locating](https://i.stack.imgur.com/q6TiC.png) ``` public void jsClick(){ JavascriptExecutor js = (JavascriptExecutor) driver; StringBuilder stringBuilder = new StringBuild...
single quotes are missing in your code, the **[value=Search]** should be replaced with **[value='Search']**. first you have to check if the selector u are using will work or not.. If you are using chrome or FF,you can follow these steps, 1. go to the page where button (to be clicked) is present, 2. open web console ...
13,040,725
I am trying to make my first iOS app after doing a few tutorials. I am making a simple headline/news reader that pulls New Orleans Saints headlines and stories as json from an ESPN API, displays the headlines in a table view, and then displays the text of the story in a detail view when the user taps a headline. The ...
2012/10/23
[ "https://Stackoverflow.com/questions/13040725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/821742/" ]
Please use the below code. driver.findElement(By.cssSelector("input[value=\"Search\"]")).click(); It works for me. And make sure that the name is "Search", coz it is case sensitive. Thanks
Are you sure that using this CSS-selector (`input[value=Search]`) on your page you have only one result?
13,040,725
I am trying to make my first iOS app after doing a few tutorials. I am making a simple headline/news reader that pulls New Orleans Saints headlines and stories as json from an ESPN API, displays the headlines in a table view, and then displays the text of the story in a detail view when the user taps a headline. The ...
2012/10/23
[ "https://Stackoverflow.com/questions/13040725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/821742/" ]
Please use the below code. driver.findElement(By.cssSelector("input[value=\"Search\"]")).click(); It works for me. And make sure that the name is "Search", coz it is case sensitive. Thanks
single quotes are missing in your code, the **[value=Search]** should be replaced with **[value='Search']**. first you have to check if the selector u are using will work or not.. If you are using chrome or FF,you can follow these steps, 1. go to the page where button (to be clicked) is present, 2. open web console ...
37,757,017
I am try do some error handling when it comes to connecting to a MySQL database. I want to separate out connection errors and SQL errors. Issue being is the error that is being returned doesn't seem to be a MySQL error but in fact a MS error. This is what I am doing: ``` using (MySqlConnection con = new MySqlConnectio...
2016/06/10
[ "https://Stackoverflow.com/questions/37757017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/968195/" ]
Why not perform catches on the different Exception Types that MySQL connector can thrown. (Not exact Exception types) like ``` try { }catch(MySqlConnectionException) { }catch(MySqlQueryException ) { } ``` You can catch and handle more than 1 type of exception, especially a general exception. Other than this you woul...
I am not aware of MySQL Exceptions, but you need to use more catch blocks. just go to definition of each method you used and there you can see what exceptions could be thrown by each method. then instead of using ``` catch (Exception x) { //Amazing error catching code } ``` use multiple catch block...
37,757,017
I am try do some error handling when it comes to connecting to a MySQL database. I want to separate out connection errors and SQL errors. Issue being is the error that is being returned doesn't seem to be a MySQL error but in fact a MS error. This is what I am doing: ``` using (MySqlConnection con = new MySqlConnectio...
2016/06/10
[ "https://Stackoverflow.com/questions/37757017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/968195/" ]
Why not perform catches on the different Exception Types that MySQL connector can thrown. (Not exact Exception types) like ``` try { }catch(MySqlConnectionException) { }catch(MySqlQueryException ) { } ``` You can catch and handle more than 1 type of exception, especially a general exception. Other than this you woul...
Just consider this as simple idea and if not needed, just ignore..There might be official way unlike this.. ``` catch (MySqlException ex) { if (ex.Message.Contains("connection")) { // do stuff when connection trouble } else { // do stuff when MySql trouble } } ``` Hope this helps....
212,058
I have Mystcraft and was thinking about creating a new Age with it where I can start from scratch with the option to retreat back to my original age if I want (particular if I want to rebuild some of my buildings). However, one of the things that would carry over between Ages would be the research I have done in Thaumc...
2015/03/31
[ "https://gaming.stackexchange.com/questions/212058", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/107009/" ]
In game this can be done with a simple command: `/thaumcraft research <playername> reset`, where `<playername>` is your Minecraft username.
If I understand what you are asking, yes you can reset your personal thaumcraft research without having to wipe the world. What you want to do is find the world folder for the current world you are playing on. If you are on a server you can find this folder at the root of install location of the server. If you are in ...
12,371,241
When I pass the season end date as a variable to this function I get this error: Warning: Division by zero ``` function win_percentage($season_start, $season_end) { $wins = mysql_query("SELECT COUNT(result) FROM scorecards WHERE result = 'Won' AND gamedate >= $season_start AND gamedate <= $season_end;"); $loss...
2012/09/11
[ "https://Stackoverflow.com/questions/12371241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1493031/" ]
You are trying to go into the wrong direction. A [release in maven is a particular version like 1.0.0](http://mojo.codehaus.org/versions-maven-plugin/version-rules.html) and it indicates that you have a defined state of that artifact. In your case you super pom has a particular state. If you are trying to define the ve...
Version ranges and expansion indeed do [not work for parent artifacts](http://jira.codehaus.org/browse/MNG-2199). Someone advised to invoke the version plugin instead : ``` mvn versions:update-parent ``` which does not cover exactly your need, but I am afraid there is no better workaround. Other ideas : using a SN...
8,138,512
Here is my code for my edit.html.erb: ``` <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script> <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script> <div class="row"> <br /> <div class="span12"> <h2>Main content</h2> <%= form_for(@post) do |f|...
2011/11/15
[ "https://Stackoverflow.com/questions/8138512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/417449/" ]
At the other answers mention, this should be handled by your CSS. Though it's difficult to know exactly without knowing the intracicies of your stylesheet, something like this: ``` .edit_post input[type=text], .edit_post textarea { width: 100%; /* or */ width: 450px; } ``` will probably work.
Inspect your CSS. This is a pure CSS issue and has nothing to do with Rails. (Bonus tip: Try Haml instead of ERb.)
8,138,512
Here is my code for my edit.html.erb: ``` <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script> <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script> <div class="row"> <br /> <div class="span12"> <h2>Main content</h2> <%= form_for(@post) do |f|...
2011/11/15
[ "https://Stackoverflow.com/questions/8138512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/417449/" ]
Try this: ``` <%= f.text_field :title, :style => "width:100px;" %> ``` It works for me and you can change the '100px' depend on your needs.
Inspect your CSS. This is a pure CSS issue and has nothing to do with Rails. (Bonus tip: Try Haml instead of ERb.)
8,138,512
Here is my code for my edit.html.erb: ``` <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script> <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script> <div class="row"> <br /> <div class="span12"> <h2>Main content</h2> <%= form_for(@post) do |f|...
2011/11/15
[ "https://Stackoverflow.com/questions/8138512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/417449/" ]
At the other answers mention, this should be handled by your CSS. Though it's difficult to know exactly without knowing the intracicies of your stylesheet, something like this: ``` .edit_post input[type=text], .edit_post textarea { width: 100%; /* or */ width: 450px; } ``` will probably work.
Well, you haven't specified any sort of widths, unless you did in your stylesheet, which you didn't include in your post. Are any of the lines wrapping (like the titles < h1 > or < h2 >) ? If they are and that's not what you want, you can add "white-space:nowrap:" to your h1/h2 styles in your stylesheet. I also noticed...
8,138,512
Here is my code for my edit.html.erb: ``` <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script> <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script> <div class="row"> <br /> <div class="span12"> <h2>Main content</h2> <%= form_for(@post) do |f|...
2011/11/15
[ "https://Stackoverflow.com/questions/8138512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/417449/" ]
Try this: ``` <%= f.text_field :title, :style => "width:100px;" %> ``` It works for me and you can change the '100px' depend on your needs.
Well, you haven't specified any sort of widths, unless you did in your stylesheet, which you didn't include in your post. Are any of the lines wrapping (like the titles < h1 > or < h2 >) ? If they are and that's not what you want, you can add "white-space:nowrap:" to your h1/h2 styles in your stylesheet. I also noticed...
8,138,512
Here is my code for my edit.html.erb: ``` <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script> <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script> <div class="row"> <br /> <div class="span12"> <h2>Main content</h2> <%= form_for(@post) do |f|...
2011/11/15
[ "https://Stackoverflow.com/questions/8138512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/417449/" ]
At the other answers mention, this should be handled by your CSS. Though it's difficult to know exactly without knowing the intracicies of your stylesheet, something like this: ``` .edit_post input[type=text], .edit_post textarea { width: 100%; /* or */ width: 450px; } ``` will probably work.
Try this: ``` <%= f.text_field :title, :style => "width:100px;" %> ``` It works for me and you can change the '100px' depend on your needs.
103,069
When I am connected to my local Ubuntu dev server with putty (from my Windows 7 box) via SSH, the following key combinations don't work to move the cursor forward and backward on word boundaries: * `Ctrl`+`Left Arrow` on the cursor pad * `Ctrl`+`Right Arrow` on the cursor pad The cursor only moves one character at a ...
2010/01/31
[ "https://superuser.com/questions/103069", "https://superuser.com", "https://superuser.com/users/26767/" ]
Add these two lines to your `~/.inputrc` file on the destination machine: ``` "\eOD": backward-word "\eOC": forward-word ``` To make sure that they are the correct sequences, at a Bash prompt, type `Ctrl`-`V` `Ctrl`-`LeftArrow` and `Ctrl`-`V` `Ctrl`-`RightArrow`, you should see: ``` ^[OD^[OC ``` When you start a ...
For the Linux console: ``` "\e[1~": beginning-of-line "\e[4~": end-of-line "\e[5~": beginning-of-history "\e[6~": end-of-history "\e[3~": delete-char "\e[2~": quoted-insert ``` [7.7. Creating the /etc/inputrc File](http://www.linuxfromscratch.org/lfs/view/6.5/chapter07/inputrc.html)
66,439,079
So i'm trying to use a MySQL view in Lavavel 8. The SQL works fine and creates a list of dates into the future (and the past) that i later plan to join Bookings or Calender blocks too. However, when Laravel Migrates the query to MYSQL, its doesn't work and throws this error.. ***Error Code: 1356. View 'ccc.calender\...
2021/03/02
[ "https://Stackoverflow.com/questions/66439079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15123510/" ]
Why not just bind your `<input />` to a `v-model`? Then where you want to get the count simply call a computed to get the count... So you would end up with something like this: ``` <characters-counter v-slot="{charactersCount}"> <div>{{ getCharacterCount }} Chars</div> <input v-model="myInput" type="text"> </...
Alternatively, you could pass the event listener from the custom component to its slot content as a slot prop (like you're already doing with `characterCount`): ```html <template> <label for="mySlot">My Custom Input</label> <slot id="mySlot" :characterCount="characterCount" :onCountCharacters="onCountChara...
35,875,423
I need to change the icon of a GMSMarker (on Google Maps) to an SVG image (which I'm requesting from the web), any idea how to do this? Ive seen a few libraries which can do this but unsure how to use them! I basically need to convert an SVG image to a UIImage!
2016/03/08
[ "https://Stackoverflow.com/questions/35875423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4011397/" ]
I don't have enough reputation to comment so I had to put this in an answer, so sorry if it sounds more like a comment: Anyway, You said you need to convert a SVG image to a UIImage. I've never done this, but I have created a UIImage from NSData before. Perhaps there is a way to convert the SVG to NSData and then to U...
Two potential methods. First, and easiest, is to export the SVG to PNG format. Most apps will allow that modification - on Mac you can use Sketch, for example. But it takes away the advantage of resolution-independent nature of SVG so it's not ideal. You could export PNG for various resolutions and ship 1x/2x/3x with ...
40,360,577
Consider the following highly simplified viewmodel for fetching and showing a list of projects: ``` public class ProjectListViewModel { private readonly IWebService _webService; public ICommand RefreshCommand { get; } // INotifyPropertyChanged implementation skipped for brevity public ObservableCollect...
2016/11/01
[ "https://Stackoverflow.com/questions/40360577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2978652/" ]
Your problem is here: ``` new Command(async () => await RefreshAsync()) ``` This `async` lambda is converted to an `async void` method by the compiler. In my article on [`async` best practices](https://msdn.microsoft.com/en-us/magazine/jj991977.aspx), I explain why the exception cannot be caught like this. `async` ...
Since async void (which is what the handler to your command is) is basically "fire and forget" and you can't await for it in the test I would suggest unit testing the RefreshAsync() method (you may want to make it internal or public), this can be easily done in NUnit: if you are asserting exceptions being thrown: ```...
36,307,720
I am creating a `UIWebview`. In UIWebview I have to delete few cookies. How to fin out the cookies file name? ``` -(void)saveHTTPCookies { NSMutableArray *cookieArray = [[NSMutableArray alloc] init]; NSArray *currentCookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]; NSUserDefaults *userDefaults = [...
2016/03/30
[ "https://Stackoverflow.com/questions/36307720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6043451/" ]
Your builder is not being used; you create and configure a builder, but then you send a plain message with 'sseEmitter.send' directly. Try this: ``` sseEmitter.send(SseEmitter.event().name("dapEvent").data("This " + i +" time."); ``` One more thing: Why do you call the send method already in the subscribe method? At...
You need to use the second constructor of *SseEmitter* which takes a *Long timeout* argument. Please refer the code below - ``` @RequestMapping("/subscribe") public SseEmitter subscribe() { SseEmitter sseEmitter = new SseEmitter(Long.MAX_VALUE) // for maximum timeout ``` Below is the copy of Java-doc of this const...
176,544
New to bash. The script I wrote works, but I don't believe it is written in the best way possible. The script only assesses how to execute the `aws ecr get-login` command depending on the parameters and versions of the `aws-cli` and `docker` currently installed on the host machine. ``` #!/usr/bin/env bash set -e d...
2017/09/26
[ "https://codereview.stackexchange.com/questions/176544", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/133619/" ]
Syntax errors ------------- ``` $aws_region = "--region $aws_region" ``` This is not how you set a variable in Bash. The correct syntax is ``` aws_region="--region $aws_region" ``` Likewise for the later statements. Note that there are no spaces before and after the `=`, and you drop the sigil before the variable...
To start with, you might want to modularize the script. Put your if conditions in separate functions doing the corresponding task of getting AWS region, registry\_id and options. Infact, you can put your functions in a separate file and include that in your bash script, if you see the use of those functions in scripts ...
25,396,314
Folks, I am trying to understand how to work with combination of peer nodes Part 1 of my question I need help with putting together xpath expression, in order to fill a collection only with links, which have span as a peer node (exists). a) Add to collection ``` <div style="font-weight:bold;padding-top:4px;padding...
2014/08/20
[ "https://Stackoverflow.com/questions/25396314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2472217/" ]
For your first question, this is fairly simplistic, but given your HTML, should work: ``` //div/span/../a ``` This will find `<div>`, which has `<span>` as a child, return to parent (which is `<div>`), then find `<a>`. For your second question: ``` //div/span[contains(@style, 'font-weight:') and not(contains(@styl...
Basically you can select `<div>` having `<span>` and `<a>` children, then get the `<a>` child this way : ``` //div[a and span]/a ``` You may want to add some filters (`[....]`) to be more specific as necessary. The 2nd requirement can use similar XPath, but with more specific filter for the `<span>` element, for exa...
38,615,742
I don't really know how to ask this via google, so I'll just do a description here. I am using excel, and I have a table like so ``` Pushups A B C 6/16/2016 45 35 6/17/2016 47 37 etc... ``` Basic pushups per day document. I know how to get my "best" day... ``` =max(B2:...) =max(C2:...) ``` How...
2016/07/27
[ "https://Stackoverflow.com/questions/38615742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1108761/" ]
``` =INDEX(A1:A4,MATCH(MAX(B1:B4),B1:B4,0)) ``` OR ``` =INDEX(A1:A4;MATCH(MAX(B1:B4);B1:B4;0)) ``` depending on Excel version and localization
Use the code below (modify **Column B** to whatever Column you are looking for the Maximum Value) ``` Option Explicit Sub Date_of_Max() Dim Row_Max As Long Dim Rng As Range ' modify your range here to whatever Column you want Set Rng = Range("B1:B" & Cells(Rows.Count, "B").End(xlUp).Row)...
5,193,648
I have this directory structure. ``` app/ src include lib/ src maincode/ main.cc Makefile ``` I want to generate automatic target from the source list in makefile. So I don't have to write rule for each file. Example ``` source=\ ../src/a.cpp ../src/ab.cp...
2011/03/04
[ "https://Stackoverflow.com/questions/5193648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428705/" ]
Edit: the find command should be inside a shell variable If you are using Linux, I think you can use: ``` SOURCES=$(shell find . -name *.cpp) OBJECTS=$(SOURCES:%.cpp=%.o) %.o: %.cpp <command to compile> ```
I like Sagar's answer, though it took me a bit to figure out I what I wanted for an additional rule to cause creation of the objects: ``` SOURCES=$(shell find . -name *.cpp) OBJECTS=$(SOURCES:%.cpp=%.o) all: $(OBJECTS) %.o: %.cpp <command to compile dependencies $< into target $@ > $< -o $...
5,193,648
I have this directory structure. ``` app/ src include lib/ src maincode/ main.cc Makefile ``` I want to generate automatic target from the source list in makefile. So I don't have to write rule for each file. Example ``` source=\ ../src/a.cpp ../src/ab.cp...
2011/03/04
[ "https://Stackoverflow.com/questions/5193648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428705/" ]
Edit: the find command should be inside a shell variable If you are using Linux, I think you can use: ``` SOURCES=$(shell find . -name *.cpp) OBJECTS=$(SOURCES:%.cpp=%.o) %.o: %.cpp <command to compile> ```
``` CPP = g++ CPPFLAGS = -Wall -pedantic -O2 -g -c SOURCES := ${wildcard *.cpp} OBJECTS := ${SOURCES:.cpp=.o} .PHONY: all clean .SUFFIXES: .cpp .o all: main main: $(OBJECTS) .cpp.o: $(CPP) $(CPPFLAGS) $< -o $@ clean: -rm -fv *.o ``` For more info see [the man](http://www.gn...
456,470
As you can easily see from the attached image and code, I numbered each equation manually using `\textbf`. How do you have to proceed to have a correct automatic numbering of this type with a correct alignment? Looking at the image and the code, each equation is not called by any command of type `\eqref` or `\ref`. I...
2018/10/23
[ "https://tex.stackexchange.com/questions/456470", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/117876/" ]
Here is an option where you insert the equation numbering manually (using `\insertmanualtag{<num>}`): [![enter image description here](https://i.stack.imgur.com/ajoYd.png)](https://i.stack.imgur.com/ajoYd.png) ``` \documentclass{article} \usepackage{mathtools,amssymb} \newcounter{manualtag}[equation] \renewcommand{...
I propose this, with some simplification of the code, and some improvements: ``` \documentclass{article} \usepackage{mathtools,amssymb} \begin{document} \begin{equation}\label{M1} \begin{dcases} \begin{aligned} \overline \nabla \cdot \,\overline{\!E} & =\frac{\rho}{\varepsilon_0} & & \textbf{(i)}& \overline \nabla...
17,330,539
So I have the following block of code inside a method: (all variables are local) ``` // ... try { if (postXml != null) using (StreamWriter writer = new StreamWriter(req.GetRequestStream())) writer.Write(postXml.ToString()); } catch (WebException ex) { HttpWebResponse response = ex.Response...
2013/06/26
[ "https://Stackoverflow.com/questions/17330539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/794067/" ]
One way would be to write a "safe" invocation method and pass a func to it: ``` public T SafeInvocation(Func<T> myMethod) { T result = default(T); try { // Invoke method result = myMethod(); } catch { // Do your common catch here } return result; } ``` Build ...
You could pass an `Action` into a function that handles the exceptions: ``` private void HandleErrorsFor(Action action) { try { action(); } catch (Exception ex) { //repeated exception handling... { } //... public void DoSomething() { HandleErrorsFor(() => { //try b...
17,330,539
So I have the following block of code inside a method: (all variables are local) ``` // ... try { if (postXml != null) using (StreamWriter writer = new StreamWriter(req.GetRequestStream())) writer.Write(postXml.ToString()); } catch (WebException ex) { HttpWebResponse response = ex.Response...
2013/06/26
[ "https://Stackoverflow.com/questions/17330539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/794067/" ]
One way would be to write a "safe" invocation method and pass a func to it: ``` public T SafeInvocation(Func<T> myMethod) { T result = default(T); try { // Invoke method result = myMethod(); } catch { // Do your common catch here } return result; } ``` Build ...
You can do something with delegates and cover both `try` and `catch` blocks: ``` static class Program { delegate void CodeBlock(); internal delegate void ExceptionCatcher(Exception ex); private static void Main() { CodeBlock b = () => { Console.WriteLine("HELLO WORLD"); }; Cod...
59,445
I’m new to this group. Can anyone please tell me the steps for setting up Yongnuo RF-603CII triggers with a Canon Speedlite 430EX, Yongnuo YN-560II, and a Canon 5D Mark II / Canon 6D? I just want to fire both flashes off-camera at the same time.
2015/01/16
[ "https://photo.stackexchange.com/questions/59445", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/37084/" ]
If you only have a single RF-603II, you cannot do this with those flashes. You will need at least two RF-603II triggers, and preferably three. The 430EX does not have any "dumb" optical slave modes, and the Canon "wireless" (near-infrared, wireless eTTL) does not work with Yongnuo's S1 and S2 optical slave modes (for t...
I use the same flash triggers with 3 yn-560II's. I have all of them set to manual with a trigger on the camera hotshoe and one on a flash. I then set the other 2 flashes only slave mode and this enables me to fire all 3 at the same time. Hope this helps you out. All the best, Leon
59,445
I’m new to this group. Can anyone please tell me the steps for setting up Yongnuo RF-603CII triggers with a Canon Speedlite 430EX, Yongnuo YN-560II, and a Canon 5D Mark II / Canon 6D? I just want to fire both flashes off-camera at the same time.
2015/01/16
[ "https://photo.stackexchange.com/questions/59445", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/37084/" ]
If you only have a single RF-603II, you cannot do this with those flashes. You will need at least two RF-603II triggers, and preferably three. The 430EX does not have any "dumb" optical slave modes, and the Canon "wireless" (near-infrared, wireless eTTL) does not work with Yongnuo's S1 and S2 optical slave modes (for t...
You will need your flashes set to slave mode (as was mentiond) and make sure you have your 603's all set to the same channel.
39,424,926
I have a private method in a controller and when I run the method and try echo out the results in my browser, it just dies. I get a white screen with no profiler on the bottom and nothing shows up in my error\_log. Here is my complete method. Note the "hello" does not echo out so it appears to die at the query. Also n...
2016/09/10
[ "https://Stackoverflow.com/questions/39424926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272643/" ]
If passing a list of integers works for you then just convert your hexadecimal representations into integers and put them in a list. Detailed steps: 1. Open a python interpreter 2. Import `serial`and open a serial port, call it `ser`. 3. Copy the code below and paste it in the python interpreter: The code: ``` comm...
[serial.to\_bytes](https://pyserial.readthedocs.io/en/latest/pyserial_api.html#serial.to_bytes) takes a sequence as input. You should remove double quotes around `value` to pass a sequence of integers instead of a `str` representing the sequence you want to pass: ``` value = [0x31, 0x0a, 0x32, 0x0a, 0x33, 0x0a] self.s...
26,855,627
I documents of the following form that I need to store in my Mongo database: ``` { "a.1": 1, "b.2": [ {"c.3": 3}, {"d.4":4} ] } ``` When I try to insert documents like this into Mongo it objects because Mongo doesn't allow periods in field names. How can I get around this limitation most ...
2014/11/11
[ "https://Stackoverflow.com/questions/26855627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1701170/" ]
As noted MongoDB does not allow this because it is reserved for ["dot notation"](http://docs.mongodb.org/manual/core/document/#document-dot-notation) which is a form for acessing "sub-field" information in either a plain sub-document or array member. Considering the following: ```js { "a": { "b": 1, ...
> > In some cases, you may wish to build a BSON object with a > user-provided key. In these situations, keys will need to substitute > the reserved $ and . characters. Any character is sufficient, but > consider using the Unicode full width equivalents: U+FF04 (i.e. “$”) > and U+FF0E (i.e. “.”). > > > So you c...
18,470,450
I'm trying to save a piture recovered from a byte[] on the asp.net server. Here is my code : ``` MemoryStream ms = new MemoryStream(cli.LOGO, 0, cli.LOGO.Length); ms.Write(cli.LOGO, 0, cli.LOGO.Length); string thePath = Server.MapPath("~/App_Data"); string wholePath = thePath + "\...
2013/08/27
[ "https://Stackoverflow.com/questions/18470450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1372320/" ]
you can overload `data()` and `setData()` functions from `QStandardItemModel`, then when user tries to edit item your `setData` will be called with `Qt::EditRole` and there you can do your processing. <http://qt-project.org/doc/qt-5.0/qtcore/qabstractitemmodel.html#setData>
If I understand you correctly, you want to check the value of an item at the time the user attempts to enter the edit mode? Using a delegate should work for this fairly well: ``` class MyItemDelegate : public QItemDelegate { public: QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option...
25,686,105
I've spend the last few hours trying to solve this, which i imagine is a easy fix. However i haven't been able to find the solution yet. In my grid im using: ``` AutoGenerateEditColumn="true" ``` When i press the Edit button in a row, i want to do a custom check in the RadGrid1\_UpdateCommand event. ``` <telerik:R...
2014/09/05
[ "https://Stackoverflow.com/questions/25686105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3871949/" ]
Please try with the below code snippet. ``` protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e) { GridEditableItem item = e.Item as GridEditableItem; int Id = Convert.ToInt32(item.GetDataKeyValue("Id").ToString()); //Access edit row ID value here -- using datakey string Name ...
In the event handler for `RadGrid1_UpdateCommand`, get the current item and then from there you can calculate the item's row index: ``` GridEditableItem editItem = e.Item as GridEditableItem; int myIndex = (editItem.RowIndex / 2) - 1; ``` The `RowIndex` value is a multiple of 2, and is sort of 1's based (starts at 1...
520,107
I implemented threading in my application for scraping websites. After all the sites are scraped I want to process them. form creates queueworker(which creates 2 workers and processes tasks). After all the tasks are done I want to process them baack in the formthread. At this point I accieved this with ``` public voi...
2009/02/06
[ "https://Stackoverflow.com/questions/520107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47351/" ]
Why are you doing the Join? I would raise a callback at the end of each thread - perhaps decrementing a counter. When the counter gets to 0, *then* call back to the UI thread and do the "all done" code; something like: ``` using System.Windows.Forms; using System.Threading; using System; class MyForm : Form { pub...
I fire a seperate event now when all tasks are done. I moved the logic for processing the tasks to a seperate function that will be called when receiving the AllUrlsScanned event.
11,790,824
I am in need of a component for drawing financial charts with the following features for my application: 1. Live plotting. 2. OHLC Chart, candlestick chart and previous day close chart. 3. Various Analysis studies. 4. Easy distribution with designing tools. Thank you.
2012/08/03
[ "https://Stackoverflow.com/questions/11790824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1216648/" ]
If you are developing *Windows Forms* or web applications, the open-source [Zedgraph](http://sourceforge.net/projects/zedgraph/) is a good solution. You can see examples of OHLC and candlestick charts [here](http://goorman.free.fr/ZedGraph/zedgraph.org/wiki/index1369.html?title=Bar_Charts). There is also sufficient des...
Highcharts or Highstock - <http://www.highcharts.com/> Highcharts or Highstock are used for web development though. Is that what you're after?
5,093,816
i have a textfield like this ``` <input type = "text" name ="text1" id ="text1" onchange="displayresult()"> function displayresult(){ alert("testing") } ``` It is giving object expected error in IE6.o . when we debug in mozilla it is pointing to function name in this way ``` `function onchange(event) { d...
2011/02/23
[ "https://Stackoverflow.com/questions/5093816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/400440/" ]
Going by your description and your example, I think your displayresult() function declaration is below the 'onchange' input text usage. The solution below uses the document.ready() event, and then uses the ID selector and .change() to register your 'onchange' needs. you can remove the onchange="displayresult();" in you...
If you are using jQuery - you should be able to just use selection via jQuery along with it's [change()](http://api.jquery.com/change/) to help you out, that way you wouldn't need the `displayresult()` in your input declaration. This should help out out: **Example:** ``` $(document).ready(function() { $('#text1')...
5,093,816
i have a textfield like this ``` <input type = "text" name ="text1" id ="text1" onchange="displayresult()"> function displayresult(){ alert("testing") } ``` It is giving object expected error in IE6.o . when we debug in mozilla it is pointing to function name in this way ``` `function onchange(event) { d...
2011/02/23
[ "https://Stackoverflow.com/questions/5093816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/400440/" ]
Going by your description and your example, I think your displayresult() function declaration is below the 'onchange' input text usage. The solution below uses the document.ready() event, and then uses the ID selector and .change() to register your 'onchange' needs. you can remove the onchange="displayresult();" in you...
You have not provided enough information to accurately determine why the error is occurring. I would guess that your function is not defined soon enough on the page. Also, you've tagged this question as jQuery related but in your code you are not referencing jQuery at all. If you want to use jQuery Rionmonster is corr...
172,549
I need to get all intefaces names in Arch linux. If I issue command ifconfig, I get following response: ``` [root@pi ~]# ifconfig eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt; mtu 1500 inet 192.168.0.154 netmask 255.255.255.0 broadcast 192.168.0.255 ether b8:27:eb:3c:03:fe txqueuelen 1000...
2014/12/10
[ "https://unix.stackexchange.com/questions/172549", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/40993/" ]
One way could be to use `ifconfig` with `-s` (short list), and cut out the part you need: ``` $ ifconfig -a -s Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 1374267176 0 116420 0 2848281091 0 0 0 BMRU lo 65536 0 761767047 0 ...
You can parse the output of `ifconfig`. This works on many unix variants. ``` ifconfig -a | sed -n 's/^\([[:alnum:]]*\):.*/\1/p' ``` If you don't mind being strictly Linux-only, you can use the simpler command ``` ls /sys/class/net/ ``` If you don't want to list interfaces that are down, use `ifconfig` instead of...
2,601,127
I am using Eclipse to develop a Blackberry Java application.Is possible to automatically increment version number on every build like its done in Visual Studio ?
2010/04/08
[ "https://Stackoverflow.com/questions/2601127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9350/" ]
If you use Ant under Eclipse, you can use the `<buildnumber>` task. See [here](http://www.rgagnon.com/javadetails/java-0532.html) for more details.
I prefer you can try using subversion <http://subversion.apache.org/> for project standard development. try using maven <http://maven.apache.org/>
152,564
Why is it important to have more than one person creating a game?
2017/12/27
[ "https://gamedev.stackexchange.com/questions/152564", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/110513/" ]
Depending on the scope of your game it comes down to what makes up for the final product. You have Mechanic/Gamelogic programmers Engine programmers (in house development) AI programmer Concept artists 3D Artists 2D Artists Music composers Animators game designers narrative designers/write...
I think there is a need for having more than one person creating a game because of there are three main tasks: Art Music Programming Which are so different between them. Also as @Sidar said you could need marketing people to help you too.
13,418,951
I need to pass variables found in parent class to the extended class, but all i get is a notice that the variables are undefined. I am not sure what is wrong and my gut says that this is an easy fix, but for some reason i can not see it. ``` <?php class trackem { public $hostnm; public $ip; public $info; public fun...
2012/11/16
[ "https://Stackoverflow.com/questions/13418951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1454271/" ]
You need to use them like this, you missed out the `$this->`: ``` $this->info; $this->ip; $this->hostnm; ``` Try this: ``` <?php class trackem { public $hostnm; public $ip; public $info; public function __construct() { } public function getNm() { $this->hostnm = gethostbyad...
``` class trackem { public $hostnm public $ip; public $info; public function __construct() { $this->hostnm = gethostbyaddr($_SERVER['REMOTE_ADDR']); $this->ip = $_SERVER['SERVER_ADDR']; $this->info = get_browser(null, true); } } class trackem2file extends trackem { ...
17,932,396
I have a class with properties in it (let say the name of the class file is `inputvar`), I use it as the input argument for two different functions, which have an exactly the same calculation, but a little bit different code, which I'll explain later. For the first function (let say the name is myfun1), I wrote the i...
2013/07/29
[ "https://Stackoverflow.com/questions/17932396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2631573/" ]
In SQL Server 2005/2008, you'll need to use a row number, as Maurice mentioned. The LIMIT syntax unfortunately doesn't work. The query will look like this (assuming you want to order by date) ``` WITH numbered AS ( SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name...
Indeed the fastest for sql server is ``` SELECT col1, col2 FROM ( SELECT col1, col2, ROW_NUMBER() OVER (ORDER BY ID) AS RowNum FROM MyTable ) AS MyDerivedTable WHERE MyDerivedTable.RowNum BETWEEN @startRow AND @endRow ``` Take a look [here](https://web.archive.org/web/20210506081930/http://www.4guysfromrol...
17,932,396
I have a class with properties in it (let say the name of the class file is `inputvar`), I use it as the input argument for two different functions, which have an exactly the same calculation, but a little bit different code, which I'll explain later. For the first function (let say the name is myfun1), I wrote the i...
2013/07/29
[ "https://Stackoverflow.com/questions/17932396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2631573/" ]
In SQL Server 2005/2008, you'll need to use a row number, as Maurice mentioned. The LIMIT syntax unfortunately doesn't work. The query will look like this (assuming you want to order by date) ``` WITH numbered AS ( SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name...
Use ROW\_NUMBER() function in t-sql. See [MSDN](http://msdn.microsoft.com/en-us/library/ms186734.aspx) ``` USE AdventureWorks2012; GO WITH OrderedOrders AS ( SELECT SalesOrderID, OrderDate, ROW_NUMBER() OVER (ORDER BY OrderDate) AS RowNumber FROM Sales.SalesOrderHeader ) SELECT SalesOrderID, OrderDate, R...
17,932,396
I have a class with properties in it (let say the name of the class file is `inputvar`), I use it as the input argument for two different functions, which have an exactly the same calculation, but a little bit different code, which I'll explain later. For the first function (let say the name is myfun1), I wrote the i...
2013/07/29
[ "https://Stackoverflow.com/questions/17932396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2631573/" ]
In SQL Server 2005/2008, you'll need to use a row number, as Maurice mentioned. The LIMIT syntax unfortunately doesn't work. The query will look like this (assuming you want to order by date) ``` WITH numbered AS ( SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name...
If you happen to be using SQL Server 2012 you can use `OFFSET` and `FETCH` for paging, but they require an `ORDER BY` clause : ``` SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name, Comments.[text] FROM Comments INNER JOIN Posts ON Comments.postId = Posts.Id WHERE Comments.approved = 0 ORDER BY [d...
17,932,396
I have a class with properties in it (let say the name of the class file is `inputvar`), I use it as the input argument for two different functions, which have an exactly the same calculation, but a little bit different code, which I'll explain later. For the first function (let say the name is myfun1), I wrote the i...
2013/07/29
[ "https://Stackoverflow.com/questions/17932396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2631573/" ]
If you happen to be using SQL Server 2012 you can use `OFFSET` and `FETCH` for paging, but they require an `ORDER BY` clause : ``` SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name, Comments.[text] FROM Comments INNER JOIN Posts ON Comments.postId = Posts.Id WHERE Comments.approved = 0 ORDER BY [d...
Indeed the fastest for sql server is ``` SELECT col1, col2 FROM ( SELECT col1, col2, ROW_NUMBER() OVER (ORDER BY ID) AS RowNum FROM MyTable ) AS MyDerivedTable WHERE MyDerivedTable.RowNum BETWEEN @startRow AND @endRow ``` Take a look [here](https://web.archive.org/web/20210506081930/http://www.4guysfromrol...
17,932,396
I have a class with properties in it (let say the name of the class file is `inputvar`), I use it as the input argument for two different functions, which have an exactly the same calculation, but a little bit different code, which I'll explain later. For the first function (let say the name is myfun1), I wrote the i...
2013/07/29
[ "https://Stackoverflow.com/questions/17932396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2631573/" ]
If you happen to be using SQL Server 2012 you can use `OFFSET` and `FETCH` for paging, but they require an `ORDER BY` clause : ``` SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name, Comments.[text] FROM Comments INNER JOIN Posts ON Comments.postId = Posts.Id WHERE Comments.approved = 0 ORDER BY [d...
Use ROW\_NUMBER() function in t-sql. See [MSDN](http://msdn.microsoft.com/en-us/library/ms186734.aspx) ``` USE AdventureWorks2012; GO WITH OrderedOrders AS ( SELECT SalesOrderID, OrderDate, ROW_NUMBER() OVER (ORDER BY OrderDate) AS RowNumber FROM Sales.SalesOrderHeader ) SELECT SalesOrderID, OrderDate, R...
44,215,165
I am having trouble with positioning for the ul div. I tried floating it to the left to position it there. But it went underneath the header, container and navbar div. And the divs are all entirely above the ul div. Why? ```css html { height: 100%; } body { height: 100%; width: 100%; background-color: g...
2017/05/27
[ "https://Stackoverflow.com/questions/44215165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6417543/" ]
You can add the URIs that should be excluded from verification to the `$except` property in the `VerifyCsrfToken` middleware. ``` <?php namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; class VerifyCsrfToken extends BaseVerifier { /** * The URIs that ...
You can exclude URI, to which reuqest from another application is send, from CSRF protection. This is described in doc [here](https://laravel.com/docs/5.4/csrf#csrf-excluding-uris)
19,784,133
I know that question is a little stupid. But i have next problem: I do obfuscation of my HTML code by <http://myobfuscate.com/> , as you can see this site do like this: he creat varriables and put on it JS code. Here is code like this: ``` var lOOL = 'document.write()'; ``` than it print on page by eval(). So if i w...
2013/11/05
[ "https://Stackoverflow.com/questions/19784133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2051503/" ]
In general you should minizmize the javascript in static files on the server one time only. Also I suggest you don't use any code from myobfuscate.com as it has really poor reputation on [Web Of Trust](https://www.mywot.com/en/scorecard/myobfuscate.com?utm_source=addon&utm_content=warn-viewsc) and is blacklisted by AV ...
To do this you need to change the code provided by <http://myobfuscate.com/>. 1. Replace the eval function with a your function. I used newEval in the example below. 2. Create a new function to replace eval. add this code to it. function newEval(code, target) { code = code.replace(/document.write(/, "myWrite('" + ta...
19,784,133
I know that question is a little stupid. But i have next problem: I do obfuscation of my HTML code by <http://myobfuscate.com/> , as you can see this site do like this: he creat varriables and put on it JS code. Here is code like this: ``` var lOOL = 'document.write()'; ``` than it print on page by eval(). So if i w...
2013/11/05
[ "https://Stackoverflow.com/questions/19784133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2051503/" ]
you may use append function of jquery. [jquery append](http://api.jquery.com/append/) ``` $('#asd').append( "<p>put your html here</p>" ); ```
To do this you need to change the code provided by <http://myobfuscate.com/>. 1. Replace the eval function with a your function. I used newEval in the example below. 2. Create a new function to replace eval. add this code to it. function newEval(code, target) { code = code.replace(/document.write(/, "myWrite('" + ta...
19,784,133
I know that question is a little stupid. But i have next problem: I do obfuscation of my HTML code by <http://myobfuscate.com/> , as you can see this site do like this: he creat varriables and put on it JS code. Here is code like this: ``` var lOOL = 'document.write()'; ``` than it print on page by eval(). So if i w...
2013/11/05
[ "https://Stackoverflow.com/questions/19784133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2051503/" ]
``` document.getElementById("yourdiv").innerHTML = "Your Message"; ```
To do this you need to change the code provided by <http://myobfuscate.com/>. 1. Replace the eval function with a your function. I used newEval in the example below. 2. Create a new function to replace eval. add this code to it. function newEval(code, target) { code = code.replace(/document.write(/, "myWrite('" + ta...
75,280
This America's Test Kitchen recipe for [Slow Cooker Chicken with "Roasted" Garlic Sauce](https://www.americastestkitchen.com/recipes/9218-slow-cooker-chicken-with-roasted-garlic-sauce) has the ingredient: > > bone-in split chicken breasts, skin and ribs removed, trimmed of all visible fat > > > The skin and ribs...
2016/11/05
[ "https://cooking.stackexchange.com/questions/75280", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/33128/" ]
Bone in = the breast plate is still there. The ribs would typically be removed because in slow cooking the rib bones often have a habit of coming loose and being an annoyance or even a choking hazard while adding little or nothing to the taste. Leaving the breast plate however is referred to by many as cooking on the c...
The recipe writer probably only had bone in chicken, and wrote up exactly what he did, avoiding having to buy a boneless chicken and retest the recipe. While this sounds facetious, it probably is often the reason for "awkward" ingredients in recipes - and preferrable to writing a substitute into a recipe and still cal...
10,496
This question is an off-shoot of this Meta question focused on the deletion, and consequently on the closure, of a particular single-word-request question. * [Deleted Upvoted and Popular Question: Why?](https://english.meta.stackexchange.com/questions/10493/deleted-upvoted-and-popular-question-why) The [question bein...
2017/07/09
[ "https://english.meta.stackexchange.com/questions/10496", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/228732/" ]
Before asking a question on EL&U, the querent should perform a detailed search on the Internet, failing that, even a perfunctory one is better than none at all. The OP should explain *exactly*, and in detail, what they need, citing any solutions they discarded during their research (and explaining why) before asking as...
As with our other standardized closure reasons, the general guidance is currently stated in the closure reason: > > too broad — There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a fe...
113,816
I'm periodically getting data from an external partner that is bound to a very large fishnet (vector grid) in shapefile format. The fishnet itself sits at around 400~ megabytes, but the only data that ever changes is the tabular data in the database file. So can you safely just swap the database file instead of redown...
2014/09/15
[ "https://gis.stackexchange.com/questions/113816", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/36814/" ]
Shp+shx is connected with dbf only by row number. If the order of features in shp remains the same you can just change dbf to a new version. But if shape number 1 gets written as the last feature in shp and #2 becomes #1 you will have all attributes wrong. Very dangerous. But perhaps, if the data provider writes an sta...
That depends entirely upon how they prepare the SHP file. If sequence of records could change, then your hack won't work. If you are certain it is the same SHP+SHX file, then you can of course skip downloading it - that is no different from any other file that is the same as what you already have.
113,816
I'm periodically getting data from an external partner that is bound to a very large fishnet (vector grid) in shapefile format. The fishnet itself sits at around 400~ megabytes, but the only data that ever changes is the tabular data in the database file. So can you safely just swap the database file instead of redown...
2014/09/15
[ "https://gis.stackexchange.com/questions/113816", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/36814/" ]
Shp+shx is connected with dbf only by row number. If the order of features in shp remains the same you can just change dbf to a new version. But if shape number 1 gets written as the last feature in shp and #2 becomes #1 you will have all attributes wrong. Very dangerous. But perhaps, if the data provider writes an sta...
Your workflow could be simplified if you connect the static geographical data with the changing database by a JOIN command. Details depends on the software you use. You need a unique field in both data to connect them.
27,612,585
Suppose that I want to check all parameters of a method for negativity. I could do something like this: ``` public class test{ public test(double a, double b, int c, int d, long e , long f){ // check parameter correctness checkNegParam(a,"1"); checkNegParam(b,"2"); checkNegParam(c...
2014/12/23
[ "https://Stackoverflow.com/questions/27612585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386969/" ]
I would recommend that you stick to using named parameters. Consider the implications if you add a new (possibly positive) parameter at a position other than the end, and forget to update your check to reflect that this can be a positive value. You will waste a lot of time debugging this. If other people have to us...
If you can get all of your arguments in a array or any collection, then you can loop over them and check it that way: ``` public class test{ public void test(double[] args) throws IllegalArgumentException{ for(int i = 0; i < args.length; i++){ if(args[i] < 0) throw new IllegalArgumentException(...
27,612,585
Suppose that I want to check all parameters of a method for negativity. I could do something like this: ``` public class test{ public test(double a, double b, int c, int d, long e , long f){ // check parameter correctness checkNegParam(a,"1"); checkNegParam(b,"2"); checkNegParam(c...
2014/12/23
[ "https://Stackoverflow.com/questions/27612585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386969/" ]
I would recommend that you stick to using named parameters. Consider the implications if you add a new (possibly positive) parameter at a position other than the end, and forget to update your check to reflect that this can be a positive value. You will waste a lot of time debugging this. If other people have to us...
The following piece of code might help you with a more general way of finding negative parameters: ``` private void assertNotNegative(Number... numbers) { for (int i = 0; i < numbers.length; i++) { if (Math.signum(numbers[i].doubleValue()) < 0) { throw new IllegalStateException("Negative argume...
27,612,585
Suppose that I want to check all parameters of a method for negativity. I could do something like this: ``` public class test{ public test(double a, double b, int c, int d, long e , long f){ // check parameter correctness checkNegParam(a,"1"); checkNegParam(b,"2"); checkNegParam(c...
2014/12/23
[ "https://Stackoverflow.com/questions/27612585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386969/" ]
If you can get all of your arguments in a array or any collection, then you can loop over them and check it that way: ``` public class test{ public void test(double[] args) throws IllegalArgumentException{ for(int i = 0; i < args.length; i++){ if(args[i] < 0) throw new IllegalArgumentException(...
The following piece of code might help you with a more general way of finding negative parameters: ``` private void assertNotNegative(Number... numbers) { for (int i = 0; i < numbers.length; i++) { if (Math.signum(numbers[i].doubleValue()) < 0) { throw new IllegalStateException("Negative argume...
34,828,401
I am trying to create a border with round corners on transparent button like this: ![enter image description here](https://i.stack.imgur.com/VhZnN.png) here is my transparent.xml ``` <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@...
2016/01/16
[ "https://Stackoverflow.com/questions/34828401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5498233/" ]
Try this ``` <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item><shape> <stroke android:width="1dp" android:color="#000000" /> <solid android:color="@android:color/transparent" /> <corners androi...
[enter image description here](https://i.stack.imgur.com/fDEE4.png) This is way to answer your question: ``` <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <stroke android:width="1dp" android:color="@color/white" />...
35,070,132
Currently using Visual Studio 2015 to build a web service application using .NET 4.0. My interface class has 1 method that I want exposed on the service: ``` public interface IEvaluateGroupService{ [OperationContract] EvaluateGroupResponse EvalGroup(EvaluateGroupRequest _request) } ``` EvaluateGroupRespo...
2016/01/28
[ "https://Stackoverflow.com/questions/35070132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5627681/" ]
I think you are missing DataMember attribute..... ``` [DataMember] public DateTime? EndDate { get { return endDate; } set { endDate = value; } } ```
You need to decorate the fields in your requests/responses with the `[DataMember]` attribute. You used to have to add the `DataContract` attribute to the class, but that is now added by default. However, WCF doesn't assume the fields are accessible. ``` [DataContract] public class MyResponse { [DataMember] pu...
18,564,291
What I want to do is to create a simple contact form. I have a file called contact.php with the simple html form: ``` <form action="process-contact.php" method="post"> <input type="text" name="name" placeholder="Nombre*"> <input type="text" name="company" placeholder="Compañía"> <input type="text" name="po...
2013/09/02
[ "https://Stackoverflow.com/questions/18564291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1289302/" ]
You can put everything inside one file and using `action=""` Your headers had errors in them and by using those, the Email ended up in my SPAM box, so I changed those with proper headers and put other details using the `$message` variable. I added `header('Location: thank_you.php');` and will redirect to that page if...
Set the `action` attribute of the form to the name of the file containing the form and php code and then include all your form processing php code in the following conditional. ``` if(count($_POST)) > 0) ``` This will make sure the php code runs only when the form is submitted.
18,564,291
What I want to do is to create a simple contact form. I have a file called contact.php with the simple html form: ``` <form action="process-contact.php" method="post"> <input type="text" name="name" placeholder="Nombre*"> <input type="text" name="company" placeholder="Compañía"> <input type="text" name="po...
2013/09/02
[ "https://Stackoverflow.com/questions/18564291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1289302/" ]
You can put everything inside one file and using `action=""` Your headers had errors in them and by using those, the Email ended up in my SPAM box, so I changed those with proper headers and put other details using the `$message` variable. I added `header('Location: thank_you.php');` and will redirect to that page if...
You'll want to use the isset feature of PHP, perhaps. ``` $name = $_POST['name']; if(isset($name) && $name != ''){ blah.... } else { blah... } ```
1,499,448
Prove that in a bit string, the string 0 1 occurs at most one more time than the string 1 0. SO - I understand that if the string begins with a 0 and ends with a 0 or starts and ends with a 1, there will be an equal number of 01's and 10's. And that if it starts with a 0 but ends with a 1, there will be one more 01 th...
2015/10/27
[ "https://math.stackexchange.com/questions/1499448", "https://math.stackexchange.com", "https://math.stackexchange.com/users/266529/" ]
$x = $ # of ten dollar bills $2x = $ # of 1 dollar bills $2x - 2 = $ # of 5 dollar bills $25 - x - 2x - (2x + 2) = $ # of 20 dollar bills so $140 = 1(2x) + 5(2x - 2) + 10x + 20(25 - x - 2x -(2x + 2))$ Solve for $x$.
The following image shows another way to represent the problem in terms of algebraic symbols. It includes manipulations of the symbols to arrive at the solution. "The math" behind the manipulations are the "generally accepted definitions, laws, and theorems" for the set of Integers. [The image is also available in PDF ...
47,972,006
I'm trying to join 2 tables where I need to show only 3 columns from the second one where another column is used as a comparison. For example: Table one is called employee: it has a column called user\_id and some other columns Table two is called people: it has a column called user\_id which included some of the em...
2017/12/25
[ "https://Stackoverflow.com/questions/47972006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6152320/" ]
You can try this query: ``` SELECT p.userid, p.firstname, p.lastname, p.email FROM people as p, employee as emp WHERE p.userid = emp.userid ```
Looking at your script, it looks like you'll run into ambiguous columns in at least your userid. You want to explicitly tell SQL where the column comes from like in your WHERE clause if there are columns sharing the same name between the two tables. ``` SELECT userid, -- AMBIGUOUS firstname, lastname, email ...
47,972,006
I'm trying to join 2 tables where I need to show only 3 columns from the second one where another column is used as a comparison. For example: Table one is called employee: it has a column called user\_id and some other columns Table two is called people: it has a column called user\_id which included some of the em...
2017/12/25
[ "https://Stackoverflow.com/questions/47972006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6152320/" ]
You can try this query: ``` SELECT p.userid, p.firstname, p.lastname, p.email FROM people as p, employee as emp WHERE p.userid = emp.userid ```
For this issue you can use this query let suppose that I have a users table where a user have zero to one profile picture I need the user (Name,LastName,BirthDate) for users who have no profile picture I can use this query ``` select * from user c where NOT EXISTS ( select 1 from photo p where p.id = ...
47,972,006
I'm trying to join 2 tables where I need to show only 3 columns from the second one where another column is used as a comparison. For example: Table one is called employee: it has a column called user\_id and some other columns Table two is called people: it has a column called user\_id which included some of the em...
2017/12/25
[ "https://Stackoverflow.com/questions/47972006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6152320/" ]
You can try this query: ``` SELECT p.userid, p.firstname, p.lastname, p.email FROM people as p, employee as emp WHERE p.userid = emp.userid ```
i think this query will solve your problem ``` insert into table1 (clmn_1,clmn_2,clmn_3) SELECT clmn_1,clmn_2,clmn_3 FROM table2 where id = value ```
47,972,006
I'm trying to join 2 tables where I need to show only 3 columns from the second one where another column is used as a comparison. For example: Table one is called employee: it has a column called user\_id and some other columns Table two is called people: it has a column called user\_id which included some of the em...
2017/12/25
[ "https://Stackoverflow.com/questions/47972006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6152320/" ]
Looking at your script, it looks like you'll run into ambiguous columns in at least your userid. You want to explicitly tell SQL where the column comes from like in your WHERE clause if there are columns sharing the same name between the two tables. ``` SELECT userid, -- AMBIGUOUS firstname, lastname, email ...
i think this query will solve your problem ``` insert into table1 (clmn_1,clmn_2,clmn_3) SELECT clmn_1,clmn_2,clmn_3 FROM table2 where id = value ```
47,972,006
I'm trying to join 2 tables where I need to show only 3 columns from the second one where another column is used as a comparison. For example: Table one is called employee: it has a column called user\_id and some other columns Table two is called people: it has a column called user\_id which included some of the em...
2017/12/25
[ "https://Stackoverflow.com/questions/47972006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6152320/" ]
For this issue you can use this query let suppose that I have a users table where a user have zero to one profile picture I need the user (Name,LastName,BirthDate) for users who have no profile picture I can use this query ``` select * from user c where NOT EXISTS ( select 1 from photo p where p.id = ...
i think this query will solve your problem ``` insert into table1 (clmn_1,clmn_2,clmn_3) SELECT clmn_1,clmn_2,clmn_3 FROM table2 where id = value ```
52,888,340
I have prepared a custom form in Kentico and it has around 15 fields. when I submit the form it creates a long query string which results an error - **The request filtering module is configured to deny a request where the query string is too long.** Am I doing something wrong while setting the form?
2018/10/19
[ "https://Stackoverflow.com/questions/52888340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2060962/" ]
Just to updated everyone. The HTML on the master page contain another tag for search box, which is typical for designers to do not knowing .NET doesn't like other tags. And KC added another tag wrapping the biz-form layout which led to the postback error. Once those tags are removed, all works fine.
When getting the query string is too long error it usually means that the query string exceeded its maximum query-string size, You could try increase the maximum query-string size by setting the maxQueryString attribute in the request filtering section in your web.config. ``` <system.webServer> <security> ...
52,888,340
I have prepared a custom form in Kentico and it has around 15 fields. when I submit the form it creates a long query string which results an error - **The request filtering module is configured to deny a request where the query string is too long.** Am I doing something wrong while setting the form?
2018/10/19
[ "https://Stackoverflow.com/questions/52888340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2060962/" ]
Just to updated everyone. The HTML on the master page contain another tag for search box, which is typical for designers to do not knowing .NET doesn't like other tags. And KC added another tag wrapping the biz-form layout which led to the postback error. Once those tags are removed, all works fine.
Are you using [request filtering module](https://devnet.kentico.com/marketplace/modules/kentico-request-filtering-module) from market place by any chance? Try to disable it or uninstall to see if it changes the situation. It must be some settings in there or a rule.
13,731,798
Assume that we have the following `struct` definition that uses generics: ``` public struct Foo<T> { public T First; public T Second; public Foo(T first) { this.First = first; } } ``` The compiler says > > 'Foo.Second' must be fully assigned before control is returned to the caller ...
2012/12/05
[ "https://Stackoverflow.com/questions/13731798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822588/" ]
That is because a compiler rule enforces that all fields in a struct must be assigned before control leaves any constructor. You can get your code working by doing this: ``` public Foo(T first) { this.First = first; this.Second = default(T); } ``` Also see [Why Must I Initialize All Fields in my C# struct w...
That's a requirement of structs in general -- it has nothing to do with generics. Your constructor must assign a value to all fields. Note the same error happens here: ``` struct Foo { public int A; public int B; public Foo() { A = 1; } } ```
13,731,798
Assume that we have the following `struct` definition that uses generics: ``` public struct Foo<T> { public T First; public T Second; public Foo(T first) { this.First = first; } } ``` The compiler says > > 'Foo.Second' must be fully assigned before control is returned to the caller ...
2012/12/05
[ "https://Stackoverflow.com/questions/13731798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822588/" ]
That's a requirement of structs in general -- it has nothing to do with generics. Your constructor must assign a value to all fields. Note the same error happens here: ``` struct Foo { public int A; public int B; public Foo() { A = 1; } } ```
Because it is a rule in C# that all fields must be assigned for structs (inline or in constructor). This is because of a struct nature. It has nothing about generic it or not generic.
13,731,798
Assume that we have the following `struct` definition that uses generics: ``` public struct Foo<T> { public T First; public T Second; public Foo(T first) { this.First = first; } } ``` The compiler says > > 'Foo.Second' must be fully assigned before control is returned to the caller ...
2012/12/05
[ "https://Stackoverflow.com/questions/13731798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822588/" ]
That's a requirement of structs in general -- it has nothing to do with generics. Your constructor must assign a value to all fields. Note the same error happens here: ``` struct Foo { public int A; public int B; public Foo() { A = 1; } } ```
The other answers explain the behaviour correctly, but neglect to mention the second part of your question, so here it is for completion. For classes, when you don't explicitly define a constructor, the compiler will produce a default constructor which assigns default values (e.g. `null` for objects, `0` for numbers e...
13,731,798
Assume that we have the following `struct` definition that uses generics: ``` public struct Foo<T> { public T First; public T Second; public Foo(T first) { this.First = first; } } ``` The compiler says > > 'Foo.Second' must be fully assigned before control is returned to the caller ...
2012/12/05
[ "https://Stackoverflow.com/questions/13731798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822588/" ]
That is because a compiler rule enforces that all fields in a struct must be assigned before control leaves any constructor. You can get your code working by doing this: ``` public Foo(T first) { this.First = first; this.Second = default(T); } ``` Also see [Why Must I Initialize All Fields in my C# struct w...
Because it is a rule in C# that all fields must be assigned for structs (inline or in constructor). This is because of a struct nature. It has nothing about generic it or not generic.
13,731,798
Assume that we have the following `struct` definition that uses generics: ``` public struct Foo<T> { public T First; public T Second; public Foo(T first) { this.First = first; } } ``` The compiler says > > 'Foo.Second' must be fully assigned before control is returned to the caller ...
2012/12/05
[ "https://Stackoverflow.com/questions/13731798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822588/" ]
That is because a compiler rule enforces that all fields in a struct must be assigned before control leaves any constructor. You can get your code working by doing this: ``` public Foo(T first) { this.First = first; this.Second = default(T); } ``` Also see [Why Must I Initialize All Fields in my C# struct w...
The other answers explain the behaviour correctly, but neglect to mention the second part of your question, so here it is for completion. For classes, when you don't explicitly define a constructor, the compiler will produce a default constructor which assigns default values (e.g. `null` for objects, `0` for numbers e...
13,731,798
Assume that we have the following `struct` definition that uses generics: ``` public struct Foo<T> { public T First; public T Second; public Foo(T first) { this.First = first; } } ``` The compiler says > > 'Foo.Second' must be fully assigned before control is returned to the caller ...
2012/12/05
[ "https://Stackoverflow.com/questions/13731798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822588/" ]
Because it is a rule in C# that all fields must be assigned for structs (inline or in constructor). This is because of a struct nature. It has nothing about generic it or not generic.
The other answers explain the behaviour correctly, but neglect to mention the second part of your question, so here it is for completion. For classes, when you don't explicitly define a constructor, the compiler will produce a default constructor which assigns default values (e.g. `null` for objects, `0` for numbers e...
54,961
Column [![enter image description here](https://i.stack.imgur.com/iE0Ku.png)](https://i.stack.imgur.com/iE0Ku.png) and wanted to check with this list ``` list_CI = ['Application', 'Server & Storage', 'Active Directory', 'Please Select Value', 'SAP', 'WPS-Core Infra Services', 'Workplace', 'WPS-Telecoms'...
2019/07/03
[ "https://datascience.stackexchange.com/questions/54961", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/74068/" ]
what you are looking for is [replace()](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.replace.html). And you don't need to write all the columns you can iterate over the columns name simply. ``` for col in train: train[col].replace("NA","XX",inplace=True) ``` You can do it on all t...
While `replace` is a valid approach, it can be inefficient and slow on a large scale - see this [question](https://stackoverflow.com/questions/42012339/using-replace-efficiently-in-pandas). You should instead use `map` to encode `NA` as `XX` - perhaps something like this: ``` na_data = ['Alley', ...,'Fence', 'MiscFea...
54,961
Column [![enter image description here](https://i.stack.imgur.com/iE0Ku.png)](https://i.stack.imgur.com/iE0Ku.png) and wanted to check with this list ``` list_CI = ['Application', 'Server & Storage', 'Active Directory', 'Please Select Value', 'SAP', 'WPS-Core Infra Services', 'Workplace', 'WPS-Telecoms'...
2019/07/03
[ "https://datascience.stackexchange.com/questions/54961", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/74068/" ]
what you are looking for is [replace()](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.replace.html). And you don't need to write all the columns you can iterate over the columns name simply. ``` for col in train: train[col].replace("NA","XX",inplace=True) ``` You can do it on all t...
Mine works this way: ```py # data_train.columns na_data = ['Gender', 'Married', 'Dependents','Self_Employed','Credit_History','Loan_Amount_Term'] for i in na_data: data_train[i].fillna(data_train[i].mode()[0], inplace=True) print(i) ``` These result are from `print(i)`, just for confirmation. ``` #Gender #...
54,961
Column [![enter image description here](https://i.stack.imgur.com/iE0Ku.png)](https://i.stack.imgur.com/iE0Ku.png) and wanted to check with this list ``` list_CI = ['Application', 'Server & Storage', 'Active Directory', 'Please Select Value', 'SAP', 'WPS-Core Infra Services', 'Workplace', 'WPS-Telecoms'...
2019/07/03
[ "https://datascience.stackexchange.com/questions/54961", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/74068/" ]
While `replace` is a valid approach, it can be inefficient and slow on a large scale - see this [question](https://stackoverflow.com/questions/42012339/using-replace-efficiently-in-pandas). You should instead use `map` to encode `NA` as `XX` - perhaps something like this: ``` na_data = ['Alley', ...,'Fence', 'MiscFea...
Mine works this way: ```py # data_train.columns na_data = ['Gender', 'Married', 'Dependents','Self_Employed','Credit_History','Loan_Amount_Term'] for i in na_data: data_train[i].fillna(data_train[i].mode()[0], inplace=True) print(i) ``` These result are from `print(i)`, just for confirmation. ``` #Gender #...
473,274
So i always thought MMU is part of the unix kernel that translates addresses to physical addresses but in the MMU wiki page it says its a computer hardware that usually have its own memory, but that page doesn't talk much about Unix/Linux operating systems So I'm confused, does the all the translation happen in hardwa...
2018/10/04
[ "https://unix.stackexchange.com/questions/473274", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/302721/" ]
[The MMU (memory management unit)](https://en.wikipedia.org/wiki/Memory_management_unit) is a physical component of the computer system, typically part of the CPU (but not necessarily). It translates virtual addresses (also known as linear addresses in the x86 world) to physical addresses; it can also enforce memory ac...
The Memory Management Unit (MMU) is a piece of hardware that translates virtual addresses to physical addresses. For example, when the CPU emits an address to read, the MMU translates that virtual address to a physical address and then emits the physical address to the memory bus. The MMU is programmed by the operatin...
24,949,274
After I changed a setting in the ckeditor plugin, the content of the whole manager doesn't load. Only the menus (top and left) are shown. I've already cleared the cache by deleting the content of the `core/cache` folder, and the cache from my browser.
2014/07/25
[ "https://Stackoverflow.com/questions/24949274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3269816/" ]
Remove the `core/components/ckeditor` folder and clear cache again. Login in the manager, go to packages Manager and remove the ckeditor and reinstall. This is also a way to remove manually packages in modx.
In such a case, also check if you have enabled the compress\_js and compress\_css options in the system setting (check them with a database administration tool like phpmyadmin) and set them to false if so. You can verify that this is your problem by opening the development tools of your browser (f12 for chrome and int...
64,136,742
if I want to check if user is logged in I gets error: **Cannot update a component from inside the function body of a different component.** I have components: App.js ``` import {View} from 'native-base'; import React, {Component} from 'react'; import {StyleSheet, SafeAreaView} from 'react-native'; import {Provider} ...
2020/09/30
[ "https://Stackoverflow.com/questions/64136742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6130088/" ]
Finally I found solution :) it is simple :) I wrapped navigation.setOption({ ... }) by componentDidUpdate(){} DefaultLogin.js ``` class DefaultLogin extends Component { componentDidMount() { const {navigation} = this.props; navigation.setOptions({ headerTitle: () => <SimpleHeader head...
Another solution, is to not call `navigation.setOptions` inside a child screen, but instead move that into the `options` of the screen in the parent component. So previously we had: Parent: ``` <NavigationContainer> <Stack.Navigator> <Stack.Screen name="Root" component={BottomTabNavigator} /> ...
64,136,742
if I want to check if user is logged in I gets error: **Cannot update a component from inside the function body of a different component.** I have components: App.js ``` import {View} from 'native-base'; import React, {Component} from 'react'; import {StyleSheet, SafeAreaView} from 'react-native'; import {Provider} ...
2020/09/30
[ "https://Stackoverflow.com/questions/64136742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6130088/" ]
Finally I found solution :) it is simple :) I wrapped navigation.setOption({ ... }) by componentDidUpdate(){} DefaultLogin.js ``` class DefaultLogin extends Component { componentDidMount() { const {navigation} = this.props; navigation.setOptions({ headerTitle: () => <SimpleHeader head...
componentDid worked for me. With stateless component: ``` const DefaultLogin = ({ navigation }) => { useEffect(() => { navigation.setOptions({ headerTitle: () => <SimpleHeader headerText="Choose login" />, headerBackground: () => <BoschBottomStrip />, }); }, [navigation]); return ( // ....
64,136,742
if I want to check if user is logged in I gets error: **Cannot update a component from inside the function body of a different component.** I have components: App.js ``` import {View} from 'native-base'; import React, {Component} from 'react'; import {StyleSheet, SafeAreaView} from 'react-native'; import {Provider} ...
2020/09/30
[ "https://Stackoverflow.com/questions/64136742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6130088/" ]
componentDid worked for me. With stateless component: ``` const DefaultLogin = ({ navigation }) => { useEffect(() => { navigation.setOptions({ headerTitle: () => <SimpleHeader headerText="Choose login" />, headerBackground: () => <BoschBottomStrip />, }); }, [navigation]); return ( // ....
Another solution, is to not call `navigation.setOptions` inside a child screen, but instead move that into the `options` of the screen in the parent component. So previously we had: Parent: ``` <NavigationContainer> <Stack.Navigator> <Stack.Screen name="Root" component={BottomTabNavigator} /> ...
9,486,446
Does anyone know how I can use a TTF font in libGDX? I have looked around and have seen things about StbTrueTypeFont but it doesn't seem to be in the latest release. EDIT: I found the StbTrueType font stuff, the jar file is located in the extensions directory. I've added it to my project. Now I just need to figure out...
2012/02/28
[ "https://Stackoverflow.com/questions/9486446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/947474/" ]
Yes you will definitely need to add the `gdx-stb-truetype` jars to your project as you stated in your edit. Here is how you will use it, pretty straighforward... First you need to declare your `BitmapFont` and the characters you will use... ``` BitmapFont font; public static final String FONT_CHARACTERS = "abcdefghij...
Use the gdx-freetype extension: ``` FreeTypeFontGenerator generator = new FreeTypeFontGenerator(fontFile); BitmapFont font15 = generator.generateData(15); BitmapFont font22 = generator.generateData(22); generator.dispose(); ``` "To use gdx-freetype, grab the latest nightlies, link `gdx-freetype.jar` and `gdx-freetyp...
9,486,446
Does anyone know how I can use a TTF font in libGDX? I have looked around and have seen things about StbTrueTypeFont but it doesn't seem to be in the latest release. EDIT: I found the StbTrueType font stuff, the jar file is located in the extensions directory. I've added it to my project. Now I just need to figure out...
2012/02/28
[ "https://Stackoverflow.com/questions/9486446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/947474/" ]
Yes you will definitely need to add the `gdx-stb-truetype` jars to your project as you stated in your edit. Here is how you will use it, pretty straighforward... First you need to declare your `BitmapFont` and the characters you will use... ``` BitmapFont font; public static final String FONT_CHARACTERS = "abcdefghij...
This is working on an S4 clone phone: Pinewood is a downloaded font, in assets folder. See the folder structure below. ``` import android.util.Log; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.GL10; import com.badl...
9,486,446
Does anyone know how I can use a TTF font in libGDX? I have looked around and have seen things about StbTrueTypeFont but it doesn't seem to be in the latest release. EDIT: I found the StbTrueType font stuff, the jar file is located in the extensions directory. I've added it to my project. Now I just need to figure out...
2012/02/28
[ "https://Stackoverflow.com/questions/9486446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/947474/" ]
Yes you will definitely need to add the `gdx-stb-truetype` jars to your project as you stated in your edit. Here is how you will use it, pretty straighforward... First you need to declare your `BitmapFont` and the characters you will use... ``` BitmapFont font; public static final String FONT_CHARACTERS = "abcdefghij...
Did researched a lot and found this working method: ``` FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("myfont.ttf")); FreeTypeFontParameter parameter = new FreeTypeFontParameter(); parameter.size = 12; // font size BitmapFont font12 = generator.generateFont(parameter); generator.dispos...
9,486,446
Does anyone know how I can use a TTF font in libGDX? I have looked around and have seen things about StbTrueTypeFont but it doesn't seem to be in the latest release. EDIT: I found the StbTrueType font stuff, the jar file is located in the extensions directory. I've added it to my project. Now I just need to figure out...
2012/02/28
[ "https://Stackoverflow.com/questions/9486446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/947474/" ]
Yes you will definitely need to add the `gdx-stb-truetype` jars to your project as you stated in your edit. Here is how you will use it, pretty straighforward... First you need to declare your `BitmapFont` and the characters you will use... ``` BitmapFont font; public static final String FONT_CHARACTERS = "abcdefghij...
you have to use FreeTypeFont library. [github](https://github.com/libgdx/libgdx/wiki/Gdx-freetype) **1.as the github page say, for projects using gradle add this dependencies:** Core Dependency: ``` compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" ``` Desktop Dependency: ``` compile "com.badlogicgames.gdx...