qid
int64
1
74.7M
question
stringlengths
0
70k
date
stringlengths
10
10
metadata
list
response
stringlengths
0
115k
26,642,767
I am trying to insert some rows to a PRODUCT table and I get an ORA\_00913: too many values at first and third line, column 13 insert into PRODUCT (prod\_id, group\_id, prod\_name, price) values ('000004', '0000045666', 'lampaan', 95,15); insert into PRODUCT (prod\_id, group\_id, prod\_name, price) values ('000005', '...
2014/10/29
[ "https://Stackoverflow.com/questions/26642767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4062211/" ]
You want to place the last condition at the top. ``` //CHECK EACH ONE AND ADD IT TO THE APPROPRIATE BUCKET while (scoreFile >> score) { if (score < 0 || score > 200) bucket[8]++; else if (score <= 24) bucket[0]++; else if (score <= 49) bucket[1]...
8,424,819
I'm deploying to a Debian 6 server, with Apache, Passenger, Ruby1.9.1 When I run "cap deploy" or "cap deploy:migrations" I get this error: ``` [out :: ip.address] Could not find multi_json-1.0.3 in any of the sources ** [out :: ip.address] Run `bundle install` to install missing gems. ** [out :: ip.address] c...
2011/12/08
[ "https://Stackoverflow.com/questions/8424819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/912895/" ]
Make sure that your `config/deploy.rb` file is including Bundler's capistrano tasks with this line: ``` require 'bundler/capistrano' ``` This will tell it to run `bundle install` after updating your code, but before it runs other tasks like `rake assets:precompile`.
8,886,296
I have a Datagridview which I populate from a Dataset created from an XML file. This part works and I can get the entire contents of the Dataset to display in a datagrid. I have the added functionality to filter the datagridview based upon a date and sold flag. This also works OK as the datagridview updates as you cycl...
2012/01/16
[ "https://Stackoverflow.com/questions/8886296", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1152667/" ]
`map.input.file` environment parameter has the file name which the mapper is processing. Get this value in the mapper and use this as the output key for the mapper and then all the k/v from a single file to go to one reducer. The code in the mapper. BTW, I am using the old MR API ``` @Override public void configure(J...
1,039,031
HW Problem here, not sure where I'm messing up. Let $X$ be the amount won or lost in betting \$5 on red in roulette. Then $P(5) = \frac{18}{38}$ and $P(-5) = \frac{20}{38}$. If a gambler bets on red one hundred times, use the central limit theorem to estimate the probability that those wagers result in less than $50 i...
2014/11/26
[ "https://math.stackexchange.com/questions/1039031", "https://math.stackexchange.com", "https://math.stackexchange.com/users/180176/" ]
Using the position occupied by the terms $1000$ we can write the determinant in a nicer way $$\left| \begin{array}{ccc} 1 & 1000 & 2 & 3 &4\\ 5 & 6 &7&1000 &8\\ 1000&9&8&7&6\\ 5 & 4&3&2&1000\\ 1&2&1000&3&4\\ \end{array} \right|=-\left| \begin{array}{ccc} 1000 & 1 & 2 & 3 &4\\ 6 & 5 &7&1000 &8\\ 9& 1000&8&7&6\\ 4 & 5&...
29,914,585
Using Jquery How can I select an option by either its value or text in 1 statement? ``` <select> <option value="0">One</option> <option value="1">Two</option> </select> ``` I can do these 2 statements individually but how can I combine the following 2 statements into 1 select OR statement? ``` $('select optio...
2015/04/28
[ "https://Stackoverflow.com/questions/29914585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3658423/" ]
The simplest way is: ``` import React, { Component } from 'react'; import { Dimensions, View, Text } from 'react-native'; export default class Home extends Component { constructor(props) { super(props); this.state = { width: Dimensions.get('window').width, height: Dimensions.get('window').heigh...
4,185,231
I had to extract the 2nd parameter (array) from an onclick attribute on an image, but jQuery just returned a function onclick and not its string value as expected. So I had to use a native method. A quick search says it **may** work some browsers like FF, but not IE. I use Chrome. ``` <img src="path/pic.png" onclic...
2010/11/15
[ "https://Stackoverflow.com/questions/4185231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52025/" ]
Why not store it in the data property? ``` <img src="path/pic.png" onclick="funcName(123456);" data-mydata='12,34,56,78,890' /> var div_data = $('div_id').data('mydata').split(','); ```
39,443,875
Is there a way to create/define a variable available to all php files(like superglobals) > > Example: > > > i define a variable in **file1.php** `$car = ferrari` > > > then in **file2.php** i write `echo $car;` > > > then it will output `ferrari` > > > how can i define a variable in file1.php and access it ...
2016/09/12
[ "https://Stackoverflow.com/questions/39443875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4619900/" ]
* create init.php in your project's root directory. If you need constant variable (so, you can't edit it) - create constants.php in your project's root dir. If you need editable variable - create globals.php in your project's root dir. **constants.php** ``` <?php define('CAR', 'ferrari'); ``` **globals.php** ```...
1,947,650
Find all positive integers $x,y$ such that $7^{x}-3^{y}=4$. It is the problem I think it can be solve using theory of congruency. But I can't process somebody please help me . Thank you
2016/09/30
[ "https://math.stackexchange.com/questions/1947650", "https://math.stackexchange.com", "https://math.stackexchange.com/users/342519/" ]
Let us go down the rabbit hole. Assume that there is a solution with $ x, y > 1 $, and rearrange to find $$ 7(7^{x-1} - 1) = 3(3^{y-1} - 1) $$ Note that $ 7^{x-1} - 1 $ is divisible by $ 3 $ exactly once (since $ x > 1 $): the contradiction will arise from this. Reducing modulo $ 7 $ we find that $ 3^{y-1} \equiv 1 ...
55,114,017
I have a page with print button which prints a table. Now in Chrome or IE it works fine but in Firefox it does not show the table headers. Here are some screenshots of Chrome and Firefox. In Firefox: ![In Firefox](https://i.stack.imgur.com/VBUxh.png) In Chrome: ![In Chrome](https://i.stack.imgur.com/JgplS.png)
2019/03/12
[ "https://Stackoverflow.com/questions/55114017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4898967/" ]
try using AUTO or IDENTITY policy. like: ``` @GeneratedValue(strategy = GenerationType.IDENTITY) ```
8,036,691
This is just a question out of curiosity but I am looking at a database and pulling data from a table with a query on one of the columns. The column has four possible values `null`, `0`, `1`, `2`. When I run the query as: ``` SELECT * FROM STATUS WHERE STATE != '1' AND STATE != '2'; ``` I get the same results as run...
2011/11/07
[ "https://Stackoverflow.com/questions/8036691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/982475/" ]
In several languages NULL is handled differently: Most people know about two-valued logic where `true` and `false` are the only comparable values in boolean expressions (even is false is defined as 0 and true as anything else). In Standard SQL you have to think about [three-valued logic](http://en.wikipedia.org/wiki/T...
36,259,849
I am using ViewPager to hold my Fragments. I have two Fragments with different Parse Queries. One of My Fragment has grid view layout. I have created and Adapter for the GridView to load images. This is my fragment ``` public class FeedsFragment extends Fragment { GridView gridview; List<ParseObject> ob; ...
2016/03/28
[ "https://Stackoverflow.com/questions/36259849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5958776/" ]
There is a NullPointerException `imageLoader.DisplayImage(phonearraylist.get(position).getPhone(), holder.phone);` Which leads to a suspiciously null `(ImageView) holder.phone`. **Why it must be null ?** Because it might not be lying inside the view you inflated to. **So** You should check if you are inflating a p...
33,549,067
I have successfully converted event to method (for use in ViewModel) using **EventTriggerBehavior** and **CallMethodAction** as shown in the following example (here picked a Page **Loaded** event for illustration). `<i:Interaction.Behaviors> <core:EventTriggerBehavior EventName="Loaded"> <core:CallMethodAction Targe...
2015/11/05
[ "https://Stackoverflow.com/questions/33549067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5525674/" ]
> > However, no success when it comes to the CurrentStateChanged event of VisualStateGroup as shown below > > > Yes, the EventTriggerBehavior won't work for VisualStateGroup.CurrentStateChanged event. The feasible way is to create a **custom Behavior** that specifically targets this scenario, please see [this blo...
61,881
We have a Honeywell whole-house humidifier attached to the duct directly above the heating element/electronics of our furnace. A few possible pertinent facts: * The water intake is attached via a saddle valve. * The drainage line leads to a pump. The intake for the pump is a PVC pipe, which the drainage line rests ins...
2015/03/12
[ "https://diy.stackexchange.com/questions/61881", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/13047/" ]
I can only provide anecdotal answers to questions 2 & 3. 2. I have successfully used a few drops of concentrated food coloring, at different places I suspect for leaks in a water softener and its related valves and plumbing. I used 3 different colors if memory serves me right. We had a very slow/unnoticeable leak, apa...
23,471,926
I know I can use `CASE` statement inside `VALUES` part of an insert statement but I am a bit confused. I have a statement like,
2014/05/05
[ "https://Stackoverflow.com/questions/23471926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2737135/" ]
You can try also a procedure: ``` create or replace procedure insert_XYZ (P_ED_MSISDN IN VARCHAR2, P_ED_OTHER_PARTY IN VARCHAR2) is begin INSERT INTO TABLE_XYZ ( ED_MSISDN, ED_OTHER_PARTY, ED_DURATION)...
22,739,757
//i want to display list items in list view i am put all the items in list i want to display all the items in listview it is displaying but getting same names where i keep the for loop in getview.Please help me how can i pshow the list items in listview. ``` public class Listjava extends Activity { /** Called when...
2014/03/30
[ "https://Stackoverflow.com/questions/22739757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3114723/" ]
Change the MyBaseAdapter class like below. ``` public class MyBaseAdapter extends BaseAdapter { private LayoutInflater inflater = null; List<Contact> contacts; public MyBaseAdapter(Context applicationContext, List<Contact> contacts) { // TODO Auto-generated constru...
64,125,262
I have a table with a list of folders and I want to return only the top level folders. For example, if the original table (tblFolders) has a single column (Fldrs) as below: **Fldrs** ``` C:\Folder1 C:\Folder1\Subfolder1 C:\Folder1\Subfolder2 C:\Folder2\Subfolder1 ``` I'd like to return: ``` C:\Folder1 C:\Folder2\...
2020/09/29
[ "https://Stackoverflow.com/questions/64125262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14362939/" ]
A standard SQL solution is to UNION all your dates ``` SELECT MyID, MAX(thedate ) AS maxdate, MIN(thedate ) AS mindate FROM ( SELECT MyID, Date1 AS thedate FROM table UNION ALL SELECT MyID, Date2 AS thedate FROM table UNION ALL SELECT MyID, Date3 AS thedate FROM table UNION ALL SELECT MyID, Date4 AS thedate FROM tabl...
56,573,278
I am trying to add some space between buttons in JavaFX using CSS. I know that separator element can do that, but I prefer to use it to separate logical groups of buttons. I have tried: ```xml <HBox id="buttonPanel" prefHeight="400.0" prefWidth="600.0" styleClass="buttonPanel" xmlns:fx="http://javafx.com/fxml/1" fx:c...
2019/06/13
[ "https://Stackoverflow.com/questions/56573278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5328289/" ]
If you give an ID then try `#` ``` #buttonPanel { -fx-spacing: 5; -fx-border-width: 0; -fx-padding: 1 2 1 2; /* Top Right Bottom Left */ } ```
40,501,502
Its my first project using CodeIgniter and it is not as easy as it seems. I have to import different JSs and CSSs in different pages and I'm stuck. First of all, I've seen that hardcoding echos are not CI way of doing it so I made a simple class like ``` <?php defined('BASEPATH') OR exit('No direct script ac...
2016/11/09
[ "https://Stackoverflow.com/questions/40501502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4408351/" ]
Ok, so you tell Emacs to find-file some foo.py file, and Emacs reads it into a new `fundamental-mode` buffer and then calls `python-mode`. That's an autoload, so first it must load `python.el`, after which your eval-after-load kicks in and you start messing with the selected buffer. After that, `python-mode` is actua...
29,642,188
Python 3. I am trying to return the function so that It would take a single word and convert it to Cow Latin. I want to get rid of the square bracket, the comma and single apostrophes when I run my function. My function is: ``` alpha = list("bcdfghjklmnpqrstvwxyz") def cow_latinify_word(word): if word[0].lower() ...
2015/04/15
[ "https://Stackoverflow.com/questions/29642188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4772905/" ]
Use `' '.join(list)` for concatenating the list elements into a string. In your code: ``` alpha = list("bcdfghjklmnpqrstvwxyz") def cow_latinify_word(word): if word[0].lower() in alpha: lista = (word.lower()) return lista[1:] + lista[0] + "oo" else: return word + "moo" def cow_latin...
47,913,649
I'm trying to access the Tensorboard for the `tensorflow_resnet_cifar10_with_tensorboard` example, but not sure what the url should be, the help text gives 2 options: > > You can access TensorBoard locally at <http://localhost:6006> or using > your SageMaker notebook instance proxy/6006/(TensorBoard will not work > ...
2017/12/20
[ "https://Stackoverflow.com/questions/47913649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3461257/" ]
Here is my solution: If URL of my sagemaker notebook instance is: ``` https://myinstance.notebook.us-east-1.sagemaker.aws/notebooks/image_classify.ipynb ``` And URL of accessing TensorBoard will be: ``` https://myinstance.notebook.us-east-1.sagemaker.aws/proxy/6006/ ```
37,458,388
We have a table with three columns: id, fieldName, fieldValue. This table has many records. We want to quickly access a list of the distinct fieldNames. When we create a view with a clustered index, we get this, but we have another problem: we have many processes that delete from the table by the id column. These ha...
2016/05/26
[ "https://Stackoverflow.com/questions/37458388", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50667/" ]
You don't need the view. Paul White blogged about how to find distinct values quickly in [Performance Tuning the Whole Query Plan](http://sqlperformance.com/2014/10/t-sql-queries/performance-tuning-whole-plan). He uses a recursive CTE to seek the next distinct value. Basically doing one seek per iteration/value jumpin...
36,064,401
I was trying to do something in Swift that would be easy in Objective-C using KVC. The new [Contacts framework](https://developer.apple.com/library/watchos/documentation/Contacts/Reference/Contacts_Framework/index.html) added in iOS9 is for the most part easier to use than the [old AddressBook API](https://developer.ap...
2016/03/17
[ "https://Stackoverflow.com/questions/36064401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2969719/" ]
If you are looking for a more Swift-y way to do it: ``` let matches = contacts.filter { return $0.phoneNumbers .flatMap { $0.value as? CNPhoneNumber } .contains { $0.stringValue == JennysPhone } } ``` `.flatMap` casts each member of `phoneNumbers` from type `CNLabeledValue` to typ...
7,318,402
I print hindi characters as string in java and I'm getting an error. I save the java file in notepad uing UTF-8. ``` public class MainClass { public static void main(String args[]) throws Exception { String s = "साहिलसाहिल"; System.out.print(s); } } ``` After compilation, I get 2 errors of i...
2011/09/06
[ "https://Stackoverflow.com/questions/7318402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/290410/" ]
You have to specify the appropriate encoding : ``` javac -encoding utf8 MainClass.java ```
22,115,008
I am trying to get my edit to work I need the contact detail data to load when the user data loads. I have set the data in a similar manner to how I am retrieving the list of roles. I also don't know how to retrieve according to the model currently I was hard-coding it to retrieve 28. Would greatly appreciate any help ...
2014/03/01
[ "https://Stackoverflow.com/questions/22115008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/696406/" ]
`email` is being called on a nil `@user`, and `@user` is going to always be nil. Looking at this line: ``` unless @user_check = nil ``` Using a single equals is assignment, not an equality comparison. You'll want to do: ``` unless @user_check == nil ``` or the more idomatic Ruby: ``` unless @user_check.nil? `...
96,984
When another moderator sends a direct user message, the notification appears for all other moderators as a dropdown alert. This is somewhat distracting, and also impossible to get back to once it's closed. I feel like this type of alert makes more sense *for moderators* as a global inbox notification, since it's more o...
2011/06/30
[ "https://meta.stackexchange.com/questions/96984", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/139837/" ]
The users **also typically get an email -- you know, a real, physical email in their email inbox** -- and that contains the text with a link to the moderator message URL, so I'm not sure I can agree with this. It is the default option when sending a moderator message.
18,899,045
What's the proper way to write this query? I have a column named TimeStamp in my customers table. I'm getting errors when trying to find customers who created an account in 2012. I've tried: ``` SELECT 'TimeStamp' AS CreatedDate FROM customers WHERE 'CreatedDate' >= '2012-01-01' AND 'CreatedDate' <= '2012-12-31' ``` ...
2013/09/19
[ "https://Stackoverflow.com/questions/18899045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2795892/" ]
You must not use single quotes around column names as they are identifiers. ``` SELECT * FROM customers WHERE TimeStamp >= '2012-01-01' AND TimeStamp <= '2012-12-31' ``` If it happens that your column name is a reserved keyword, you can escape it by using `backtick` eg, ``` WHERE `select` .... -- SELECT is a res...
60,844,852
I am looking for a prettier way to delete some special characters (`{}[]()*?!^:|&"/\~`) if they exists in the first and the last position of a string called query. My way is pretty ugly but does the work. ```js while( query.charAt(1)==":" || query.charAt(1)=="{" || query.charAt(1)=="}" || query.charAt(...
2020/03/25
[ "https://Stackoverflow.com/questions/60844852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12602828/" ]
Use a regular expression instead: ``` query = query.replace(/^[-:{}[\]*^()|"]+|[-:{}[\]*^()|"]+$/g, ''); ``` This pattern is composed of: ``` ^[CHARS]+|[CHARS]+$ ``` where `CHARS` are the characters you want to remove. * `^[CHARS]+` - Match one or more of those characters at the beginning of the string * `|` OR ...
18,785,399
If editors frequently work with show / hide dates for pages and content elements, there is an increasing number of outdated, hidden content in the Backend. For housekeeping, it would be nice to have an extension that lists such not-displayed content, maybe also hidden items. Is there something?
2013/09/13
[ "https://Stackoverflow.com/questions/18785399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/160968/" ]
I'm not aware that there is any extension for this purpose. But you can use the list module for something similar. Place any kind of content on your "root" page. In the list module, you now see the table "Page Content". Click on the header cell to get only "Page Content" records. In the bottom of the list module, in t...
53,433,285
I'm having this json stored in db ``` { "endDate": "2018-10-10", "startDate": "2017-09-05", "oldKeyValue": { "foo": 1000, "bar": 2000, "baz": 3000 }, "anotherValue": 0 } ``` How can I rename `"oldKeyValue"` key to `"newKeyValue"` without knowing the index of the key in ...
2018/11/22
[ "https://Stackoverflow.com/questions/53433285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1483422/" ]
There is no straightforward JSON function to do the same. We can use a combination of some JSON functions. We will remove the *oldKey-oldValue* pair using [`Json_Remove()`](https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-remove) function, and then [`Json_Insert()`](https://dev.my...
10,950,356
I have a quick question about Haskell. I've been following [Learn You a Haskell](http://learnyouahaskell.com/starting-out#tuples), and am just a bit confused as to the execution order / logic of the following snippet, used to calculate the side lengths of a triangle, when all sides are equal to or less than 10 and the ...
2012/06/08
[ "https://Stackoverflow.com/questions/10950356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/420001/" ]
The original version considers all triplets (a,b,c) where c is a number between 1 and 10, b is a number between 1 and c and a is a number between 1 and b. (6,8,10) fits that criteria, (8,6,10) doesn't (because here a is 8 and b is 6, so a isn't between 0 and 6). In your version you consider all triplets (a,b,c) where ...
28,879,751
so here is the situation i currently am having trouble with. I want to check if a user has permission to view a page, with one single function. So I have an array with key/values where i store permissions in. ``` {"authorities":[{"role":"gebruikersbeheer"},{"role":"kijken"},{"role":"plannen"}]}; ``` Stored in `ser...
2015/03/05
[ "https://Stackoverflow.com/questions/28879751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1863487/" ]
You currently are check a object with another object, is best check the string with the string, below show an little example of the same function but using the **some** method from arrays; ```js var currentUser = {"authorities":[{"role":"gebruikersbeheer"},{"role":"kijken"},{"role":"plannen"}]}; function hasPermis...
6,604,459
Is there an NSNotification we can observe for when the device is on/off the phone?
2011/07/07
[ "https://Stackoverflow.com/questions/6604459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/212559/" ]
The `NotificationCenter` doesn't send out any notifications abou this, but take a look at the `CTCallCenter` class introduced in iOS 4. It has a `callEventHandler` property that you can assign a block of code to, and gets called with call state info. There is a limitation in that the handler only gets called when your...
71,032
I have a Ph.D. in pure math (interested in Harmonic analysis and operator theory). I am looking forward some proper references to lead me get the foundation of discrete/signal processing more and more. Actually, I had a review of the Heppenheim's books (both signal and digital ones) and (rather) got what he is saying i...
2020/10/23
[ "https://dsp.stackexchange.com/questions/71032", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/50574/" ]
You have already read those Oppenheim's Signals & Systems, and Discrete-Time Signal Processing books. I'm not sure what you mean by *foundations* but in some sense these two are also the foundations on signal processing. In other words, there are no (popular & successful) graduate level DSP books that discuss at an ad...
15,431,025
I have published a successful app on play, but after upgrading the app when I sign and align the app and install it on an emulator/real device it force closes and gives me `ClassNotFound` Exception. ``` 03-15 16:09:08.280: E/AndroidRuntime(7122): java.lang.RuntimeException: Unable to instantiate application william.sh...
2013/03/15
[ "https://Stackoverflow.com/questions/15431025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1129047/" ]
ClassNotFound exception means that in your manifest file you have miss the Activity or may be you have not give correct name of the Activity.
6,163,166
I am trying to to understand **why Java's ArrayDeque is better than Java's LinkedList** as they both implement Deque interface. I hardly see someone using ArrayDeque in their code. If someone sheds more light into how ArrayDeque is implemented, it would be helpful. If I understand it, I will be more confident using...
2011/05/28
[ "https://Stackoverflow.com/questions/6163166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774521/" ]
Linked structures are possibly the worst structure to iterate with a cache miss on each element. On top of it they consume way more memory. If you need add/remove of the both ends, ArrayDeque is significantly better than a linked list. Random access each element is also O(1) for a cyclic queue. The only better opera...
51,521,716
I have seen [this post](https://stackoverflow.com/questions/13258454/marking-specific-tiles-in-geom-tile-geom-raster), but I'm struggling to translate that to a logarithmic raster. For example: ``` library(tidyverse) a <- tibble(x = rep(10^seq(-2, 2), 5), y = rep(10^seq(-2, 2), each = 5), z =...
2018/07/25
[ "https://Stackoverflow.com/questions/51521716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1704801/" ]
Assuming for example that you want to mark tiles in the y = 0.1 row, for x < 10, adding `geom_tile()` like the following could work: ``` p1 <- a %>% ggplot(aes(x = x, y = y)) + geom_raster(aes(fill = z)) + scale_x_log10() + scale_y_log10() + geom_tile(data = . %>% filter(y == 0.1 & x < 10), # filter dataset ...
49,290,741
We are designing a system for conducting a survey in which it askes user a about 72 questions (Multiple Choice questions) And when the user submits this will be posted to php page which will save the answer in a MySQL table. Its works fine and perfectly well when we doing the test with a small number of user But I obs...
2018/03/15
[ "https://Stackoverflow.com/questions/49290741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4941350/" ]
There is a limit on `POST` request size in PHP. You can adjust [`post_max_size`](http://php.net/ini.core.php#ini.post-max-size) in your `php.ini`. As for database, I don't know how you are saving them in the database, but there are character/storage limitation on the database as well. Whenever I'm dealing with large `...
271,524
I'm building a mansion to impress my friends. I've seen pictures of armor stands with ARMS. I searched how to summon one but all of them were either 1.9 or beta. (?how?) What command do i use to summon one that works?
2016/06/27
[ "https://gaming.stackexchange.com/questions/271524", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/151855/" ]
You can watch [this tutorial](https://www.youtube.com/watch?v=LoLRLKyswTI) (by Sethbling) to see how to show arms and more But if you want to show arms, try: `/summon ArmorStand ~ ~ ~ {ShowArms:1}` If you already spawned a ArmorStand and want to add arms (show arms), you can do: `/entitydata @e[r=2,type=ArmorStand] {...
40,057,611
I'm trying to draw a set of rectangles, each with a fill color representing some value between 0 and 1. Ideally, I would like to use any standard colormap. Note that the rectangles are not placed in a nice grid, so using `imagesc`, `surf`, or similar seems unpractical. Also, the `scatter` function does not seem to all...
2016/10/15
[ "https://Stackoverflow.com/questions/40057611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7022877/" ]
You can use `complete` from package `tidyr` : ``` library("tidyr") data %>% complete(area, year, fill = list(population.served = 0)) # # A tibble: 16 × 3 # area year population.served # <fctr> <fctr> <dbl> # 1 Cambridge Year.1 200 # 2 Cambridge Year.2 202 # 3 ...
34,523,149
I've developed app that takes screenshot. But it only takes snapshot of app. I want to take snapshot out of app. I've researched answers but I don't find answer yet. Here is my code. ``` View view = getWindow().getDecorView().getRootView(); view.setDrawingCacheEnabled(true); Bitmap bitmap = Bitmap.createBitmap(view.ge...
2015/12/30
[ "https://Stackoverflow.com/questions/34523149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5729314/" ]
To take screen shot of the device screen, **Only if you have root** call the screencap binary like: ``` Process sh = Runtime.getRuntime().exec("su", null,null); OutputStream os = sh.getOutputStream(); os.write(("/system/bin/screencap -p " + Environment.getExternalStorageDirectory()+ "/img.png").getBytes("ASCII")); os...
16,878,544
Want search every word in a dictionary what has the same character exactly at the second and last positon, and one times somewhere middle. examples: ``` statement - has the "t" at the second, fourth and last place severe = has "e" at 2,4,last abbxb = "b" at 2,3,last ``` wrong ``` abab = "b" only 2 times not 3 abxx...
2013/06/02
[ "https://Stackoverflow.com/questions/16878544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/632407/" ]
This is the regex that should work for you: ``` ^.(.)(?=(?:.*?\1){2})(?!(?:.*?\1){3}).*?\1$ ``` ### Live Demo: <http://www.rubular.com/r/bEMgutE7t5>
56,804,266
We are using [KubeDB](https://kubedb.com/docs/0.10.0/guides/redis/) in our cluster to manage our DB's. So Redis is deployed via a [KubeDB Redis object](https://kubedb.com/docs/0.10.0/concepts/databases/redis/) and KubeDB attaches a PVC to the Redis pod. Unfortunately KubeDB doesn't support any restoring or backing up...
2019/06/28
[ "https://Stackoverflow.com/questions/56804266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2591194/" ]
Sooo, a few hours later, my teammate remembered that Redis executes a save to dump on [shutdown](https://redis.io/commands/shutdown). Instead of deleting the pod using `kubectl delete pod` I now changed the code to run a `SHUTDOWN NOSAVE` using the `redis-cli`. ``` kubectl exec <redis-pod> -- /bin/bash -c 'redis-cli ...
38,138,478
I have a print table code fiddle [LINK](http://jsfiddle.net/9DbEP/1060/) Check my code: ``` function printData() { var divToPrint=document.getElementById("printTable"); console.log(divToPrint.outerHTML); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.clo...
2016/07/01
[ "https://Stackoverflow.com/questions/38138478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4387657/" ]
Please find chrome driver here <https://sites.google.com/a/chromium.org/chromedriver/downloads>
43,917
I am traveling from Stockholm to Dubai and Dubai to Nairobi using two different airlines. I have Kenyan nationality and can't go through Immigration because I don't have a Dubai visa. How I will get my luggage?
2015/02/27
[ "https://travel.stackexchange.com/questions/43917", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/27260/" ]
If your luggage is not checked through, then I am afraid you will have to collect it and to do that you'll need a visa as the baggage carousels are *after* the immigration counters. The sequence is: 1. De-plane. 2. Depending on the terminal, you'll have a long walk (and then go down a few flights of stairs) or a shor...
2,595,871
Are there any libraries to parse Textile (Textile to HTML) which will work in an Objective C iPhone app? C libraries will work too. **Update:** I couldn't find any sufficiently developed libraries in C/Obj-C, but I did find one written in Javascript, which I used through an invisible UIWebView. Link: [Javascript text...
2010/04/07
[ "https://Stackoverflow.com/questions/2595871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/173781/" ]
Of course a method can return NSRange. But returning structures require special attention to the compiler because how the method is invoked is usually different (`objc_msgSend_stret` vs. `objc_msgSend`). Please make sure you declare `phrase` as ``` Phrase* phrase = ...; ``` so that the compiler knows `-rangeInStri...
57,546,243
I have this data's is there a way to get all of these? already tried `this._data.forEach` but it is not working thanks! ``` data() { return { childData: '', credit: '', company: '', email: '', first_name: '', middle_name: '', terms: '', last_name: '', phone: '', mobile: '', ...
2019/08/18
[ "https://Stackoverflow.com/questions/57546243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10022569/" ]
try this perhaps: ``` =QUERY(IMPORTXML(B4, "//*[@id='historical-data']/div/div[2]/table/tbody/tr/td[2]"), "limit 100", 0) ```
45,589,463
i've read a lot of blogs, tutorials & co but i don't get something about the dynamic binding in java. When i create the object called "myspecialcar" it's creates an object from the class "car" as type of the class vehicle as a dynamic binding right? So java know that when i execute the method *myspecialcar.getType()* ...
2017/08/09
[ "https://Stackoverflow.com/questions/45589463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5747959/" ]
You faced the [fields hiding](http://docs.oracle.com/javase/tutorial/java/IandI/hidevariables.html). > > Within a class, a field that has the same name as a field in the > superclass hides the superclass's field, even if their types are > different. Within the subclass, the field in the superclass cannot be > refe...
23,434
A friend of a friend has on multiple occasions aggressively asked how my self-study for software engineering interviews is going. Most recently I answered very briefly, because I find it too nosy and the person to be arrogant and presumptuous. I don't like for example that he's convinced that I seem too calm about the ...
2019/11/11
[ "https://interpersonal.stackexchange.com/questions/23434", "https://interpersonal.stackexchange.com", "https://interpersonal.stackexchange.com/users/4886/" ]
It sounds like you have already figured out this person's *motivation* for asking you questions - they want to give you advice. "Advice-giver" is a [recognised personality trait](https://www.psychologytoday.com/gb/blog/evolution-the-self/201308/what-you-should-know-about-advice-givers), and many do it for their own ego...
10,840,872
I am currently going through a tutorial using Visual Studio 11 beta. When trying to set the max length of a field value in one of my classes: ``` [MaxLength(50)] public string LastName { get; set; } ``` It errors out and wont let me compile because the `MaxLength()` function exists in two places: > > Error 4 The t...
2012/05/31
[ "https://Stackoverflow.com/questions/10840872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1022305/" ]
Use using at the top of your code: ``` using MaxLength = System.ComponentModel.DataAnnotations ```
609,275
I administer a large number of ESXi hosts, and in order to do that efficiently, I pretty much need to have SSH allowed into the hosts at all times, as it's just far too burdensome to enable and disable SSH access through vCenter/vSphere on every host every time I need to log into a host and view the CLI or SCP files be...
2014/07/01
[ "https://serverfault.com/questions/609275", "https://serverfault.com", "https://serverfault.com/users/118258/" ]
This particular alert can be controlled in the `Advanced Settings` under the `Configuration` tab for the host in question. Once there, go to the `UserVars` category and scroll down to `UserVars.SuppressShellWarning`. Change the value from `0` to `1`, and you will no longer be warned that the host in question is allowin...
127,635
I need to monitor open and closed ports on dozens of hosts. I've found a [Nagios](http://en.wikipedia.org/wiki/Nagios) plugin that does what I need, but I would have to use this script through [NRPE](http://en.wikipedia.org/wiki/Nagios#Nagios_Remote_Plugin_Executor). Some of the hosts are powered by Linux and they all...
2010/03/30
[ "https://serverfault.com/questions/127635", "https://serverfault.com", "https://serverfault.com/users/14850/" ]
What do you mean to check ports on hosts remotely? Do you just want to connect to the port to see if it is open? The check\_tcp plugin will do that, if, that's what you want to do. Not quite sure what you mean.
29,442,424
The following is code that I have put together with some help from SO. I am trying to be able to implement the `$select` statement, as well as the `$search` statement on the same page. The `$select` statement works fine, but I do not know how to call the `$search` statement to execute when the user searches using the f...
2015/04/04
[ "https://Stackoverflow.com/questions/29442424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4564055/" ]
You can you `touchesBegan` for that. Here is example code for you: ``` override func touchesBegan(touches: NSSet, withEvent event: UIEvent) { for touch: AnyObject in touches{ let location = touch.locationInNode(self) if self.nodeAtPoint(location) == self.playButton{ //your code ...
967,261
Why isn't this script working? ``` $(function() { var isbn = $('input').val(); $('button').click(function() { $("#data").html('<iframe height="500" width="1000" src="http://books.google.com/books?vid=ISBN' + isbn + '" />'); }); }); ``` As you can see, I'm trying to do an extremely simple ISBN lo...
2009/06/08
[ "https://Stackoverflow.com/questions/967261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97939/" ]
It's not clear when your code gets called, but is this line: ``` var isbn = $('input').val(); ``` only called once at page-load time, whereas it should be within the click handler: ``` $('button').click(function() { var isbn = $('input').val(); $("#data").html('<iframe height="500" width="1000" src="http://...
55,710,561
i need some help to validate a jwt signature with a ECDSA public key. I'm reading the key from a .pem file with bouncy castle and using jjwt to do the validation. I'm getting an error while validating the signature. ``` Security.addProvider(new BouncyCastleProvider()); String jwt = "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ...
2019/04/16
[ "https://Stackoverflow.com/questions/55710561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2343794/" ]
This will work as well without mentioning any algorithm. ``` public boolean isTokenValid(String token) { try { String certificate = "GET_YOUR_PUBLIC_CERTIFICATE_HERE"; //Either from REST call or reading from a cert file. getPublicKeyAndParseToken(token, certificate); return true; } catc...
19,243,837
I am new to use Autolayouts, even this is my first try. Whatever I do with it, I end with a white screen as result. Here is my attempt. I have a `UIView`, let me say a `parentView` of frame `(60, 154, 200, 200)`. It is a subview to `self.view`. Then I have a dynamic view, say `dynamicView` of frame `(0, 0, 260, 100)`...
2013/10/08
[ "https://Stackoverflow.com/questions/19243837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/500625/" ]
i'll just address the dyanmicView being part of the parentView issue, then let you go from there **first**: if you are creating the view dynamically, then you're good to go, but if you've created it from storyboard, you'd have to detach it from it's parent then reattach it.. that's how you get rid of it's previous NSC...
441,419
I’m curious if I have a legitimate concern or if I’m just being overly paranoid. I have a rechargeable Lithium-Polymer battery (prismatic shaped) rated for a max charging temperature of 45 °C. The battery rests against a circuit board that I know can generate some heat when charging the battery (500 mA current via an...
2019/06/01
[ "https://electronics.stackexchange.com/questions/441419", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/77406/" ]
Lithium-Polymer service life is seriously degraded at high temperatures, especially when fully charged. The cooler you can keep the battery the better. I suggest using a more efficient switch-mode charging IC such as the TP5000.
472,937
When running msbuild.exe with ANT's exec task, errors in the .net code do not result in the build process failing. Why would this be?
2009/01/23
[ "https://Stackoverflow.com/questions/472937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I use Nant to run some MSBuild tasks. Every time I use the `failonbuild` attribute of that task, it fails for me. Looking at Apache's documentation for Ant, it would appear the same attribute is there as well. Are you using this attribute?
40,049,978
I'm trying to get the currently displayed `ViewController` using the following: ``` let currentViewController = UIApplication.sharedApplication().keyWindow!.rootViewController?.presentedViewController ``` This property gives me the `TabBarController`. The only property after `presentedViewController` is "`childViewC...
2016/10/14
[ "https://Stackoverflow.com/questions/40049978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6758725/" ]
I would use a computed property instead of a filter and a method. I'd go through each cast member and if any of their groups is in `selected_groups` I'd allow it through the filter. I'd so this using `Array.some`. ``` results: function() { var self = this return self.cast.filter(function(person) { return pers...
2,721,502
The challenge ------------- The shortest code by character count that will output the numeric solution, given a number and a valid string pattern, using the [Ghost Leg](http://en.wikipedia.org/wiki/Ghost_Leg) method. Examples -------- ``` Input: 3, "| | | | | | | | |-| |=| | | | | |-| | |-| |=| | | |-| |-| | |-|...
2010/04/27
[ "https://Stackoverflow.com/questions/2721502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/180243/" ]
JavaScript: 169 158 148 141 127 125 123 122 Characters ------------------------------------------------------ **Minified and Golfed:** ``` function g(n,s){for(l=s.split('\n'),n*=2;k=l.shift();)for(j=3;j;)n+=k[n-3]==(c=--j-1?'=':'-')?-2:k[n-1]==c?2:0;return n/2} ``` **Readable Version:** ``` function g(n, str) { ...
5,533
I'm aware there are floppy emulators that are installed to 3.5″ bays where disk images are stored on a flash drive. But what I need now is the opposite: essentially a USB dongle that emulates the floppy drive hardware with a disk inside. Something that older OS installers would recognize. The need came up when I tried...
2018/01/20
[ "https://retrocomputing.stackexchange.com/questions/5533", "https://retrocomputing.stackexchange.com", "https://retrocomputing.stackexchange.com/users/7758/" ]
I don't think anyone sells something like that in one piece. There are, however, components on the market that should allow you to build that from scratch: 1. A GoTek or HxC that behaves like a "real" floppy 2. An *old* Floppy-to-USB adapter that was used to connect "real" floppies over USB. I don't think they're sti...
519,832
I want to write the following sentence in a compact way: "The difference between the old scheme and the new scheme lies in..." Which one of the following is correct? 1. The difference between the old and **new scheme** lies in... 2. The difference between the old and **new schemes** lies in... 3. The difference betw...
2019/12/04
[ "https://english.stackexchange.com/questions/519832", "https://english.stackexchange.com", "https://english.stackexchange.com/users/368826/" ]
All are variations of parallelism, with two distinct wrinkles: * Whether the determiner or article must be repeated or not * Whether the head noun is singular or plural All four constructions are valid, but produce slight differences in emphasis. --- > > The difference between **the old and new** scheme lies in......
62,006,211
Having worked through a course on Pluralsight (.NET Logging Done Right: An Opinionated Approach Using Serilog by Erik Dahl) I began implementing a similar solution in my own ASP.Net Core 3.1 MVC project. As an initial proof of concept I downloaded his complete sample code from the course and integrated his logger class...
2020/05/25
[ "https://Stackoverflow.com/questions/62006211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7801941/" ]
You can use `trackBy` on **\*ngFor** to deal with changes. It allows you to check each element and rerenders only the ones that are new. You can use an id or another unique elements to check them. Template : ```js <tr *ngFor="let element of objects$ | async; trackBy: trackByFunction"> </tr ``` Component : ```js tr...
13,537,503
Can I please have a design suggestion for the following problem: I am using Codeigniter/Grocery\_CRUD. My system is multi tenanted - different autonomous sites - within the same client. I have quite a few instances of tables that have unique logical keys. One such table structure is: equip\_items id (pk) equ...
2012/11/24
[ "https://Stackoverflow.com/questions/13537503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1228116/" ]
**UPDATE:** This code is now part of grocery CRUD version >= 1.4 and you don't need to use an extension anymore. For more see the documentation for [unique\_fields](http://www.grocerycrud.com/documentation/options_functions/unique_fields) I will try to explain it as easy as I can: **1.** First of all for those who h...
16,329
I have some basic questions about my 1-year-old pug. 1. How much should he eat? Typically he should eat 2 times, but he always keeps some food in his bowl and whenever he wants he eats. Is this a good practice? (I use Royal Canin Mini Adult) 2. Now-a-days he always wants what I'm eating. How to stop this? I'm too ne...
2017/02/08
[ "https://pets.stackexchange.com/questions/16329", "https://pets.stackexchange.com", "https://pets.stackexchange.com/users/8839/" ]
1. As Gone2 has stated, you should definitely regulate your pug's intake by removing the food after 15-20 minutes with each feeding. All kibble has feeding directions on the back, so you should follow the feeding recommendations on the bag for his weight unless otherwise directed by a veterinarian. Dogs should generall...
15,043,674
I do something like this in my code ``` S s; s.a=1 s.b=2 v.push_back(s) ``` Now that C++ has forwarding can i write something like ``` v.push_back(1,2) ``` fyi visual studio supports forwarding as the below works as expected ``` //http://herbsutter.com/gotw/_102/ template<typename T, typename ...Args> std::uniqu...
2013/02/23
[ "https://Stackoverflow.com/questions/15043674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can use `std::vector::emplace_back` which will create the object inplace with the fitting constructor. This of course requires that you have such a constructor defined. ``` v.emplace_back(1,2); ``` As of C++11 every std-container offers an emplace-like function which gives the above described behavior. Compatib...
33,840
Consider our world at 18-19 centuries. Our civilization knows how to print books, build steam machines, we have made first experiments on electricity. And one day the [Mad God Sheogorath](http://elderscrolls.wikia.com/wiki/Sheogorath) is emerged. He can bend the reality by his will. For example, he can violate the pr...
2016/01/21
[ "https://worldbuilding.stackexchange.com/questions/33840", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/2763/" ]
**Caveat**: I've made some assumptions in order to make this work as a potential world. Like many have pointed out, a truly mad god acting without care would probably manage to kill off the human race pretty quickly if they acted often enough to have a tangible effect on the world (by triggering a catastrophic imbalanc...
8,051,394
Could anybody help me out to get nested tabs through ajax calls. Description: I am having Jquery Tabs with ajax option CODE: ``` $( ".has_ajax_tabs" ).tabs({ ajaxOptions: { error: function( xhr, status, index, anchor ) { $( anchor.hash ).html("<h3>OOPS...Something went wrong!</h3>...
2011/11/08
[ "https://Stackoverflow.com/questions/8051394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
That's a bad idea. The lifetime of a threadpool thread is determined by the code it executes, preferably short and snappy. This is *not* the rule for an STA thread, it must stay active and pump a message loop as long as the COM objects that were created on that thread are not finalized. A requirement that's very incomp...
16,660
I'm currently building a functional Lego escalator that is minifigure-scaled and with staircases transitioning from flat platform to stairwell. Here's my progress so far: [![escalator slope design](https://i.stack.imgur.com/OOvDG.png)](https://i.stack.imgur.com/OOvDG.png) But with the design of the staircases hopefully...
2021/10/15
[ "https://bricks.stackexchange.com/questions/16660", "https://bricks.stackexchange.com", "https://bricks.stackexchange.com/users/19067/" ]
Could this work in you case? Using snot brick to build it vertically. [![Slope 45°](https://i.stack.imgur.com/9mNeE.jpg)](https://i.stack.imgur.com/9mNeE.jpg) EDIT 1: The only way I managed to get your angle and snap it correctly is like that. I used stud.io with collision turned on to be sure it could work. I hope ...
330,170
I learned British English, but I work exclusively with Americans. I'll often say "Fat lot of good X did for us", and I get confused looks from others. For example, the other day, I said "I think we should have had them take the web development course; fat lot of good the algorithms course did for them" and people have ...
2022/12/30
[ "https://ell.stackexchange.com/questions/330170", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/151216/" ]
**Just leave out the fat**, in speech, and use a sarcastic tone. "I think we should have had them take the web development course; a lot of good the algorithms course did for them." The fact is that this is an idiomatic expression. And **many Americans** *would in fact understand* "a fat lot of good". Who cares what...
3,599,278
I must develop a simple web application to produce reports. I have a single table "contract" and i must return very simple aggregated values : number of documents produced in a time range, average number of pages for documents and so on . The table gets filled by a batch application, users will have roles that will all...
2010/08/30
[ "https://Stackoverflow.com/questions/3599278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
KISS - keep it simple and stupid. You have five days. Create working application and if you have time refactor it to some better solution.
14,055,690
can i get the whole `linearlayout` or other layouts converted to bitmap. my code is this : ``` LinearLayout view = (LinearLayout)findViewById(R.id.linear_parent); view.setDrawingCacheEnabled(true); view.buildDrawingCache(); Bitmap bm = view.getDrawingCache(); ByteArrayOutputStream bytes = new ByteArrayOutputStream(...
2012/12/27
[ "https://Stackoverflow.com/questions/14055690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1882012/" ]
After lot of googling, I found a good solution of my problem ``` TextView textView =new TextView(this); SpannableStringBuilder ssb = new SpannableStringBuilder( "Here's a smiley how are you " ); Bitmap smiley = BitmapFactory.decodeResource( getResources(), R.drawable.movie_add ); ...
16,326,527
Windows 7, Java jdk1.6.0\_32, Ant 1.9 User & System variables: **JAVA\_HOME**:C:\Program Files\Java\jdk1.6.0\_32 **PATH**:C:\Program Files\Java\jdk1.6.0\_32;c:\ant\bin; ``` ANT_HOME:c:\ANT Run command prompt as administrator Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights...
2013/05/01
[ "https://Stackoverflow.com/questions/16326527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1985765/" ]
Your class path is missing the required jar for ``` org/apache/xml/serialize/OutputFormat ``` Check if you have `xercesImpl.jar` in your classpath **EDIT** : This you can set by including the required jars in ant compile target and put all the required jars in the lib folder. ``` <target name="compile" depends=...
8,798,985
I have encountered a problem of socket communication on linux system, the communication process is like below: client send a message to ask the server to do a compute task, and wait for the result message from server after the task completes. But the client would hangs up to wait for the result message if the task cos...
2012/01/10
[ "https://Stackoverflow.com/questions/8798985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124954/" ]
This problem is solved. using the `tcpdump` to capture the messages flows. I have found that while in the application level, `ObjectOutputStream.writeObject()` method was invoked, in the tcp level, many times `[TCP ReTransmission]` were found. So, I concluded that the connection is possibly be dead, although using th...
70,973,755
iOS 15 Swift 5.5 Trying to understand preferences, but struggling with GeometryReader I crafted this code reading a tutorial, but it doesn't work correctly. The green box should appear over the red dot, the first one. But it is over the centre one. When I tap on the dot, it moves to the third...it feels like SwiftUI d...
2022/02/03
[ "https://Stackoverflow.com/questions/70973755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3069232/" ]
This is an example using `AsyncValue` - It eliminates the `repository` Have your service.dart file like this: ``` final blogServiceProvider = Provider<BlogService>((ref) => BlogService()); class BlogService { Future<AsyncValue<List<BlogPost>>> getBlogPost() async { try { var dio = Dio(); Response r...
2,727,480
Let $(D,\prec) $ be a directed set. Is there a "cofinal chain" in $D $? By chain I mean a $D'\subset D $ such that for all $\lambda,\gamma \in D'$, then $\lambda\prec \gamma $ or $\gamma\prec \lambda $. By cofinal chain I mean a chain $D'$ for which, for every $\gamma\in D $, there is some $\lambda \in D'$ such that $\...
2018/04/08
[ "https://math.stackexchange.com/questions/2727480", "https://math.stackexchange.com", "https://math.stackexchange.com/users/177211/" ]
Take $X$ to be your favorite uncountable set. Now take $D$ to be the finite subsets of $X$, ordered by inclusion. Easily, this set is directed. But there are no chains with order type longer than $\omega$, and so no chain can have an uncountable union, and in particular, no chain is cofinal. (If you choose $X$ wisely...
46,774,880
I must be doing something wrong, but the following commented code returns false. Note that WP is returning 'admin' as the 'user\_login', but when that user\_login is used for the `get_user_by()` function it simply returns false. Am I missing something? ``` $user = get_userdata(1); // (admin ID is 1) var_dump($user->u...
2017/10/16
[ "https://Stackoverflow.com/questions/46774880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5433458/" ]
I believe you'll need to use "login" rather by "user\_login" in the get\_user\_by call. See the posssible accepted values of the function here: <https://developer.wordpress.org/reference/functions/get_user_by/>
3,098,881
Ive looked and tried but I can't find an answer. In PHP, is it possible to call a class' member function (when that class requires a constructor to receive parameters) without instantiating it as an object? A code example (which gives errors): ``` <?php class Test { private $end=""; function __construct($...
2010/06/23
[ "https://Stackoverflow.com/questions/3098881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/373039/" ]
Unfortunately PHP doesn't have support to do this, but you are a creative and look guy :D You can use an "factory", sample: ``` <?php class Foo { private $__aaa = null; public function __construct($aaa) { $this->__aaa = $aaa; } public static function factory($aaa) { return new Foo($aa...
49,148,842
I am working on a show page based on the `match.params` from react router 4. For some reason, some functions runs 3 times which gives me the first 2 times undefined and the third time the result I want. So I have this Show component which have the props "projects" from the main component. In this show component I do a...
2018/03/07
[ "https://Stackoverflow.com/questions/49148842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5503094/" ]
Without altering the order of your data, we can do the following: ``` import pandas as pd from io import StringIO data = StringIO('''id,user,timestamp,song 0,user_000001,05-05-09 12:08,The Start of Something 1,user_000001,04-05-09 14:54,My Sharona 2,user_000001,04-05-09 14:52,Caught by the river 3,user_000001,04-05-0...
30,669,015
I have a tkinter 'Text' and 'Scrollbar' working fine. In my program in the text window automatically lines will keep on adding. So When a new line of text is inserted and data reached out of limit I would like the text and scrollbar to be scrolled to the bottom automatically, so that the latest line of text is always s...
2015/06/05
[ "https://Stackoverflow.com/questions/30669015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4946244/" ]
You can cause the text widget to scroll to any location with the `see` which takes an index. For example, to make the last line of the widget visible you can use the index `"end"`: ``` outputwindow.see("end") ``` Here's a complete working example: ``` import time try: # python 2.x import Tkinter as tk exce...
30,591,025
I have a problem similar to this one: [SFINAE tried with bool gives compiler error: "template argument ‘T::value’ involves template parameter"](https://stackoverflow.com/questions/7776448/sfinae-tried-with-bool-gives-compiler-error-template-argument-tvalue-invol) I want to define a trait that tells if a complex repres...
2015/06/02
[ "https://Stackoverflow.com/questions/30591025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1930508/" ]
On the assumption that `IsAoS<T>`'s desired behavior is: * If `IsComplex<T>::value` is `false`, it defaults to `false_type`; * Otherwise, it is an error unless the user provides a specialization. It's straightforward to implement with a `static_assert`; no default template argument needed: ``` template< typename T >...
34,481,610
I'm working on an iOS app, that should work fine with both iphones and ipads. As I know we can build the app as universal or convert iphone storyboard into ipad storyboard.What I want to know is, what is the best way from these and, when we launch app to app store, is it a problem to have two storyboards one for iphone...
2015/12/27
[ "https://Stackoverflow.com/questions/34481610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5680499/" ]
You can do a linear search with steps that are often greater than 1. The crucial observation is that if e.g. `array[i] == 4` and 7 hasn't yet appeared then the next candidate for 7 is at index `i+3`. Use a while loop which repeatedly goes directly to the next viable candidate. Here is an implementation, slightly gener...
698,478
I have to run Mac OS on virtual box for a class and it keeps giving me errors stating "VT-x/AMD-V hardware acceleration not available on your system. Certain guests (e.g. OS/2 and QNX) require this feature and will fail to boot without it." If there is a solution, I am not used to windows 8.1 and will need detailed ...
2014/01/08
[ "https://superuser.com/questions/698478", "https://superuser.com", "https://superuser.com/users/287753/" ]
Do you have Hyper-V installed? For example it may have been added if you installed the Windows Phone emulators which come with Visual Studio 2012 & 2013. If so, then there is a known conflict between Hyper-V and VirtualBox - [Hardware Virtualisation support not detected if Hyper-V installed](https://www.virtualbox.org...
10,315,793
Okay, you may call me a noob but I'm realling confused. My ex classmate paid me to write a program in C. She gave me the task and it said something like "blah blah blah make at least TWO CLASSES, write at least ONE CONSTRUCTOR and rewrite at least ONE METHOD" it says that word by word. And then I told her "this is C+...
2012/04/25
[ "https://Stackoverflow.com/questions/10315793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1289097/" ]
No, C doesn't have classes. That said, there are ways of simulating object-oriented programming in C - a quick Google search should yield some useful results.
80,774
I recently switched to a new PC at work, one with two (identical, Dell 23") monitors. I'm running Linux Mint 15 64bit / Cinnamon. Is there a way to set it up in such a way that, instead of both monitors sharing the same huge workspace, they are on separate smaller ones? E.g. left monitor on workspace 1, right monitor o...
2013/06/26
[ "https://unix.stackexchange.com/questions/80774", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/41904/" ]
Short answer: yes, you can do this. I have my (Fedora) desktop set up this way, each monitor is an independent display. It is the same 'desktop', in the X sense, but there are some limitations to typical desktop functionality with this setup versus the 'single desktop spread over two monitors' configuration. [For examp...
42,440,070
I have this problem: The GridView I has in the view (shown below) is too long that it doesn't fit entirely in the screen, maybe because one value parameter is too long, and it doesn't follow the text down. This this a screenshot for the GridView: [![enter image description here](https://i.stack.imgur.com/HPKAh.png)](h...
2017/02/24
[ "https://Stackoverflow.com/questions/42440070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7575968/" ]
`java` **doesn't** supports multiple inheritance. What you are doing is implementing an `interface`. **You can't extend multiple classes in `java` but you can implement multiple interfaces**. An interface is a reference type and it is similar to class. It is a collection of abstract methods. A class implements an int...
22,532,019
I adapted the following code found [here](http://pythonexcels.com/automating-pivot-tables-with-python/) to create a pivot table in my existing excel sheet: ``` import win32com.client as win32 win32c = win32.constants import sys import itertools tablecount = itertools.count(1) def addpivot(wb,sourcedata,title,filters=...
2014/03/20
[ "https://Stackoverflow.com/questions/22532019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3335936/" ]
As this is the one of the first Google hits when searching for Excel pivot tables from Python, I post my example code. This code generates a simple pivot table in Excel through a COM server, with some basic filters, columns, rows, and some number formatting applied. I hope this helps someone not to waste half a day on ...
21,646,093
So I have a many to many relationship between Users and Photos via the pivot table `user_photo`. I use `belongsToMany('Photo')` in my User model. However the trouble here is that I have a dozen columns in my Photo table most I don't need (especially during a json response). So an example would be: ``` //Grab user #987...
2014/02/08
[ "https://Stackoverflow.com/questions/21646093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3189288/" ]
You can use belongsToMany with select operation using laravel relationship. ``` public function photos() { return $this->belongsToMany('Photo')->select(array('name', 'date')); } ```
51,581,398
When we are using hive, data is not displayed in perfect table format. Column name and actual data related to column differs in position if the column name is big. How to fix it?
2018/07/29
[ "https://Stackoverflow.com/questions/51581398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10151665/" ]
You specified the condition in `WHERE` clause for the condition that you required ``` DELETE d FROM mytab d WHERE ( d.x1 = 'b' AND d.act = 0 ) OR d.x1 is null ```
15,346,793
Hello :) How do i find out which "count"-id the loaded picture has? The loaded picture is: "df5ddc27f7569f83e3867bec71a2cac0.jpg" And my json are: ``` [ {"count":1,"file":"8b6c5592f0378dc8c56e591a7b147826.jpg"}, {"count":2,"file":"a44618c1afe93be486382ceb38536e02.jpg"}, {"count":3,"file":"3c692942d69fba0d1...
2013/03/11
[ "https://Stackoverflow.com/questions/15346793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1936309/" ]
Yeah, this should be pretty straightforward. Assuming the two are siblings, you can even do this with CSS. **CSS APPROACH** ``` #site-logo { background-image: url(path/to/non-animated-image); } .login-button { /* Login default CSS here */ } .login-button:active ~ #site-logo { background-image: url(path/to/ani...
3,442,781
I was using one of my favorite R packages today to read data from a google spreadsheet. It would not work. This problem is occurring on all my machines (I use windows) and it appears to be a new problem. I am using Version: 0.4-1 of RGoogleDocs ``` library(RGoogleDocs) ps <-readline(prompt="get the password in ") shee...
2010/08/09
[ "https://Stackoverflow.com/questions/3442781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/168139/" ]
I no longer have this problem. I do not quite remember the timeline of exactly when I overcame the problem and cannot remember who helped me get here but here is a typical session which works. ``` library(RGoogleDocs) if(exists("ps")) print("got password, keep going") else ps <-readline(prompt="get the password in ") ...
46,415,325
Microsoft has some [decent documentation](https://learn.microsoft.com/en-us/microsoft-edge/extensions/guides/debugging-extensions#content-script-debugging) on debugging Content Scripts for an Edge Extension and the top of the page even includes a [Channel 9 video](https://channel9.msdn.com/Blogs/One-Dev-Minute/Debuggin...
2017/09/25
[ "https://Stackoverflow.com/questions/46415325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31629/" ]
The answer is no. You only need one. NPM modules can be incorporated into your code several folders down in your project. Take for example a project folder: ``` /root app.js package.json /public index.html /node_modules ... ``` All modules in the `node-module` folder can be used in any proj...
11,200,518
newbie here, so thanks in advance for help! I have a Wordpress site with multiple taxonomies. I'd like to create a very simple form with two select boxes, one for each taxonomy. Then I'd like to use an HTML form with the get method to display posts matching the criteria they requested from the select boxes. I'm able t...
2012/06/26
[ "https://Stackoverflow.com/questions/11200518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1481578/" ]
**How to get the error EAGAIN?** To get the error EAGAIN, you need to be using Non-Blocking Sockets. With Non-Blocking sockets, you need to write huge amounts of data (and stop receiving data on the peer side), so that your internal TCP buffer gets filled and returns this error. **How to get the error EPIPE?** T...
40,006
I'm trying to chart out a song, just so I have a chord chart to use for comping. It's in 4/4, and most chord changes happen on the strong beats (1 and 3), but there's a couple of places where beat 3 is anticipated (by an 8th note). For reference, the song is "Sultans of Swing" by Dire Straights. Is there any sort of c...
2015/12/05
[ "https://music.stackexchange.com/questions/40006", "https://music.stackexchange.com", "https://music.stackexchange.com/users/3404/" ]
(I don't have enough reputation points yet to comment, so I'll make this an answer instead. Will convert to comments on other answers later, or to edits on other answers, once I have enough cred to ask those answers' authors whether they welcome the edit.) I don't see any convention specified in either the "Concise Di...
55,012,413
New to javascript and just trying to make a simple form validation where if the user/pass is valid the box border turns green, and if invalid, it turns red (pictured) [Valid/Invalid](https://i.stack.imgur.com/Qlmd0.png) Here is my HTML: (Form Works, I'm guessing I'm screwing up on the listeners and Handlers) ``` <!D...
2019/03/05
[ "https://Stackoverflow.com/questions/55012413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8812202/" ]
``` "code": 403, "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." } } ``` This means that you have exceeded your limit to serve videos from youtube. You need to create an account to be able to show more videos. If you're sure you haven't exceeded your limit/ have an accoun...
69,147,252
``` <img src="https://res.cloudinary.com/dvhhqcxre/image/upload/v1611495185/zenith/tldyffcvvfm9fj51pvjp.jpg"> ``` I want to get rid of the img tag, I just want only the image link
2021/09/11
[ "https://Stackoverflow.com/questions/69147252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13574659/" ]
```js const image = document.querySelector('img') image.outerHTML = image.src ``` ```html <img src="https://res.cloudinary.com/dvhhqcxre/image/upload/v1611495185/zenith/tldyffcvvfm9fj51pvjp.jpg"> ```
8,162,278
**I am getting following errors while deploying GAE application. What will be the reason for that? Stack backtrace below.** ``` Uncaught exception from servlet com.google.apphosting.runtime.HardDeadlineExceededError: This request (0000000000000000) started at 2011/11/17 04:12:01.160 UTC and was still executing at...
2011/11/17
[ "https://Stackoverflow.com/questions/8162278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/930544/" ]
As it says in the stacktrace: ``` HardDeadlineExceededError: This request (0000000000000000) started at 2011/11/17 04:12:01.160 UTC and was still executing at 2011/11/17 04:13:01.204 UTC. ``` Frontend requests to App Engine apps have 60 seconds to complete. If your request takes longer than that, it will be terminat...
53,203,011
It's abundantly clear to me that when we want to delete a node in a Linked List (be it doubly or singly linked), and we have to search for this node, the time complexity for this task is O(n), as we must traverse the whole list in the worst case to identify the node. Similarly, it is O(k) if we want to delete the k-th ...
2018/11/08
[ "https://Stackoverflow.com/questions/53203011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10622251/" ]
It is true that copying data from `i.next` to `i` and then deleting `i` would be `O(1)` assuming that copying the data is also `O(1)`. But even with this algorithm, since deleting the last element is `O(n)`, and a description of a function in terms of big O notation only provides an upper bound on the growth rate of t...
27,529,956
I need to enlarge an input field when it's on focus without the containing td enlarging, too. Further on both fields should stay on their actual position (have a look on the fiddle, it mooves) and not move up or down (what is caused by the absolute position). This is my actual state ``` $('.Bemerkung').focus(fu...
2014/12/17
[ "https://Stackoverflow.com/questions/27529956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4371042/" ]
It's not too far from what you originally had: ``` $('.Bemerkung').focus(function() { oldWidth = $(this).width(); $(this).attr('size','30'); $(this).css({'position':'relative'}); $(this).css({'margin-right':('-'+($(this).width()-oldWidth)+'px')}); }) $('.Bemerkung').blur(function() { $(this).attr('...
27,541,934
I'm trying to accomplish a dynamic button which is always square, and based on the height of the text it is with. Something like this: ![Example](https://i.stack.imgur.com/9Vg9m.png) Basically the icon stays the same, but the size of the box varies, based on what size of text it is next to. The icon should be centere...
2014/12/18
[ "https://Stackoverflow.com/questions/27541934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1940394/" ]
Something like this should do it. You may have to change the size a little depending on the font. Also, you may have to `vertical-align` it. ``` .edit { display: inline-block; width: 1em; height: 1em; } .edit img { display: block; } ```
35,435,755
I am creating a json string using dictionary and I have to remove only that part from string my string is ``` [{Id: "code": "AAA" , Title: "display": "ANAA,FRENCH POLYNESIA"},{Id: "code": "AAB" , Title: "display": "ARRABURY, QL AUSTRALIA"}] ``` I want to remove only ``` "code": ``` And that part from string u...
2016/02/16
[ "https://Stackoverflow.com/questions/35435755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5879311/" ]
You can run this code: ``` string json = "[{Id: \"code\": \"AAA\" , Title: \"display\": \"ANAA,FRENCH POLYNESIA\"},{Id: \"code\": \"AAB\" , Title: \"display\": \"ARRABURY, QL AUSTRALIA\"}]"; json = json.Replace("\"code\":", String.Empty); json = json.Replace("\"display\":", String.Empty); ``` You can remove wit...