qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
2,887,951
In the case of three variables, the elementary symmetric polynomials are $$ \begin{align} e\_1(X\_1,X\_2,X\_3)&:=X\_1+X\_2+X\_3, \\ e\_2(X\_1,X\_2,X\_3)&:=X\_1 X\_2+X\_1 X\_3+X\_2 X\_3, \\ e\_3(X\_1,X\_2,X\_3)&:=X\_1 X\_2 X\_3. \\ \end{align}$$ Knowledge of the values of $e\_1,e\_2,e\_3$ determines the variables $X\_1...
2018/08/19
[ "https://math.stackexchange.com/questions/2887951", "https://math.stackexchange.com", "https://math.stackexchange.com/users/62839/" ]
You're almost there. It suffices to add a fourth polynomial : $$ \begin{array}{lcl} P\_1 &=& X\_1+X\_2+X\_3 \\ P\_2 &=& X\_1X\_2+X\_1X\_3+X\_2X\_3 \\ P\_3 &=& X\_1X\_2X\_3 \\ P\_4 &=& X\_1^2X\_2+X\_2^2X\_3+X\_3^2X\_1 \end{array} $$ Suppose that $X=(X\_1,X\_2,X\_3)$ and $Y=(Y\_1,Y\_2,Y\_3)$ satisfy $P\_n(X)=P\_n(Y)$ f...
Here’s one way to do it: to get a list of polynomials for any $n$, start with the list of elementary symmetric polynomials on $n$ variables and add in the Vandermonde polynomial on $n$ variables.
30,285,529
I'm trying to code a little command line tool using Xcode (under MacOS 10.10) that watches a specific folder and informs me about changes to files in that folder. I'm following the guide given in <https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/FSEvents_ProgGuide/UsingtheFSEventsFramework/Using...
2015/05/17
[ "https://Stackoverflow.com/questions/30285529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2068852/" ]
According to the documentation, after starting event stream to send events, you should call [`CFRunLoopRun`](https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFRunLoopRef/index.html#//apple_ref/c/func/CFRunLoopRun). Try to change your `while()` loop to: ``` CFRunLoopRun(); ``` **Update...
It appears you have *FSEventStreamRef stream;* commented out. In order to start watching events you'll want to uncomment that line. It also looks like your callback print statement is also commented out, although that appears to be just for debugging perhaps.
31,033,640
I am developing a .NET 4.0 C# console application. My understanding is that Dictionaries are implemented internally using hash tables and as such as really fast if they are accessed by their keys. I have a situation where I need to keep track of a list of objects by keys and need to iterate thru them often, so would ...
2015/06/24
[ "https://Stackoverflow.com/questions/31033640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3397285/" ]
You don't want to find all of the items matching a given key, you're trying to find all of the items with an int value greater than a provided value. You aren't going to get that out of a hash based set. It's very good at finding the items *exactly matching a key*, but that's not what you're trying to do. To find all ...
As servy said use binary search algorithm. To explain binary search imagine you are looking for the word "hello" in a big dictionary book. If you navigate to the middle of the book you will reach words starting with M. Now is H less or greater than M? Navigate to the middle page again you hit 'F'. Continue the bina...
31,033,640
I am developing a .NET 4.0 C# console application. My understanding is that Dictionaries are implemented internally using hash tables and as such as really fast if they are accessed by their keys. I have a situation where I need to keep track of a list of objects by keys and need to iterate thru them often, so would ...
2015/06/24
[ "https://Stackoverflow.com/questions/31033640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3397285/" ]
You don't want to find all of the items matching a given key, you're trying to find all of the items with an int value greater than a provided value. You aren't going to get that out of a hash based set. It's very good at finding the items *exactly matching a key*, but that's not what you're trying to do. To find all ...
Sorry for my bad English. If you need a really fast code, should take into account the processor cache. Google 'cache conscious hot cold' for more info. As you iterate over all elements of a collection, you do not get any benefit from the dictionary. KeyValuePair, contains three values: a, b and key is loaded into th...
31,033,640
I am developing a .NET 4.0 C# console application. My understanding is that Dictionaries are implemented internally using hash tables and as such as really fast if they are accessed by their keys. I have a situation where I need to keep track of a list of objects by keys and need to iterate thru them often, so would ...
2015/06/24
[ "https://Stackoverflow.com/questions/31033640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3397285/" ]
You don't want to find all of the items matching a given key, you're trying to find all of the items with an int value greater than a provided value. You aren't going to get that out of a hash based set. It's very good at finding the items *exactly matching a key*, but that's not what you're trying to do. To find all ...
Take a look at nosql database engines like redis. It is a key value database that stays in memory and will even allow you to set how long to persist the key value pair.
52,683
In Dragonvale I noticed breeding two Pang Long dragons yields another Pan Long dragon, and advice for breeding Holiday dragons on the Dragonvale wiki suggests you can only get expired time-limited dragons by breeding two of the same dragon. Does breeding two of the same dragon always give another one of the same drago...
2012/02/28
[ "https://gaming.stackexchange.com/questions/52683", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/11920/" ]
Generally they will breed a child of the same exact type, at least 95% of the time in my experience. However they can breed a hybrid of their elements. When breeding two Chrome dragons (air/metal) repeatedly I found that once I got a Rust dragon (Metal+water)! This is because, apparently, on rare occasion an Air drago...
I am almost positive they can mix and create a hybrid dragon. I am trying to remember if it happened to me, but I can't seem to recall... It is most likely that it creates the same type of dragon, but I believe it is possible to have a random combination of the elements within the dragon, as long as it is not one of th...
52,683
In Dragonvale I noticed breeding two Pang Long dragons yields another Pan Long dragon, and advice for breeding Holiday dragons on the Dragonvale wiki suggests you can only get expired time-limited dragons by breeding two of the same dragon. Does breeding two of the same dragon always give another one of the same drago...
2012/02/28
[ "https://gaming.stackexchange.com/questions/52683", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/11920/" ]
Generally they will breed a child of the same exact type, at least 95% of the time in my experience. However they can breed a hybrid of their elements. When breeding two Chrome dragons (air/metal) repeatedly I found that once I got a Rust dragon (Metal+water)! This is because, apparently, on rare occasion an Air drago...
I have been breeding two iron dragons for cash for about a month solid. It has always been another iron. Then today 10-11-13 two iron dragons gave me a bronze dragon. I would say they do have a chance to give you something else.
52,943,812
I need to create a SQL Linq with a `WHERE` clause containing an `OR` expression. Its operands are stored in a `List`. With this piece of code, I end up getting an AND expression: ``` private sigdaEntities db = new sigdaEntities(); List<string> list = new List<string>(); list.Add("Nom"); list.Add("Representant"); IQ...
2018/10/23
[ "https://Stackoverflow.com/questions/52943812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10541224/" ]
You can build the OR manually with multiple [`.Union()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.queryable.union?view=netframework-4.7.2) statements. I also changed to using `list.Contains()` because to me it seems to reflect better what the code is doing. ``` IQueryable<ExplotacionsAgraries> consult...
I am not sure that this is what you're looking for, but you can make use of the [`Queryable.Union`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.queryable.union?view=netframework-4.7.2) method, which will > > Produces the set union of two sequences. > > > Your code will look like this: ``` IQueryabl...
52,943,812
I need to create a SQL Linq with a `WHERE` clause containing an `OR` expression. Its operands are stored in a `List`. With this piece of code, I end up getting an AND expression: ``` private sigdaEntities db = new sigdaEntities(); List<string> list = new List<string>(); list.Add("Nom"); list.Add("Representant"); IQ...
2018/10/23
[ "https://Stackoverflow.com/questions/52943812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10541224/" ]
You can build the OR manually with multiple [`.Union()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.queryable.union?view=netframework-4.7.2) statements. I also changed to using `list.Contains()` because to me it seems to reflect better what the code is doing. ``` IQueryable<ExplotacionsAgraries> consult...
You can try this. ``` IQueryable<ExplotacionsAgraries> consulta = db.ExplotacionsAgraries; consulta.Where(x => (list.Contains("Nom") && x.nom.Contains(valueSearch)) || (list.Contains("Representant") && x.representant.Contains(valueSearch))); ```
52,943,812
I need to create a SQL Linq with a `WHERE` clause containing an `OR` expression. Its operands are stored in a `List`. With this piece of code, I end up getting an AND expression: ``` private sigdaEntities db = new sigdaEntities(); List<string> list = new List<string>(); list.Add("Nom"); list.Add("Representant"); IQ...
2018/10/23
[ "https://Stackoverflow.com/questions/52943812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10541224/" ]
You can build the OR manually with multiple [`.Union()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.queryable.union?view=netframework-4.7.2) statements. I also changed to using `list.Contains()` because to me it seems to reflect better what the code is doing. ``` IQueryable<ExplotacionsAgraries> consult...
You could just do `db.ExplotacionsAgraries.Where(x => (list.Any(i => i == "Nom") && x.nom.Contains(valueSearch)) || (list.Any(i => i == "Representant") && x.representant.Contains(valueSearch)))`
42,450,801
Here is the code, there are solutions available for work around what I am really interested in is WHY does it happen, whats going on behind the scenes? ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Demo CSS3</title> <style> p { color: ...
2017/02/25
[ "https://Stackoverflow.com/questions/42450801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1386990/" ]
I had this problem too. Instead of a wrong indentation, I accidentally added another dash ( - ) to my Homestead.yaml file. For example, this is the **incorrect** one: ``` - map: testing.khc.my - to: /home/vagrant/code/testing/public ``` The **correct** one is this: ``` - map: testing.khc.my to: /home/vagrant/cod...
I got this error too and it's a real pain. The source of the problem is a wrong indentation in the Homestead.yaml file. Check if you're using spaces or tabs.
27,379,972
I have a very large file which has columns delimited by the `|^` special characters. One important thing to be noted is that i am on an **AIX server** An example of the data would be: ``` name|^surname|^age|^city|^country john|^doe|^15|^chicago|^usa george|^reese|^14|^london|^england ``` After searching the intern...
2014/12/09
[ "https://Stackoverflow.com/questions/27379972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2571329/" ]
You have syntax errors in your `CREATE TABLE` you are ignoring. * `"Table de Clientes"` should probably be a valid identifier like `"TABLE_CLIENTE"` you're using later, according to your stacktrace. * `ID_CLIENTE PRIMARY KEY NOT NULL AUTOINCREMENT` needs to have `INTEGER` in it, e.g. `ID_CLIENTE INTEGER PRIMARY KEY AU...
In Oncreate You passed Wrong argument to create table: ``` public void onCreate(SQLiteDatabase database) { try { database.execSQL(TabelaClientes); } catch (SQLException e) { e.printStackTrace(); } } ``` And table name should not contain any spaces. ``` private st...
43,382,875
I'm trying to run the following script that creates a DB and a table at the same time. Because I'm using PgAdminIII, I have to use the Query Tool of an already existing database. I think that might be causing the problem. So this is how my script goes: ``` CREATE DATABASE homework; CREATE TABLE exampletable ( i...
2017/04/13
[ "https://Stackoverflow.com/questions/43382875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3400351/" ]
as mentioned by @AlexM I started looking in Cron and found few useful links to do this outside of postgresql. [crontab in linux with 20 useful examples](https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/) helps me out in understanding the structure for creating a new entry in the crontab. edit t...
Unfortunately, the previous comments are correct. There is no scheduler within PostgreSQL nor any of the supplied utilities. Your only option is to use an external scheduler.
14,839,452
I am working on extracting and displaying data from a Wordpress DB to a mobile app for a customer and I am having a little trouble refining this query to be most efficient. In wordpress, there are three tables that link the data I need to access 1. wp\_posts - in this table there is the main post title, it's published...
2013/02/12
[ "https://Stackoverflow.com/questions/14839452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/952029/" ]
If I understand correctly, you're looking for only child posts, in which case, the query below should be much faster: ``` SELECT wp_posts.id, post_title, post_status, post_type FROM wp_posts JOIN wp_postmeta ON (wp_posts.id = wp_postmeta.post_id) LEFT JOIN wp_p2p ON (wp_posts.id = wp_p2p.p2p_from) WHERE `post_status`...
To begin with, you should join tables using INNER or OUTER JOIN syntax. So: ``` FROM wp_posts INNER JOIN wp_postmeta ON wp_posts.id = wp_postmeta.post_id ``` or perhaps you want an OUTER JOIN here? Can you explain why you're doing a GROUP BY on wp\_posts.id. Does this column not have unique values?
31,420,565
So I'm making a webpage and for it I am making a header that includes 4 links/tabs, a logo and a dropdown menu when someone hovers over the 4th tab to display a hidden 5th tab. Everything is working except I can't seem to get the 5th tab (the "cater tab") to have **the same padding as the other four**, even though they...
2015/07/15
[ "https://Stackoverflow.com/questions/31420565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3920548/" ]
According to [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) > > `Padding` > > > Applies to all elements except `table-row-group`, `table-header-group`, > `table-footer-group`, `table-row`, `table-column-group` and `table-column`. It > also applies to `::first-letter`. > > > So just change you...
The problem originates from `display: table` in the `.dropdown` style. Remove that and the padding returns to normal. However, this may not be the desired method. Usually, inside of a `display: table` divs would be assigned to display as `display: table-column`
48,255,377
We are trying to do a school project in which we solve a problem of collecting items in an Amazon Building. We think we have the code almost set up but aren't able to pass a simple integer to a Clause for it to check, we get Wrong ObjectType all the time. ``` domains posicionInicial = Symbol posicionFinal= Symbol po...
2018/01/14
[ "https://Stackoverflow.com/questions/48255377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9217229/" ]
in addition to **answer 1** I can tell that you've almost totally typed `symbol`s instead of `variable`s. Variable name syntax: 1. The first char is *upper-cased letter* or *underscore* ("\_"); 2. The rest chars are *alpha-numeric chars* of any case or *underscore*; Replace `symbols` with `variable`s when it's appr...
`valido (nombre, posicion, cantidad)` is not a valid rule head or predicate call. You cannot put a space between the predicate name and the first parenthesis. For example, `test (1).` does not compile: ``` ERROR: c:/test.pl:1:5: Syntax error: Operator expected ``` but `test(1).` does. So remove all those spaces.
44,292,526
I'm getting a fatal runtime crash every time I attempt to instantiate a UIStoryboard. Here is the screen shot of the result of a Exception Break: [![enter image description here](https://i.stack.imgur.com/tqBR1.png)](https://i.stack.imgur.com/tqBR1.png) [![enter image description here](https://i.stack.imgur.com/p...
2017/05/31
[ "https://Stackoverflow.com/questions/44292526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/715747/" ]
Use `window.self` instead of `self`.
Add `var self = this;` or use `this.addEventListener(...)`
44,292,526
I'm getting a fatal runtime crash every time I attempt to instantiate a UIStoryboard. Here is the screen shot of the result of a Exception Break: [![enter image description here](https://i.stack.imgur.com/tqBR1.png)](https://i.stack.imgur.com/tqBR1.png) [![enter image description here](https://i.stack.imgur.com/p...
2017/05/31
[ "https://Stackoverflow.com/questions/44292526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/715747/" ]
You can explicitly remove `self` from the [no-restricted-globals](https://eslint.org/docs/rules/no-restricted-globals) rule or simply disable the rule for the line containing `self` using `eslint-disable-line` or `eslint-disable-next-line`: ``` self.addEventListener('install', function (event) { /* eslint-disable-line...
Add `var self = this;` or use `this.addEventListener(...)`
44,292,526
I'm getting a fatal runtime crash every time I attempt to instantiate a UIStoryboard. Here is the screen shot of the result of a Exception Break: [![enter image description here](https://i.stack.imgur.com/tqBR1.png)](https://i.stack.imgur.com/tqBR1.png) [![enter image description here](https://i.stack.imgur.com/p...
2017/05/31
[ "https://Stackoverflow.com/questions/44292526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/715747/" ]
You can explicitly remove `self` from the [no-restricted-globals](https://eslint.org/docs/rules/no-restricted-globals) rule or simply disable the rule for the line containing `self` using `eslint-disable-line` or `eslint-disable-next-line`: ``` self.addEventListener('install', function (event) { /* eslint-disable-line...
Use `window.self` instead of `self`.
4,063,273
I was googling around for some time and didn't googled anything... How to, using php, update twitter status thru twitter API with OAuth? Thanks!
2010/10/31
[ "https://Stackoverflow.com/questions/4063273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/491096/" ]
Does this work? ``` SELECT *, (SELECT COUNT(*) FROM words WHERE words.project=projects.id) as pCount FROM projects ```
Your inner subquery knows nothing about the outer query, so the `projects` table is not available.
4,063,273
I was googling around for some time and didn't googled anything... How to, using php, update twitter status thru twitter API with OAuth? Thanks!
2010/10/31
[ "https://Stackoverflow.com/questions/4063273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/491096/" ]
Does this work? ``` SELECT *, (SELECT COUNT(*) FROM words WHERE words.project=projects.id) as pCount FROM projects ```
It looks like you are trying to count for each project the number of words which occur more than once. You can run your subquery for all projects and then use a JOIN to get the rest of the data from the projects table: ``` SELECT projects.*, COUNT(word) AS cnt FROM projects LEFT JOIN ( SELECT project, word ...
5,819,721
I need the path of the referrer. I don't want the domain name. For example, if the referrer is `http://www.google.com/adsense` I want `/adsense`.
2011/04/28
[ "https://Stackoverflow.com/questions/5819721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/723530/" ]
`request.referer` returns a string, but you can use [Ruby's URI Module](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI.html#M009387) to wrap it and then simply ask it for its path: ``` if URI(request.referer).path == '/adsense' ```
You can access referer with ``` request.referer ```
409,650
after I add color to table, it has some problem for dispalying, here is the sample code: ``` \documentclass{article} \usepackage{xcolor,colortbl} \definecolor{Gray}{gray}{0.85} \begin{document} test a color table: \begin{table}[h] \begin{center} \begin{tabular}{|c|c|c|c|} \hline \rowcolor{Gray} Version & Date & Auth...
2018/01/10
[ "https://tex.stackexchange.com/questions/409650", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/17643/" ]
You can redraw the line after the tabular e.g. with tikz (in the example in red). An alternative is to draw the gray background before the tabular (also with tikz). See e.g. [Background colour for cells with padding](https://tex.stackexchange.com/questions/380436/background-colour-for-cells-with-padding/380440#380440)...
The package `nicematrix` provides tools designed to solve that kind of problems. The environment `{NiceTabular}` is similar to `{tabular}` (of `array`) but provides (when the key `colortbl-like` is used) tools to color the cells, row and columns with a syntax similar to the syntax of `colortbl`. It does *not* use `col...
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
Break it down into steps. Think about where code is going to be reusable. Although I don't use an off-the-shelf framework, I've kind of built one up over the years. Don't be wary of frameworks, they should be embraced. For example, my framework is pretty simple and lightweight. When I start a project, I create two (s...
I really do know how you feel. I am an old school guy and I think I'm a little resilient with all those new stuff. I just can't use a tool without know exactly what is happening. Sorry for frameworks evangelists, and megaproductive developers. I think when you use a framework, a CMS, or design patterns you miss all t...
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
This is more of a software engineering question than strictly a PHP question. There are several software development models. PHP supports some better than others, but with a little creativity you can implement almost any design. **[Model View Controller](http://en.wikipedia.org/wiki/Model-View-Controller)** This is t...
I really do know how you feel. I am an old school guy and I think I'm a little resilient with all those new stuff. I just can't use a tool without know exactly what is happening. Sorry for frameworks evangelists, and megaproductive developers. I think when you use a framework, a CMS, or design patterns you miss all t...
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
Break it down into steps. Think about where code is going to be reusable. Although I don't use an off-the-shelf framework, I've kind of built one up over the years. Don't be wary of frameworks, they should be embraced. For example, my framework is pretty simple and lightweight. When I start a project, I create two (s...
How Rasmus Lerdorf (co-creator of PHP) does it, "The no-framework PHP MVC Framework": <http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html>
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
I like your thinking. I had a look at CodeIgniter, Cake and the other frameworks and whilst they were good I decided to write my own. I learnt a ton. The first revision of my framework wasn't that great but I have two sites running on that without issues. The second edition of it might not be as mature as Cake etc but ...
Don't reinvent the wheel .. use Zend framework <http://framework.zend.com/> , is a best MVC structured you can find. Start from their quickstart tutorial.
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
This is more of a software engineering question than strictly a PHP question. There are several software development models. PHP supports some better than others, but with a little creativity you can implement almost any design. **[Model View Controller](http://en.wikipedia.org/wiki/Model-View-Controller)** This is t...
Frameworks are simply ways of making sure you adopt best practice. But on a small project, you can quite easily adopt good practice without a framework. All you need is a class or set of functions which do all the interaction with your database. These will generate the SQL queries based on the parameters you pass them....
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
First, pick a framework. Then, follow the directory structure it requires and the design principles it uses.
Don't reinvent the wheel .. use Zend framework <http://framework.zend.com/> , is a best MVC structured you can find. Start from their quickstart tutorial.
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
I like your thinking. I had a look at CodeIgniter, Cake and the other frameworks and whilst they were good I decided to write my own. I learnt a ton. The first revision of my framework wasn't that great but I have two sites running on that without issues. The second edition of it might not be as mature as Cake etc but ...
This is more of a software engineering question than strictly a PHP question. There are several software development models. PHP supports some better than others, but with a little creativity you can implement almost any design. **[Model View Controller](http://en.wikipedia.org/wiki/Model-View-Controller)** This is t...
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
Don't reinvent the wheel .. use Zend framework <http://framework.zend.com/> , is a best MVC structured you can find. Start from their quickstart tutorial.
Frameworks are simply ways of making sure you adopt best practice. But on a small project, you can quite easily adopt good practice without a framework. All you need is a class or set of functions which do all the interaction with your database. These will generate the SQL queries based on the parameters you pass them....
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
First, pick a framework. Then, follow the directory structure it requires and the design principles it uses.
This is more of a software engineering question than strictly a PHP question. There are several software development models. PHP supports some better than others, but with a little creativity you can implement almost any design. **[Model View Controller](http://en.wikipedia.org/wiki/Model-View-Controller)** This is t...
4,104,879
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database. I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck. I have read articles about MVC, frameworks, etc... and it all seems to have changed :) ...
2010/11/05
[ "https://Stackoverflow.com/questions/4104879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498180/" ]
I like your thinking. I had a look at CodeIgniter, Cake and the other frameworks and whilst they were good I decided to write my own. I learnt a ton. The first revision of my framework wasn't that great but I have two sites running on that without issues. The second edition of it might not be as mature as Cake etc but ...
Frameworks are simply ways of making sure you adopt best practice. But on a small project, you can quite easily adopt good practice without a framework. All you need is a class or set of functions which do all the interaction with your database. These will generate the SQL queries based on the parameters you pass them....
49,437,029
``` UIView.animate(withDuration: 3.0, animations: { // UIView.setAnimationRepeatCount(3.0) self.leadng.constant = self.view.frame.size.width + self.vwObj.frame.size.width self.view.layoutIfNeeded() }, completion: { finished in UIView.animate(withDuration: 3.0, animations: { ...
2018/03/22
[ "https://Stackoverflow.com/questions/49437029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4460970/" ]
Try this! ``` from jbossply.jbossparser import JbossParser import json parser = JbossParser() parser_out = parser.parse(OUT) json_dump = json.dump(parser_out) json_load = json.loads(json_dump) print json_load['result']['AvailableCount'] # op 0 ```
Finally I got the answer by myself, parsed json to a variable and extracted result like beow: `parser = JbossParser() data=(parser.parse(OUT)) TOTAL_CN=(data["result"]["AvailableCount"])`
40,552,672
Firstly, I have read through other posts on this page regarding similar issues but I cannot figure out where I am going wrong. I want to populate a column of [table1] with values from another column in [table2]. When I run, ``` insert into Staged.dbo.factSales(Date) select SaleDate from Staged.dbo.SaleDates...
2016/11/11
[ "https://Stackoverflow.com/questions/40552672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7147061/" ]
SalesValue does not allow nulls, so supply a zero. ``` Insert into Staged.dbo.factSales (Date,SaleValue) Select SaleDate,0 from Staged.dbo.SaleDates ```
Fixed using ``` update Staged.dbo.factSales set Staged.dbo.factSales.Date = Staged.dbo.SaleDates.SaleDate from Staged.dbo.factSales inner join Staged.dbo.SaleDates on Staged.dbo.factSales.SaleID = Staged.dbo.SaleDates.SaleID ```
455,543
The question asks us to find the function $f(x)$ with the given information: > > Let $f:\mathbb R \to \mathbb R$ such that $f'(0)=1$ and $f(x+y)=f(x) + f(y) + e^{x+y}(x+y)-xe^x-ye^y+2xy$ where $x,y \in\mathbb R$. Then determine $f(x)$. > > > Also, it will be great if someone could explain the general approach use...
2013/07/30
[ "https://math.stackexchange.com/questions/455543", "https://math.stackexchange.com", "https://math.stackexchange.com/users/86694/" ]
Put $x = y = 0$: $$ f(0) = 2f(0) $$ so $f(0) = 0$. Next, differentiate the original equation with respect to $y$ alone: $$ f'(x + y) = f'(y) + e^{x+y} + (x+y)e^{x+y} - e^y - ye^y + 2x. $$ Put $y = 0$: $$ f'(x) = f'(0) + e^x + xe^x - 1 + 2x = e^x + xe^x + 2x $$ Therefore $$ f(x) = \int\_0^x \left(e^z + ze^z + 2z\right)...
Rewrite the equation as $f(x+y)-f(x)-f(y)=e^{x+y}(x+y)-xe^x-ye^y-2xy$ then simply note that $f(x)=x e^x-x^2$ does the trick.
8,279,663
I have a form that the user can save and return to edit. I have questions on the form that toggle a div (`class = "details`) with additional questions based on the user's answer to the previous question. There are multiple of these question types. I'd like the answers of the sub-questions within the details div to cle...
2011/11/26
[ "https://Stackoverflow.com/questions/8279663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284908/" ]
If you can implement a fall detection algorithm using the sensors: ``` +Clumsy -Dropped the phone 5 times. ```
How about ``` + Talkative - Sent 100 texts a day or had 1 hour long converstions + Cool Kid on the block - 500+ contacts added + Stalker (or Friend zoned) - Calls a number more than 20 times a day with no reply from it. + Socially awkward penguin - 5 missed calls from different numbers, not returned....
66,176
> > In the beginning was the Word, and the Word was with God, and the Word > was God; John 1:1 (YLT) > > > > > Brethren, a new command I write not to you, but an old command, that > ye had from the beginning -- the old command is the word that ye heard > from the beginning 1 John 2:7 (YLT) > > > What is the m...
2021/08/04
[ "https://hermeneutics.stackexchange.com/questions/66176", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/42310/" ]
There are two possible origins for the idea that the water was "stirred up" in the story of the pool of Bethesda in John 5:1-7: 1. It was an old myth/tradition/legend 2. The flow of water (from a spring?) feeding the pool of Bethesda was intermittent giving the impression of being occasionally stirred. In any case, t...
You have stated, *"Modern translations omit John 5:4 so please avoid mentioning it".* Don't you want to know why modern translation omit it? Has your mind been fully made up about the need to refuse this verse any consideration? Yet you ask this Q in a hermeneutics site, which requires examination of text verses to see...
66,176
> > In the beginning was the Word, and the Word was with God, and the Word > was God; John 1:1 (YLT) > > > > > Brethren, a new command I write not to you, but an old command, that > ye had from the beginning -- the old command is the word that ye heard > from the beginning 1 John 2:7 (YLT) > > > What is the m...
2021/08/04
[ "https://hermeneutics.stackexchange.com/questions/66176", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/42310/" ]
There are two possible origins for the idea that the water was "stirred up" in the story of the pool of Bethesda in John 5:1-7: 1. It was an old myth/tradition/legend 2. The flow of water (from a spring?) feeding the pool of Bethesda was intermittent giving the impression of being occasionally stirred. In any case, t...
Here is my view from a supernatural worldview faith perspective. The implications of John 5:4 being part of the original Biblical text merits a separate question. My response takes it into account as it being a very early explanatory oral tradition connected to the early manuscripts as a scribal note. The rush of wat...
66,176
> > In the beginning was the Word, and the Word was with God, and the Word > was God; John 1:1 (YLT) > > > > > Brethren, a new command I write not to you, but an old command, that > ye had from the beginning -- the old command is the word that ye heard > from the beginning 1 John 2:7 (YLT) > > > What is the m...
2021/08/04
[ "https://hermeneutics.stackexchange.com/questions/66176", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/42310/" ]
You have stated, *"Modern translations omit John 5:4 so please avoid mentioning it".* Don't you want to know why modern translation omit it? Has your mind been fully made up about the need to refuse this verse any consideration? Yet you ask this Q in a hermeneutics site, which requires examination of text verses to see...
Here is my view from a supernatural worldview faith perspective. The implications of John 5:4 being part of the original Biblical text merits a separate question. My response takes it into account as it being a very early explanatory oral tradition connected to the early manuscripts as a scribal note. The rush of wat...
50,500,058
In the following table there is only two columns(ts and transaction\_id) and 3 rows. I just tried to create a partitioned table based on timestamp column but I get error message. ``` create table myfirstdataset.partition_table1(ts timestamp, transaction_id int64)partition by ts as select timestamp '2013-12-31 01:55:02...
2018/05/24
[ "https://Stackoverflow.com/questions/50500058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9798355/" ]
Should be `PARTITION BY DATE(ts)` instead of `PARTITION BY ts` - see [`CREATE TABLE statement`](https://cloud.google.com/bigquery/docs/data-definition-language#create_table_statement) and [`partition_expression`](https://cloud.google.com/bigquery/docs/data-definition-language#partition_expression) in particular ``` c...
create or replace table stage\_pcm\_dev.tab1(forecast\_date date) as select forecast\_date from `bigquery-public-data.covid19_public_forecasts.county_14d`
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
Okay i might have some even different approach. I am aware that it won't suit everybody but nontheless someone might find it useful. For those who do not want to pupup a new window, and like me, are concerned about css styles this is what i came up with: I wrapped view of my app into additional container, which is b...
**I don't think there's any need of writing this much big codes.** I've just installed angular-print bower package and all is set to go. ***Just inject it in module and you're all set to go Use pre-built print directives & fun is that you can also hide some div if you don't want to print*** <http://angular-js.in/ang...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
Two conditional functions are needed: one for Google Chrome, and a second for the remaining browsers. ``` $scope.printDiv = function (divName) { var printContents = document.getElementById(divName).innerHTML; if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { var popupWin = window.open(...
Okay i might have some even different approach. I am aware that it won't suit everybody but nontheless someone might find it useful. For those who do not want to pupup a new window, and like me, are concerned about css styles this is what i came up with: I wrapped view of my app into additional container, which is b...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
I done this way: ``` $scope.printDiv = function (div) { var docHead = document.head.outerHTML; var printContents = document.getElementById(div).outerHTML; var winAttr = "location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=865, height=600, resizable=yes, screenX=200, screenY=200, p...
**I don't think there's any need of writing this much big codes.** I've just installed angular-print bower package and all is set to go. ***Just inject it in module and you're all set to go Use pre-built print directives & fun is that you can also hide some div if you don't want to print*** <http://angular-js.in/ang...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
``` $scope.printDiv = function(divName) { var printContents = document.getElementById(divName).innerHTML; var popupWin = window.open('', '_blank', 'width=300,height=300'); popupWin.document.open(); popupWin.document.write('<html><head><link rel="stylesheet" type="text/css" href="style.css" /></head><body onload...
You can now use the library called [angular-print](https://github.com/samwiseduzer/angularPrint)
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
You can now use the library called [angular-print](https://github.com/samwiseduzer/angularPrint)
Okay i might have some even different approach. I am aware that it won't suit everybody but nontheless someone might find it useful. For those who do not want to pupup a new window, and like me, are concerned about css styles this is what i came up with: I wrapped view of my app into additional container, which is b...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
This is what worked for me in Chrome and Firefox! This will open the little print window and close it automatically once you've clicked print. ``` var printContents = document.getElementById('div-id-selector').innerHTML; var popupWin = window.open('', '_blank', 'width=800,height=800,scrollbars=no,menubar=n...
**I don't think there's any need of writing this much big codes.** I've just installed angular-print bower package and all is set to go. ***Just inject it in module and you're all set to go Use pre-built print directives & fun is that you can also hide some div if you don't want to print*** <http://angular-js.in/ang...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
You can now use the library called [angular-print](https://github.com/samwiseduzer/angularPrint)
I done this way: ``` $scope.printDiv = function (div) { var docHead = document.head.outerHTML; var printContents = document.getElementById(div).outerHTML; var winAttr = "location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=865, height=600, resizable=yes, screenX=200, screenY=200, p...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
I done this way: ``` $scope.printDiv = function (div) { var docHead = document.head.outerHTML; var printContents = document.getElementById(div).outerHTML; var winAttr = "location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=865, height=600, resizable=yes, screenX=200, screenY=200, p...
This is what worked for me in Chrome and Firefox! This will open the little print window and close it automatically once you've clicked print. ``` var printContents = document.getElementById('div-id-selector').innerHTML; var popupWin = window.open('', '_blank', 'width=800,height=800,scrollbars=no,menubar=n...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
You can now use the library called [angular-print](https://github.com/samwiseduzer/angularPrint)
This is what worked for me in Chrome and Firefox! This will open the little print window and close it automatically once you've clicked print. ``` var printContents = document.getElementById('div-id-selector').innerHTML; var popupWin = window.open('', '_blank', 'width=800,height=800,scrollbars=no,menubar=n...
22,189,555
Let's say I have data, such as below: ``` union { struct { char flags : 4; uint16_t : 12; } char data[2]; } ``` I understand how to make this code run regardless of byte endianness on a platform. I am asking to be sure that my understanding of how it would be stored on the different endians is corr...
2014/03/05
[ "https://Stackoverflow.com/questions/22189555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2363967/" ]
Two conditional functions are needed: one for Google Chrome, and a second for the remaining browsers. ``` $scope.printDiv = function (divName) { var printContents = document.getElementById(divName).innerHTML; if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { var popupWin = window.open(...
**I don't think there's any need of writing this much big codes.** I've just installed angular-print bower package and all is set to go. ***Just inject it in module and you're all set to go Use pre-built print directives & fun is that you can also hide some div if you don't want to print*** <http://angular-js.in/ang...
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
Those are exactly the same. "string" is just an alias for "System.String" in C#
string and String both resolve to System.String. So no there is no difference at all.
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
Those are exactly the same. "string" is just an alias for "System.String" in C#
Yes, string is an alias for System.String in C# Test it yourself: ``` public static void Main(string[] args) { string s1 = "abc"; System.String s2 = "xyz"; Type t1 = s1.GetType(); Type t2 = s2.GetType(); System.Console.WriteLine( t1.Equals(t2) ); return ; ...
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
Those are exactly the same. "string" is just an alias for "System.String" in C#
Yes, there's absolutely no difference from CLR's point of view: `string` vs `String` is purely C# syntactic sugar.
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
Those are exactly the same. "string" is just an alias for "System.String" in C#
In C#, **string** is simply an alias for the CLR type **System.String**, so there is no performance difference. It is not clear why MS decided to include this alias, particularly as the other aliased types (int, long, etc.) are value types rather than reference types. In my team we decided that static methods of the s...
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
string and String both resolve to System.String. So no there is no difference at all.
Yes, string is an alias for System.String in C# Test it yourself: ``` public static void Main(string[] args) { string s1 = "abc"; System.String s2 = "xyz"; Type t1 = s1.GetType(); Type t2 = s2.GetType(); System.Console.WriteLine( t1.Equals(t2) ); return ; ...
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
string and String both resolve to System.String. So no there is no difference at all.
Yes, there's absolutely no difference from CLR's point of view: `string` vs `String` is purely C# syntactic sugar.
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
In C#, **string** is simply an alias for the CLR type **System.String**, so there is no performance difference. It is not clear why MS decided to include this alias, particularly as the other aliased types (int, long, etc.) are value types rather than reference types. In my team we decided that static methods of the s...
Yes, string is an alias for System.String in C# Test it yourself: ``` public static void Main(string[] args) { string s1 = "abc"; System.String s2 = "xyz"; Type t1 = s1.GetType(); Type t2 = s2.GetType(); System.Console.WriteLine( t1.Equals(t2) ); return ; ...
1,086,170
Is there any performance differences between string.Format and String.Format ? As far as i understand string is a shortcut for System.String and there's no difference between them. Am i right? Thanks!
2009/07/06
[ "https://Stackoverflow.com/questions/1086170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88702/" ]
In C#, **string** is simply an alias for the CLR type **System.String**, so there is no performance difference. It is not clear why MS decided to include this alias, particularly as the other aliased types (int, long, etc.) are value types rather than reference types. In my team we decided that static methods of the s...
Yes, there's absolutely no difference from CLR's point of view: `string` vs `String` is purely C# syntactic sugar.
10,681,107
Reader, Could anyone explain to me what will happen in my computer when I run this piece of false code. Compiled with the gnu gcc compiler. in Codeblocks. *This is false code:* ``` char data[5]; data[0] = '1'; data[1] = '10'; data[2] = '30'; data[3] = '50'; if(sizeof(data) == 5) { adjust(data); }...
2012/05/21
[ "https://Stackoverflow.com/questions/10681107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343662/" ]
It's a bit confusing that you're using multi-character literals like `10`, that probably adds to your confusion. What will happen with a line like this: ``` data[1] = '10'; ``` is: * The `int`-type (*not* `char`, in C) value `'10'` will be truncated down to `char` * The resulting value will be assigned to `data[1]`...
Except for the effects of `adjust()`, what happens is quite clear: * `data[]` is allocated with 5 elements * the first through fourth elements are defined * the size of `data[]` is compared with 5 * *adjust()* is called with a pointer to the beginning of `data[]` I don't understand your comments about reading `data[1...
18,259,916
You are given **N integers, A[1] to A[N]**. You have to assign weights to these integers such that their `weighted sum is maximized`. The weights should satisfy the following conditions : 1. Each weight should be an positive integer. 2. W[1] = 1 3. W[i] should be in the range [2, W[i-1] + 1] for i > 1 Weighted sum is...
2013/08/15
[ "https://Stackoverflow.com/questions/18259916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2426101/" ]
Let `dp[i][j]` equal the maximum weighted sum we can make from `A[1..i]` by assigning weight `j` to `A[i]`. Clearly `dp[i][j] = j*A[i] + max(dp[i - 1][(j - 1)..N])`. There are `O(N^2)` states and our recurrence takes `O(N)` for each state so the overall time complexity will be `O(N^3)`. To reduce it to `O(N^2)` we can ...
Fairly standard dynamic-programming methods can be used to solve this problem in O(N³) time. Let V(k,u) denote the best value that can be gotten using elements k...N when Wₖ₋₁ has the value u. Observe that V(k,u) is the maximum value of g·Aₖ+V(k-1,g) as g ranges from 2 to u+1, and that V(N,u) is (u+1)·AN if AN is posit...
18,259,916
You are given **N integers, A[1] to A[N]**. You have to assign weights to these integers such that their `weighted sum is maximized`. The weights should satisfy the following conditions : 1. Each weight should be an positive integer. 2. W[1] = 1 3. W[i] should be in the range [2, W[i-1] + 1] for i > 1 Weighted sum is...
2013/08/15
[ "https://Stackoverflow.com/questions/18259916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2426101/" ]
Let `dp[i][j]` equal the maximum weighted sum we can make from `A[1..i]` by assigning weight `j` to `A[i]`. Clearly `dp[i][j] = j*A[i] + max(dp[i - 1][(j - 1)..N])`. There are `O(N^2)` states and our recurrence takes `O(N)` for each state so the overall time complexity will be `O(N^3)`. To reduce it to `O(N^2)` we can ...
Here's a little insight that might enable you or someone else to come up with a really fast solution. Note that for an optimal solution, you can safely assume that at each step either you increase the weight by +1 from the previous weight, or you decrease the weight all the way down to the minimum of 2. To see this, su...
39,367,586
How could I run javascript on changing value of `ASPxComboBox`? I tried this: ``` <dx:ASPxComboBox ID="cbx_Organization" runat="server" ValueType="System.String" AutoPostBack="True" OnSelectedIndexChanged="handleOrganizationChange()" Width="230px"> </dx:ASPxComboBox> <script type="text/javascript"> function handleO...
2016/09/07
[ "https://Stackoverflow.com/questions/39367586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm not totally sure about this but it seems that On-Premises Data Gateway is a connection between On-Premise and servers (IaaS) in Azure. Hybrid Connection is used to connect On-Premise to e.g. Web Apps (PaaS) in Azure. So I would say that at least one difference is whether On-Premise is connected to IaaS or PaaS. ...
From an integration perspective, let's say you want to read some data from on-premises SQL server as a step in a logic app. If you have either a Site-to-Site VPN or ExpressRoute providing connectivity between your on-premises network and Azure VNET, create an Azure ISE (Integration Services Environment) deployed to ...
38,072,295
I am using Xcode8 Beta with Swift 3.0. I tried to encode a simple object base on NSObject, but I cannot decode Int or NSInteger type. (The encoding process is OK) [![enter image description here](https://i.stack.imgur.com/GN6Yi.png)](https://i.stack.imgur.com/GN6Yi.png) codes ``` class Model : NSObject, NSCoding { ...
2016/06/28
[ "https://Stackoverflow.com/questions/38072295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4133803/" ]
Use the `encodeInteger` method to encode integers instead: ``` func encode(with aCoder: NSCoder) { ... aCoder.encodeInteger(seq2, forKey: "seq2") } ```
Take care with nil values ``` func encode(with aCoder: NSCoder){ aCoder.encode(seq, forKey: "seq") if let second_seq = self.seq2 { aCoder.encode(second_seq, forKey: "seq2") } aCoder.encode(id, forKey: "id") aCoder.encode(value, forKey: "value") } ``` `seq2` will be `nil` if the key i...
38,072,295
I am using Xcode8 Beta with Swift 3.0. I tried to encode a simple object base on NSObject, but I cannot decode Int or NSInteger type. (The encoding process is OK) [![enter image description here](https://i.stack.imgur.com/GN6Yi.png)](https://i.stack.imgur.com/GN6Yi.png) codes ``` class Model : NSObject, NSCoding { ...
2016/06/28
[ "https://Stackoverflow.com/questions/38072295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4133803/" ]
The problem is that `seq2` is not an `Int`, but rather a `Int?` optional. It cannot be represented as an Objective-C integer. You can use `decodeObject`: ``` required init?(coder aDecoder: NSCoder){ self.seq = aDecoder.decodeObject(forKey: "seq") as? NSNumber self.seq2 = aDecoder.decodeObject(forKey: "seq2")...
Take care with nil values ``` func encode(with aCoder: NSCoder){ aCoder.encode(seq, forKey: "seq") if let second_seq = self.seq2 { aCoder.encode(second_seq, forKey: "seq2") } aCoder.encode(id, forKey: "id") aCoder.encode(value, forKey: "value") } ``` `seq2` will be `nil` if the key i...
38,072,295
I am using Xcode8 Beta with Swift 3.0. I tried to encode a simple object base on NSObject, but I cannot decode Int or NSInteger type. (The encoding process is OK) [![enter image description here](https://i.stack.imgur.com/GN6Yi.png)](https://i.stack.imgur.com/GN6Yi.png) codes ``` class Model : NSObject, NSCoding { ...
2016/06/28
[ "https://Stackoverflow.com/questions/38072295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4133803/" ]
The problem is that `seq2` is not an `Int`, but rather a `Int?` optional. It cannot be represented as an Objective-C integer. You can use `decodeObject`: ``` required init?(coder aDecoder: NSCoder){ self.seq = aDecoder.decodeObject(forKey: "seq") as? NSNumber self.seq2 = aDecoder.decodeObject(forKey: "seq2")...
Use the `encodeInteger` method to encode integers instead: ``` func encode(with aCoder: NSCoder) { ... aCoder.encodeInteger(seq2, forKey: "seq2") } ```
36,002,075
I'm trying to create two model in just one form. I have `user` and `unit` model both are associated with has\_many :through association. user.rb ``` class User < ActiveRecord::Base has_many :units, :through => :user_unit_assocs has_many :user_unit_assocs end ``` unit.rb ``` class Unit < ActiveRecord::Base ha...
2016/03/15
[ "https://Stackoverflow.com/questions/36002075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5167264/" ]
Add ``` def new @user = User.new @user.units.build end ``` on your controller
You need to build the association in the new action, not the create action.
59,173,145
**Is there any strategy to partition the classes to apply Single Responsibility Principle?** In a medium size team, we are developing a wearable manager app which can connect with different types of wearables, let’s say, `Wearable1` and `Wearable2` (single connection at a time). Each wearable device has different type...
2019/12/04
[ "https://Stackoverflow.com/questions/59173145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1084174/" ]
Each step of this loop: ``` ... for (DataSnapshot s : dataSnapshot.getChildren()) { final member user = s.getValue(member.class); LatLng location = new LatLng(user.lat, user.lon); mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() { @Override ...
`final member user = s.getValue(member.class);` You have your user variable as final. This means that its value will not change after initializing it so it will always have the same user. Try removing the final keyword.
48,480,223
I've recently deployed a Rails app, and have heard back from a few users that it doesn't work in their work environments. It's clear that Websockets are blocked for them. I've hunted through the Rails documentation on this but can't find any information on how to go about detecting if this has happened. My best guess ...
2018/01/27
[ "https://Stackoverflow.com/questions/48480223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1952267/" ]
I have a workaround that isn't great, but is better than anything else I've seen. Rails provides no interface, but you can get down to the native WebSocket and handle the error. ``` consumer.subscriptions.create("ChatChannel", { ... }); consumer.connection.webSocket.onerror = function () { console.log('Websocket co...
There is a `rejected` handler you can use. This should fire when the subscription is rejected by the server. The below coffeescript example is from the [official rails docs](http://edgeguides.rubyonrails.org/action_cable_overview.html). ``` App.cable.subscriptions.create "AppearanceChannel", # Called when the subsc...
48,480,223
I've recently deployed a Rails app, and have heard back from a few users that it doesn't work in their work environments. It's clear that Websockets are blocked for them. I've hunted through the Rails documentation on this but can't find any information on how to go about detecting if this has happened. My best guess ...
2018/01/27
[ "https://Stackoverflow.com/questions/48480223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1952267/" ]
I have a workaround that isn't great, but is better than anything else I've seen. Rails provides no interface, but you can get down to the native WebSocket and handle the error. ``` consumer.subscriptions.create("ChatChannel", { ... }); consumer.connection.webSocket.onerror = function () { console.log('Websocket co...
Whenever an action cable connection fails it writes to the browser console `failed: WebSocket is closed before the connection is established` You can leverage this to know if there was a connection error: ``` def action_cable_connection_errored? page.driver.browser.manage.logs.get(:browser) .map(&:message) ...
125,886
I've got a data structure that consists of a long list of triples; each triple consists of a number, a two-element pair, and a two-element pair. Symbolically, I can represent this data structure as `{{t1, {x1, y1}, {vx1, vy1}}, {t2, {x2, y2}, {vx2, vy2}}, ...}`. I want to extract just the tN and yN values as pairs, to...
2016/09/08
[ "https://mathematica.stackexchange.com/questions/125886", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/23076/" ]
I would approach this with `Part` (shorthand [[ ]]) rather than `Extract`: ``` Thread[{traj[[All, 1]], traj[[All, 2, 2]]}] {{t1, y1}, {t2, y2}, {t3, y3}} ```
`MapAt` is the only function I know that allows a list position to contain `All`. You could exploit that fact: ``` Reap[MapAt[Sow, traj, {{All, 1}, {All, 2, 2}}]][[2, 1]] ``` However, I like the following workaround better: ``` traj[[Sequence @@ #]] & /@ {{All, 1}, {All, 2, 2}} ```
125,886
I've got a data structure that consists of a long list of triples; each triple consists of a number, a two-element pair, and a two-element pair. Symbolically, I can represent this data structure as `{{t1, {x1, y1}, {vx1, vy1}}, {t2, {x2, y2}, {vx2, vy2}}, ...}`. I want to extract just the tN and yN values as pairs, to...
2016/09/08
[ "https://mathematica.stackexchange.com/questions/125886", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/23076/" ]
Yet another way using the operator form of `Extract`: ``` Map[Extract[{{1}, {2, 2}}], traj] (* {{t1, y1}, {t2, y2}, {t3, y3}} *) ```
`MapAt` is the only function I know that allows a list position to contain `All`. You could exploit that fact: ``` Reap[MapAt[Sow, traj, {{All, 1}, {All, 2, 2}}]][[2, 1]] ``` However, I like the following workaround better: ``` traj[[Sequence @@ #]] & /@ {{All, 1}, {All, 2, 2}} ```
125,886
I've got a data structure that consists of a long list of triples; each triple consists of a number, a two-element pair, and a two-element pair. Symbolically, I can represent this data structure as `{{t1, {x1, y1}, {vx1, vy1}}, {t2, {x2, y2}, {vx2, vy2}}, ...}`. I want to extract just the tN and yN values as pairs, to...
2016/09/08
[ "https://mathematica.stackexchange.com/questions/125886", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/23076/" ]
Use destructuring. ``` helper[{t_, {_, y_}, _}] := {t, y} helper /@ traj ``` > > `{{t1, y1}, {t2, y2}, {t3, y3}}` > > >
`MapAt` is the only function I know that allows a list position to contain `All`. You could exploit that fact: ``` Reap[MapAt[Sow, traj, {{All, 1}, {All, 2, 2}}]][[2, 1]] ``` However, I like the following workaround better: ``` traj[[Sequence @@ #]] & /@ {{All, 1}, {All, 2, 2}} ```
125,886
I've got a data structure that consists of a long list of triples; each triple consists of a number, a two-element pair, and a two-element pair. Symbolically, I can represent this data structure as `{{t1, {x1, y1}, {vx1, vy1}}, {t2, {x2, y2}, {vx2, vy2}}, ...}`. I want to extract just the tN and yN values as pairs, to...
2016/09/08
[ "https://mathematica.stackexchange.com/questions/125886", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/23076/" ]
Yet another way using the operator form of `Extract`: ``` Map[Extract[{{1}, {2, 2}}], traj] (* {{t1, y1}, {t2, y2}, {t3, y3}} *) ```
I would approach this with `Part` (shorthand [[ ]]) rather than `Extract`: ``` Thread[{traj[[All, 1]], traj[[All, 2, 2]]}] {{t1, y1}, {t2, y2}, {t3, y3}} ```
125,886
I've got a data structure that consists of a long list of triples; each triple consists of a number, a two-element pair, and a two-element pair. Symbolically, I can represent this data structure as `{{t1, {x1, y1}, {vx1, vy1}}, {t2, {x2, y2}, {vx2, vy2}}, ...}`. I want to extract just the tN and yN values as pairs, to...
2016/09/08
[ "https://mathematica.stackexchange.com/questions/125886", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/23076/" ]
Yet another way using the operator form of `Extract`: ``` Map[Extract[{{1}, {2, 2}}], traj] (* {{t1, y1}, {t2, y2}, {t3, y3}} *) ```
Use destructuring. ``` helper[{t_, {_, y_}, _}] := {t, y} helper /@ traj ``` > > `{{t1, y1}, {t2, y2}, {t3, y3}}` > > >
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
Turns out you can get around this by configuring `htmlnano` to *not* minify SVG. Add a `.htmlnanorc` file to your project root, with a JSON configuration object like this: ``` { "minifySvg": false } ``` The relevant part of the documentation is [here for V1](https://parceljs.org/html.html#htmlnano) (which actua...
`parcel build --no-optimize index.html` It will jump the optimization of parcel and let you going on. Hope it’s helpful. very easy way pls upvote
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
Turns out you can get around this by configuring `htmlnano` to *not* minify SVG. Add a `.htmlnanorc` file to your project root, with a JSON configuration object like this: ``` { "minifySvg": false } ``` The relevant part of the documentation is [here for V1](https://parceljs.org/html.html#htmlnano) (which actua...
In my case, it worked by using an IMG tag with the SVG as the src. You can weigh the pro's & con's yourself: [Adding vector graphics to the Web | MDN](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web) Note: I'm not sure if doing it this way is less efficie...
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
Turns out you can get around this by configuring `htmlnano` to *not* minify SVG. Add a `.htmlnanorc` file to your project root, with a JSON configuration object like this: ``` { "minifySvg": false } ``` The relevant part of the documentation is [here for V1](https://parceljs.org/html.html#htmlnano) (which actua...
It worked for me. just ``` parcel build index.html --no-minify ``` i think is deprecated because of --no-optmize
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
In my case it worked adding .htmlnanorc.js to my project root with the following: ``` module.exports = { "minifySvg": false } ```
`parcel build --no-optimize index.html` It will jump the optimization of parcel and let you going on. Hope it’s helpful. very easy way pls upvote
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
In my case it worked adding .htmlnanorc.js to my project root with the following: ``` module.exports = { "minifySvg": false } ```
In my case, it worked by using an IMG tag with the SVG as the src. You can weigh the pro's & con's yourself: [Adding vector graphics to the Web | MDN](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web) Note: I'm not sure if doing it this way is less efficie...
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
In my case it worked adding .htmlnanorc.js to my project root with the following: ``` module.exports = { "minifySvg": false } ```
It worked for me. just ``` parcel build index.html --no-minify ``` i think is deprecated because of --no-optmize
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
`parcel build --no-optimize index.html` It will jump the optimization of parcel and let you going on. Hope it’s helpful. very easy way pls upvote
In my case, it worked by using an IMG tag with the SVG as the src. You can weigh the pro's & con's yourself: [Adding vector graphics to the Web | MDN](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web) Note: I'm not sure if doing it this way is less efficie...
67,087,634
Whenever I try to run production build command `npm run build` or `npx parcel build index.html`, I get this error. I have a simple html and css project, no react, no 3rd party library Why could this be happening? I have tried parcel versions 1.12.3, 1.12.4 and 1.12.5. Here is the error: ``` /Users/user/Documents/HTML...
2021/04/14
[ "https://Stackoverflow.com/questions/67087634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5720206/" ]
`parcel build --no-optimize index.html` It will jump the optimization of parcel and let you going on. Hope it’s helpful. very easy way pls upvote
It worked for me. just ``` parcel build index.html --no-minify ``` i think is deprecated because of --no-optmize
8,370,098
Can it happen that mutual exclusion algorithm doesn`t maintain dead-lock free property,but it maintains starvation freedom ? Thank you
2011/12/03
[ "https://Stackoverflow.com/questions/8370098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/466056/" ]
**Starvation-freedom** can be defined as: Whatever the process *p*, each invocation of `acquire_mutex()` issused by *p* eventually terminates. OR Any process trying to enter critical section, will eventually enter critical section. **Deadlock-freedom**: Whatever the time *T* , if before *T* one or several processes ha...
No—every reasonable definition of starvation includes deadlock.
51,374
I have a piece of non-fiction to write that I'll be doing by telling a story. It's somewhere between a news report, op-ed, and historical lesson, but told as a short story. In this story there are no good guys, nobody who fell from grace, and nobody to save the day. It's just a bunch of bad guys doing a bunch of bad g...
2020/05/31
[ "https://writers.stackexchange.com/questions/51374", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/44542/" ]
This is *[slice of life](https://en.wikipedia.org/wiki/Slice_of_life)*, a storytelling technique that depicts a period of time without a conventional narrative or plotline, and potentially without an identifiable protagonist. It's relatively uncommon in fiction, but relatively common in documentaries, although those ar...
Is it similar to "And then there are none"? And Then There Are None is classified under: * Mystery * Crime * Psychological thriller * Horror I think your book might fit under one of these (except mystery).
51,374
I have a piece of non-fiction to write that I'll be doing by telling a story. It's somewhere between a news report, op-ed, and historical lesson, but told as a short story. In this story there are no good guys, nobody who fell from grace, and nobody to save the day. It's just a bunch of bad guys doing a bunch of bad g...
2020/05/31
[ "https://writers.stackexchange.com/questions/51374", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/44542/" ]
This is *[slice of life](https://en.wikipedia.org/wiki/Slice_of_life)*, a storytelling technique that depicts a period of time without a conventional narrative or plotline, and potentially without an identifiable protagonist. It's relatively uncommon in fiction, but relatively common in documentaries, although those ar...
I believe the term you're looking for may be 'Creative Non-Fiction'.
17,460,198
On a click of a button, i'm trying to fadeOut an image, and while it is fading out i'm changing the source of the image. And then i'm using the fadeIn to show the new image. This works fine in Chrome, and firefox. However, in ie10, the image fades out, fades in, and then the new image appears. I can't find a a fix for ...
2013/07/04
[ "https://Stackoverflow.com/questions/17460198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801879/" ]
I'm pretty sure you need to put the `.fadeIn` method inside the callback function in order for it to be affected by the callback function. In fact, I'd add another callback function to the `.attr` method to make sure that it fades back in only after the `src` has been changed. [Here's](http://jsfiddle.net/eanAc/) a js...
this works: ``` me.$el.find('#printable-detail-static-imageRight').animate({ opacity:0 }, { duration: 700, step: function(now, fx){ if(fx.pos > 0.40 && fx.pos < 0.5){ ...
17,460,198
On a click of a button, i'm trying to fadeOut an image, and while it is fading out i'm changing the source of the image. And then i'm using the fadeIn to show the new image. This works fine in Chrome, and firefox. However, in ie10, the image fades out, fades in, and then the new image appears. I can't find a a fix for ...
2013/07/04
[ "https://Stackoverflow.com/questions/17460198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801879/" ]
i am on a mac, but does this code works in ie ? [jsFiddle](http://jsfiddle.net/Rusln/b36Jp/) .html ``` <div id="content">Promises</div> <button id="click">start animation</button> ``` .js ``` $("#click").on("click", function () { $('#content').fadeOut({ duration: 1000, // run when the animation...
this works: ``` me.$el.find('#printable-detail-static-imageRight').animate({ opacity:0 }, { duration: 700, step: function(now, fx){ if(fx.pos > 0.40 && fx.pos < 0.5){ ...
24,918,429
very new to SharedObjects, but essentially all I want to do is let a user answer a question once and not allow them to answer again, how is it possible. This is what I have below? ``` /*if(_question.data.seenQuestion == "true") { cookie_txt.text = "COOKIE FOUND"; } else { cookie_txt.text = "NO COOKIES"; }*/ v...
2014/07/23
[ "https://Stackoverflow.com/questions/24918429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1947068/" ]
You're very close. It looks like you're not actually creating a `SharedObject`, to do that you would use the method `getLocal`: ``` var _question:SharedObject = SharedObject.getLocal("questionData"); ``` Additionally, since `SharedObject` supports primitive types (`String`, `int`, `Number`, `Object`, `Boolean`, etc)...
You do need to create your SharedOBject or else your code will throw errors: ``` var _question:SharedObject = SharedOBject.getLocal("myapp"); ``` No need for flush or close just assign/change some data and that's it. ``` _question.data.seenQuestion = "true"; ``` However SharedObject is not a good solution for per...
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
Date is looking for a timestamp as it's 2nd parameter, not a string value representing this. Updated to pass it $strtime instead. ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); // <-- Unnecessary unless you want to echo the value. echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$strtime)...
If you already have strtotime, why plus on `date` ? Instead you could've used + (30 days in seconds) OR simply the feature they offer you `+ 1 day` check answer: [adding one day to a date](https://stackoverflow.com/questions/1394791/adding-one-day-to-a-date) `strtotime('2013-10-04 + 30 days');` This will print `2013-...
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
You can just use the following function to add 30 days to the date you put in: ``` $date = strtotime("2013-10-04"); $new_date = strtotime("+30 days", $date); ``` or simply to the current date: ``` $new_date = strototime("+30 days", time()); ```
If you already have strtotime, why plus on `date` ? Instead you could've used + (30 days in seconds) OR simply the feature they offer you `+ 1 day` check answer: [adding one day to a date](https://stackoverflow.com/questions/1394791/adding-one-day-to-a-date) `strtotime('2013-10-04 + 30 days');` This will print `2013-...
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
If you already have strtotime, why plus on `date` ? Instead you could've used + (30 days in seconds) OR simply the feature they offer you `+ 1 day` check answer: [adding one day to a date](https://stackoverflow.com/questions/1394791/adding-one-day-to-a-date) `strtotime('2013-10-04 + 30 days');` This will print `2013-...
You can use this also ``` <?php $date = date("Y/m/d"); // example date in yyyy/mm/dd format $unix_time = strtotime( $date ); // covert date to unix time $sec_in_30_days = 60 * 60 * 24 * 30; // 60 seconds * 60 minutes * 24 hours * 30 days $new_unix_time = $unix_time + $sec_in_30_days; // add 30 days to unix ...
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
Date is looking for a timestamp as it's 2nd parameter, not a string value representing this. Updated to pass it $strtime instead. ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); // <-- Unnecessary unless you want to echo the value. echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$strtime)...
you can try this: echo strtotime("+1 day"), "\n"; echo strtotime("+30 day",strtotime(date('D, d M Y'))), "\n"; this will add 30 days to the current date. Also strtotime is very usefull you can use it for weekly,monthly and yearly.
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
You can just use the following function to add 30 days to the date you put in: ``` $date = strtotime("2013-10-04"); $new_date = strtotime("+30 days", $date); ``` or simply to the current date: ``` $new_date = strototime("+30 days", time()); ```
you can try this: echo strtotime("+1 day"), "\n"; echo strtotime("+30 day",strtotime(date('D, d M Y'))), "\n"; this will add 30 days to the current date. Also strtotime is very usefull you can use it for weekly,monthly and yearly.
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
you can try this: echo strtotime("+1 day"), "\n"; echo strtotime("+30 day",strtotime(date('D, d M Y'))), "\n"; this will add 30 days to the current date. Also strtotime is very usefull you can use it for weekly,monthly and yearly.
You can use this also ``` <?php $date = date("Y/m/d"); // example date in yyyy/mm/dd format $unix_time = strtotime( $date ); // covert date to unix time $sec_in_30_days = 60 * 60 * 24 * 30; // 60 seconds * 60 minutes * 24 hours * 30 days $new_unix_time = $unix_time + $sec_in_30_days; // add 30 days to unix ...
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
Date is looking for a timestamp as it's 2nd parameter, not a string value representing this. Updated to pass it $strtime instead. ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); // <-- Unnecessary unless you want to echo the value. echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$strtime)...
You can just use the following function to add 30 days to the date you put in: ``` $date = strtotime("2013-10-04"); $new_date = strtotime("+30 days", $date); ``` or simply to the current date: ``` $new_date = strototime("+30 days", time()); ```
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
Date is looking for a timestamp as it's 2nd parameter, not a string value representing this. Updated to pass it $strtime instead. ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); // <-- Unnecessary unless you want to echo the value. echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$strtime)...
You can use this also ``` <?php $date = date("Y/m/d"); // example date in yyyy/mm/dd format $unix_time = strtotime( $date ); // covert date to unix time $sec_in_30_days = 60 * 60 * 24 * 30; // 60 seconds * 60 minutes * 24 hours * 30 days $new_unix_time = $unix_time + $sec_in_30_days; // add 30 days to unix ...
19,190,438
im doing some stuff with mktime, i need to add the next date with 30 days more but its returning me 1970-01-30 date, what im doing wrong ? ``` $strtime=strtotime("2013-10-04"); $fecha=date("Y-m-d",$strtime); echo $fecha."<br />"; $nueva_fecha=mktime(0,0,0,date("n",$fecha),date("j",$fecha)+30,date("Y",$fecha)); echo da...
2013/10/04
[ "https://Stackoverflow.com/questions/19190438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1009089/" ]
You can just use the following function to add 30 days to the date you put in: ``` $date = strtotime("2013-10-04"); $new_date = strtotime("+30 days", $date); ``` or simply to the current date: ``` $new_date = strototime("+30 days", time()); ```
You can use this also ``` <?php $date = date("Y/m/d"); // example date in yyyy/mm/dd format $unix_time = strtotime( $date ); // covert date to unix time $sec_in_30_days = 60 * 60 * 24 * 30; // 60 seconds * 60 minutes * 24 hours * 30 days $new_unix_time = $unix_time + $sec_in_30_days; // add 30 days to unix ...
26,856,669
Am I allowed to not put any parameters besides self into the init method? Can I also have a body that does not define any other variables besides self? ``` class foo(object): def __init__(self): self = self ``` Or do I have to put a parameter and a body like so: ``` class bar(object): def __init__(s...
2014/11/11
[ "https://Stackoverflow.com/questions/26856669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4135743/" ]
If you have nothing to initialize, than you don't need to define an `__init__` method at all. Just don't define it.
If you are not using the `__init__`, then there is no reason to define it at all. *However,* if this is theoretical, then ***I*** have a question for you: Why don't **you** try it first? For the sake of completion, here is my trial: ``` >>> class foo(object): ... def __init__(self): ... self = self .....
92,453
Our office is an open space community and my desk is right beside the walking path (I don't know if it's called that way), where people are passing by all day long. Of course I placed some stuff at my desk such as bottle of water, a cup for a tea, notebook, phone, snack sometimes, pens and etc. And there is this cowork...
2017/06/09
[ "https://workplace.stackexchange.com/questions/92453", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/43050/" ]
Personally I would go directly to **his** boss and complain. You have asked him to stop and he did not. It is unprofessional behavior not a joke. He needs to have someone sit him down and tell him in no uncertain terms that this is unacceptable and that he needs to stop it immediately or his job is at risk. Is he goi...
I worked in a place where someone took stuff from my desk as a joke. After I placed a picture on my desk of my taekwondo master awarding me my latest black belt...that stopped. I have no idea why --innocent look--