qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
11,646,368
A requirement for my software is that the encoding of a file which contains exported data shall be UTF8. But when I write the data to the file the encoding is always ANSI. (I use Notepad++ to check this.) What I'm currently doing is trying to convert the file manually by reading it, converting it to UTF8 and writing t...
2012/07/25
[ "https://Stackoverflow.com/questions/11646368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305694/" ]
On Windows in VC++2010 it is possible (not yet implemented in GCC, as far as i know) using localization facet std::codecvt\_utf8\_utf16 (i.e. in C++11). The sample code from [cppreference.com](http://en.cppreference.com/w/cpp/locale/codecvt_utf8_utf16) has all basic information you would need to read/write UTF-8 file. ...
AFAIK, `fprintf()` does character conversions, so there is no guarantee that passing UTF-8 encoded data to it will actually write the UTF-8 to the file. Since you already converted the data yourself, use `fwrite()` instead so you are writing the UTF-8 data as-is, eg: ``` DWORD dwCount = MultiByteToWideChar( CP_ACP, 0,...
11,646,368
A requirement for my software is that the encoding of a file which contains exported data shall be UTF8. But when I write the data to the file the encoding is always ANSI. (I use Notepad++ to check this.) What I'm currently doing is trying to convert the file manually by reading it, converting it to UTF8 and writing t...
2012/07/25
[ "https://Stackoverflow.com/questions/11646368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305694/" ]
On Windows in VC++2010 it is possible (not yet implemented in GCC, as far as i know) using localization facet std::codecvt\_utf8\_utf16 (i.e. in C++11). The sample code from [cppreference.com](http://en.cppreference.com/w/cpp/locale/codecvt_utf8_utf16) has all basic information you would need to read/write UTF-8 file. ...
On Windows, files don't have encodings. Each application will assume an encoding based on its own rules. The best you can do is put a [byte-order mark](http://en.wikipedia.org/wiki/Byte_order_mark) at the front of the file and hope it's recognized.
11,646,368
A requirement for my software is that the encoding of a file which contains exported data shall be UTF8. But when I write the data to the file the encoding is always ANSI. (I use Notepad++ to check this.) What I'm currently doing is trying to convert the file manually by reading it, converting it to UTF8 and writing t...
2012/07/25
[ "https://Stackoverflow.com/questions/11646368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305694/" ]
On Windows in VC++2010 it is possible (not yet implemented in GCC, as far as i know) using localization facet std::codecvt\_utf8\_utf16 (i.e. in C++11). The sample code from [cppreference.com](http://en.cppreference.com/w/cpp/locale/codecvt_utf8_utf16) has all basic information you would need to read/write UTF-8 file. ...
The type `char` has no clue of any encoding, all it can do is store 8 bits. Therefore any text file is just a sequence of bytes and the user must guess the underlying encoding. A file starting with a BOM indicates UTF 8, but using a BOM is not recommended any more. The type `wchar_t` in contrast is in Windows always in...
11,646,368
A requirement for my software is that the encoding of a file which contains exported data shall be UTF8. But when I write the data to the file the encoding is always ANSI. (I use Notepad++ to check this.) What I'm currently doing is trying to convert the file manually by reading it, converting it to UTF8 and writing t...
2012/07/25
[ "https://Stackoverflow.com/questions/11646368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305694/" ]
On Windows, files don't have encodings. Each application will assume an encoding based on its own rules. The best you can do is put a [byte-order mark](http://en.wikipedia.org/wiki/Byte_order_mark) at the front of the file and hope it's recognized.
AFAIK, `fprintf()` does character conversions, so there is no guarantee that passing UTF-8 encoded data to it will actually write the UTF-8 to the file. Since you already converted the data yourself, use `fwrite()` instead so you are writing the UTF-8 data as-is, eg: ``` DWORD dwCount = MultiByteToWideChar( CP_ACP, 0,...
11,646,368
A requirement for my software is that the encoding of a file which contains exported data shall be UTF8. But when I write the data to the file the encoding is always ANSI. (I use Notepad++ to check this.) What I'm currently doing is trying to convert the file manually by reading it, converting it to UTF8 and writing t...
2012/07/25
[ "https://Stackoverflow.com/questions/11646368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305694/" ]
On Windows, files don't have encodings. Each application will assume an encoding based on its own rules. The best you can do is put a [byte-order mark](http://en.wikipedia.org/wiki/Byte_order_mark) at the front of the file and hope it's recognized.
The type `char` has no clue of any encoding, all it can do is store 8 bits. Therefore any text file is just a sequence of bytes and the user must guess the underlying encoding. A file starting with a BOM indicates UTF 8, but using a BOM is not recommended any more. The type `wchar_t` in contrast is in Windows always in...
20,739,530
I'm trying to read data from excel file. My problem is when I finished reading it's always appear an dialog ask for save. How can I turn off it? ![enter image description here](https://i.stack.imgur.com/upitz.png) Here is my code: ``` Missing missing = Missing.Value; Excel.Application _app = new Exce...
2013/12/23
[ "https://Stackoverflow.com/questions/20739530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3030058/" ]
You should set the `DisplayAlerts` property to FALSE to prevent this message when you call `.Quit()` method. ``` _app.DisplayAlerts = false; _app.Quit(); ``` [\_Application.Quit method](http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._application.quit.ASPX): > > If unsaved workbooks are open...
have you tried something like this ``` _workBook.Close(SaveChanges:false) ``` or ``` WB.Close(false, Type.Missing, Type.Missing); ``` according to this link: <http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.close.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1> if you omit this para...
20,739,530
I'm trying to read data from excel file. My problem is when I finished reading it's always appear an dialog ask for save. How can I turn off it? ![enter image description here](https://i.stack.imgur.com/upitz.png) Here is my code: ``` Missing missing = Missing.Value; Excel.Application _app = new Exce...
2013/12/23
[ "https://Stackoverflow.com/questions/20739530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3030058/" ]
You should set the `DisplayAlerts` property to FALSE to prevent this message when you call `.Quit()` method. ``` _app.DisplayAlerts = false; _app.Quit(); ``` [\_Application.Quit method](http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._application.quit.ASPX): > > If unsaved workbooks are open...
I had this same problem. All the suggestions about macros, repairing MS Office, etc. were no help at all -- although they were related to the problem ... It turns out that I accidentally changed a date in one cell of the spreadsheet from a valid date -- ex: 02/06/2021 -- to the letter "H". I don't know when I did it, ...
20,739,530
I'm trying to read data from excel file. My problem is when I finished reading it's always appear an dialog ask for save. How can I turn off it? ![enter image description here](https://i.stack.imgur.com/upitz.png) Here is my code: ``` Missing missing = Missing.Value; Excel.Application _app = new Exce...
2013/12/23
[ "https://Stackoverflow.com/questions/20739530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3030058/" ]
have you tried something like this ``` _workBook.Close(SaveChanges:false) ``` or ``` WB.Close(false, Type.Missing, Type.Missing); ``` according to this link: <http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.close.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1> if you omit this para...
I had this same problem. All the suggestions about macros, repairing MS Office, etc. were no help at all -- although they were related to the problem ... It turns out that I accidentally changed a date in one cell of the spreadsheet from a valid date -- ex: 02/06/2021 -- to the letter "H". I don't know when I did it, ...
29,895,802
I would like to calculate the mean of a data.frame by two variables. See an example of the data.frame (extraction) below: ``` Station Time Year Month Value ARO 199501 1995 1 69 ARO 199502 1995 2 87 ARO 199503 1995 3 107 ARO 199601 1996 ...
2015/04/27
[ "https://Stackoverflow.com/questions/29895802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4762870/" ]
assuming you data is named `df`, you can try `aggregate` ``` aggregate(Value~Month+Station, data=df, FUN = mean) Month Station Value 1 1 ANT 83.5 2 2 ANT 118.5 3 3 ANT 108.5 4 1 ARO 52.0 5 2 ARO 66.5 6 3 ARO 78.5 ```
You can use `data.table` package: ``` library(data.table) setDT(df)[,mean(Value), by=list(Month, Station)] ```
29,895,802
I would like to calculate the mean of a data.frame by two variables. See an example of the data.frame (extraction) below: ``` Station Time Year Month Value ARO 199501 1995 1 69 ARO 199502 1995 2 87 ARO 199503 1995 3 107 ARO 199601 1996 ...
2015/04/27
[ "https://Stackoverflow.com/questions/29895802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4762870/" ]
assuming you data is named `df`, you can try `aggregate` ``` aggregate(Value~Month+Station, data=df, FUN = mean) Month Station Value 1 1 ANT 83.5 2 2 ANT 118.5 3 3 ANT 108.5 4 1 ARO 52.0 5 2 ARO 66.5 6 3 ARO 78.5 ```
Using the [dplyr](http://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html) package, if your data.frame is called `dat`: ``` library(dplyr) means <- dat %>% group_by(Station, Month) %>% summarise(Valuemean = mean(Value, na.rm = TRUE)) ```
29,895,802
I would like to calculate the mean of a data.frame by two variables. See an example of the data.frame (extraction) below: ``` Station Time Year Month Value ARO 199501 1995 1 69 ARO 199502 1995 2 87 ARO 199503 1995 3 107 ARO 199601 1996 ...
2015/04/27
[ "https://Stackoverflow.com/questions/29895802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4762870/" ]
You can use `data.table` package: ``` library(data.table) setDT(df)[,mean(Value), by=list(Month, Station)] ```
Using the [dplyr](http://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html) package, if your data.frame is called `dat`: ``` library(dplyr) means <- dat %>% group_by(Station, Month) %>% summarise(Valuemean = mean(Value, na.rm = TRUE)) ```
62,353,743
I have created a function to recursively find empty values in a nested array. The function returns the correct value at first but seems to reset it to the input value before returning the result. What am I missing? Here is my code: ```js const obj = [ { mainContact: true, contactName: "", emailId: "ab...
2020/06/12
[ "https://Stackoverflow.com/questions/62353743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072454/" ]
The basic issue is that you are not returning the value of the recursion call. So what you are actually doing is performing an inline recursive loop, then returning the value from the parent call. Also, because `isOk` is a primitive boolean, it is pass by value rather than pass by reference. Thus modifying `isOk` insi...
Thanks to James McGuigan, my edited version is as below: ``` isValidObject(obj) { for (var propName in obj) { if( typeof obj[propName] === "object" ) { if( this.isValidObject(obj[propName]) === false || obj[propName] === null || o...
62,353,743
I have created a function to recursively find empty values in a nested array. The function returns the correct value at first but seems to reset it to the input value before returning the result. What am I missing? Here is my code: ```js const obj = [ { mainContact: true, contactName: "", emailId: "ab...
2020/06/12
[ "https://Stackoverflow.com/questions/62353743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072454/" ]
The thing about recursion is that you have to return the value from your recursive call. That means that you call the function from inside itself, then handle the return value accordingly. Here's my interpretation of your function, where I add a simple base case to check if the passed value is `null`, `undefined`, or...
Thanks to James McGuigan, my edited version is as below: ``` isValidObject(obj) { for (var propName in obj) { if( typeof obj[propName] === "object" ) { if( this.isValidObject(obj[propName]) === false || obj[propName] === null || o...
62,353,743
I have created a function to recursively find empty values in a nested array. The function returns the correct value at first but seems to reset it to the input value before returning the result. What am I missing? Here is my code: ```js const obj = [ { mainContact: true, contactName: "", emailId: "ab...
2020/06/12
[ "https://Stackoverflow.com/questions/62353743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072454/" ]
An alternate approach is to write a more generic function to recursively test validity of object properties given a predicate to test with. It's not difficult; to my mind it's often simpler than writing the specific function directly. And applying it to a specific case is also simple. It might look like this: ```js ...
Thanks to James McGuigan, my edited version is as below: ``` isValidObject(obj) { for (var propName in obj) { if( typeof obj[propName] === "object" ) { if( this.isValidObject(obj[propName]) === false || obj[propName] === null || o...
42,521,858
In Acumatica project , on Receipt screen have a lookup button "Add Item". When Inventory lookup show dialog ( it's FromDetail template ), i will scan barcode from my bill. But, i must scan second times it to working. How can i to filter grid details and set checked a row filtered according barcode ? And how can to know...
2017/03/01
[ "https://Stackoverflow.com/questions/42521858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4384573/" ]
**Parfait** provided a solution for me in the comments to my original question. Changing my connection string provider to a driver did not work. It caused a `Run-time error '-2147467259 (80004005)'` Instead of a CTE, I utilized a derived table in my query. The SQL query that returns a recordcount for me in VBA is: `...
I had the same issue except I was using Driver as recommended by user7638417. When the recordset returned, the recordcount was -1, but, when I inserted the rows into the spreadsheet, they were all there (24). Used simplified query in example, actual query was more complex which lead me to the CTE method. ``` Dim s...
9,855,316
Is there any way to directly access a field of class in the aspx page? I have tried this: In the aspx page I have added: ``` <form id="LoginForm" runat="server"> <asp:Label Text='<%# Eval("Test") %>' runat="server" ID="jym" /> </form> ``` and in the backend class of this page I have declared a ...
2012/03/24
[ "https://Stackoverflow.com/questions/9855316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/576758/" ]
Are you calling `Page.DataBind()` in `Page_Load()`? You are using the `#` data binding operator in your embedded code block. The values that you bind to the control will only show after you have called `DataBind()` from either the control or the page (which will in turn call it for each control on the page). If you o...
You may want to use <%= this.Test%>. You can also do this.jym.Text=Test; in the Page Load evt.
23,500,313
I'm looking to create a google map using the javascript API. I can create the map, customise the look and add the default markers to the maps but... I need to create markers which look like the following: ![Google map markers](https://i.stack.imgur.com/lt139.jpg) I know I can do it by creating multiple images for ea...
2014/05/06
[ "https://Stackoverflow.com/questions/23500313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/911553/" ]
Instead of a Marker you may create a [**custom overlay**](https://developers.google.com/maps/documentation/javascript/customoverlays) It will give you the option to use HTML, via CSS it's not difficult to create an element that is styled like your example-images. A possible implementation: ``` function HtmlMarker(ma...
It's not an easy question, mostly depends on the approximate number of markers you have t display at once. Marker drawables can be defined only as one of the following: * URL of an image * Pre-defined [Symbol path](https://developers.google.com/maps/documentation/javascript/reference#SymbolPath) (such as circle or di...
41,530,193
I am using codeigniter framework and i want to create a OR WHERE statement using foreach loop, Below is my code, ``` $wh_q = array('ec_date >' => $start, 'ec_date <=' => $end); ``` This will produce query as `WHERE ec_details.date > '2016-11-01 00:00:00' AND ec_details.date <= '2017-01-07 00:00:00'` Now i want to ...
2017/01/08
[ "https://Stackoverflow.com/questions/41530193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4657216/" ]
Try as below... ``` $wh_q = array('ec_date >' => $start, 'ec_date <=' => $end);//condition first $user_string = '5,6'; $users_array = explode(",",$user_string); foreach ($users_array as $user) { $query []= array('ec_details.user_id' => $user);//second condition } //print_r($query) //multidimensional array ``` ...
You can try like this, create a complete where string like this ``` $where = "name='Joe' AND status='boss' OR status='active'"; $this->db->where($where); ``` And check, this will work. **EDIT** OR you can give or condition like this ``` $this->db->where('name !=', $name); $this->db->or_where('id >', $id); // Pro...
41,530,193
I am using codeigniter framework and i want to create a OR WHERE statement using foreach loop, Below is my code, ``` $wh_q = array('ec_date >' => $start, 'ec_date <=' => $end); ``` This will produce query as `WHERE ec_details.date > '2016-11-01 00:00:00' AND ec_details.date <= '2017-01-07 00:00:00'` Now i want to ...
2017/01/08
[ "https://Stackoverflow.com/questions/41530193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4657216/" ]
You can try like this, create a complete where string like this ``` $where = "name='Joe' AND status='boss' OR status='active'"; $this->db->where($where); ``` And check, this will work. **EDIT** OR you can give or condition like this ``` $this->db->where('name !=', $name); $this->db->or_where('id >', $id); // Pro...
If you you need to check only user id then better you can also user IN like below. ``` $user_string = '5,6'; $users_array = explode(",",$user_string); $this->db->where_in('id', $users_array); ``` and If you want to use only OR and And statement then use below code ``` $this->db->where('ec_date >',$start,false); $...
41,530,193
I am using codeigniter framework and i want to create a OR WHERE statement using foreach loop, Below is my code, ``` $wh_q = array('ec_date >' => $start, 'ec_date <=' => $end); ``` This will produce query as `WHERE ec_details.date > '2016-11-01 00:00:00' AND ec_details.date <= '2017-01-07 00:00:00'` Now i want to ...
2017/01/08
[ "https://Stackoverflow.com/questions/41530193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4657216/" ]
Try as below... ``` $wh_q = array('ec_date >' => $start, 'ec_date <=' => $end);//condition first $user_string = '5,6'; $users_array = explode(",",$user_string); foreach ($users_array as $user) { $query []= array('ec_details.user_id' => $user);//second condition } //print_r($query) //multidimensional array ``` ...
If you you need to check only user id then better you can also user IN like below. ``` $user_string = '5,6'; $users_array = explode(",",$user_string); $this->db->where_in('id', $users_array); ``` and If you want to use only OR and And statement then use below code ``` $this->db->where('ec_date >',$start,false); $...
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
I'll second Lisp/Scheme, and also suggest [Haskell](http://www.haskell.org/haskellwiki/Introduction) as a language that will challenge the way you think about programming. The O'Reilly book "Real World Haskell" is a pragmatic introduction, well illustrated with concrete use cases.
Prolog is a must. Any other language of a different paradigm would be a good start. Prolog is of a logical paradigm. Another great yet very different language is Scheme. It is of the functional language family. Here a few sample of a Palindrome validator. EDIT: Someone mentionned that the code I wrote is unimpressiv...
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
Python gave me the "so cool" reaction
I'll second Lisp/Scheme, and also suggest [Haskell](http://www.haskell.org/haskellwiki/Introduction) as a language that will challenge the way you think about programming. The O'Reilly book "Real World Haskell" is a pragmatic introduction, well illustrated with concrete use cases.
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
Of course Haskell, but really all of the following really changed my perspectives: I started in GWBasic years ago as a kid, so I gravitated naturally to procedural languages. My career started in C++, and that is the foundation I build from. * JavaScript - Introduced me to first class functions, closures, dynamic ty...
Firstly, good on you for looking to do something different! If you're up to it, this is a great opportunity to try something which works in a completely different way, if only to broaden your understanding of how things work. I'd echo [ManicMailman's comments about Prolog](https://stackoverflow.com/questions/1583142/c-...
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
I second Python, and Ruby too. Re-read Design Patterns... then learn Python, and realize quite a lot of design patterns are actually stopgaps trying to patch a defective language like C++. When classes are first-class objects, for instance, the Factory pattern becomes obsolete. Just pass the class, it is after all an...
Firstly, good on you for looking to do something different! If you're up to it, this is a great opportunity to try something which works in a completely different way, if only to broaden your understanding of how things work. I'd echo [ManicMailman's comments about Prolog](https://stackoverflow.com/questions/1583142/c-...
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
I am probably at heart, mostly a C++ programmer, because I have used it so much, so you may find my experiences interesting. In chronological order, here are the languages I learned, and my epiphanies. I've highlighted the big ones for me. Of course there are many different languages that can provide the same insight...
Python gave me the "so cool" reaction
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
The whole "Whaoo..this is sooo cool! I didnt know I can program like that." revelation came to me when I first learned [functional programming](http://en.wikipedia.org/wiki/Functional_programming). In my case, this came through my studies in [Tcl/Tk](http://www.tcl.tk/), which is multi-paradigm, but I imagine you can g...
I posted, above : ``` For instance, in Javascript : button.onclick = function(){ some code } ``` And got this comment : > > that button.onclick example was definitely cool. and it looks very intuitive too. thanks! – ShaChris23 > > > I find this very interesting. When you work in a low-level language like C++,...
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
Python gave me the "so cool" reaction
I've programmed in Pascal, Delphi, Assembly, C, C++, Scheme, Lisp, Java, C# and CUDA. C# is the answer - you can write extremely dynamic programs using reflection, and WPF really places C# at the edge.
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
I would try both Scheme (or Lisp) and Python, in that order. Scheme will warp your mind in a positive way (it did for me), and then move on to Python, where you'll be (quasi-) able to put together your C++ and new functional knowledge. You'll get a big kick out of both, I promise.
Ruby must be the one that makes me say "Cool look how you can do that" the most. But I have a new found fondness for JavaScript again.
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
A recent "This is so cool!" for me was Scala. It combines functional programming, objects and threads in a great way, and it all runs in the JVM. For me it was the first really cool thing I'd seen that was Java related. :) Oh, okay, it was the second. The first was a reversible debugger which I forget the name of, bu...
I'd recommend J (jsoftware.com), as I always do. It differs from most other languages in that it is symbolic (though the symbols are all rendered in plain ASCII) and functional. More importantly, it is dynamic, interactive, and it has a lot of high-level concepts built-in. For instance, taking a cue from one of the ot...
1,583,142
I've been programming C++ for about 5 years now, and I now realize the value of knowing how to think "differently." This question is for C++ programmers who tried out other programming languages and came across moments like: * "Whaoo..this is sooo cool! I didnt know I can program like that." * "Wow, I never thought a...
2009/10/17
[ "https://Stackoverflow.com/questions/1583142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65313/" ]
I would try both Scheme (or Lisp) and Python, in that order. Scheme will warp your mind in a positive way (it did for me), and then move on to Python, where you'll be (quasi-) able to put together your C++ and new functional knowledge. You'll get a big kick out of both, I promise.
Firstly, good on you for looking to do something different! If you're up to it, this is a great opportunity to try something which works in a completely different way, if only to broaden your understanding of how things work. I'd echo [ManicMailman's comments about Prolog](https://stackoverflow.com/questions/1583142/c-...
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Check your project physical path , If is to long , Copy project to some root directory folder with very short name. And try to build your project.
Has this issue when dealing with Sharepoint 2013 Workflows in VS 2013. To solve it did the following: 1. Unload worklfows ( the buggy one) project. 2. Delete .csproj.user file 3. Opened .csproj file in the notepad and delete the following lines: ``` <PropertyGroup> <VisualStudioVersion Condition="'$(VisualStudioVe...
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Close Visual Studio, delete the `.suo` file for your solution. It's a 'hidden file' in Windows and contains user preferences, but it can also do nasty things.
I had this issue today as well... after changing the verbosity of build to diagnostic like @Jac suggested, i discovered that the problem relies in one my resx files. Apparently, one image was corupted or was too big, i deleted it and it worked!
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Close Visual Studio, delete the `.suo` file for your solution. It's a 'hidden file' in Windows and contains user preferences, but it can also do nasty things.
if your solution contains too many projects , build projects individually, Check which project is failing for that project check the references of that project , if on any reference if their is yellow color mark, then delete that reference , and add that again , then build and check, this will work or check ...
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Seems a bit late, but what worked for me was to check my Output window. I had a reference to a Function that didn't exist yet. I don't know why it never came up in the Error List, but the Output window told me exactly where the problem was.
Some times if the Directory path is more than 248 chars it will fail the Solution. Make sure complete path is less than that.I have faced the same issue than i made short and it did worked for me. Regards Venkateshwarlu, MSBI Developer, Hyderabad.
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
I had the same problem, solved by the following step go to Tool->option->projects and Solution->General, make sure to check the box "Always show Error List if build finishes with errors", in this case, visual studio will show the error list.
I had this issue today as well... after changing the verbosity of build to diagnostic like @Jac suggested, i discovered that the problem relies in one my resx files. Apparently, one image was corupted or was too big, i deleted it and it worked!
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Try repeating the same steps by changing the location where you compile/run. Make sure your new location has less folders to traverse when compared to your old location. A lengthy path to the source code had resulted in a similar issue to me and I overcame it by choosing a shorter path.
I had the same problem, solved by the following step go to Tool->option->projects and Solution->General, make sure to check the box "Always show Error List if build finishes with errors", in this case, visual studio will show the error list.
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Close Visual Studio, delete the `.suo` file for your solution. It's a 'hidden file' in Windows and contains user preferences, but it can also do nasty things.
Seems a bit late, but what worked for me was to check my Output window. I had a reference to a Function that didn't exist yet. I don't know why it never came up in the Error List, but the Output window told me exactly where the problem was.
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
I closed my visual studio. Deleted every bin folder. (I had a weird permission error, so I deleted the files and back track deleted the folders including bin). Reopened visual studio. Performed build or rebuild and everything was working again.
My issue arose from converting a functional vs2008 project to vs2010. All other projects in the solution came across fine, but this one would build the MIDL portion, then stop and fail. Detailed build setting revealed nothing, so finally I created a whole new project with all files the same. This worked. Then I compare...
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
I closed my visual studio. Deleted every bin folder. (I had a weird permission error, so I deleted the files and back track deleted the folders including bin). Reopened visual studio. Performed build or rebuild and everything was working again.
I had the same problem, solved by the following step go to Tool->option->projects and Solution->General, make sure to check the box "Always show Error List if build finishes with errors", in this case, visual studio will show the error list.
5,068,011
I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected. After I change a source file, save it and then again build (...
2011/02/21
[ "https://Stackoverflow.com/questions/5068011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608971/" ]
Try repeating the same steps by changing the location where you compile/run. Make sure your new location has less folders to traverse when compared to your old location. A lengthy path to the source code had resulted in a similar issue to me and I overcame it by choosing a shorter path.
In case some other folks are experiencing this issue (I had tried deleting the SUO file first but this didn't work for me): I solved it by creating a blank new Project in my solution and importing all source files into the new project. Likely the problem sat in project file.
35,188,332
I am trying to run the Javascript recording example of Kurento WebRTC as seen in: <http://doc-kurento.readthedocs.org/en/stable/tutorials/js/tutorial-recorder.html> I have setup Kurento on a Ubuntu machine and it is running OK. The service has started as well. Furthermore I tested the Java based example and it was ru...
2016/02/03
[ "https://Stackoverflow.com/questions/35188332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/496607/" ]
You already have a [certificate chain](https://support.dnsimple.com/articles/what-is-ssl-certificate-chain/) files, and as the documentation mentions: > > If this PEM certificate is a signed certificate (by a Certificate Authority such as Verisign), then you are done. > > > Kurento needs both the private key and ...
Your kurento.json.conf file is probably fine. I ran into this issue a while back. The problem is that java is blocking websocket tunneling for security purposes. You need to add setAllowedOrigins(\*) within the registerWebSocketHandlers method. **Note: this is not secure and should not be used in a production environm...
35,188,332
I am trying to run the Javascript recording example of Kurento WebRTC as seen in: <http://doc-kurento.readthedocs.org/en/stable/tutorials/js/tutorial-recorder.html> I have setup Kurento on a Ubuntu machine and it is running OK. The service has started as well. Furthermore I tested the Java based example and it was ru...
2016/02/03
[ "https://Stackoverflow.com/questions/35188332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/496607/" ]
Your kurento.json.conf file is probably fine. I ran into this issue a while back. The problem is that java is blocking websocket tunneling for security purposes. You need to add setAllowedOrigins(\*) within the registerWebSocketHandlers method. **Note: this is not secure and should not be used in a production environm...
Please ensure that Kurento Media Server is installed and is running. <https://github.com/Kurento/kurento-media-server>
35,188,332
I am trying to run the Javascript recording example of Kurento WebRTC as seen in: <http://doc-kurento.readthedocs.org/en/stable/tutorials/js/tutorial-recorder.html> I have setup Kurento on a Ubuntu machine and it is running OK. The service has started as well. Furthermore I tested the Java based example and it was ru...
2016/02/03
[ "https://Stackoverflow.com/questions/35188332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/496607/" ]
You already have a [certificate chain](https://support.dnsimple.com/articles/what-is-ssl-certificate-chain/) files, and as the documentation mentions: > > If this PEM certificate is a signed certificate (by a Certificate Authority such as Verisign), then you are done. > > > Kurento needs both the private key and ...
Please ensure that Kurento Media Server is installed and is running. <https://github.com/Kurento/kurento-media-server>
22,940,091
Laravel 4 Project, using Eloquent ORM. I have three tables: customers, orders and products (+ 1 pivot table order\_product). Customers are linked one-to-many to Orders. Orders are linked many-to-many to Products. ``` Customers 1-->N Orders N<-->N Products ``` I would like to have a method on Customer model tha...
2014/04/08
[ "https://Stackoverflow.com/questions/22940091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/806789/" ]
@deczo's answer probably works fine, and is probably a lot more performant as all the data reduction is done in the database itself, but here's a 'pure Laravel' way that's undoubtedly more readable: ``` use Illuminate\Database\Eloquent\Collection; class Customer extends Eloquent { ... public function products...
I can't think of easy relation method for this one, but here's a workaround: ``` $productsIds = DB::table('customers') ->leftJoin('orders', 'orders.customer_id', '=', 'customers.id') ->join('order_item', 'order_item.order_id', '=', 'orders.id') ->leftJoin('items', 'order_item.item_id' , '=', 'items.id') ...
22,940,091
Laravel 4 Project, using Eloquent ORM. I have three tables: customers, orders and products (+ 1 pivot table order\_product). Customers are linked one-to-many to Orders. Orders are linked many-to-many to Products. ``` Customers 1-->N Orders N<-->N Products ``` I would like to have a method on Customer model tha...
2014/04/08
[ "https://Stackoverflow.com/questions/22940091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/806789/" ]
Thanks to @deczo's answer, I was able to put up a single query method to retrieve items: ``` public function items() { $query = DB::table('items')->select('items.*') ->join('item_order', 'item_order.component_id', '=', 'items.id') ->leftJoin('orders', 'item_order.order_id', '=', 'orders.id') ...
I can't think of easy relation method for this one, but here's a workaround: ``` $productsIds = DB::table('customers') ->leftJoin('orders', 'orders.customer_id', '=', 'customers.id') ->join('order_item', 'order_item.order_id', '=', 'orders.id') ->leftJoin('items', 'order_item.item_id' , '=', 'items.id') ...
22,940,091
Laravel 4 Project, using Eloquent ORM. I have three tables: customers, orders and products (+ 1 pivot table order\_product). Customers are linked one-to-many to Orders. Orders are linked many-to-many to Products. ``` Customers 1-->N Orders N<-->N Products ``` I would like to have a method on Customer model tha...
2014/04/08
[ "https://Stackoverflow.com/questions/22940091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/806789/" ]
This is a Many-to-Many relationship, but with the **Orders** table as the pivot table. ``` class Customers extends Eloquent { public function orders() { return $this->hasMany('Orders', 'customer_id'); } public function products() { return $this->belongsToMany('Products', 'orders'...
I can't think of easy relation method for this one, but here's a workaround: ``` $productsIds = DB::table('customers') ->leftJoin('orders', 'orders.customer_id', '=', 'customers.id') ->join('order_item', 'order_item.order_id', '=', 'orders.id') ->leftJoin('items', 'order_item.item_id' , '=', 'items.id') ...
22,940,091
Laravel 4 Project, using Eloquent ORM. I have three tables: customers, orders and products (+ 1 pivot table order\_product). Customers are linked one-to-many to Orders. Orders are linked many-to-many to Products. ``` Customers 1-->N Orders N<-->N Products ``` I would like to have a method on Customer model tha...
2014/04/08
[ "https://Stackoverflow.com/questions/22940091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/806789/" ]
Thanks to @deczo's answer, I was able to put up a single query method to retrieve items: ``` public function items() { $query = DB::table('items')->select('items.*') ->join('item_order', 'item_order.component_id', '=', 'items.id') ->leftJoin('orders', 'item_order.order_id', '=', 'orders.id') ...
@deczo's answer probably works fine, and is probably a lot more performant as all the data reduction is done in the database itself, but here's a 'pure Laravel' way that's undoubtedly more readable: ``` use Illuminate\Database\Eloquent\Collection; class Customer extends Eloquent { ... public function products...
22,940,091
Laravel 4 Project, using Eloquent ORM. I have three tables: customers, orders and products (+ 1 pivot table order\_product). Customers are linked one-to-many to Orders. Orders are linked many-to-many to Products. ``` Customers 1-->N Orders N<-->N Products ``` I would like to have a method on Customer model tha...
2014/04/08
[ "https://Stackoverflow.com/questions/22940091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/806789/" ]
Thanks to @deczo's answer, I was able to put up a single query method to retrieve items: ``` public function items() { $query = DB::table('items')->select('items.*') ->join('item_order', 'item_order.component_id', '=', 'items.id') ->leftJoin('orders', 'item_order.order_id', '=', 'orders.id') ...
This is a Many-to-Many relationship, but with the **Orders** table as the pivot table. ``` class Customers extends Eloquent { public function orders() { return $this->hasMany('Orders', 'customer_id'); } public function products() { return $this->belongsToMany('Products', 'orders'...
68,999,620
I am trying to use a checkbox to make my font awesome icon trigger the menu icon to open and close the menu (which is how I want it to be design wise) when the screen is in mobile view. Thanks in advance for any help. ```css /*** General ***/ * { font-family: 'Noto Serif SC', serif; margin: 0; padding: 0; } ....
2021/08/31
[ "https://Stackoverflow.com/questions/68999620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16480543/" ]
Do this: ```css * { font-family: 'Noto Serif SC', serif; margin: 0; padding: 0; } .bluepic { padding-top: 10px; display: block; margin-left: auto; margin-right: auto; width: 100%; max-width: 400px; height: auto; } .contents1 { margin-top: 5vh; margin-bottom: 10vh; } a { text-decoration: no...
See this response in codepen. <https://codepen.io/threefingers/pen/PojZMpx> Add in your `::before` element icon, the code icons in your states. ```css .mydiv{ background-color: blue; height: 50px; width: 50px; } input + .mydiv::before{ content: 'code icon 1'; } input:checked + .mydiv::before{ content: 'co...
68,999,620
I am trying to use a checkbox to make my font awesome icon trigger the menu icon to open and close the menu (which is how I want it to be design wise) when the screen is in mobile view. Thanks in advance for any help. ```css /*** General ***/ * { font-family: 'Noto Serif SC', serif; margin: 0; padding: 0; } ....
2021/08/31
[ "https://Stackoverflow.com/questions/68999620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16480543/" ]
CSS modification: The **font-awesome** library overrides your CSS. That is why your menu-icon (`.fa-bars`) wouldn't hide when not in mobile mode. I made following corrections to your CSS: 1. **Changing** `.fa-bars` to `.fas.fa-bars` 2. **Adding** `!important` in mobile mode (to show always when media break-point ...
See this response in codepen. <https://codepen.io/threefingers/pen/PojZMpx> Add in your `::before` element icon, the code icons in your states. ```css .mydiv{ background-color: blue; height: 50px; width: 50px; } input + .mydiv::before{ content: 'code icon 1'; } input:checked + .mydiv::before{ content: 'co...
68,999,620
I am trying to use a checkbox to make my font awesome icon trigger the menu icon to open and close the menu (which is how I want it to be design wise) when the screen is in mobile view. Thanks in advance for any help. ```css /*** General ***/ * { font-family: 'Noto Serif SC', serif; margin: 0; padding: 0; } ....
2021/08/31
[ "https://Stackoverflow.com/questions/68999620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16480543/" ]
Do this: ```css * { font-family: 'Noto Serif SC', serif; margin: 0; padding: 0; } .bluepic { padding-top: 10px; display: block; margin-left: auto; margin-right: auto; width: 100%; max-width: 400px; height: auto; } .contents1 { margin-top: 5vh; margin-bottom: 10vh; } a { text-decoration: no...
CSS modification: The **font-awesome** library overrides your CSS. That is why your menu-icon (`.fa-bars`) wouldn't hide when not in mobile mode. I made following corrections to your CSS: 1. **Changing** `.fa-bars` to `.fas.fa-bars` 2. **Adding** `!important` in mobile mode (to show always when media break-point ...
38,208,447
How do you validate form posts with the [MoneyType Field](http://symfony.com/doc/current/reference/forms/types/money.html)? It's bad enough that [it uses `input type="text"` instead of `type="number"`](https://stackoverflow.com/q/38190891/4233593), but worse it doesn't matter what's input, like *"asdf"*, the response ...
2016/07/05
[ "https://Stackoverflow.com/questions/38208447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4233593/" ]
Using a raw `None` (not in `slice`) is the same thing as using [`np.newaxis`](http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html#numpy.newaxis), of which it is but an alias. In your case: * `a[0,None,1]` is like a`[0,np.newaxis,1]`, hence the output * whereas `slice(None)` is like "slice nothing", which i...
`a[0,None,1]` is the same as `a[0, 1]` but with an **extra** axis in the result. > > The `newaxis` object can be used in all slicing operations to create an > axis of length one. `:const: newaxis` is an alias for `‘None’`, and `‘None’` > can be used in place of this with the same result. > > > So `a[0,None,1]` ...
58,116,962
I want my sprite to move either up or down or left or right, I don't want any other movement such as north-west or south-east; it needs to be either up, down, right or left. There are similar posts like this on the internet but I was wondering why mine wasn't working. It doesn't initiate any movement in the game. ```...
2019/09/26
[ "https://Stackoverflow.com/questions/58116962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11724198/" ]
In your case `move` increases each time when `if` statement pass. There are two ways to disable double sides movement: or rewrite `move` in each `if` or exit form function after first `if` passed. Also there is another issue in your script: you need update `x` axis for A/D buttons and `z` axis for W/S. For example: ...
First, you should cache your SpriteRenderer, here you're doing up to 4 GetComponent calls just for movement. Then, you don't want to directly set the position of your object, but move it. You can either do transform.Translate(move), or transform.position += move; edit : and you should probably assign the sprite basin...
58,116,962
I want my sprite to move either up or down or left or right, I don't want any other movement such as north-west or south-east; it needs to be either up, down, right or left. There are similar posts like this on the internet but I was wondering why mine wasn't working. It doesn't initiate any movement in the game. ```...
2019/09/26
[ "https://Stackoverflow.com/questions/58116962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11724198/" ]
First, you should cache your SpriteRenderer, here you're doing up to 4 GetComponent calls just for movement. Then, you don't want to directly set the position of your object, but move it. You can either do transform.Translate(move), or transform.position += move; edit : and you should probably assign the sprite basin...
Solution : ``` using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { public Sprite Up; public Sprite Down; public Sprite Right; public Sprite Left; public float speed; // Update is called once per frame void Update()...
58,116,962
I want my sprite to move either up or down or left or right, I don't want any other movement such as north-west or south-east; it needs to be either up, down, right or left. There are similar posts like this on the internet but I was wondering why mine wasn't working. It doesn't initiate any movement in the game. ```...
2019/09/26
[ "https://Stackoverflow.com/questions/58116962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11724198/" ]
In your case `move` increases each time when `if` statement pass. There are two ways to disable double sides movement: or rewrite `move` in each `if` or exit form function after first `if` passed. Also there is another issue in your script: you need update `x` axis for A/D buttons and `z` axis for W/S. For example: ...
Solution : ``` using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { public Sprite Up; public Sprite Down; public Sprite Right; public Sprite Left; public float speed; // Update is called once per frame void Update()...
4,991,343
I want to use the "princomp" function of Matlab but this function gives the eigenvalues in a sorted array. This way I can't find out to which column corresponds which eigenvalue. For Matlab, ``` m = [1,2,3;4,5,6;7,8,9]; [pc,score,latent] = princomp(m); ``` is the same as ``` m = [2,1,3;5,4,6;8,7,9]; [pc,score,laten...
2011/02/14
[ "https://Stackoverflow.com/questions/4991343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/578563/" ]
With PCA, each principle component returned will be a linear combination of the original columns/dimensions. Perhaps an example might clear up any misunderstanding you have. Lets consider the Fisher-Iris dataset comprising of 150 instances and 4 dimensions, and apply PCA on the data. To make things easier to understan...
"The information (which eigenvalue corresponds to which original (input) column) is lost." Since each principal component is a linear function of all input variables, each principal component (eigenvector, eigenvalue), corresponds to **all** of the original input columns. Ignoring possible changes in sign, which are a...
30,463,404
Nowhere have I found anyone attempting to prompt for first and last names and then put that into a variable with a wildcard. If I substitute real values with the asterisk, it works but attempting to do so with a variable returns nothing. ``` $LastName = Read-Host "Enter user's Last Name" $FirstName = Read-Host "Ente...
2015/05/26
[ "https://Stackoverflow.com/questions/30463404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4891754/" ]
I think the issue is just that your braces are preventing your variables from expanding the way you expect them to. I offer this since `-Filter` will work with properly formatted strings as well. ``` $GroupMembershipList = Get-ADUser -Filter "GivenName -like '$FirstName*' -and Surname -like '$LastName*'" | Select-Ob...
I used the second suggestion and it worked. I am new to PS and also to programming in general. I find PS confusing at times regarding the placement of parenthesis, brackets, etc. I generally have the logic but mess up on placing these delimiters. You mentioned formatting my code. I am sorry I don't know what you mean...
30,463,404
Nowhere have I found anyone attempting to prompt for first and last names and then put that into a variable with a wildcard. If I substitute real values with the asterisk, it works but attempting to do so with a variable returns nothing. ``` $LastName = Read-Host "Enter user's Last Name" $FirstName = Read-Host "Ente...
2015/05/26
[ "https://Stackoverflow.com/questions/30463404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4891754/" ]
I think the issue is just that your braces are preventing your variables from expanding the way you expect them to. I offer this since `-Filter` will work with properly formatted strings as well. ``` $GroupMembershipList = Get-ADUser -Filter "GivenName -like '$FirstName*' -and Surname -like '$LastName*'" | Select-Ob...
``` $GivenName = read-host "What's the users first name (wildcard * ok)?" $Surname = read-host "What's the users last name (wildcard * ok)?" Get-ADUser -filter{(Surname -like $Surname -and GivenName -like $GivenName)} -properties GivenName, Surname, UserPrincipalName, mobile ```
30,463,404
Nowhere have I found anyone attempting to prompt for first and last names and then put that into a variable with a wildcard. If I substitute real values with the asterisk, it works but attempting to do so with a variable returns nothing. ``` $LastName = Read-Host "Enter user's Last Name" $FirstName = Read-Host "Ente...
2015/05/26
[ "https://Stackoverflow.com/questions/30463404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4891754/" ]
I used the second suggestion and it worked. I am new to PS and also to programming in general. I find PS confusing at times regarding the placement of parenthesis, brackets, etc. I generally have the logic but mess up on placing these delimiters. You mentioned formatting my code. I am sorry I don't know what you mean...
``` $GivenName = read-host "What's the users first name (wildcard * ok)?" $Surname = read-host "What's the users last name (wildcard * ok)?" Get-ADUser -filter{(Surname -like $Surname -and GivenName -like $GivenName)} -properties GivenName, Surname, UserPrincipalName, mobile ```
12,114,512
I have an ever growing medley of websites that I own (WordPress for the most part if that helps). Each one has a VERY simple "name, a graphic, and social media links" page on it at **foo.domain.com/partner**. I would like for **a.domain.com** to be able to load content from 3 other sites into their sidebar with OUT i...
2012/08/24
[ "https://Stackoverflow.com/questions/12114512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/933810/" ]
Lots of ways to do this: 1. PHP can `file_get_contents()` or `cURL` content from other sites and then work with the content server side (load content before it's sent to the browser) 2. If you are generating content from databases (as you would be in WP) you can connect directly to the MySQL database of your other si...
$("#loaddiv").load("directory/file.php").fadeIn("fast");
12,114,512
I have an ever growing medley of websites that I own (WordPress for the most part if that helps). Each one has a VERY simple "name, a graphic, and social media links" page on it at **foo.domain.com/partner**. I would like for **a.domain.com** to be able to load content from 3 other sites into their sidebar with OUT i...
2012/08/24
[ "https://Stackoverflow.com/questions/12114512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/933810/" ]
How about JSONP requests? You can avoid the [SOP](http://en.wikipedia.org/wiki/Same_origin_policy "Same Origin Policy") violation.
$("#loaddiv").load("directory/file.php").fadeIn("fast");
12,114,512
I have an ever growing medley of websites that I own (WordPress for the most part if that helps). Each one has a VERY simple "name, a graphic, and social media links" page on it at **foo.domain.com/partner**. I would like for **a.domain.com** to be able to load content from 3 other sites into their sidebar with OUT i...
2012/08/24
[ "https://Stackoverflow.com/questions/12114512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/933810/" ]
Lots of ways to do this: 1. PHP can `file_get_contents()` or `cURL` content from other sites and then work with the content server side (load content before it's sent to the browser) 2. If you are generating content from databases (as you would be in WP) you can connect directly to the MySQL database of your other si...
How about JSONP requests? You can avoid the [SOP](http://en.wikipedia.org/wiki/Same_origin_policy "Same Origin Policy") violation.
16,869
I mean if I check using copyscape when buying articles is it going to be fool-proof way of knowing if it was never published on internet? I understand it would not catch those articles who haven't been indexed yet by say Google (within 6 weeks or so).
2011/07/15
[ "https://webmasters.stackexchange.com/questions/16869", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/6776/" ]
Foolproof? No. But it does use Google's API so it is getting the largest set of data to compare to which is a good thing. So basically any content that is not blocked to Google's crawlers or has not been indexed yet *should* be caught with Copyscape.
Copyscape definately is one of the leaders out there although in additon you could also Google select quotes from articles of interest to see how many results come up. For example you can copy paste something like "I highly recommend resturaunt x in NYC for high quality goods" (with the quotes) or some fairly unique p...
57,164,693
When I write an iterator for a custom container, should I define both `operator==` and `operator!=`? Initially I thought that I should define both, but then I read [here](https://en.cppreference.com/w/cpp/named_req/InputIterator), in the table of expressions that have to be defined, that only `i != j` has to be define...
2019/07/23
[ "https://Stackoverflow.com/questions/57164693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827927/" ]
**tl;dr: Yes, you *should*, though for just range-based `for` you may not *need* to.** --- Assuming from your link that you want to create a *InputIterator*: > > Initially I thought that I should define both, but then I read here, in the table of expressions that have to be defined, that only `i != j` has to be def...
> > Why not just require one of them and calculate the other automatically? > > > Because you may want to customise it for speed *etc*.
45,221,686
I can't figure out how to get the original abstract class or interface where an anonymous inner class is defined. For example: ``` public static void main(String[] args) { Object obj = new Runnable() { @Override public void run() { } }; System.out.println(obj.getClass()); Sys...
2017/07/20
[ "https://Stackoverflow.com/questions/45221686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3476226/" ]
Thanks for the help! No one really answered my question fully, so I decided to combine the different answers to get this comprehensive solution. ``` public static Class<?> getOriginalClass(Object obj) { Class<?> cls = obj.getClass(); if (cls.isAnonymousClass()) { return cls.getInterfaces().length == 0 ...
What you are doing is correct to get the superclass. But Runnable is an interface that's why it isn't working. Check this answer on how to get all interfaces: [Get all interfaces](https://stackoverflow.com/questions/6616055/get-all-derived-interfaces-of-a-class)
45,221,686
I can't figure out how to get the original abstract class or interface where an anonymous inner class is defined. For example: ``` public static void main(String[] args) { Object obj = new Runnable() { @Override public void run() { } }; System.out.println(obj.getClass()); Sys...
2017/07/20
[ "https://Stackoverflow.com/questions/45221686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3476226/" ]
Thanks for the help! No one really answered my question fully, so I decided to combine the different answers to get this comprehensive solution. ``` public static Class<?> getOriginalClass(Object obj) { Class<?> cls = obj.getClass(); if (cls.isAnonymousClass()) { return cls.getInterfaces().length == 0 ...
As others have mentioned runnable is an interface, so you can't use the getClass method to get its name. You can however do this: ``` System.out.println(obj.getClass().getInterfaces()[0].getName()) ``` Notice getInterfaces returns an array so if you were implementing more than one you'd have to loop through it with ...
13,117,083
Its more likely a subjective question. I wanted to create a sub class of a third party API to customize the behavior, but the problem is one of the method in API class is having default access specifier, and I am not allowed to override as my sub class is not in same package. However, if I want a solution, I can put m...
2012/10/29
[ "https://Stackoverflow.com/questions/13117083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/815566/" ]
For (1): The X11 license basically says you can do anything with the software as long as you credit the authors and don't sue them for breach of warranty. There is nothing illegal about what you suggest. While what you suggest should work, it's hackish. The problem is that the third-party library is using an overly st...
1. I can't answer your first question because I don't have enough knowledge on this :) 2. It depends on your classloader. In common case the class that it sees first will be loaded. The second will be omitted. I wouldn't rely on classloader resolution order here, The only thing you can be sure in is that the resources...
96,907
I can check, if a file exists and is a symbolic link with -L ``` for file in *; do if [[ -L "$file" ]]; then echo "$file is a symlink"; else echo "$file is not a symlink"; fi done ``` and if it is a directory with -d: ``` for file in *; do if [[ -d "$file" ]]; then echo "$file is a directory"; else echo "$f...
2013/10/21
[ "https://unix.stackexchange.com/questions/96907", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20661/" ]
Just combine the two tests with `&&`: ```bsh if [[ -L "$file" && -d "$file" ]] then echo "$file is a symlink to a directory" fi ``` Or, for POSIX compliant-syntax, use: ```bsh if [ -L "$file" ] && [ -d "$file" ] ... ``` *Note: the first syntax using `[[ expr1 && expr2 ]]` is valid, but only works in certain s...
A solution with `find` and using a function: ``` dosomething () { echo "doing something with $1"; } find -L -path './*' -prune -type d| while read file; do if [[ -L "$file" && -d "$file" ]]; then dosomething "$file"; fi; done ```
96,907
I can check, if a file exists and is a symbolic link with -L ``` for file in *; do if [[ -L "$file" ]]; then echo "$file is a symlink"; else echo "$file is not a symlink"; fi done ``` and if it is a directory with -d: ``` for file in *; do if [[ -d "$file" ]]; then echo "$file is a directory"; else echo "$f...
2013/10/21
[ "https://unix.stackexchange.com/questions/96907", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20661/" ]
Just combine the two tests with `&&`: ```bsh if [[ -L "$file" && -d "$file" ]] then echo "$file is a symlink to a directory" fi ``` Or, for POSIX compliant-syntax, use: ```bsh if [ -L "$file" ] && [ -d "$file" ] ... ``` *Note: the first syntax using `[[ expr1 && expr2 ]]` is valid, but only works in certain s...
Here is a single command which will recursively list symlinks whose target is a directory (starting in the current directory): `find . -type l -xtype d` Reference: <http://www.commandlinefu.com/commands/view/6105/find-all-symlinks-that-link-to-directories>
96,907
I can check, if a file exists and is a symbolic link with -L ``` for file in *; do if [[ -L "$file" ]]; then echo "$file is a symlink"; else echo "$file is not a symlink"; fi done ``` and if it is a directory with -d: ``` for file in *; do if [[ -d "$file" ]]; then echo "$file is a directory"; else echo "$f...
2013/10/21
[ "https://unix.stackexchange.com/questions/96907", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/20661/" ]
Here is a single command which will recursively list symlinks whose target is a directory (starting in the current directory): `find . -type l -xtype d` Reference: <http://www.commandlinefu.com/commands/view/6105/find-all-symlinks-that-link-to-directories>
A solution with `find` and using a function: ``` dosomething () { echo "doing something with $1"; } find -L -path './*' -prune -type d| while read file; do if [[ -L "$file" && -d "$file" ]]; then dosomething "$file"; fi; done ```
49,111
I want to replace my kitchen cabinets (shoddy DIY stuff, very rough) with some nice floating shelves. I tried to find information on how to mount heavy stuff to wooden studs but all I found were information for what fasteners to use when mounting heavy stuff into drywall. What kind of fasteners do I need to use if ...
2014/09/22
[ "https://diy.stackexchange.com/questions/49111", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/25396/" ]
The hardware needed will likely be dictated to some degree by the manner in which the shelves are supported and how much weight the shelves are being asked to support. A true floating shelf will often use a french cleat as Keshlam suggested, often in this situation an aluminum version called called a Z-clip. ![Z-clip ]...
Your existing cabinets are probably mounded with screws long enough to reach through the cabinet back and the drywall, then go deep enough into the studs to support the weight. The *right* way to mount cabinets is probably with a [French Cleat](https://en.wikipedia.org/wiki/French_cleat). Those can be as simple as a p...
17,172,496
I am trying to use `linkTo` as explained [here](https://github.com/emberjs/ember.js/issues/2779) This is my template: ``` {{#each model}} {{#linkTo "nodes.show" this tagName="tr"}} <td>{{shortenHash id}}</td> ... <td> <a {{action startEditing this bubbles=false}}><i class="icon...
2013/06/18
[ "https://Stackoverflow.com/questions/17172496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/647991/" ]
*This is maybe very opinionated, but bear with me.* If you have to render big lists where you end up doing pagination, you should rather take a different approach then using the old `table` markup. Here is where [`ember-list-view`](http://emberjs.com/list-view/) comes in. It's a ember addon that allows you to have long...
For those Googling, Ember List View does not work with current stable Ember > 1.8 <https://github.com/emberjs/list-view/issues/169> Maybe check out ember-cloak for something similar... <https://github.com/eviltrout/ember-cloaking>
17,172,496
I am trying to use `linkTo` as explained [here](https://github.com/emberjs/ember.js/issues/2779) This is my template: ``` {{#each model}} {{#linkTo "nodes.show" this tagName="tr"}} <td>{{shortenHash id}}</td> ... <td> <a {{action startEditing this bubbles=false}}><i class="icon...
2013/06/18
[ "https://Stackoverflow.com/questions/17172496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/647991/" ]
`linkTo` by default generates an anchor '`A`' tag. This tag is not allowed to be directly attached to a `TABLE`, `TBODY` or `TR` element. See the '*Permitted Content*' section in the spec, * [HTML5 TBODY](http://www.w3.org/TR/html-markup/tbody.html#tbody-content-model) * [HTML5 TR](http://www.w3.org/TR/html-markup/tr....
*This is maybe very opinionated, but bear with me.* If you have to render big lists where you end up doing pagination, you should rather take a different approach then using the old `table` markup. Here is where [`ember-list-view`](http://emberjs.com/list-view/) comes in. It's a ember addon that allows you to have long...
17,172,496
I am trying to use `linkTo` as explained [here](https://github.com/emberjs/ember.js/issues/2779) This is my template: ``` {{#each model}} {{#linkTo "nodes.show" this tagName="tr"}} <td>{{shortenHash id}}</td> ... <td> <a {{action startEditing this bubbles=false}}><i class="icon...
2013/06/18
[ "https://Stackoverflow.com/questions/17172496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/647991/" ]
`linkTo` by default generates an anchor '`A`' tag. This tag is not allowed to be directly attached to a `TABLE`, `TBODY` or `TR` element. See the '*Permitted Content*' section in the spec, * [HTML5 TBODY](http://www.w3.org/TR/html-markup/tbody.html#tbody-content-model) * [HTML5 TR](http://www.w3.org/TR/html-markup/tr....
For those Googling, Ember List View does not work with current stable Ember > 1.8 <https://github.com/emberjs/list-view/issues/169> Maybe check out ember-cloak for something similar... <https://github.com/eviltrout/ember-cloaking>
4,773,149
when we write javascript in web page then other user can see that javascript and understand how the script work. i have seen few site where javascript was written in such a way user can read the script but will not be able to understand how it works. so for the security reason how can i encrypt my javascript in the pag...
2011/01/23
[ "https://Stackoverflow.com/questions/4773149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/508127/" ]
This process is called [obfuscation](http://en.wikipedia.org/wiki/Obfuscated_code), not encryption which is not the same. It means that it makes it hard to read the code but not impossible. There are many tools allowing you to achieve this such as: * [YUI Compressor](http://developer.yahoo.com/yui/compressor/) * [Go...
If you use a JavaScript library but still want to obfuscate the entire code base to protect your IP, you can consider the Dojo Toolkit which is compatible with Closure Compiler's Advanced mode. Of course, you can also use the Closure Library, but in general Dojo is *much* more popular than the Closure Library (outside ...
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
You can always put doubtful words in a **glossary** - a mini dictionary at the end of your book with definitions.
I would say the rule for clarity and conciseness, is if there is a word that isn’t so verbose, use it. If you are just trying to show off your ten dollar vocabulary to the peanut gallery, you are in the wrong theatre most teenagers in 11th grade have the reading comprehension of an 8th grader. I like the idea of the on...
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
One approach to this I encountered in the novels "A Series of Unforunate Events" by Lemony Snicket (which were definitely intended mainly for a teenage audience) is to use big words as an example to **TEACH** them. For example, the second-to-last book is called "The Penultimate Peril". In the beginning of the book, th...
Don't use a big word when a singularly unloquacious and diminutive linguistic expression will satisfactorily accomplish the contemporary necessity.
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
Don't use a big word when a singularly unloquacious and diminutive linguistic expression will satisfactorily accomplish the contemporary necessity.
No. Use the words that you want/need to use. Kids have NO idea what is or is not a big word. Kids are a blank slate. Every word is big to them. So no word is big to them. This is why there are plenty of 4 year olds who can rattle off the scientific names of dozens of dinosaurs. Big words are not a problem for kids....
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
You can always put doubtful words in a **glossary** - a mini dictionary at the end of your book with definitions.
Don't use a big word when a singularly unloquacious and diminutive linguistic expression will satisfactorily accomplish the contemporary necessity.
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
The easiest way to do this is have a character use it, and another character (like yourself, not knowing the word at that age) ask what it means, or look it up, or otherwise figure out what it means. You can even use this as a moment of conflict, or humor. > > "It's ubiquitous," Angela said. > > > Kevin frowned. "...
No. Use the words that you want/need to use. Kids have NO idea what is or is not a big word. Kids are a blank slate. Every word is big to them. So no word is big to them. This is why there are plenty of 4 year olds who can rattle off the scientific names of dozens of dinosaurs. Big words are not a problem for kids....
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
One approach to this I encountered in the novels "A Series of Unforunate Events" by Lemony Snicket (which were definitely intended mainly for a teenage audience) is to use big words as an example to **TEACH** them. For example, the second-to-last book is called "The Penultimate Peril". In the beginning of the book, th...
I would say the rule for clarity and conciseness, is if there is a word that isn’t so verbose, use it. If you are just trying to show off your ten dollar vocabulary to the peanut gallery, you are in the wrong theatre most teenagers in 11th grade have the reading comprehension of an 8th grader. I like the idea of the on...
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
Don't use a big word when a singularly unloquacious and diminutive linguistic expression will satisfactorily accomplish the contemporary necessity.
Yes. But also, it depends on how young are your audiences. Search on appropriate words for the younger ones to understand.
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
I think this is a really interesting question - because if we avoid using advanced vocabulary with children, then when are they supposed to learn it? ----------------------------------------------------------------------------------------------------------------------------------------------------- I think the answer ...
Klippy, your intuition is correct. Your audience comes first. It’s the reason why you write the book. It doesn’t matter who else reads it, its only important that it pleases your audience. A pleased audience then tells others about your book via word of mouth (i.e. those outside of your audience). Your audience grows ...
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
One approach to this I encountered in the novels "A Series of Unforunate Events" by Lemony Snicket (which were definitely intended mainly for a teenage audience) is to use big words as an example to **TEACH** them. For example, the second-to-last book is called "The Penultimate Peril". In the beginning of the book, th...
So keep in mind that much of the English Language Literature on the market (especially modern written novels) is written at an 8th grade (US) reading level, which corresponds to about 13-14 years old. Most English courses beyond 8th grade will read some selections of English Language Classical Literature that may be ce...
48,422
I was writing the other day and I used the word "ubiquitous". While I don't think "ubiquitous" is the most egregious example of "Using Big Words To Sound Intelligent", and would be perfectly acceptable in most novels, it's just, my novel's demographic would be young teenagers, and I definitely did not know what ubiqu...
2019/10/07
[ "https://writers.stackexchange.com/questions/48422", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/33321/" ]
You can always put doubtful words in a **glossary** - a mini dictionary at the end of your book with definitions.
Klippy, your intuition is correct. Your audience comes first. It’s the reason why you write the book. It doesn’t matter who else reads it, its only important that it pleases your audience. A pleased audience then tells others about your book via word of mouth (i.e. those outside of your audience). Your audience grows ...
10,051,607
I am trying to access the nsstring data out side the function and also outside the class. How can I access `useridStr` outside the function and class? This is my code: ``` -(id)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *loginStatus = [[NSString alloc] initWithBytes:[webData mutableBytes]...
2012/04/07
[ "https://Stackoverflow.com/questions/10051607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1239265/" ]
``` NSUserDefaults *pre = [NSUserDefaults standardUserDefaults]; [pre setObject:useridStr forKey:@"useridStr"]; ``` where you want to need string: ``` NSUserDefaults *pre =[NSUserDefaults standardUserDefaults]; NSString * useridStr =[pre stringForKey:@"useridStr"]; ``` OR In .h file of anotherView ``` -(id)initU...
What Piyush suggested is also correct. But there is also another way to achieve it. As he suggested **[NSUserDefaults](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsuserdefaults_Class/Reference/Reference.html)** to save data you should keep in mind that **[NSUserDefaults]...
68,768,812
I have tried every ways i knew to check if the keyword is similar to something in my dataset.csv movie title but nothing is working. It only recommends me movies if the title is exactly similar to that in dataset. for example: if i searched for Spider-Man 3 then it will recommend me movies related to it but if i search...
2021/08/13
[ "https://Stackoverflow.com/questions/68768812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14660445/" ]
I think you are using wrong the API Package APEX\_LDAP. I am doing this on my own enviornment in a different way, but I am using Enterprise Edition: 1. Oracle Database version 19c 2. Oracle Apex version 20.1 3. Oracle Oracle Rest Data Services version 20.4 I have an authentication schema to make the login against the...
I tried to add your function and I cannot access to my application from my Login Page anymore. I've tried on the SQL Commands, here's what I got ``` DECLARE VAL BOOLEAN; BEGIN IF APEX_LDAP.AUTHENTICATE( p_username => 'thomas.tirole', p_password => 'mypassword', p_search_base => 'OU=Users,OU=Domain,DC=domai...
107,577
I'm reaching a point where my clients are demanding robust hosting, but I have little experience of what to offer. I've always dealt with shared hosts like Hostgator, but now that I'm building more service-based sites and mission-critical sites like ecommerce sites, I'm realising that shared just doesn't cut the mustar...
2013/07/23
[ "https://wordpress.stackexchange.com/questions/107577", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/2685/" ]
I highly recommend Amazon AWS. You can continue to use WP Super Cache with Amazon S3 (for storage of your static files such as images etc). For high traffic scenarios, you can set up auto scaling rules of EC2 server instances to set up new servers as needed (and cut them when not needed). This is the best tute I've...
Implement a multi-level caching strategy with HTML, CSS, JavaScript, PHP, & MySQL processes under optimization. At the CMS level install a plugin like WP Smush It or EWWW Image Optimizer for better image compression. For CSS/JavaScript compression & WordPress HTML page caching, install one or more of these plugins: * ...
38,243,631
Following the question here: [How do I log from my Python Spark script](https://stackoverflow.com/questions/25407550/how-do-i-log-from-my-python-spark-script), I have been struggling to get: a) All output into a log file. b) Writing out to a log file from pyspark For a) I use the following changes to the config file:...
2016/07/07
[ "https://Stackoverflow.com/questions/38243631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673600/" ]
Works in my configuration: ``` log4jLogger = sc._jvm.org.apache.log4j LOGGER = log4jLogger.LogManager.getLogger(__name__) LOGGER.info("Hello logger...") ```
***All output into a log file & Writing out to a log file from pyspark*** ``` import os import sys import logging import logging.handlers log = logging.getLogger(__name_) handler = logging.FileHandler("spam.log") formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") handler.setFormatt...
1,721,108
I am writing an application for the .NET Compact Framework. If a create a new custom control inheriting Control `class MyButton : Control`, my OnPaint override gets called correctly. However, if I create a new custom control inheriting Button `class MyButton : Button` - it does not. Why does the OnPaint override not...
2009/11/12
[ "https://Stackoverflow.com/questions/1721108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/128873/" ]
To be able to override OnPaint in Button you needUserPaint style set on Button... and you can't do that in compact framework bacause it's not supported there. The only way to do it is to write your own controls from the ground up.
Set control's style to UserPaint - problem fixed
4,473,207
The problem that I'm trying to workaround is that we cannot report on pending approvals. I've seen the recommendation that we update fields on the object that is being routed in the action that executes after each step - however this doesn't work when the step is for parallel approvals. I haven't been able to find an...
2010/12/17
[ "https://Stackoverflow.com/questions/4473207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/98795/" ]
Since I really needed for anyone to be able to check all pending approvals or pending approvals for a particular users at any given time I created a VisualForce page and used the below queries depending on looking for every pending approval or ones for a user. For all pending approvals: ``` [SELECT Status, TargetObje...
First and foremost - go to **Reports -> Administrative Reports -> All pending approval requests**. Check it out and see if it can be fine-tuned to match your needs. If you need to be able to share it with non-admins - consider making a dashboard out of it (can be Table) and schedule it for daily run & email sending......
748,235
Suppose we throw $n$ independent dices. After each throw we put aside the dices showing $6$ and then perform a new throw with the dices not showing $6$, repeating the process until all dices have shown $6$. Let $N\_n$ be the number of throws before all dice have shown $6$. Set $m\_n := E[N\_n]$ and let $Y$ denote the n...
2014/04/10
[ "https://math.stackexchange.com/questions/748235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/58349/" ]
$$m\_{n}=\mathbb{E}N\_{n}=\sum\_{y=0}^{n}\mathbb{E}\left(N\_{n}\mid Y=y\right)P\left(Y=y\right)$$ Here $\mathbb{E}\left(N\_{n}\mid Y=y\right)=m\_{y}+1$, $m\_{0}=0$ and applying the distribution of $Y$ this gives: $$m\_{n}=\sum\_{y=0}^{n}\left(m\_{y}+1\right)\binom{n}{y}\left(\frac{5}{6}\right)^{y}\left(\frac{1}{6}\righ...
Consider the first throw. Given that we get no six, the expectation is $1+m\_{n}$. Given that we get exactly $1$ six, the expectation is $1+m\_{n-1}$. Given that we get $2$ sixes, the expectation is $1+m\_{n-2}$, and so on. Thus $$m\_n=\sum\_{k=0}^n (1+m\_{n-k})\binom{n}{k}\left(\frac{1}{6}\right)^{k}\left(\frac{5}{6}\...
748,235
Suppose we throw $n$ independent dices. After each throw we put aside the dices showing $6$ and then perform a new throw with the dices not showing $6$, repeating the process until all dices have shown $6$. Let $N\_n$ be the number of throws before all dice have shown $6$. Set $m\_n := E[N\_n]$ and let $Y$ denote the n...
2014/04/10
[ "https://math.stackexchange.com/questions/748235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/58349/" ]
$$m\_{n}=\mathbb{E}N\_{n}=\sum\_{y=0}^{n}\mathbb{E}\left(N\_{n}\mid Y=y\right)P\left(Y=y\right)$$ Here $\mathbb{E}\left(N\_{n}\mid Y=y\right)=m\_{y}+1$, $m\_{0}=0$ and applying the distribution of $Y$ this gives: $$m\_{n}=\sum\_{y=0}^{n}\left(m\_{y}+1\right)\binom{n}{y}\left(\frac{5}{6}\right)^{y}\left(\frac{1}{6}\righ...
Two closed formulas, not based on the recursion you suggest: $$ E(N\_n)=\sum\_{k\geqslant0}\left(1-\left(1-\left(\frac56\right)^k\right)^n\right) $$ $$ E(N\_n)=\sum\_{i=1}^n{n\choose i}\frac{(-1)^{i+1}}{1-\left(\frac56\right)^i} $$
403,714
I used the following latex code to draw [this digraph](https://i.stack.imgur.com/nrCsi.jpg). ``` \documentclass[12pt]{article} \usepackage{pgf, tikz} \usetikzlibrary{arrows, automata} \begin{document} \begin{tikzpicture} [> = stealth, shorten > = 1pt, auto, node distance = 2cm, ...
2017/11/29
[ "https://tex.stackexchange.com/questions/403714", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/111479/" ]
I like to use the `quotes` library to make edge labels, because it offers the syntax `(source) edge["label"] (target)` which is shorter than `(source) edge node {label} (target)`. The option to control the position of the label is `pos`; I think `pos=0.8` leads to reasonable output, but you could fiddle with it yoursel...
slightly modified nice [Hood Chatham](https://tex.stackexchange.com/users/23866/hood-chatham)'s answer (most changes are off-topic): ``` \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{arrows, automata, quotes} \begin{document} \begin{tikzpicture} [shorten > = 1pt, auto, node d...
19,799,284
In javascript I can write function with closure like this ``` function getUniqueIDfunction() { var id = 0; return function() { return id++; }; }; ``` And then use it ``` uniqueID = getUniqueIDfunction(); uniqueID(); //return 0 uniqueID(); //return 1 ... ``` Can I perform the sa...
2013/11/05
[ "https://Stackoverflow.com/questions/19799284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1660286/" ]
If all you want is a unique ID, just use the following: ``` def uniqueID(): x = 0 while True: yield x x += 1 id = next(uniqueID) ``` You can rewrite this with a closure (as [poke mentions in his answer](https://stackoverflow.com/a/19799468/558592)), if you wish to: ``` def getUniqueIDfunc...
If you want to explicitly specify that something is a closure variable, not a local or global, you use the [`nonlocal`](http://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement) statement. So: ``` def foo(): nonlocal x x += 1 return x ``` In Python 2.x, there is no `nonlocal` stateme...
19,799,284
In javascript I can write function with closure like this ``` function getUniqueIDfunction() { var id = 0; return function() { return id++; }; }; ``` And then use it ``` uniqueID = getUniqueIDfunction(); uniqueID(); //return 0 uniqueID(); //return 1 ... ``` Can I perform the sa...
2013/11/05
[ "https://Stackoverflow.com/questions/19799284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1660286/" ]
Python 3 introduced this kind of scoping behavior with [PEP 3104](http://www.python.org/dev/peps/pep-3104/) and the `nonlocal` statement: ``` >>> def uniqueId (): x = -1 def inner (): nonlocal x x += 1 return x return inner >>> f = uniqueId() >>> f() 0 >>> f...
If all you want is a unique ID, just use the following: ``` def uniqueID(): x = 0 while True: yield x x += 1 id = next(uniqueID) ``` You can rewrite this with a closure (as [poke mentions in his answer](https://stackoverflow.com/a/19799468/558592)), if you wish to: ``` def getUniqueIDfunc...
19,799,284
In javascript I can write function with closure like this ``` function getUniqueIDfunction() { var id = 0; return function() { return id++; }; }; ``` And then use it ``` uniqueID = getUniqueIDfunction(); uniqueID(); //return 0 uniqueID(); //return 1 ... ``` Can I perform the sa...
2013/11/05
[ "https://Stackoverflow.com/questions/19799284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1660286/" ]
Python 3 introduced this kind of scoping behavior with [PEP 3104](http://www.python.org/dev/peps/pep-3104/) and the `nonlocal` statement: ``` >>> def uniqueId (): x = -1 def inner (): nonlocal x x += 1 return x return inner >>> f = uniqueId() >>> f() 0 >>> f...
If you want to explicitly specify that something is a closure variable, not a local or global, you use the [`nonlocal`](http://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement) statement. So: ``` def foo(): nonlocal x x += 1 return x ``` In Python 2.x, there is no `nonlocal` stateme...
19,799,284
In javascript I can write function with closure like this ``` function getUniqueIDfunction() { var id = 0; return function() { return id++; }; }; ``` And then use it ``` uniqueID = getUniqueIDfunction(); uniqueID(); //return 0 uniqueID(); //return 1 ... ``` Can I perform the sa...
2013/11/05
[ "https://Stackoverflow.com/questions/19799284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1660286/" ]
This works, but doesn't do exactly what you want: ``` def getUniqueIDfunction(): x = -1 def foo(x=x): x += 1 return x return foo f() # returns 0 f() # returns 0 again! ``` Because the integer datatype is immutable. If instead you use a mutable datatype: ``` def counter(): x = [0] ...
If you want to explicitly specify that something is a closure variable, not a local or global, you use the [`nonlocal`](http://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement) statement. So: ``` def foo(): nonlocal x x += 1 return x ``` In Python 2.x, there is no `nonlocal` stateme...
19,799,284
In javascript I can write function with closure like this ``` function getUniqueIDfunction() { var id = 0; return function() { return id++; }; }; ``` And then use it ``` uniqueID = getUniqueIDfunction(); uniqueID(); //return 0 uniqueID(); //return 1 ... ``` Can I perform the sa...
2013/11/05
[ "https://Stackoverflow.com/questions/19799284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1660286/" ]
Python 3 introduced this kind of scoping behavior with [PEP 3104](http://www.python.org/dev/peps/pep-3104/) and the `nonlocal` statement: ``` >>> def uniqueId (): x = -1 def inner (): nonlocal x x += 1 return x return inner >>> f = uniqueId() >>> f() 0 >>> f...
This works, but doesn't do exactly what you want: ``` def getUniqueIDfunction(): x = -1 def foo(x=x): x += 1 return x return foo f() # returns 0 f() # returns 0 again! ``` Because the integer datatype is immutable. If instead you use a mutable datatype: ``` def counter(): x = [0] ...
28,024
In my case, I am planning to design how a website looks; I am a bit of a newbie. I'd love to learn :) Are there any books that I can refer to?
2014/03/06
[ "https://graphicdesign.stackexchange.com/questions/28024", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/20460/" ]
The world of design is still stuck in an era where designers are seen as people who have 'divine inspiration' and come up with ideas out of the blue. However, in fact it is the opposite- designers get inspiration from working with people, trying things, doing research, understanding better the client and context. Its c...
I'm also a newbie in web design.. but I have one good advice for you.. search and search and look for the best website designs in the world, that will rich your creativity and is a very good way for inspiration.. It's totally fine for your first website to be a mixture of a few ideas which you already saw in other webs...