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
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/" ]
> > I don't know how to deal with this without insulting him or having bad feeling at the end. > > > Well it sounds like you have a bad feeling about him already, so you just need to be direct and to the point about it. Go to him and tell him calmly but forcefully exactly what you want. > > Bob, I'm taking my wa...
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...
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/" ]
> > He doesn't seem to understand that I stopped playing this game > > > You have stated multiple time that this behaviour is no longer tolerable by you. I would tell them one final time that if it does not stop that a complaint will be made to HR. > > I don't know how to deal with this without insulting him or...
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--
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/" ]
> > I don't know how to deal with this without insulting him or having bad feeling at the end. > > > Well it sounds like you have a bad feeling about him already, so you just need to be direct and to the point about it. Go to him and tell him calmly but forcefully exactly what you want. > > Bob, I'm taking my wa...
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--
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/" ]
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--
If you like to be nasty, depending on the work culture: The next time he passes by, say loudly with everybody hearing it "please keep your hands to yourself this time" (without specifying from what). Let's see how much fun it is for him to be pranked. When you are asked by you boss, explain the situation and apologize ...
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/" ]
> > He doesn't seem to understand that I stopped playing this game > > > You have stated multiple time that this behaviour is no longer tolerable by you. I would tell them one final time that if it does not stop that a complaint will be made to HR. > > I don't know how to deal with this without insulting him or...
If you like to be nasty, depending on the work culture: The next time he passes by, say loudly with everybody hearing it "please keep your hands to yourself this time" (without specifying from what). Let's see how much fun it is for him to be pranked. When you are asked by you boss, explain the situation and apologize ...
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/" ]
> > I don't know how to deal with this without insulting him or having bad feeling at the end. > > > Well it sounds like you have a bad feeling about him already, so you just need to be direct and to the point about it. Go to him and tell him calmly but forcefully exactly what you want. > > Bob, I'm taking my wa...
> > He doesn't seem to understand that I stopped playing this game > > > You have stated multiple time that this behaviour is no longer tolerable by you. I would tell them one final time that if it does not stop that a complaint will be made to HR. > > I don't know how to deal with this without insulting him or...
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/" ]
It seems your coworker indulges in some rather childish behavior. In my experience, this gets resolved if you do similar things you would do with a child. In this case that would be: **do not play the game**. You say you stopped playing the game, but you will only really stop it if you stop being emotionally involved. ...
If you like to be nasty, depending on the work culture: The next time he passes by, say loudly with everybody hearing it "please keep your hands to yourself this time" (without specifying from what). Let's see how much fun it is for him to be pranked. When you are asked by you boss, explain the situation and apologize ...
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/" ]
> > I don't know how to deal with this without insulting him or having bad feeling at the end. > > > Well it sounds like you have a bad feeling about him already, so you just need to be direct and to the point about it. Go to him and tell him calmly but forcefully exactly what you want. > > Bob, I'm taking my wa...
If you like to be nasty, depending on the work culture: The next time he passes by, say loudly with everybody hearing it "please keep your hands to yourself this time" (without specifying from what). Let's see how much fun it is for him to be pranked. When you are asked by you boss, explain the situation and apologize ...
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...
It seems your coworker indulges in some rather childish behavior. In my experience, this gets resolved if you do similar things you would do with a child. In this case that would be: **do not play the game**. You say you stopped playing the game, but you will only really stop it if you stop being emotionally involved. ...
39,408
I use [MesureIt!](https://chrome.google.com/webstore/detail/measureit/aonjhmdcgbgikgjapjckfkefpphjpgma) to measure pixels on websites, generally to check if things add up right when developing. I'm making a fluid layout right now, and would really like to do the same, but I couldn't find anything that would show me mea...
2012/12/27
[ "https://webmasters.stackexchange.com/questions/39408", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/12354/" ]
You need to make sure that all resources from your page (images, scripts, css) are also loaded via https otherwise your page is not secure.
``` <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> ``` add this in header and it's working.
33,889,813
Imagine I have created an object name of `oItem`. And this has a lot of attributes such as `ItemCode`, `ItemName`.....(around 300). And I want to assign new values to some of these attributes which were selected by the user of my application. User will give these attribute names as strings. Ex: `string attribute1 = "...
2015/11/24
[ "https://Stackoverflow.com/questions/33889813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5448670/" ]
If you have 300 properties you should really refactor this class. I think that you can use a `Dictionarystring, string>` in this case. ``` Dictionary<string, string> Items = new Dictionary<string, string> { {"attribute1", "01234"}, {"attribute2", "56789"}, {"attribute3", "76543"}, // ... }; ``` You can access t...
To make it easier for you there's a "dynamic" keyword in C#. A sample from [msdn dynamic object article](https://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject(v=vs.110).aspx): ``` // The class derived from DynamicObject. public class DynamicDictionary : DynamicObject { // The inner dictionary. ...
33,889,813
Imagine I have created an object name of `oItem`. And this has a lot of attributes such as `ItemCode`, `ItemName`.....(around 300). And I want to assign new values to some of these attributes which were selected by the user of my application. User will give these attribute names as strings. Ex: `string attribute1 = "...
2015/11/24
[ "https://Stackoverflow.com/questions/33889813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5448670/" ]
It is really easy to do this for SAP B1 addon using c# with the provided library functions. Simply include `using SAPbobsCOM;` And then you can do it as follows ``` yourobject.UserFields.Fields.Item("attribute").Value = "value"; ```
To make it easier for you there's a "dynamic" keyword in C#. A sample from [msdn dynamic object article](https://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject(v=vs.110).aspx): ``` // The class derived from DynamicObject. public class DynamicDictionary : DynamicObject { // The inner dictionary. ...
9,902,791
On my Mac, `tar` defaults to BSD tar. ``` $ tar --version bsdtar 2.8.3 - libarchive 2.8.3 ``` There is a GNU tar that I can invoke with `gnutar`. ``` $ gnutar --version tar (GNU tar) 1.17 Copyright (C) 2007 Free Software Foundation, Inc. ... ``` With [Ant Tar task](http://ant.apache.org/manual/Tasks/tar.html), ho...
2012/03/28
[ "https://Stackoverflow.com/questions/9902791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/583539/" ]
As @Raghuram wrote, modern versions of Ant do not use an external `tar` program; instead, they have their own pure-Java implementation. However, you can produce behavior **similar** to GNU tar by using the `longfile="gnu"` attribute. From the [manual](http://ant.apache.org/manual/Tasks/tar.html): > > If the loss of p...
[ant tar task](http://ant.apache.org/manual/Tasks/tar.html) does not use the system `tar` command. Thus the question of configuring an alternate tar implementation does not arise.
47,719,306
Can you use an `auto` deduced type where you have a comma to indicate initialization of two or more variables. Like this: ``` auto p = c.begin(), e = c.end(); ``` Or is the presence of two initializations (potentially) too confusing for a compiler? What does the C++ standard allow?
2017/12/08
[ "https://Stackoverflow.com/questions/47719306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/545127/" ]
Yes you can initialize them that way as long as they are of the same type (which they are in your example).
> > Can you use an auto deduced type where you have a comma operator to indicate initialization of two or more variables. > > > Yes. > > Or is the presence of two initialization too confusing for a compiler? > > > No, it is not. As long as the auto deduction does not result in inconsistent types declaring mu...
39,187,726
I have a function which takes a count and a string as input. It should return a list of all words in that string of length count, and greater. Python however doesn't recognise my variable and returns an empty list. ``` def word_number(count, string): return re.findall(r'\w{count,}', string) ``` How do I pass in ...
2016/08/28
[ "https://Stackoverflow.com/questions/39187726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6053880/" ]
You can use `printf` style formatting: ``` re.findall(r'\w{%s,}' % count, string) ```
You can use [str.format](https://docs.python.org/2/library/string.html#format-examples) to achieve your goal. ``` def word_number(count, string): return re.findall(r'\w{{{0},}}'.format(count), string) ```
1,252,083
I'm running Ubuntu 20.04 in dual boot with Windows 10. The way I have my setup configured is there's an SSD with both Windows and Ubuntu operating systems and a second drive with all my data on it, such as downloads and documents, etc. The disk is partitioned under NTFS scheme. Firstly, I was interested in simply moun...
2020/06/20
[ "https://askubuntu.com/questions/1252083", "https://askubuntu.com", "https://askubuntu.com/users/1097034/" ]
I had the exact same setup and faced the same problem. So here is a solution: 1. Make sure fast startup is turned off in Windows Control Panel\Hardware and Sound\Power Options\System Settings. 2. Make sure you have shut down your PC and not hibernated it with windows.
What worked for me was login with windows, find the permissions tab and write "everyone" and click full control, click apply, then restart to linux.
1,336,588
I want to know in which situations two numbers that can be expressed as powers can be equal. I think it's intuitive that if two powers (say $a^b$ and $c^d$) are equal, then the bases must be themselves powers of a single natural number (say $a=m^k$ and $c=m^l$, so that $m^{kb}=m^{ld}$, and $kb=ld$). But I'm having a ha...
2015/06/23
[ "https://math.stackexchange.com/questions/1336588", "https://math.stackexchange.com", "https://math.stackexchange.com/users/113664/" ]
You notice the fact about the gcd's (i.e., mdc's) of the numbers $a\_i$ and $c\_i$. The key here is to notice that $b$ and $d$ can also be assumed relatively prime (if they have gcd equal to $k$, then take the $k$th root of both sides of $a^b = c^d$ to reduce to the case where the exponents are relatively prime.) Now ...
Let us look case by case 1. Either $b$ divides $d$ ( or $d$ divides $b$, it is similar ) then we get $a\_i=\frac{d}{b}c\_i$. Thus your claim is satisfied as for vector $v=[c\_1,c\_2..c\_n]$ your vector $a=\frac{d}{b}v$ and $c=v$. 2. $b$ and $d$ are co-primes then $a\_i=k\_id$ and $c\_i=k\_ib$ ( here $k\_i$ are integer...
1,336,588
I want to know in which situations two numbers that can be expressed as powers can be equal. I think it's intuitive that if two powers (say $a^b$ and $c^d$) are equal, then the bases must be themselves powers of a single natural number (say $a=m^k$ and $c=m^l$, so that $m^{kb}=m^{ld}$, and $kb=ld$). But I'm having a ha...
2015/06/23
[ "https://math.stackexchange.com/questions/1336588", "https://math.stackexchange.com", "https://math.stackexchange.com/users/113664/" ]
Alternatively, we first prove the following claim. To use the claim below, let $k:=\gcd(b,d)$. From $a^b=c^d$, we have $$a^{\frac{b}k}=c^{\frac{d}k}\,.$$ As $\gcd\left(\dfrac{b}{k},\dfrac{d}{k}\right)=1$, by the claim, there exists $e\in\mathbb{Z}\_{>0}$ such that $$a=e^{\frac{d}k}\text{ and }c=e^{\frac{b}k}\,.$$ > >...
Let us look case by case 1. Either $b$ divides $d$ ( or $d$ divides $b$, it is similar ) then we get $a\_i=\frac{d}{b}c\_i$. Thus your claim is satisfied as for vector $v=[c\_1,c\_2..c\_n]$ your vector $a=\frac{d}{b}v$ and $c=v$. 2. $b$ and $d$ are co-primes then $a\_i=k\_id$ and $c\_i=k\_ib$ ( here $k\_i$ are integer...
2,171,192
I have scanned a page of a book and saved it as a picture. How do I convert that image into real text? Is there any technique for that? Any help will be highly appreciated.
2010/01/31
[ "https://Stackoverflow.com/questions/2171192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/148814/" ]
The technique is called optical character recognition (OCR). I don't like to simply suggest a search, but that's probably your best bet here.
The technique is called OCR <http://en.wikipedia.org/wiki/Optical_character_recognition> A google for PHP OCR gives you a few results.
2,171,192
I have scanned a page of a book and saved it as a picture. How do I convert that image into real text? Is there any technique for that? Any help will be highly appreciated.
2010/01/31
[ "https://Stackoverflow.com/questions/2171192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/148814/" ]
The technique is called optical character recognition (OCR). I don't like to simply suggest a search, but that's probably your best bet here.
Just as @JesperPalm replied the technique is called OCR, and regarding implementing it I suggest reading @nategood's reply in [How can I implement OCR on a website using PHP?](https://stackoverflow.com/questions/2170271/how-can-i-implement-ocr-on-a-website-using-php/2170419#2170419) regarding Google's ocropus, which se...
63,300,511
I have a main home activity which consists of 3 tabs at the bottom of the screen. Inside this `activity` I have a `fragment`. This fragment contains a `view pager`. This view pager is used to navigate between 2 activities: 1.Exercise Form = This displays a video for the exercise. 2.Exercise History = This shows all...
2020/08/07
[ "https://Stackoverflow.com/questions/63300511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13258564/" ]
you can send data using Interface, set argument or newInstance **in your tab fragment** ``` switch (position) { case 0: fragment = new ExerciseHomeVideoFragment().newInstance(childExerciseName); break; case 1: fragment = new ExerciseHomeVideoFragment(); break; ...
I think it's a good idea to use better architecture. for example if you use a singleton class to store your data you will be able to use them without passing to the fragment. search about singleton. Android has a new feature that has been released 3 months later. you can use setFragmentResultListener. here is the docum...
66,931
There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into the standard tools such as `pdftk` but could not find an option doing what I want.
2013/03/05
[ "https://unix.stackexchange.com/questions/66931", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/17409/" ]
`pdftk` is able to cut out a fixed set of pages efficiently. With a bit of scripting glue, this does what I want: ``` number=$(pdfinfo -- "$file" 2> /dev/null | awk '$1 == "Pages:" {print $2}') count=$((number / pagesper)) filename=${file%.pdf} counter=0 while [ "$count" -gt "$counter" ]; do start=$((counter*pages...
See also `pdfseparate` and `pdfunite` from [`poppler-utils`](http://poppler.freedesktop.org/). `pdfseparate` breaks the file into one file per page which makes it relatively easy to reassemble at will later on with `pdfunite`, manually or (semi-)automatically. Like with zsh: ``` autoload zargs reunite() pdfunite "$@...
66,931
There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into the standard tools such as `pdftk` but could not find an option doing what I want.
2013/03/05
[ "https://unix.stackexchange.com/questions/66931", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/17409/" ]
`pdftk` is able to cut out a fixed set of pages efficiently. With a bit of scripting glue, this does what I want: ``` number=$(pdfinfo -- "$file" 2> /dev/null | awk '$1 == "Pages:" {print $2}') count=$((number / pagesper)) filename=${file%.pdf} counter=0 while [ "$count" -gt "$counter" ]; do start=$((counter*pages...
I find Python with the [PyPdf library](http://pybrary.net/pyPdf/) convenient for those jobs that pdftk doesn't do conveniently (or at all). ``` #!/usr/bin/env python import sys from pyPdf import PdfFileWriter, PdfFileReader # Command line parsing if len(sys.argv) < 2 or sys.argv[1][-4:] != '.pdf': sys.stderr.writ...
66,931
There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into the standard tools such as `pdftk` but could not find an option doing what I want.
2013/03/05
[ "https://unix.stackexchange.com/questions/66931", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/17409/" ]
`pdftk` is able to cut out a fixed set of pages efficiently. With a bit of scripting glue, this does what I want: ``` number=$(pdfinfo -- "$file" 2> /dev/null | awk '$1 == "Pages:" {print $2}') count=$((number / pagesper)) filename=${file%.pdf} counter=0 while [ "$count" -gt "$counter" ]; do start=$((counter*pages...
The solution posted by Raphael is flawed: if you have an uneven number of pages, the last ones are just ignored. There it is an improved solution that works also with an uneven number of pages. Again, assumes that you have the number of pages per chunk in `$pagesper` and the filename of the source PDF in `$file`. ``` ...
66,931
There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into the standard tools such as `pdftk` but could not find an option doing what I want.
2013/03/05
[ "https://unix.stackexchange.com/questions/66931", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/17409/" ]
See also `pdfseparate` and `pdfunite` from [`poppler-utils`](http://poppler.freedesktop.org/). `pdfseparate` breaks the file into one file per page which makes it relatively easy to reassemble at will later on with `pdfunite`, manually or (semi-)automatically. Like with zsh: ``` autoload zargs reunite() pdfunite "$@...
I find Python with the [PyPdf library](http://pybrary.net/pyPdf/) convenient for those jobs that pdftk doesn't do conveniently (or at all). ``` #!/usr/bin/env python import sys from pyPdf import PdfFileWriter, PdfFileReader # Command line parsing if len(sys.argv) < 2 or sys.argv[1][-4:] != '.pdf': sys.stderr.writ...
66,931
There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into the standard tools such as `pdftk` but could not find an option doing what I want.
2013/03/05
[ "https://unix.stackexchange.com/questions/66931", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/17409/" ]
See also `pdfseparate` and `pdfunite` from [`poppler-utils`](http://poppler.freedesktop.org/). `pdfseparate` breaks the file into one file per page which makes it relatively easy to reassemble at will later on with `pdfunite`, manually or (semi-)automatically. Like with zsh: ``` autoload zargs reunite() pdfunite "$@...
The solution posted by Raphael is flawed: if you have an uneven number of pages, the last ones are just ignored. There it is an improved solution that works also with an uneven number of pages. Again, assumes that you have the number of pages per chunk in `$pagesper` and the filename of the source PDF in `$file`. ``` ...
24,968,277
Say we have two XML files, of which these are snippets: `firstxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/button1 /> ``` `secondxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button...
2014/07/26
[ "https://Stackoverflow.com/questions/24968277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2533904/" ]
When you set the firstxml to be the content view, that layout gets inflated. findViewById will find the id's in the current layout that's inflated rather than on every layout. [setContentView](http://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View)) method description kind of...
The code will call and instantiate the button1 set on your firstxml.xml file. **Note** For future readers. If the layout file doesnot contain button1 it will throw null pointer exception and the editor wont know that there is an error. This is because **R.id.button1** is static field in your R.java class. Also provid...
24,968,277
Say we have two XML files, of which these are snippets: `firstxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/button1 /> ``` `secondxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button...
2014/07/26
[ "https://Stackoverflow.com/questions/24968277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2533904/" ]
You are referencing the the first XML layout file `R.layout.firstxml` in the activity's `onCreate(Bundle...)` method, so the search here will be made. Any call to `findViewById(int id);` will search in your inflated layout `R.layout.firstxml`. The `R.java` file is automatically generated when you are defining/adding ...
The code will call and instantiate the button1 set on your firstxml.xml file. **Note** For future readers. If the layout file doesnot contain button1 it will throw null pointer exception and the editor wont know that there is an error. This is because **R.id.button1** is static field in your R.java class. Also provid...
24,968,277
Say we have two XML files, of which these are snippets: `firstxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/button1 /> ``` `secondxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button...
2014/07/26
[ "https://Stackoverflow.com/questions/24968277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2533904/" ]
When you set the firstxml to be the content view, that layout gets inflated. findViewById will find the id's in the current layout that's inflated rather than on every layout. [setContentView](http://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View)) method description kind of...
``` Which button is called and instantiated when this code runs? ``` Since you used the `firstxml.xml` as the layout of the activity you are calling the reference of that button from that xml not the button from the `secondxml.xml`. And in your R.java it will only generate one instance of that id. **sample:** ```...
24,968,277
Say we have two XML files, of which these are snippets: `firstxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/button1 /> ``` `secondxml.xml` ``` <?xml version="1.0" encoding="utf-8"?> <Button...
2014/07/26
[ "https://Stackoverflow.com/questions/24968277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2533904/" ]
You are referencing the the first XML layout file `R.layout.firstxml` in the activity's `onCreate(Bundle...)` method, so the search here will be made. Any call to `findViewById(int id);` will search in your inflated layout `R.layout.firstxml`. The `R.java` file is automatically generated when you are defining/adding ...
``` Which button is called and instantiated when this code runs? ``` Since you used the `firstxml.xml` as the layout of the activity you are calling the reference of that button from that xml not the button from the `secondxml.xml`. And in your R.java it will only generate one instance of that id. **sample:** ```...
11,718,383
I use a first view (a class) where there is a button that shows me one second view (another class). display looks like this: ``` listContactsViewController viewController * = [[listContactsViewController alloc] init]; UINavigationController * vc = [[UINavigationController alloc] initWithRootViewController: viewControl...
2012/07/30
[ "https://Stackoverflow.com/questions/11718383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1562441/" ]
Since Android 4.0, it is possible to connect an Android phone to a Wifly module in adhoc mode, without rooting, with the following technique: 1. With a helper app (available on Google Play or develop your own), create an Access Point on the phone and inspect the SSID, passphrase and IP address. 2. Configure the Wifly ...
Its not possible to work with AdHoc mode devices via Android (in iOS you can) in normal ways. Please read here: <http://www.xda-developers.com/android/android-ad-hoc-wireless-network-support/> This link shows a way to work with AdHoc.
11,718,383
I use a first view (a class) where there is a button that shows me one second view (another class). display looks like this: ``` listContactsViewController viewController * = [[listContactsViewController alloc] init]; UINavigationController * vc = [[UINavigationController alloc] initWithRootViewController: viewControl...
2012/07/30
[ "https://Stackoverflow.com/questions/11718383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1562441/" ]
Since Android 4.0, it is possible to connect an Android phone to a Wifly module in adhoc mode, without rooting, with the following technique: 1. With a helper app (available on Google Play or develop your own), create an Access Point on the phone and inspect the SSID, passphrase and IP address. 2. Configure the Wifly ...
Auto-connect: <https://dl.dropboxusercontent.com/u/101922388/WiflySanUSB.zip> .When only the green LED of the WiFly modem is blinking, the circuit and the program has been successfully implemented.
18,227,828
I was reading a program and I found this function: ``` void** function(void**) ``` My question is what kind of parameter can I give and what should my return value be ? \**UPDATE!!! \** I can read it and I know it's can be a pointer of a pointer on any type the question is how to use it ?? ( I've just edited th...
2013/08/14
[ "https://Stackoverflow.com/questions/18227828", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563123/" ]
The function declaration: ``` void **functionName( void**); ``` ... is read as: "`functionName` *is a function that is passed a double void pointer and returns a double void pointer*". It is passed a double void pointer and returns a double void pointer. It is extremely common to see void pointers in generic ADTs, ...
It is a function that takes a pointer to pointer to `void` and returns a pointer to pointer to `void`. You could use it like this: ``` int something = 5; void* somepointer = &something; functionName(&somepointer); ```
18,227,828
I was reading a program and I found this function: ``` void** function(void**) ``` My question is what kind of parameter can I give and what should my return value be ? \**UPDATE!!! \** I can read it and I know it's can be a pointer of a pointer on any type the question is how to use it ?? ( I've just edited th...
2013/08/14
[ "https://Stackoverflow.com/questions/18227828", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563123/" ]
It is a function that takes a pointer to pointer to `void` and returns a pointer to pointer to `void`. You could use it like this: ``` int something = 5; void* somepointer = &something; functionName(&somepointer); ```
A `void *` can refer to an address of any type. You can read it as: 'a pointer to something in memory'. So this means, it can point to an integer, a string, an object, ... everything. Some examples: ``` void *anyObject; int a = 1; float b = 2; char *c = "somestring"; function aFunction(int a) { ... } anyObject = ...
18,227,828
I was reading a program and I found this function: ``` void** function(void**) ``` My question is what kind of parameter can I give and what should my return value be ? \**UPDATE!!! \** I can read it and I know it's can be a pointer of a pointer on any type the question is how to use it ?? ( I've just edited th...
2013/08/14
[ "https://Stackoverflow.com/questions/18227828", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563123/" ]
The function declaration: ``` void **functionName( void**); ``` ... is read as: "`functionName` *is a function that is passed a double void pointer and returns a double void pointer*". It is passed a double void pointer and returns a double void pointer. It is extremely common to see void pointers in generic ADTs, ...
A `void *` can refer to an address of any type. You can read it as: 'a pointer to something in memory'. So this means, it can point to an integer, a string, an object, ... everything. Some examples: ``` void *anyObject; int a = 1; float b = 2; char *c = "somestring"; function aFunction(int a) { ... } anyObject = ...
20,640,656
I have a parent table, call it `parents`. Each parent has some number of children in a second table, called `children`. A typical left join would be something like this: ``` select * from parents p left join children c on p.id = c.parent_id ``` But this returns every child row and repeats all the parent informatio...
2013/12/17
[ "https://Stackoverflow.com/questions/20640656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286288/" ]
``` SELECT A.* FROM ( SELECT p.*, c.child_id, some_field_of_children FROM parents p LEFT JOIN children c ON p.id = c.parent_id ) A WHERE A.child_id = ( SELECT MIN(B.child_id) FROM children B WHERE B.parent_id = A.parent_id) ``` I assume that children table has 'child\_id' as its PK that we can use to get t...
Freehand SQL: Select \* from Parent p cross join Child c where c.Id = (select max(c2.id) from Child c2 where c2.ParentId = p.Id) Something like that will get 1 child with the current Parent and join the two. If you want it return stuff if there are no children, ann: or not exists(select max(c3.id) from Child c3 wher...
20,640,656
I have a parent table, call it `parents`. Each parent has some number of children in a second table, called `children`. A typical left join would be something like this: ``` select * from parents p left join children c on p.id = c.parent_id ``` But this returns every child row and repeats all the parent informatio...
2013/12/17
[ "https://Stackoverflow.com/questions/20640656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1286288/" ]
``` SELECT A.* FROM ( SELECT p.*, c.child_id, some_field_of_children FROM parents p LEFT JOIN children c ON p.id = c.parent_id ) A WHERE A.child_id = ( SELECT MIN(B.child_id) FROM children B WHERE B.parent_id = A.parent_id) ``` I assume that children table has 'child\_id' as its PK that we can use to get t...
``` select p.parent_id, p.name as parent_name, c.name as child_name from parent p join( select * from child where child_id in( select child_id from child group by parent_id)) c on p.parent_id = c.parent_id ``` **SQL Fiddle:** <http://sqlfiddle.com/#!2/03fdc/14>
11,491,431
I have a situation and I need to know how to deal with it in the best way. I have an application (MVC3) and I have couple of integrations for it. I have an interface "IntegrationInterface" and every integration implements it. I want to load the dlls of the integrations, create a list of them, and run a loop that runs ...
2012/07/15
[ "https://Stackoverflow.com/questions/11491431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025142/" ]
First, you'll have to find all relevant dlls and classes: ``` loadedIntegrations.Clear(); if (!Directory.Exists(path)) return; DirectoryInfo di = new DirectoryInfo(path); FileInfo[] files = di.GetFiles("*.dll"); foreach (var file in files) { Assembly newAssembly = Assembly.LoadFile(file.FullName); Type[] t...
I am doing something similar to what you described in an import utility that wrote. My issue was that I didn't want to load ALL the assemblies. I only wanted to load assemblies that contained types that were requested. To accomplish this I've used the [AppDomain.CurrentDomain.AssemblyResolve](http://msdn.microsoft.co...
11,491,431
I have a situation and I need to know how to deal with it in the best way. I have an application (MVC3) and I have couple of integrations for it. I have an interface "IntegrationInterface" and every integration implements it. I want to load the dlls of the integrations, create a list of them, and run a loop that runs ...
2012/07/15
[ "https://Stackoverflow.com/questions/11491431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025142/" ]
First, you'll have to find all relevant dlls and classes: ``` loadedIntegrations.Clear(); if (!Directory.Exists(path)) return; DirectoryInfo di = new DirectoryInfo(path); FileInfo[] files = di.GetFiles("*.dll"); foreach (var file in files) { Assembly newAssembly = Assembly.LoadFile(file.FullName); Type[] t...
If u know MEF (Managed extensibility framework) this might help you I personally use it but have to say that using MEF with MVC is not trivial i think for more information please visit <http://msdn.microsoft.com/en-us/library/dd460648.aspx>
11,491,431
I have a situation and I need to know how to deal with it in the best way. I have an application (MVC3) and I have couple of integrations for it. I have an interface "IntegrationInterface" and every integration implements it. I want to load the dlls of the integrations, create a list of them, and run a loop that runs ...
2012/07/15
[ "https://Stackoverflow.com/questions/11491431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025142/" ]
I am doing something similar to what you described in an import utility that wrote. My issue was that I didn't want to load ALL the assemblies. I only wanted to load assemblies that contained types that were requested. To accomplish this I've used the [AppDomain.CurrentDomain.AssemblyResolve](http://msdn.microsoft.co...
If u know MEF (Managed extensibility framework) this might help you I personally use it but have to say that using MEF with MVC is not trivial i think for more information please visit <http://msdn.microsoft.com/en-us/library/dd460648.aspx>
159,818
I am working on a text-based adventure game and I'm implementing new features, one of these features being **saves** and **loads**. This code works, and I know that there is a more efficient way of coding it, but this is sufficient. I will first post the code (feel free to play with it, but bear in mind that this is on...
2017/04/04
[ "https://codereview.stackexchange.com/questions/159818", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/135373/" ]
Comments ======== You have `#Player Class` and `#Enemy Class` as comments. Comments should be used to clarify something that may otherwise be unclear. The line `class Player:` means that you are creating the Player class, so that comment does nothing. Spacing ======= You need a little whitespace. Between the methods...
### `while` loop is more intuitive than recursion For example you can re-write: ``` def userMultiChoice(): option = input("What do you want to do?\n1] See your blance. \n2] Go to the shop. \n3] Go on an adventure.\n--> ") if option == "1" or option == "balance" or option == "Balance" or option == "BALANCE": ...
159,818
I am working on a text-based adventure game and I'm implementing new features, one of these features being **saves** and **loads**. This code works, and I know that there is a more efficient way of coding it, but this is sufficient. I will first post the code (feel free to play with it, but bear in mind that this is on...
2017/04/04
[ "https://codereview.stackexchange.com/questions/159818", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/135373/" ]
Comments ======== You have `#Player Class` and `#Enemy Class` as comments. Comments should be used to clarify something that may otherwise be unclear. The line `class Player:` means that you are creating the Player class, so that comment does nothing. Spacing ======= You need a little whitespace. Between the methods...
I would change a few things for the readability's sake, in addition to other things (e.g. globals). **`While` loop vs. recursion** Like other answers pointed out, use `while` loop over recursion when you can (especially in games, where the idea of a "main game loop" is very grounded). Recursion may be a more "elega...
9,120,896
I'd like emacs to treat "#ifdef" exactly like "{" and "#endif" like "}" in relation to indentation. Like so: ``` #ifdef __linux__ #include <sys/socket.h> #endif int func(void) { int foo = 0; #ifdef DO_STUFF foo = do_stuff(); #endif return foo; } ``` instead of: ``` #ifdef __linux__ #i...
2012/02/02
[ "https://Stackoverflow.com/questions/9120896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/406163/" ]
You can use this el file for emacs : <http://www.emacswiki.org/emacs/ppindent.el> You can find many info about emacs indentation here : <http://www.emacswiki.org/emacs/IndentingC>
Preprocessor comments are were supposed to start in the first column, so emacs is correct there, however these days compilers typically allow them to be indented. (See [Indenting #defines](https://stackoverflow.com/questions/789073/indenting-defines)) That said, see [Indent preprocessor directives as C code in emacs](...
1,998,926
In Windows XP if you click Start, Run (or Windows-key + R) you get a little dialog for running things directly. If you start typing, a resizable scroll-list pops up underneath the edit-box. I want something similar, so when a user is typing in a name to an edit-box, a list will suddenly appear if suggestions can be m...
2010/01/04
[ "https://Stackoverflow.com/questions/1998926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197229/" ]
I'm currently looking at this one: <http://www.codeproject.com/KB/combobox/akautocomplete.aspx> Will try to remember to post my findings.
You'll have to create it yourself, IMHO. However if you google 'autosuggest textbox', you should find some examples on how to do it. The examples might not be in in MFC though, but I'm sure they can help you along.
1,998,926
In Windows XP if you click Start, Run (or Windows-key + R) you get a little dialog for running things directly. If you start typing, a resizable scroll-list pops up underneath the edit-box. I want something similar, so when a user is typing in a name to an edit-box, a list will suddenly appear if suggestions can be m...
2010/01/04
[ "https://Stackoverflow.com/questions/1998926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197229/" ]
I'm currently looking at this one: <http://www.codeproject.com/KB/combobox/akautocomplete.aspx> Will try to remember to post my findings.
[This one](http://www.codeproject.com/KB/combobox/combocompletion.aspx) is a good start:
12,754,261
I need to develop an application using WebSockets and Haxe. I came upon this lib: <http://lib.haxe.org/p/hxWebSockets> But it's outdated. Then I found this blog post: <http://bp.io/post/322> But the links to the code are broken :( So, anyone out there knows any other WebSocket resource for Haxe? If not,...
2012/10/05
[ "https://Stackoverflow.com/questions/12754261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/575092/" ]
If you use node.js as a platform, I'd recommend you to make bindings to socket.io. If you use another platform, I'd recommend to use socket.io as a reference implementation, or just port it to haxe, which shouldn't be that hard.
I recently started using Haxe-Js-Kit and it has decent bindings for a lot of nodejs libs including Socket.IO. <https://github.com/clemos/haxe-js-kit/> Make sure you use the dev branch for development as it is quite more advanced than the haxelib or master branch.
12,754,261
I need to develop an application using WebSockets and Haxe. I came upon this lib: <http://lib.haxe.org/p/hxWebSockets> But it's outdated. Then I found this blog post: <http://bp.io/post/322> But the links to the code are broken :( So, anyone out there knows any other WebSocket resource for Haxe? If not,...
2012/10/05
[ "https://Stackoverflow.com/questions/12754261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/575092/" ]
The lib you mentioned is indeed outdated. Luckily, someone made a new one, supporting the latest websocket protocol: <http://lib.haxe.org/p/WebSocket> ...however, it's still a bit lower level than nodejs/socket.io
I recently started using Haxe-Js-Kit and it has decent bindings for a lot of nodejs libs including Socket.IO. <https://github.com/clemos/haxe-js-kit/> Make sure you use the dev branch for development as it is quite more advanced than the haxelib or master branch.
12,754,261
I need to develop an application using WebSockets and Haxe. I came upon this lib: <http://lib.haxe.org/p/hxWebSockets> But it's outdated. Then I found this blog post: <http://bp.io/post/322> But the links to the code are broken :( So, anyone out there knows any other WebSocket resource for Haxe? If not,...
2012/10/05
[ "https://Stackoverflow.com/questions/12754261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/575092/" ]
I am using haxe for a websockets application and using the js libraries: ``` import js.html.WebSocket; ``` Using the following function to connect to the server. ``` private function connect() { trace("Calling connect"); try { websocket = new WebSocket(connectionString()); websocket.onclose = onClo...
I recently started using Haxe-Js-Kit and it has decent bindings for a lot of nodejs libs including Socket.IO. <https://github.com/clemos/haxe-js-kit/> Make sure you use the dev branch for development as it is quite more advanced than the haxelib or master branch.
70,663,139
I am trying to get my class to behave like a "normal" object, in that when it is called in `object.entries` it returns an array of key value pairs. After quite a bit of searching around I have been able to make my class iterable. But I cannot find where to start in terms of implementing `object.entries`. Here is where...
2022/01/11
[ "https://Stackoverflow.com/questions/70663139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4406780/" ]
The issue is that your instances have no public "own" (not inherited) properties, which is what `Object.entries` includes in its array. > > I am trying to get my class to behave like a "normal" object, in that when it is called in object.entries it returns an array of key value pairs. > > > That's the default beh...
You actually don't have to implement the iterator. The reason `Object.entries` wouldnt work is that due to the `#` the property is treated as private and therefore is not returned. If you remove the `#` `name` is returned by `Object.entries` like in the example below. ```js class Person { name constructor(nam...
3,957,287
I found one jQuery plugin (tipsy) to display tooltip below <http://onehackoranother.com/projects/jquery/tipsy/> In link above i could see that **manually triggered** tooltip is working as designed. I copied the page, and save it *locally*, as **tipsy.htm** (together with auto-generated **tipsy\_files**). Again, is st...
2010/10/18
[ "https://Stackoverflow.com/questions/3957287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/325192/" ]
Don't do it like that. Saving a webpage locally could alter the page and the files its links to. 1. Download the plugin. 2. Create your own page. 3. Include the [jQuery](http://www.jquery.com) library in your page. 4. Then include the plugin js file. 5. Include the CSS file for the plugin or write your own. 6. Follow ...
Check the JavaScript console of Firefox for errors. That should give you an idea why it fails.
3,957,287
I found one jQuery plugin (tipsy) to display tooltip below <http://onehackoranother.com/projects/jquery/tipsy/> In link above i could see that **manually triggered** tooltip is working as designed. I copied the page, and save it *locally*, as **tipsy.htm** (together with auto-generated **tipsy\_files**). Again, is st...
2010/10/18
[ "https://Stackoverflow.com/questions/3957287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/325192/" ]
Don't do it like that. Saving a webpage locally could alter the page and the files its links to. 1. Download the plugin. 2. Create your own page. 3. Include the [jQuery](http://www.jquery.com) library in your page. 4. Then include the plugin js file. 5. Include the CSS file for the plugin or write your own. 6. Follow ...
I found that the latest version of tipsy 0.1.7 (from jquery plugin tipsy project) is not actually the latest copy (perhaps the developer forgot to update?) - without the trigger functionality. The latest copy is actually on the website itself, which is <http://onehackoranother.com/projects/jquery/tipsy/javascripts/jqu...
3,957,287
I found one jQuery plugin (tipsy) to display tooltip below <http://onehackoranother.com/projects/jquery/tipsy/> In link above i could see that **manually triggered** tooltip is working as designed. I copied the page, and save it *locally*, as **tipsy.htm** (together with auto-generated **tipsy\_files**). Again, is st...
2010/10/18
[ "https://Stackoverflow.com/questions/3957287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/325192/" ]
Don't do it like that. Saving a webpage locally could alter the page and the files its links to. 1. Download the plugin. 2. Create your own page. 3. Include the [jQuery](http://www.jquery.com) library in your page. 4. Then include the plugin js file. 5. Include the CSS file for the plugin or write your own. 6. Follow ...
Check if you used live option too. **live** option does not work with **manual trigger**!
3,957,287
I found one jQuery plugin (tipsy) to display tooltip below <http://onehackoranother.com/projects/jquery/tipsy/> In link above i could see that **manually triggered** tooltip is working as designed. I copied the page, and save it *locally*, as **tipsy.htm** (together with auto-generated **tipsy\_files**). Again, is st...
2010/10/18
[ "https://Stackoverflow.com/questions/3957287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/325192/" ]
I found that the latest version of tipsy 0.1.7 (from jquery plugin tipsy project) is not actually the latest copy (perhaps the developer forgot to update?) - without the trigger functionality. The latest copy is actually on the website itself, which is <http://onehackoranother.com/projects/jquery/tipsy/javascripts/jqu...
Check the JavaScript console of Firefox for errors. That should give you an idea why it fails.
3,957,287
I found one jQuery plugin (tipsy) to display tooltip below <http://onehackoranother.com/projects/jquery/tipsy/> In link above i could see that **manually triggered** tooltip is working as designed. I copied the page, and save it *locally*, as **tipsy.htm** (together with auto-generated **tipsy\_files**). Again, is st...
2010/10/18
[ "https://Stackoverflow.com/questions/3957287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/325192/" ]
I found that the latest version of tipsy 0.1.7 (from jquery plugin tipsy project) is not actually the latest copy (perhaps the developer forgot to update?) - without the trigger functionality. The latest copy is actually on the website itself, which is <http://onehackoranother.com/projects/jquery/tipsy/javascripts/jqu...
Check if you used live option too. **live** option does not work with **manual trigger**!
4,120,937
I have gallery and a custom css drop-down menu to choose a category. If the user does not have javascript enabled, he should be able to click the a anchor without any problems. Otherwise, jquery & ajax are used. My problem is, how do I know the category selected? Storing it as an attribute isn't an option, because it d...
2010/11/08
[ "https://Stackoverflow.com/questions/4120937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/294022/" ]
``` $(this).data('key', 'value'); ``` would work in the context of an event handler assigned to an element where `this` refers to the element. If you have to store it initially on page load, use `data-attribute`.
I would go with @meder's answer, but if the page needs to load with the category, and you don't want to use data-attribute then another option is to store the data at the class attribute, it can even be a json string and you can parse it to an object using the [metadata plugin](http://plugins.jquery.com/project/m...
1,088,562
The solution of $x(\ln x)^2=e$ is clearly $e$, but how can I show that it is indeed a solution conceptually (that is, **without substituting $x=e$**) and that it is unique?
2015/01/02
[ "https://math.stackexchange.com/questions/1088562", "https://math.stackexchange.com", "https://math.stackexchange.com/users/175920/" ]
$g(x)=x\log^2 x$ is a continuous and increasing function on $(1,+\infty)$, as a product of two continuous, non-negative and increasing functions on the same interval. Since $g(1)=0$ and $\lim\_{x\to+\infty} g(x)=+\infty$, the map between $(1,+\infty)$ and $(0,+\infty)$ given by $g$ is one-to-one.
Substituting $x = e$ checks out. $f(x) = x(\ln(x))^2$ is strictly increasing so there is only at most one solution.
47,215,134
I'm writing a cloud functions in conjunction with google's Firestore database. I'm trying to write recursive delete more data. I can't find the syntax for accessing and deleting data in other parts of the database. The code I have already is below. ``` exports.deleteProject = functions.firestore.document('{userID}/pr...
2017/11/10
[ "https://Stackoverflow.com/questions/47215134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6939854/" ]
One can use below code to delete all the documents in a collection recursively. This code worked perfectly for me. Make sure you have **JSON** file of firebase **credentials** and **firebase-admin** installed. ``` const admin = require('firebase-admin'); const db = admin.firestore(); const serviceAccount = require...
The answer is that you must write a cloud function that deletes the data on its own and is trigger by the client. There isn't an efficient way to do it with client side. The method I use is I listen in the cloud function for the first delete and then fire the recursive. Code to delete in node js: ``` db.collection("c...
170,371
I recently came across the book ["The Adventures of Tom Bombadil"](https://www.harpercollins.co.uk/9780007557271/the-adventures-of-tom-bombadil) and was wondering if this can be seen as official canon. To my knowledge, after the death of J.R.R. Tolkien, his son Christopher edited and published all his works. This book ...
2017/09/25
[ "https://scifi.stackexchange.com/questions/170371", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/63615/" ]
*[The Adventures of Tom Bombadil](http://tolkiengateway.net/wiki/The_Adventures_of_Tom_Bombadil)* was written by J.R.R. Tolkien and published while he was still alive, and it is considered part of his *[Legendarium](http://tolkiengateway.net/wiki/Legendarium)*. In universe, it is presented as a translation of some p...
**Yes** > > [The Adventures of Tom Bombadil](https://en.wikipedia.org/wiki/The_Adventures_of_Tom_Bombadil) is a collection of poetry written > by J. R. R. Tolkien and published in 1962 [well before his death]. The > book contains 16 poems, two of which feature Tom Bombadil, a character > encountered by Frodo Baggi...
244,723
There are many situations where the validity of the timestamp attached to a certain post (submission of information) might be invaluable for the post owner's legal usage. I'm not looking for a service to achieve this, as requested [in this great question](https://softwareengineering.stackexchange.com/questions/195958/s...
2014/06/11
[ "https://softwareengineering.stackexchange.com/questions/244723", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
Sure. You can take the content, append the textual representation of the timestamp), and then generate a cryptographically secure hash to the result which you store along with the data. In the future, you can take the content that you've stored, the timestamp that you've stored, and repeat the process. If the hash com...
I worked at a shop that stored images of legal documents in a database. In order to achieve security, all user documents were stored this way: * take a hashcode of the document * encrypt the document & store it * encrypt the hashcode & store it * take a hashcode of the encrypted document & store it * take a hashcode o...
244,723
There are many situations where the validity of the timestamp attached to a certain post (submission of information) might be invaluable for the post owner's legal usage. I'm not looking for a service to achieve this, as requested [in this great question](https://softwareengineering.stackexchange.com/questions/195958/s...
2014/06/11
[ "https://softwareengineering.stackexchange.com/questions/244723", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
Traditionally, you would use timestamping services for this sort of thing. A timestamp service is a well-known service that performs the following tasks: 1. You send a small bit of data to the service (such as a hash). 2. The service combines this data with the current timestamp. 3. The combined data is signed with th...
I worked at a shop that stored images of legal documents in a database. In order to achieve security, all user documents were stored this way: * take a hashcode of the document * encrypt the document & store it * encrypt the hashcode & store it * take a hashcode of the encrypted document & store it * take a hashcode o...
244,723
There are many situations where the validity of the timestamp attached to a certain post (submission of information) might be invaluable for the post owner's legal usage. I'm not looking for a service to achieve this, as requested [in this great question](https://softwareengineering.stackexchange.com/questions/195958/s...
2014/06/11
[ "https://softwareengineering.stackexchange.com/questions/244723", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
There is no way to do what you want with pure digital information theory. However, there is a way to use a trusted assistant to help you. The classic version of this involves posting information in a classified column on a particular day in a particular newspaper. It is exceedingly difficult to forge such a post after ...
I worked at a shop that stored images of legal documents in a database. In order to achieve security, all user documents were stored this way: * take a hashcode of the document * encrypt the document & store it * encrypt the hashcode & store it * take a hashcode of the encrypted document & store it * take a hashcode o...
136,075
Unfortunately I deleted a trigger, and now I want it back. I've checked the Recycle Bin, but it's not there. Any ideas how I can get it back?
2016/08/09
[ "https://salesforce.stackexchange.com/questions/136075", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/36212/" ]
You can't implement it retroactively, but this incident highlights the importance of **[version control](https://developer.salesforce.com/trailhead/en/alm_deployment/alm_source_control)** as an *industry best practice*. Had you been using it already, you could simply pull the most recent version from your repository an...
Currently, it is not possible to recover a deleted triggers or classes. However, you can retrieve the deleted class or trigger id from workbench using the following SOQL query: ``` Select Id,Name from ApexTrigger where status='deleted' or name='classname' ``` After getting the Id, you may try to browse to the foll...
10,497,248
I'm looking for jquery plugin similar to <http://zendold.lojcomm.com.br/icarousel/example6.asp>. I need speed-up effect for images slide like example has. Does it exist smth similar to?
2012/05/08
[ "https://Stackoverflow.com/questions/10497248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610641/" ]
You can use the jQuery UI easings: [demo](http://jsbin.com/enaqot/2/edit) jQuery: ``` var galW = 500; // SET HERE THE GALLERY WIDTH var N = $('#slider img').length; $('#thumbs img').on('click',function(){ N = $(this).index(); $('#slider').stop(1).animate({left: -galW*N},{duration:700, easing:'easeOutSine'}); }...
Something like this <http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/> demo <http://css-tricks.com/examples/FeaturedContentSlider/> Hope this is what you need.
9,999,110
> > **Possible Duplicate:** > > [Problem with processing individual strings stored in an array of pointers to multiple strings in C](https://stackoverflow.com/questions/1726350/problem-with-processing-individual-strings-stored-in-an-array-of-pointers-to-mul) > > > Ok so I'm trying to change a char of a string ...
2012/04/03
[ "https://Stackoverflow.com/questions/9999110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311135/" ]
You didn't allocate enough space for `a`. Instead of ``` a=(char**)malloc(sizeof(char*)); ``` you need ``` a=(char**)malloc(sizeof(char*)*size); ``` and obviously this must move to be after `size` has been read. Once you sort that rather mundane problem out the fundamental problem is here: ``` a[3]="Read"; `...
This: ``` a=(char**)malloc(sizeof(char*)); ``` allocates space for one string. What you probably intend is something like: ``` char **a = NULL; size_t number_of_strings = 8; /* for argument's sake */ a = malloc(number_of_strings * sizeof(char*)); if (!a) return NOT_ENOUGH_MEMORY_ERROR; ``` At this point, yo...
9,999,110
> > **Possible Duplicate:** > > [Problem with processing individual strings stored in an array of pointers to multiple strings in C](https://stackoverflow.com/questions/1726350/problem-with-processing-individual-strings-stored-in-an-array-of-pointers-to-mul) > > > Ok so I'm trying to change a char of a string ...
2012/04/03
[ "https://Stackoverflow.com/questions/9999110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311135/" ]
You didn't allocate enough space for `a`. Instead of ``` a=(char**)malloc(sizeof(char*)); ``` you need ``` a=(char**)malloc(sizeof(char*)*size); ``` and obviously this must move to be after `size` has been read. Once you sort that rather mundane problem out the fundamental problem is here: ``` a[3]="Read"; `...
I see another problem, when you allocate memory for the: ``` a = (char **) malloc(sizeof(char *)); ``` You are allocating memory for just one position, but you are using `size` positions. Then your code should be: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> int main () { int i, size; char **a; ...
9,999,110
> > **Possible Duplicate:** > > [Problem with processing individual strings stored in an array of pointers to multiple strings in C](https://stackoverflow.com/questions/1726350/problem-with-processing-individual-strings-stored-in-an-array-of-pointers-to-mul) > > > Ok so I'm trying to change a char of a string ...
2012/04/03
[ "https://Stackoverflow.com/questions/9999110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311135/" ]
You didn't allocate enough space for `a`. Instead of ``` a=(char**)malloc(sizeof(char*)); ``` you need ``` a=(char**)malloc(sizeof(char*)*size); ``` and obviously this must move to be after `size` has been read. Once you sort that rather mundane problem out the fundamental problem is here: ``` a[3]="Read"; `...
Your while loop doesn't do anything. ``` while(*(a[3])!='\0'){ if(*(a[3]) == 'e'){ *(a[3]) = 'r'; } } ``` It doesn't advance the pointer, it just keeps it at the first position. A more proper-ish way would be to make a temporary pointer and use it to walk the string ``` char *temp = a[3]; while (*temp != '\0...
9,999,110
> > **Possible Duplicate:** > > [Problem with processing individual strings stored in an array of pointers to multiple strings in C](https://stackoverflow.com/questions/1726350/problem-with-processing-individual-strings-stored-in-an-array-of-pointers-to-mul) > > > Ok so I'm trying to change a char of a string ...
2012/04/03
[ "https://Stackoverflow.com/questions/9999110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311135/" ]
``` a=(char**)malloc(sizeof(char*)); printf("Enter the size of the array:"); scanf("%d", &size); for(i=0;i<size;i++){ a[i]=(char*)malloc(sizeof(char)*8); } ``` Nope. You've allocated 1 `char*`. Then you treat it like it's `size` elements. You need to allocate `size * sizeof(char*)` bytes. (Note that this multiplic...
This: ``` a=(char**)malloc(sizeof(char*)); ``` allocates space for one string. What you probably intend is something like: ``` char **a = NULL; size_t number_of_strings = 8; /* for argument's sake */ a = malloc(number_of_strings * sizeof(char*)); if (!a) return NOT_ENOUGH_MEMORY_ERROR; ``` At this point, yo...
9,999,110
> > **Possible Duplicate:** > > [Problem with processing individual strings stored in an array of pointers to multiple strings in C](https://stackoverflow.com/questions/1726350/problem-with-processing-individual-strings-stored-in-an-array-of-pointers-to-mul) > > > Ok so I'm trying to change a char of a string ...
2012/04/03
[ "https://Stackoverflow.com/questions/9999110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311135/" ]
``` a=(char**)malloc(sizeof(char*)); printf("Enter the size of the array:"); scanf("%d", &size); for(i=0;i<size;i++){ a[i]=(char*)malloc(sizeof(char)*8); } ``` Nope. You've allocated 1 `char*`. Then you treat it like it's `size` elements. You need to allocate `size * sizeof(char*)` bytes. (Note that this multiplic...
I see another problem, when you allocate memory for the: ``` a = (char **) malloc(sizeof(char *)); ``` You are allocating memory for just one position, but you are using `size` positions. Then your code should be: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> int main () { int i, size; char **a; ...
9,999,110
> > **Possible Duplicate:** > > [Problem with processing individual strings stored in an array of pointers to multiple strings in C](https://stackoverflow.com/questions/1726350/problem-with-processing-individual-strings-stored-in-an-array-of-pointers-to-mul) > > > Ok so I'm trying to change a char of a string ...
2012/04/03
[ "https://Stackoverflow.com/questions/9999110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311135/" ]
``` a=(char**)malloc(sizeof(char*)); printf("Enter the size of the array:"); scanf("%d", &size); for(i=0;i<size;i++){ a[i]=(char*)malloc(sizeof(char)*8); } ``` Nope. You've allocated 1 `char*`. Then you treat it like it's `size` elements. You need to allocate `size * sizeof(char*)` bytes. (Note that this multiplic...
Your while loop doesn't do anything. ``` while(*(a[3])!='\0'){ if(*(a[3]) == 'e'){ *(a[3]) = 'r'; } } ``` It doesn't advance the pointer, it just keeps it at the first position. A more proper-ish way would be to make a temporary pointer and use it to walk the string ``` char *temp = a[3]; while (*temp != '\0...
36,623,545
I need to execute some function accurate in `20` milliseconds (for RTP packets sending) after some event. I have tried next variants: ``` std::this_thread::sleep_for(std::chrono::milliseconds(20)); boost::this_thread::sleep_for(std::chrono::milliseconds(20)); Sleep(20); ``` Also different perversions as: ``` auto a...
2016/04/14
[ "https://Stackoverflow.com/questions/36623545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5868000/" ]
Briefly, because of how OS kernels manage time and threads, you won't get accuracy much better with that method. Also, you can't rely on sleep alone with a static interval or your stream will quickly drift off your intended send clock rate, because the thread could be interrupted or it could be scheduled again well aft...
In C we have a nanosleep function in time.h. The nanosleep() function causes the current thread to be suspended from execution until either the time interval specified by the rqtp argument has elapsed or a signal is delivered to the calling thread and its action is to invoke a signal-catching function or to terminate ...
36,623,545
I need to execute some function accurate in `20` milliseconds (for RTP packets sending) after some event. I have tried next variants: ``` std::this_thread::sleep_for(std::chrono::milliseconds(20)); boost::this_thread::sleep_for(std::chrono::milliseconds(20)); Sleep(20); ``` Also different perversions as: ``` auto a...
2016/04/14
[ "https://Stackoverflow.com/questions/36623545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5868000/" ]
Using `std::chrono::steady_clock`, I got about 0.1ms accuracy on windows 7. That is, simply: ``` auto a = std::chrono::steady_clock::now(); while ((std::chrono::steady_clock::now() - a) < WAIT_TIME) continue; ``` This should give you accurate "waiting" (about 0.1ms, as I said), at least. We all know that this kind ...
In C we have a nanosleep function in time.h. The nanosleep() function causes the current thread to be suspended from execution until either the time interval specified by the rqtp argument has elapsed or a signal is delivered to the calling thread and its action is to invoke a signal-catching function or to terminate ...
46,379,668
I'm using `Gson` to transfer a `string array` to another activity with `SharedPreferences` (because `SharedPreferences` as is works best with strings only, apparently) Can you tell me what is wrong with this code ?: In activity 1 (it's a Custom Adapter but I don't think this is an issue) I write the Shared Preference...
2017/09/23
[ "https://Stackoverflow.com/questions/46379668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1362184/" ]
You need to define a function which will retrieve the callbacked value. ``` function multiply(x,y, callback) { let res = x * y callback(res) } function hardOperation(a,b) { multiply(a, b, function(res){ res = a + b + res console.log("The result is " + res); }) } hardOperation(2...
`callback` is indeed not a function, because you don't define it. The function you're calling expects three arguments: ``` function multiply(x,y, callback) { ``` You're giving it only two: ``` multiply(a,b) ``` So the third argument is `undefined`. You're also expecting it to return a value, but nowhere in the `m...
5,571,684
1. Is it possible to take an ISO file and edit a file in it directly, i.e. not by unpacking it, changing the file, and repacking it? 2. It is possible to do 1. from Python? How would I do it?
2011/04/06
[ "https://Stackoverflow.com/questions/5571684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055/" ]
Have you seen [Hachoir](https://pypi.org/project/hachoir/), a Python library to "view and edit a binary stream field by field"? I haven't had a need to try it myself, but ISO 9660 is listed as a [supported parser format](https://hachoir.readthedocs.io/en/latest/parser.html#file-system).
1. Of course, as with any file. 2. It can be done with open/read/write/seek/tell/close operations on a file. Pack/unpack the data with struct/ctypes. It would require serious knowledge of the contents of ISO, but I presume you already know what to do. If you're lucky you can try using mmap - the interface to file conte...
5,571,684
1. Is it possible to take an ISO file and edit a file in it directly, i.e. not by unpacking it, changing the file, and repacking it? 2. It is possible to do 1. from Python? How would I do it?
2011/04/06
[ "https://Stackoverflow.com/questions/5571684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055/" ]
You can use for listing and extracting, I tested the first. <https://github.com/barneygale/iso9660/blob/master/iso9660.py> ``` import iso9660 cd = iso9660.ISO9660("/Users/murat/Downloads/VisualStudio6Enterprise.ISO") for path in cd.tree(): print path ``` <https://github.com/barneygale/isoparser> ``` import i...
1. Of course, as with any file. 2. It can be done with open/read/write/seek/tell/close operations on a file. Pack/unpack the data with struct/ctypes. It would require serious knowledge of the contents of ISO, but I presume you already know what to do. If you're lucky you can try using mmap - the interface to file conte...
5,571,684
1. Is it possible to take an ISO file and edit a file in it directly, i.e. not by unpacking it, changing the file, and repacking it? 2. It is possible to do 1. from Python? How would I do it?
2011/04/06
[ "https://Stackoverflow.com/questions/5571684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055/" ]
[PyCdlib](https://github.com/clalancette/pycdlib) can read and edit ISO-9660 files, as well as Joliet, Rock Ridge, UDF, and El Torito extensions. It has a bunch of detailed examples in its [documentation](https://clalancette.github.io/pycdlib/examples.html), including one showing how to [edit a file in-place](https://c...
1. Of course, as with any file. 2. It can be done with open/read/write/seek/tell/close operations on a file. Pack/unpack the data with struct/ctypes. It would require serious knowledge of the contents of ISO, but I presume you already know what to do. If you're lucky you can try using mmap - the interface to file conte...
239,454
I draw a picture like this: ![Bad](https://i.stack.imgur.com/DsgMX.jpg) You may find that the right side of the molecule is under the base line. I know this problem is 'Vertical alignment' mentioned in P25 of the offical documantaion. After I place `\chemskipalign` in front of the first ring, the problem is fixed, but ...
2015/04/19
[ "https://tex.stackexchange.com/questions/239454", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/76326/" ]
You can locally redefine `\printatom` in order to force atom depths to 0pt: ``` \documentclass{article} \usepackage{chemfig} \setatomsep{1.5em} \begin{document} something \( \renewcommand\printatom[1]{\setbox0=\hbox{\ensuremath{\mathrm{#1}}}\dp0=0pt \box0 } \chemfig{CH_3-*6(-=-(-CH_2-*6(-=-(-CH_2-*6(-=-(-CH_3)=-=))=-=...
I have a successful attempt, but it is not elegant enough. ![Successful, but not elegant enough](https://i.stack.imgur.com/47xqb.jpg) Code: ``` \documentclass{article} \usepackage{chemfig} \setatomsep{1.5em} \newcommand{\vr}{{\tikz \draw[draw=none] (0,0) rectangle (0,\dimexpr\fontcharht\font`A);}} \begin{document} ...
5,077,802
I am using Ubuntu 10.10 with QT4. i am wondering is it possible for a QlistWidget to show the output of Eg: ``` system("dhclient eth0"); ``` then making qlistWidget shows the DHCPREQUEST/SHCPACK etc in real time? So far i could only pipe the output of the command to a file,then get my program to read the file, wh...
2011/02/22
[ "https://Stackoverflow.com/questions/5077802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/553304/" ]
Ok i solved it, here is a short examples of how i do it, i would only show my implementation ``` test::test() { widget.setupUi(this); call(); QObject::connect(&proc,SIGNAL(readyReadStandardOutput()),this,SLOT(stdOut()) ); QObject::connect(&proc,SIGNAL(readyReadStandardError()),this,SLOT(stdErr()) ) ; ...
Maybe this code sample will help you: ``` QProcess gzip; gzip.start("gzip", QStringList() << "-c"); if (!gzip.waitForStarted()) return false; gzip.write("Qt rocks!"); gzip.closeWriteChannel(); if (!gzip.waitForFinished()) return false; QByteArray result = gzip.readAll(); ```
21,556
In English, the number 0 is treated as plural. It is then: * 0 seconds * 1 second * 1.2 seconds * 2 seconds Shouldn't it be "nobody want to go there," instead of "nobody wants to go there"? I also saw in TOEFL that "any *\_*\_" should be used with a singular. But I see it very common that it is a plural also. Why is...
2011/04/18
[ "https://english.stackexchange.com/questions/21556", "https://english.stackexchange.com", "https://english.stackexchange.com/users/1204/" ]
> > * Zero cars have driven by. > * Not one car has driven by. > > > Both of these sentences are fundamentally describing the same thing semantically and yet they demand different number agreement. Both of these are possible because grammatical number agreement is only partially informed by semantics. Just becau...
*Nobody* is singular, and that is not related with the fact any number different from 1 (one) is considered plural. > > Nobody was at home. > > Nobody could predict how it might end. > > > *Any* can be used as both singular, and plural. > > I don't have any choice. > > Do you have any tips to pass on? ...
21,556
In English, the number 0 is treated as plural. It is then: * 0 seconds * 1 second * 1.2 seconds * 2 seconds Shouldn't it be "nobody want to go there," instead of "nobody wants to go there"? I also saw in TOEFL that "any *\_*\_" should be used with a singular. But I see it very common that it is a plural also. Why is...
2011/04/18
[ "https://english.stackexchange.com/questions/21556", "https://english.stackexchange.com", "https://english.stackexchange.com/users/1204/" ]
*Nobody* is singular, and that is not related with the fact any number different from 1 (one) is considered plural. > > Nobody was at home. > > Nobody could predict how it might end. > > > *Any* can be used as both singular, and plural. > > I don't have any choice. > > Do you have any tips to pass on? ...
My answer is "nobody wants to go there", because *nobody*, in this case, has a singular notation.
21,556
In English, the number 0 is treated as plural. It is then: * 0 seconds * 1 second * 1.2 seconds * 2 seconds Shouldn't it be "nobody want to go there," instead of "nobody wants to go there"? I also saw in TOEFL that "any *\_*\_" should be used with a singular. But I see it very common that it is a plural also. Why is...
2011/04/18
[ "https://english.stackexchange.com/questions/21556", "https://english.stackexchange.com", "https://english.stackexchange.com/users/1204/" ]
> > * Zero cars have driven by. > * Not one car has driven by. > > > Both of these sentences are fundamentally describing the same thing semantically and yet they demand different number agreement. Both of these are possible because grammatical number agreement is only partially informed by semantics. Just becau...
*Nobody*—like *everybody*, *anyone*, and *anything*—is a [singular indefinite pronoun](http://en.wikipedia.org/wiki/Indefinite_pronoun#Singular). Thus, the correct sentence is "Nobody wants to go to there."
21,556
In English, the number 0 is treated as plural. It is then: * 0 seconds * 1 second * 1.2 seconds * 2 seconds Shouldn't it be "nobody want to go there," instead of "nobody wants to go there"? I also saw in TOEFL that "any *\_*\_" should be used with a singular. But I see it very common that it is a plural also. Why is...
2011/04/18
[ "https://english.stackexchange.com/questions/21556", "https://english.stackexchange.com", "https://english.stackexchange.com/users/1204/" ]
*Nobody*—like *everybody*, *anyone*, and *anything*—is a [singular indefinite pronoun](http://en.wikipedia.org/wiki/Indefinite_pronoun#Singular). Thus, the correct sentence is "Nobody wants to go to there."
My answer is "nobody wants to go there", because *nobody*, in this case, has a singular notation.
21,556
In English, the number 0 is treated as plural. It is then: * 0 seconds * 1 second * 1.2 seconds * 2 seconds Shouldn't it be "nobody want to go there," instead of "nobody wants to go there"? I also saw in TOEFL that "any *\_*\_" should be used with a singular. But I see it very common that it is a plural also. Why is...
2011/04/18
[ "https://english.stackexchange.com/questions/21556", "https://english.stackexchange.com", "https://english.stackexchange.com/users/1204/" ]
> > * Zero cars have driven by. > * Not one car has driven by. > > > Both of these sentences are fundamentally describing the same thing semantically and yet they demand different number agreement. Both of these are possible because grammatical number agreement is only partially informed by semantics. Just becau...
My answer is "nobody wants to go there", because *nobody*, in this case, has a singular notation.
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
``` override func viewDidLayoutSubviews() { scrollView.delegate = self scrollView.contentSize = CGSize(width:self.view.frame.size.width, height: 1000) } ```
``` import UIKit class ViewController: UIViewController { @IBOutlet weak var UIViewHeader: UIView! @IBOutlet weak var btnRegisteredCourses: UIButton! @IBOutlet weak var lblName: UILabel! @IBOutlet weak var tableView: UITableView! var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() ...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
``` override func viewDidLayoutSubviews() { scrollView.delegate = self scrollView.contentSize = CGSize(width:self.view.frame.size.width, height: 1000) } ```
Try This content will also scroll: ``` @IBOutle var UIViewHeader: UIView! @IBOutle var btnRegisteredCourses: UIButton! @IBOutle var lblName: UILabel! @IBOutle var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() scrollView = UIScrollView(frame: view.bounds) scrollView.contentSiz...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
Increase scroll view content size and try it again. and you have to remove UIViewHeader, lblName, tableView, btnRegisteredCourses from super view and after that add to scroll view.
``` import UIKit class ViewController: UIViewController { @IBOutlet weak var UIViewHeader: UIView! @IBOutlet weak var btnRegisteredCourses: UIButton! @IBOutlet weak var lblName: UILabel! @IBOutlet weak var tableView: UITableView! var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() ...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
``` override func viewDidLayoutSubviews() { scrollView.delegate = self scrollView.contentSize = CGSize(width:self.view.frame.size.width, height: 1000) } ```
You might want to check Steve Hancock's answer in the similar question: [UIScrollView not scrolling at all when added programmatically in Swift?](https://stackoverflow.com/questions/42291053/uiscrollview-not-scrolling-at-all-when-added-programmatically-in-swift) There is a lot of answers suggesting content size but th...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
Depends on which type of scrolling you want, you have to set the `contentSize` of `scrollView`. For example For Horizontal Scrolling: ``` scrollView.contentSize = CGSize(width: UIViewHeader.frame.size.width + lblName.frame.size.width + tableView.frame.size.width + btnRegisteredCourses.frame.size.width , height: scrol...
You might want to check Steve Hancock's answer in the similar question: [UIScrollView not scrolling at all when added programmatically in Swift?](https://stackoverflow.com/questions/42291053/uiscrollview-not-scrolling-at-all-when-added-programmatically-in-swift) There is a lot of answers suggesting content size but th...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
Try This content will also scroll: ``` @IBOutle var UIViewHeader: UIView! @IBOutle var btnRegisteredCourses: UIButton! @IBOutle var lblName: UILabel! @IBOutle var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() scrollView = UIScrollView(frame: view.bounds) scrollView.contentSiz...
You might want to check Steve Hancock's answer in the similar question: [UIScrollView not scrolling at all when added programmatically in Swift?](https://stackoverflow.com/questions/42291053/uiscrollview-not-scrolling-at-all-when-added-programmatically-in-swift) There is a lot of answers suggesting content size but th...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
Increase scroll view content size and try it again. and you have to remove UIViewHeader, lblName, tableView, btnRegisteredCourses from super view and after that add to scroll view.
You might want to check Steve Hancock's answer in the similar question: [UIScrollView not scrolling at all when added programmatically in Swift?](https://stackoverflow.com/questions/42291053/uiscrollview-not-scrolling-at-all-when-added-programmatically-in-swift) There is a lot of answers suggesting content size but th...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
``` override func viewDidLayoutSubviews() { scrollView.delegate = self scrollView.contentSize = CGSize(width:self.view.frame.size.width, height: 1000) } ```
Increase scroll view content size and try it again. and you have to remove UIViewHeader, lblName, tableView, btnRegisteredCourses from super view and after that add to scroll view.
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
Depends on which type of scrolling you want, you have to set the `contentSize` of `scrollView`. For example For Horizontal Scrolling: ``` scrollView.contentSize = CGSize(width: UIViewHeader.frame.size.width + lblName.frame.size.width + tableView.frame.size.width + btnRegisteredCourses.frame.size.width , height: scrol...
``` import UIKit class ViewController: UIViewController { @IBOutlet weak var UIViewHeader: UIView! @IBOutlet weak var btnRegisteredCourses: UIButton! @IBOutlet weak var lblName: UILabel! @IBOutlet weak var tableView: UITableView! var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() ...
41,562,802
``` if($listing != null) { return \Response::json($listing);//return propertyees matching the search parameters } else { return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200); } ``` Return view in json
2017/01/10
[ "https://Stackoverflow.com/questions/41562802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851454/" ]
Try This content will also scroll: ``` @IBOutle var UIViewHeader: UIView! @IBOutle var btnRegisteredCourses: UIButton! @IBOutle var lblName: UILabel! @IBOutle var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() scrollView = UIScrollView(frame: view.bounds) scrollView.contentSiz...
``` import UIKit class ViewController: UIViewController { @IBOutlet weak var UIViewHeader: UIView! @IBOutlet weak var btnRegisteredCourses: UIButton! @IBOutlet weak var lblName: UILabel! @IBOutlet weak var tableView: UITableView! var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() ...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
jQuery v: 2.1.0 jquery.dataTables.min.js v: 1.10.7 dataTables.responsive.min.js v: 1.0.6 I used the accent neutralise plugin from here (thanks Allan Jardine): <http://www.datatables.net/plug-ins/filtering/type-based/accent-neutralise> And just made minimal adaptations for my purposes: I made an example co...
Additional feedback on column filtering : the comments above will only work if the column to filter is of type "string" (the DataTables column type defined [here](https://datatables.net/reference/option/columns.type)). If the column contains HTML tags, the DataTables lib will automagically tag it as "html" type, and ...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
In this [topic](http://datatables.net/forums/discussion/18763/key-problems-with-accent-spanish/p1) explain this issuse, the trick is to replace *strange characters* with a *normal character* (no accent character). So to speak way. ``` $.fn.DataTable.ext.type.search.string = function ( data ) { return ! data ? ...
``` // (Long) list of all accented characters and their folded equivalents var accent_map = { '\n':' ','ẚ':'a','Á':'a','á':'a','À':'a','à':'a','Ă':'a','ă':'a','Ắ':'a','ắ':'a','Ằ':'a','ằ':'a','Ẵ':'a','ẵ':'a','Ẳ':'a','ẳ':'a','Â':'a','â':'a','Ấ':'a','ấ':'a','Ầ':'a','ầ':'a','Ẫ':'a','ẫ':'a','Ẩ':'a','ẩ':'a','Ǎ':'a','ǎ':'a','...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
jQuery v: 2.1.0 jquery.dataTables.min.js v: 1.10.7 dataTables.responsive.min.js v: 1.0.6 I used the accent neutralise plugin from here (thanks Allan Jardine): <http://www.datatables.net/plug-ins/filtering/type-based/accent-neutralise> And just made minimal adaptations for my purposes: I made an example co...
My question is the same about searching without accent but finding answers with accent like search with cafe and display results with café. I don't use a table but div and I don't have the clue to adapt the solutions to my site. Here is my code for searching: ``` $(document).ready(function(){ $("#myInput").on(...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
jQuery v: 2.1.0 jquery.dataTables.min.js v: 1.10.7 dataTables.responsive.min.js v: 1.0.6 I used the accent neutralise plugin from here (thanks Allan Jardine): <http://www.datatables.net/plug-ins/filtering/type-based/accent-neutralise> And just made minimal adaptations for my purposes: I made an example co...
``` // (Long) list of all accented characters and their folded equivalents var accent_map = { '\n':' ','ẚ':'a','Á':'a','á':'a','À':'a','à':'a','Ă':'a','ă':'a','Ắ':'a','ắ':'a','Ằ':'a','ằ':'a','Ẵ':'a','ẵ':'a','Ẳ':'a','ẳ':'a','Â':'a','â':'a','Ấ':'a','ấ':'a','Ầ':'a','ầ':'a','Ẫ':'a','ẫ':'a','Ẩ':'a','ẩ':'a','Ǎ':'a','ǎ':'a','...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
You are **so** close in your edit, what you have tried, except that you lack the must important thing : *Defining the "scope" or sType of your filter plugin*. The function is never called, right? This is because the plugin is not associated with a `sType`. To get your code to work simply declare the plugin like this :...
jQuery v: 2.1.0 jquery.dataTables.min.js v: 1.10.7 dataTables.responsive.min.js v: 1.0.6 I used the accent neutralise plugin from here (thanks Allan Jardine): <http://www.datatables.net/plug-ins/filtering/type-based/accent-neutralise> And just made minimal adaptations for my purposes: I made an example co...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
jQuery v: 2.1.0 jquery.dataTables.min.js v: 1.10.7 dataTables.responsive.min.js v: 1.0.6 I used the accent neutralise plugin from here (thanks Allan Jardine): <http://www.datatables.net/plug-ins/filtering/type-based/accent-neutralise> And just made minimal adaptations for my purposes: I made an example co...
For future readers, using accent-neutralise only solves part of the problem of searching in a case-insensitive way. The plugin only replaces some accented chars to non-accented chars inside the table. You will also need to remove accents from your search textbox input. Another problem I had is that the plugin only ...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
jQuery v: 2.1.0 jquery.dataTables.min.js v: 1.10.7 dataTables.responsive.min.js v: 1.0.6 I used the accent neutralise plugin from here (thanks Allan Jardine): <http://www.datatables.net/plug-ins/filtering/type-based/accent-neutralise> And just made minimal adaptations for my purposes: I made an example co...
In this [topic](http://datatables.net/forums/discussion/18763/key-problems-with-accent-spanish/p1) explain this issuse, the trick is to replace *strange characters* with a *normal character* (no accent character). So to speak way. ``` $.fn.DataTable.ext.type.search.string = function ( data ) { return ! data ? ...
21,833,584
When using [jQuery DataTables](https://datatables.net/) is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden...
2014/02/17
[ "https://Stackoverflow.com/questions/21833584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086938/" ]
You are **so** close in your edit, what you have tried, except that you lack the must important thing : *Defining the "scope" or sType of your filter plugin*. The function is never called, right? This is because the plugin is not associated with a `sType`. To get your code to work simply declare the plugin like this :...
Additional feedback on column filtering : the comments above will only work if the column to filter is of type "string" (the DataTables column type defined [here](https://datatables.net/reference/option/columns.type)). If the column contains HTML tags, the DataTables lib will automagically tag it as "html" type, and ...