qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
10,265,935
I am not able to execute pthreads program in c. Please tell me what is wrong with the following program. I am neither getting any error nor expected output. ``` void *worker(void * arg) { int i; int *id=(int *)arg; printf("Thread %d starts\n", *id ); } void main(int argc, char **argv) { int thrd_no,i,*thrd_id...
2012/04/22
[ "https://Stackoverflow.com/questions/10265935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265751/" ]
`thrd_no = atoi(argv[1] - 1);` likely doesn't do what you intended; the way `argv` is normally passed into a new process and parsed into a C array, `argv[1] - 1` is probably pointing at `\0` (specifically, the `\0` at the end of `argv[0]`). (More generally, indexing backwards off the start of a string is rarely correct...
code segment rank=i+1; thrd\_id[i]=pthread\_create(&threads[i], NULL, worker, &rank); will produce race condition.
2,713,415
I am looking for any tool or good solution for handling spell check in the RichTextBox for Silverlight 4. Does anyone know of an existing solution or a good way to implement spell checking support for this control?
2010/04/26
[ "https://Stackoverflow.com/questions/2713415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22381/" ]
Capacity Planning is quite a detailed and extensive area. You'll need to accept an iterative model with a "Theoretical Baseline > Load Testing > Tuning & Optimizing" approach. **Theory** The first step is to decide on the Business requirements: how many users are expected for peak usage ? Remember - these numbers are...
Determine your expected load. Setup a machine and run some tests against it with a Load testing tool. How close are you if you only accomplished 10% of the peak load with some margin for error then you know you are going to need some load balancing. Design and implement a solution and test again. Make sure you solution...
2,713,415
I am looking for any tool or good solution for handling spell check in the RichTextBox for Silverlight 4. Does anyone know of an existing solution or a good way to implement spell checking support for this control?
2010/04/26
[ "https://Stackoverflow.com/questions/2713415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22381/" ]
Capacity Planning is quite a detailed and extensive area. You'll need to accept an iterative model with a "Theoretical Baseline > Load Testing > Tuning & Optimizing" approach. **Theory** The first step is to decide on the Business requirements: how many users are expected for peak usage ? Remember - these numbers are...
Test your app with a sample load and measure performance and load metrics. DB queries, disk hits, latency, whatever. Then get an estimate of the expected load when deployed (go ask the domain expert) (you have to consider average load AND spikes). Multiply the two and add some just to be sure. That's a *really* rough...
61,613,904
I'm trying to use the CLI to deploy a new app in Openshift. When I use the GUI and click on "Build from docker file", everything works fine. But when I use the CLI, it does not. These are the files in my repo: Dockerfile ``` FROM golang:1.11-alpine RUN mkdir /app COPY main.go /app WORKDIR /app RUN go build -o main ...
2020/05/05
[ "https://Stackoverflow.com/questions/61613904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10377599/" ]
You could just build it as a regular dockerfile on your own computer and upload it to a Docker registry and then deploy it to openshift from the remote registry or you could even push it to the built in registry on openshift. I think the command you are looking for is probably ``` oc new-build ``` This articl...
Late Post...Faced the same issue...Try changing the directory from where you are running the `oc new-app` command. I was running the command from `/root` while being a non-privileged user. Changing the location to user's homedir worked for me.
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
Can you get the last column seperately using: ``` SELECT SUBSTRING (longfield,1,200) as Part1, SUBSTRING (longfield,201,200) as Part2, SUBSTRING (longfield,401,200) as Part3, SUBSTRING (longfield,601,200) as Part4 ``` ? You can then glue the columns back together. You might need some special cases for when then str...
I don't have problems using ADODB in PHP to query MSSQL. I write queries in the following way: ``` <?php // assuming $db is properly configured and connected ADODB database object $rs = $db->Execute("SELECT ..."); while (!$rs->EOF) { print $rs->fields['fieldname']; // further processing of row $rs->MoveNex...
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
What exactly are you able to change? I stumbled across this article, which may help: [ADODB Varchar Limit Problem](http://www.sitepoint.com/forums/showthread.php?t=506868) What it seems to suggest you try is: 1. Change your column type from `varchar` to `text` 2. In the select statement, stipulate a `CAST` for the c...
Can you get the last column seperately using: ``` SELECT SUBSTRING (longfield,1,200) as Part1, SUBSTRING (longfield,201,200) as Part2, SUBSTRING (longfield,401,200) as Part3, SUBSTRING (longfield,601,200) as Part4 ``` ? You can then glue the columns back together. You might need some special cases for when then str...
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
Can you get the last column seperately using: ``` SELECT SUBSTRING (longfield,1,200) as Part1, SUBSTRING (longfield,201,200) as Part2, SUBSTRING (longfield,401,200) as Part3, SUBSTRING (longfield,601,200) as Part4 ``` ? You can then glue the columns back together. You might need some special cases for when then str...
Check your whether you are using DISTINCT and GROUP BY statements, apparently "truncation occurs on text fields when using DISTINCT and GROUP BY statements because of the overhead of comparing variable length strings as opposed to fixed length strings". [Link](http://bytes.com/topic/php/answers/717087-text-truncated-2...
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
What exactly are you able to change? I stumbled across this article, which may help: [ADODB Varchar Limit Problem](http://www.sitepoint.com/forums/showthread.php?t=506868) What it seems to suggest you try is: 1. Change your column type from `varchar` to `text` 2. In the select statement, stipulate a `CAST` for the c...
I don't have problems using ADODB in PHP to query MSSQL. I write queries in the following way: ``` <?php // assuming $db is properly configured and connected ADODB database object $rs = $db->Execute("SELECT ..."); while (!$rs->EOF) { print $rs->fields['fieldname']; // further processing of row $rs->MoveNex...
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
Try replace all "255" to "800" or "MAX" in drivers\adodb-mssql.inc. Or just cast it, **not** change to `text` datatype , `text` is [deprecated](http://msdn.microsoft.com/en-us/library/ms143729.aspx)
I don't have problems using ADODB in PHP to query MSSQL. I write queries in the following way: ``` <?php // assuming $db is properly configured and connected ADODB database object $rs = $db->Execute("SELECT ..."); while (!$rs->EOF) { print $rs->fields['fieldname']; // further processing of row $rs->MoveNex...
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
What exactly are you able to change? I stumbled across this article, which may help: [ADODB Varchar Limit Problem](http://www.sitepoint.com/forums/showthread.php?t=506868) What it seems to suggest you try is: 1. Change your column type from `varchar` to `text` 2. In the select statement, stipulate a `CAST` for the c...
Check your whether you are using DISTINCT and GROUP BY statements, apparently "truncation occurs on text fields when using DISTINCT and GROUP BY statements because of the overhead of comparing variable length strings as opposed to fixed length strings". [Link](http://bytes.com/topic/php/answers/717087-text-truncated-2...
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
What exactly are you able to change? I stumbled across this article, which may help: [ADODB Varchar Limit Problem](http://www.sitepoint.com/forums/showthread.php?t=506868) What it seems to suggest you try is: 1. Change your column type from `varchar` to `text` 2. In the select statement, stipulate a `CAST` for the c...
Try replace all "255" to "800" or "MAX" in drivers\adodb-mssql.inc. Or just cast it, **not** change to `text` datatype , `text` is [deprecated](http://msdn.microsoft.com/en-us/library/ms143729.aspx)
4,396,894
I'm maintaining a web application written in PHP that connects to a MSSQL database. The original developer used <http://adodb.sourceforge.net/> as his database library. The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. Has anyone a solution to my problem? ed...
2010/12/09
[ "https://Stackoverflow.com/questions/4396894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
Try replace all "255" to "800" or "MAX" in drivers\adodb-mssql.inc. Or just cast it, **not** change to `text` datatype , `text` is [deprecated](http://msdn.microsoft.com/en-us/library/ms143729.aspx)
Check your whether you are using DISTINCT and GROUP BY statements, apparently "truncation occurs on text fields when using DISTINCT and GROUP BY statements because of the overhead of comparing variable length strings as opposed to fixed length strings". [Link](http://bytes.com/topic/php/answers/717087-text-truncated-2...
241,340
Down here in Atlanta. Installed an 18' LVL to join two living rooms in my 1960s brick ranch. Used joist hangers on most of the 2"x8" ceiling joists, but there is a small number of joists from the previous doorway that spanned roughly 5'. The ceiling joists in this section were notched and rested on a ledger. I've reach...
2021/12/19
[ "https://diy.stackexchange.com/questions/241340", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/146158/" ]
The Code limits notching at end bearing locations to not exceed 1/4 the depth of the joists. (See IBC 2308.8.2) If the notch does not exceed this dimension, you can merely install a joist hanger in the notch fastening it to the joist and then fasten it to the LVL.
The joist notch affects the bearing strength. So I suggest building back as shown below. You shall make sure there are no defects in the makeup block, then use wood adhesive to glue it to the joist. Install the metal hanger once the glue has dried and the block is firmly in place. [![enter image description here](http...
241,340
Down here in Atlanta. Installed an 18' LVL to join two living rooms in my 1960s brick ranch. Used joist hangers on most of the 2"x8" ceiling joists, but there is a small number of joists from the previous doorway that spanned roughly 5'. The ceiling joists in this section were notched and rested on a ledger. I've reach...
2021/12/19
[ "https://diy.stackexchange.com/questions/241340", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/146158/" ]
The Code limits notching at end bearing locations to not exceed 1/4 the depth of the joists. (See IBC 2308.8.2) If the notch does not exceed this dimension, you can merely install a joist hanger in the notch fastening it to the joist and then fasten it to the LVL.
Just take an LVL and rip it down to the height you need to fill that void. Secure that ripped LVL to the beam in place, along it's entire length. This creates a ledger for those floor joist to rest on. You will no longer need any joist hanger brackets. The shear loads have been addressed. If you need more room to insta...
19,615,373
I am using `TextWatcher` on `EditText` .when I input something in `edittext` it works perfectly but when I set data into `edittext` from database getting `NullPointerException`. I used `onTouchListener` to on this `Edittext`. my question is. could I check the condition that `TextWatcher` works only after touch event is...
2013/10/27
[ "https://Stackoverflow.com/questions/19615373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157919/" ]
Create a TextWatcher like below ``` TextWatcher textWatcher=new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { // TODO Auto-generated method stub } @Override public void beforeTextChanged(CharSequence s, int...
i solved this by taking a global boolen variable.Set this variable true in onTouchListener and check condition in afterTextChanged method that if varible is true of false.
119,825
I have a totally default installation using the Luma theme. When you go to the cart page there is no checkout button. Only a link for "Check out with multiple addresses". I have turned off single page checkout but I don't see why that would make a difference. Any ideas? [![Checkout](https://i.stack.imgur.com/2O1dZ.jpg...
2016/06/07
[ "https://magento.stackexchange.com/questions/119825", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/37109/" ]
Just had the same issue, was a combination of these 2 things: 1. The default Tax Destination country (under Sales -> Tax) was set to USA while that was not one of the allowed countries under General -> General 2. Disabled one-page checkout After making the default tax country the same as my default country (under gen...
Do you have any errors/notices/warnings at the top of your cart page? Or beside the product name in the cart items list? Looks like you have not enough inventory for the added products, or required custom option is not set someway, so Magento does not allow you to proceed with the checkout.
64,926,976
For test purposes I'd like to create and display a widget. For now I only need the widget to render correctly but in the future I may want to extend this so I simulate various events to see how the widget behaves. From various sources it would appear that the following should work: ``` QApplication app; QPushButton ...
2020/11/20
[ "https://Stackoverflow.com/questions/64926976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/975326/" ]
Why don't you want to have the application run exec ? The process of displaying a widget is not "static". You don't "draw" the widget on the screen, but rather you have an application that listen for various events and receives draw events from the windowing manager. The application can only draw the widget when the wi...
As expertly described by Vincent Fourmond, widgets are not a one-off deal. The GUI is non-blocking and for this, it needs to run in an *event loop*. The `exec()` method starts this event loop which you mimicked by polling. While it is possible to combine Qt's event loop with other event loops, I would recommend you a ...
64,926,976
For test purposes I'd like to create and display a widget. For now I only need the widget to render correctly but in the future I may want to extend this so I simulate various events to see how the widget behaves. From various sources it would appear that the following should work: ``` QApplication app; QPushButton ...
2020/11/20
[ "https://Stackoverflow.com/questions/64926976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/975326/" ]
To test Qt GUI application you need at least `QApplication` instance and event loop being processed. The fastest way is just use `QTEST_MAIN` macro, [this answer](https://stackoverflow.com/questions/59982002/how-does-qtest-main-set-everything-up-automatically-to-run-tests) explains in a nice way what it does exactly. H...
Why don't you want to have the application run exec ? The process of displaying a widget is not "static". You don't "draw" the widget on the screen, but rather you have an application that listen for various events and receives draw events from the windowing manager. The application can only draw the widget when the wi...
64,926,976
For test purposes I'd like to create and display a widget. For now I only need the widget to render correctly but in the future I may want to extend this so I simulate various events to see how the widget behaves. From various sources it would appear that the following should work: ``` QApplication app; QPushButton ...
2020/11/20
[ "https://Stackoverflow.com/questions/64926976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/975326/" ]
To test Qt GUI application you need at least `QApplication` instance and event loop being processed. The fastest way is just use `QTEST_MAIN` macro, [this answer](https://stackoverflow.com/questions/59982002/how-does-qtest-main-set-everything-up-automatically-to-run-tests) explains in a nice way what it does exactly. H...
As expertly described by Vincent Fourmond, widgets are not a one-off deal. The GUI is non-blocking and for this, it needs to run in an *event loop*. The `exec()` method starts this event loop which you mimicked by polling. While it is possible to combine Qt's event loop with other event loops, I would recommend you a ...
822,589
Consider the real number $0.123456789101112\dots$, where you concatenate the digits of the natural numbers. Certain natural numbers are "early", meaning, they appear earlier as a substring of digits than they are supposed to. For example: $12$, $23$ and $101$ are early natural numbers. I have a few questions: 1. Is...
2014/06/06
[ "https://math.stackexchange.com/questions/822589", "https://math.stackexchange.com", "https://math.stackexchange.com/users/107952/" ]
These numbers are [tabulated](https://oeis.org/A116700) at the Online Encyclopedia of Integer Sequences. There's a reference there to work of Golomb, which you can find on page 30 of this [link](http://backup.itsoc.org/publications/nltr/it0303web.pdf). In particular, Golomb explains why these numbers have density 1.
The set of early numbers is infinite, as it contains at least the following set: $$\{12,123,1234,12345,123456,1234567,\dots\}$$ As for the set of non-early numbers, I think you can show that the number $1111\dots 1$ is not early for any number of ones it contains, meaning the set of non-early numbers is also infinite....
822,589
Consider the real number $0.123456789101112\dots$, where you concatenate the digits of the natural numbers. Certain natural numbers are "early", meaning, they appear earlier as a substring of digits than they are supposed to. For example: $12$, $23$ and $101$ are early natural numbers. I have a few questions: 1. Is...
2014/06/06
[ "https://math.stackexchange.com/questions/822589", "https://math.stackexchange.com", "https://math.stackexchange.com/users/107952/" ]
These numbers are [tabulated](https://oeis.org/A116700) at the Online Encyclopedia of Integer Sequences. There's a reference there to work of Golomb, which you can find on page 30 of this [link](http://backup.itsoc.org/publications/nltr/it0303web.pdf). In particular, Golomb explains why these numbers have density 1.
The set of early numbers will definitely go infinite because you can group certain number of digits to achieve a early number. There are also non-early numbers which will go to infinite. There would be always certain numbers (more than early ones) who can't be achieved by the combination of any numbers.
31,672,598
I wish to do a select and limit the number of future and previous events by 20 for example for the newest events first. `future_events` and `previous_event` is a 1 or 0. I could store is as a single column if needed. I think I'm missing a GROUP BY but my brains not with it this morning. This is what I have: ``` SEL...
2015/07/28
[ "https://Stackoverflow.com/questions/31672598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1251137/" ]
Is this what you want? ``` var result = ret.ToDictionary ( r => r.Key, v => v.Value.Select(n => (double)n/v.Value.Count(i => i != 0)).ToArray() ); ``` This will set the values to `NaN` for a row if all the elements of that row are zero. If instead you want to make the results for that row zero, you could ch...
If you just need a sum of all non zero values in all the dictionary items you can use ``` ret.Sum(x => x.Value.Count(y => y != 0)); ``` If you need to iterate through all the key value pairs and you wish not to use a foreach loop then you have to come up with an extension method of your own as shown below ``` publ...
6,885,452
> > **Possible Duplicate:** > > [Any way to use some Scala for iOS coding?](https://stackoverflow.com/questions/13460780/any-way-to-use-some-scala-for-ios-coding) > > > Would it be possible to use the [Scala.NET implementation](http://lamp.epfl.ch/~magarcia/ScalaNET/2011Q2/PreviewScalaNET.pdf), and then [MonoT...
2011/07/30
[ "https://Stackoverflow.com/questions/6885452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/318557/" ]
I have not been able to find a page with binaries of Scala.NET that I can test, so the following are just general guidelines as to what you can do with MonoTouch and .NET languages. MonoTouch can run any ECMA CIL that you feed to it. When you consider using a new language with Monotouch, there are two components that ...
If you had read the [MonoTouch FAQ](http://ios.xamarin.com/FAQ), you would have noticed that it currently supports only C# and no other CLR languages.
6,885,452
> > **Possible Duplicate:** > > [Any way to use some Scala for iOS coding?](https://stackoverflow.com/questions/13460780/any-way-to-use-some-scala-for-ios-coding) > > > Would it be possible to use the [Scala.NET implementation](http://lamp.epfl.ch/~magarcia/ScalaNET/2011Q2/PreviewScalaNET.pdf), and then [MonoT...
2011/07/30
[ "https://Stackoverflow.com/questions/6885452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/318557/" ]
I have not been able to find a page with binaries of Scala.NET that I can test, so the following are just general guidelines as to what you can do with MonoTouch and .NET languages. MonoTouch can run any ECMA CIL that you feed to it. When you consider using a new language with Monotouch, there are two components that ...
Binaries for the Scala.NET library and the compiler can be obtained via SVN, in the bin folder of the preview: ``` svn co http://lampsvn.epfl.ch/svn-repos/scala/scala-experimental/trunk/bootstrap ``` Bootstrapping has been an important step, and ongoing work will add support for missing features (CLR generics, etc)....
3,633,938
Derivation of the answer provided to my previous [stack-question](https://math.stackexchange.com/questions/3632614/r-wedge-neg-s-rightarrow-neg-q/3632633?noredirect=1#comment7465834_3632633) was elegant and answer thus obtained was correct according to Kenneth Rosan. Proposition in question: > > “[*You cannot ride ...
2020/04/19
[ "https://math.stackexchange.com/questions/3633938", "https://math.stackexchange.com", "https://math.stackexchange.com/users/469128/" ]
The sentence > > You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old. > > > should tell us mainly one thing that young kids (younger than 16) shorter than 4 ft. are prohibited from riding. We can encode this idea as follows: $(r\land \neg s)\rightarrow \neg q$. E...
English words are not symbolic operators. Rules of the English language, which are both quite complicated and sometimes ambiguous, determine the groupings of words into phrases and/or catenas, the relationships between them, and the meanings of those relationships. These rules can be somewhat modeled in similar ways to...
25,452,832
Is there a way to use a subclass of the current class as a type parameter for a generic class ? =============================================================================================== I'm not very sure how to expose my problem so I'll go with an example : Example ------- My `Connection` object is responsible...
2014/08/22
[ "https://Stackoverflow.com/questions/25452832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2121761/" ]
Use `Connection<Message>`: ``` public abstract class Message { private transient Connection<Message> conn; ... } ```
In order to get an `M` to give to `conn.send()`, you need an abstract method that will give you an `M`, which subclasses override to provide. ``` public abstract class Message<M> { abstract M getMessage(); private transient Connection<M> conn; public void send() { conn.send(getMessage()); } } ...
3,913,498
I have written a script that inserts some test data into a document library. I intend to use it as a post-deployment step in Visual Studio 2010, so that the library is not empty after a retract & deploy. The relevant portions of the script are: **Install.ps1:** ``` $scriptDirectory = Split-Path -Path $script:MyInvoc...
2010/10/12
[ "https://Stackoverflow.com/questions/3913498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29083/" ]
I had same situation, I needed the Post Deployment powershell script to create dummy data for lists on my local instance. I tried several other ways even using the MSBuild with the .msbuild file as suggested above, but i could not all the variables and had to hard code the file with path and url, this is not what i wan...
**Visual Studio is a 32-bit** application, so in 64-bit Windows it runs in a simulated 32-bit environment. Strangely, the 32-bit environment is called "WoW64" (when 32-bit Windows did this for 16-bit apps, it was called "WoW16". The "WoW" part means "Windows on Windows". It's similarly strange that "System32" didn't...
3,913,498
I have written a script that inserts some test data into a document library. I intend to use it as a post-deployment step in Visual Studio 2010, so that the library is not empty after a retract & deploy. The relevant portions of the script are: **Install.ps1:** ``` $scriptDirectory = Split-Path -Path $script:MyInvoc...
2010/10/12
[ "https://Stackoverflow.com/questions/3913498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29083/" ]
Use %WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe It’s important that you use the virtual path of %WINDIR%\SysNative and not the actual path of C:\Windows\System32. The reason for this is that Visual Studio 2010 is a 32-bit application that needs to call the 64-bit version of powershell.exe to successfully...
**Visual Studio is a 32-bit** application, so in 64-bit Windows it runs in a simulated 32-bit environment. Strangely, the 32-bit environment is called "WoW64" (when 32-bit Windows did this for 16-bit apps, it was called "WoW16". The "WoW" part means "Windows on Windows". It's similarly strange that "System32" didn't...
3,913,498
I have written a script that inserts some test data into a document library. I intend to use it as a post-deployment step in Visual Studio 2010, so that the library is not empty after a retract & deploy. The relevant portions of the script are: **Install.ps1:** ``` $scriptDirectory = Split-Path -Path $script:MyInvoc...
2010/10/12
[ "https://Stackoverflow.com/questions/3913498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29083/" ]
**Visual Studio is a 32-bit** application, so in 64-bit Windows it runs in a simulated 32-bit environment. Strangely, the 32-bit environment is called "WoW64" (when 32-bit Windows did this for 16-bit apps, it was called "WoW16". The "WoW" part means "Windows on Windows". It's similarly strange that "System32" didn't...
I have success doing this as a post deployment command: ``` %comspec% /c powershell -File "c:\foo\bar.ps1" ```
3,913,498
I have written a script that inserts some test data into a document library. I intend to use it as a post-deployment step in Visual Studio 2010, so that the library is not empty after a retract & deploy. The relevant portions of the script are: **Install.ps1:** ``` $scriptDirectory = Split-Path -Path $script:MyInvoc...
2010/10/12
[ "https://Stackoverflow.com/questions/3913498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29083/" ]
Use %WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe It’s important that you use the virtual path of %WINDIR%\SysNative and not the actual path of C:\Windows\System32. The reason for this is that Visual Studio 2010 is a 32-bit application that needs to call the 64-bit version of powershell.exe to successfully...
I had same situation, I needed the Post Deployment powershell script to create dummy data for lists on my local instance. I tried several other ways even using the MSBuild with the .msbuild file as suggested above, but i could not all the variables and had to hard code the file with path and url, this is not what i wan...
3,913,498
I have written a script that inserts some test data into a document library. I intend to use it as a post-deployment step in Visual Studio 2010, so that the library is not empty after a retract & deploy. The relevant portions of the script are: **Install.ps1:** ``` $scriptDirectory = Split-Path -Path $script:MyInvoc...
2010/10/12
[ "https://Stackoverflow.com/questions/3913498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29083/" ]
I had same situation, I needed the Post Deployment powershell script to create dummy data for lists on my local instance. I tried several other ways even using the MSBuild with the .msbuild file as suggested above, but i could not all the variables and had to hard code the file with path and url, this is not what i wan...
I have success doing this as a post deployment command: ``` %comspec% /c powershell -File "c:\foo\bar.ps1" ```
3,913,498
I have written a script that inserts some test data into a document library. I intend to use it as a post-deployment step in Visual Studio 2010, so that the library is not empty after a retract & deploy. The relevant portions of the script are: **Install.ps1:** ``` $scriptDirectory = Split-Path -Path $script:MyInvoc...
2010/10/12
[ "https://Stackoverflow.com/questions/3913498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29083/" ]
Use %WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe It’s important that you use the virtual path of %WINDIR%\SysNative and not the actual path of C:\Windows\System32. The reason for this is that Visual Studio 2010 is a 32-bit application that needs to call the 64-bit version of powershell.exe to successfully...
I have success doing this as a post deployment command: ``` %comspec% /c powershell -File "c:\foo\bar.ps1" ```
295,979
I found these two recurrence relations in an old textbook and was hoping someone could show me how to solve them for their closed form. If not, a final answer would also be appreciated, as it helps me reason out the iterative process (I've tried using online calculators to give me an answer but I haven't had the best o...
2013/02/06
[ "https://math.stackexchange.com/questions/295979", "https://math.stackexchange.com", "https://math.stackexchange.com/users/48580/" ]
The second relation reads $T(kf)=eT((k-1)f)+g$ for all $k\geq 0$. Write $T(kf)=x\_kg$. Then $x\_0=0$ and $x\_k=ex\_{k-1}+1$. Case 1: $e=1$ then $x\_k=k$ (induction) and so $$T(kf)=kg.$$ Case 2: $e\neq 1$ then $\frac{1}{1-e}$ is a constant solution and the general solution of the homogeneous relation$x\_k=ex\_{k-1}$ ...
For example the firt one: $$T(1)=1\;\;,\;\;T(2)=T(1)+\log\_22=1+1=2\;\;,\;\;T(4)=T(2)+\log\_24=2+2=4$$ $$T(8)=T(4)+\log\_28=4+3=7\;\;,\;\;T(16)=T(8)+\log\_216=7+4=11$$ So the sequence seems to be $\,1,2,4,7,11,16,22,\,\ldots,a\_{n-1}+n-1\,\ldots\,$
60,042,015
I would like to have a custom action on the pages app that opens up a dialog with one field for a comment and two actions, namely `cancel` and `commit`. The commit action calls the custom ExportToGitCommand class. I defined a custom action definition and class action for the pages app in magnolia: ``` public class E...
2020/02/03
[ "https://Stackoverflow.com/questions/60042015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3615847/" ]
> > **Disclaimer:** I can't verify that any of the solutions I've written below work as I can't replicate the issue on my device in the JSFiddle you provided. > It displays fine for me in Firefox and Chrome. FWIW: I'm using a Mac > Mini on MacOS 10.14.6 with a 4K display @ 1920 x 1080 (i.e. HiDPI). > The same brows...
I can't reproduce this issue with the jsfiddle you supplied (all icons look okay for me). But I have had similar issues myself with other font-icons. I think the issue comes from the `font-weight: bolder;` you've added to the parent element in your code. The browser now also wants to make the icon bolder, but since t...
40,858,691
I have a bloger system with this type of address: ``` www.example.com/xxx ``` each blog has its own content. Should I add blogs to sitemap.xml (for example as a static sitemap) or only all content is enough? I want search engine recognized blogs.
2016/11/29
[ "https://Stackoverflow.com/questions/40858691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7223695/" ]
Adding a category to a sitemap is up to you. To answer this question you must ask yourself "do I need to rank my categories in Google?" If yes then add to sitemap and index them. If not then don't add to sitemap and noindex them.
Your category archives are more important than individual pages and posts. Those archives should be the first result in the search engines. The more likely your individual pages are to expire, the more this is true. (<https://yoast.com/category-seo/>)
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
I think what you're saying is that you want events to occur when you click on objects you have drawn on a canvas. I have written a few [tutorials](http://simonsarris.com/blog/140-canvas-moving-selectable-shapes) on how to make persistent shapes and move them around with mouse clicks. That should give you a good startin...
`addEventListener` is tricky. What I would try is `canvas.addEventListener.apply(canvas, ["mousedown", mouseClick, false]);` or use an anonymous function. `canvas.addEventListener.apply(canvas, ["mousedown", function(){ mouseClick(); }, false]);` Using the apply function can help make sure the `eventListener` is a...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
A canvas is nothing more than a bitmap. There is no record kept that there was a rectangle drawn on the canvas, so if you want to detect that the click was inside an area that you drew a rectangle on, you have to keep a record of the areas you've drawn and test against them. eg: ``` var rects= []; function mouseClick...
`addEventListener` is tricky. What I would try is `canvas.addEventListener.apply(canvas, ["mousedown", mouseClick, false]);` or use an anonymous function. `canvas.addEventListener.apply(canvas, ["mousedown", function(){ mouseClick(); }, false]);` Using the apply function can help make sure the `eventListener` is a...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
``` $(canvas).mousedown(function myDown(e) { var position = $(canvas).position(); var x = e.pageX-position.left; var y = e.pageY-position.top; ... }); ``` This is much better way to do this!
`addEventListener` is tricky. What I would try is `canvas.addEventListener.apply(canvas, ["mousedown", mouseClick, false]);` or use an anonymous function. `canvas.addEventListener.apply(canvas, ["mousedown", function(){ mouseClick(); }, false]);` Using the apply function can help make sure the `eventListener` is a...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
You could also try out Concrete.js <http://www.concretejs.com> which is a lightweight canvas framework that adds interactivity. You would just do something like this: var key = canvas.getIntersection(x,y); if x,y intersects a graphic you've drawn with a given key, it returns the key, and you know what was hovered/cli...
`addEventListener` is tricky. What I would try is `canvas.addEventListener.apply(canvas, ["mousedown", mouseClick, false]);` or use an anonymous function. `canvas.addEventListener.apply(canvas, ["mousedown", function(){ mouseClick(); }, false]);` Using the apply function can help make sure the `eventListener` is a...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
A canvas is nothing more than a bitmap. There is no record kept that there was a rectangle drawn on the canvas, so if you want to detect that the click was inside an area that you drew a rectangle on, you have to keep a record of the areas you've drawn and test against them. eg: ``` var rects= []; function mouseClick...
I think what you're saying is that you want events to occur when you click on objects you have drawn on a canvas. I have written a few [tutorials](http://simonsarris.com/blog/140-canvas-moving-selectable-shapes) on how to make persistent shapes and move them around with mouse clicks. That should give you a good startin...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
``` $(canvas).mousedown(function myDown(e) { var position = $(canvas).position(); var x = e.pageX-position.left; var y = e.pageY-position.top; ... }); ``` This is much better way to do this!
I think what you're saying is that you want events to occur when you click on objects you have drawn on a canvas. I have written a few [tutorials](http://simonsarris.com/blog/140-canvas-moving-selectable-shapes) on how to make persistent shapes and move them around with mouse clicks. That should give you a good startin...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
A canvas is nothing more than a bitmap. There is no record kept that there was a rectangle drawn on the canvas, so if you want to detect that the click was inside an area that you drew a rectangle on, you have to keep a record of the areas you've drawn and test against them. eg: ``` var rects= []; function mouseClick...
``` $(canvas).mousedown(function myDown(e) { var position = $(canvas).position(); var x = e.pageX-position.left; var y = e.pageY-position.top; ... }); ``` This is much better way to do this!
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
A canvas is nothing more than a bitmap. There is no record kept that there was a rectangle drawn on the canvas, so if you want to detect that the click was inside an area that you drew a rectangle on, you have to keep a record of the areas you've drawn and test against them. eg: ``` var rects= []; function mouseClick...
You could also try out Concrete.js <http://www.concretejs.com> which is a lightweight canvas framework that adds interactivity. You would just do something like this: var key = canvas.getIntersection(x,y); if x,y intersects a graphic you've drawn with a given key, it returns the key, and you know what was hovered/cli...
7,224,175
Something like I am have: ``` function mouseClick(event) { ... } canvas.addEventListener("mousedown", mouseClick, false); function drawRect(x, y) { context.fillRect(x, y, 16, 16); }; drawRect(10, 10); ``` How to do something like if I am click on my Rect in Canvas get somethi...
2011/08/28
[ "https://Stackoverflow.com/questions/7224175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/910940/" ]
``` $(canvas).mousedown(function myDown(e) { var position = $(canvas).position(); var x = e.pageX-position.left; var y = e.pageY-position.top; ... }); ``` This is much better way to do this!
You could also try out Concrete.js <http://www.concretejs.com> which is a lightweight canvas framework that adds interactivity. You would just do something like this: var key = canvas.getIntersection(x,y); if x,y intersects a graphic you've drawn with a given key, it returns the key, and you know what was hovered/cli...
46,481,367
I just do the test in tensorflow/model in GitHub,and I have trained and got four files, than I freeze the model, and the problem Is coming. I am supported that You need to supply the name of a node to `--output_node_names`. and I have red the `graph.pbtxt`,it is so long ... the basic format ``` node{ name: "ParseSi...
2017/09/29
[ "https://Stackoverflow.com/questions/46481367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8693379/" ]
> > when defining your graph you can set names of your placeholders / nodes, e.g. > > > ``` # Initialize tensorflow placeholders x = tf.placeholder('float', [None, self.time_steps, self.num_features], name='input_node') y = tf.placeholder('float', [None, self.num_features], name='output_node') ``` Whereas `y` is...
The easiest way is to manually add an identity node with the name you want by using tf.identity.
20,992,710
When I am using Xcode 5 and I set the deployment target as 7.0, the application runs perfectly with both 4-inch and 3.5-inch displays. I have downloaded the iOS 6 SDK already. When I change the base SDK to iOS 6 and set the deployment target as iOS 6.1 my GUI is affected in a way that changes every image, navigation ...
2014/01/08
[ "https://Stackoverflow.com/questions/20992710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3631801/" ]
When you compile with the iOS 6 SDK , you application is created with the iOS6 images, views, keyboards, etc... You can't use iOS7 views if you are compiling for iOS6, you need to compile for iOS7, even thought your app is iOS6 compatible (setting the deployment target to iOS6)
If your application is working fine in iOS 7 and you need to run it iOS 6 then you need to manage the application using this method: ``` if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending){ //CGRect gridFrame; if ([[UIScreen mainScreen] bounds].size.height == 568) { // Do n...
20,992,710
When I am using Xcode 5 and I set the deployment target as 7.0, the application runs perfectly with both 4-inch and 3.5-inch displays. I have downloaded the iOS 6 SDK already. When I change the base SDK to iOS 6 and set the deployment target as iOS 6.1 my GUI is affected in a way that changes every image, navigation ...
2014/01/08
[ "https://Stackoverflow.com/questions/20992710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3631801/" ]
When compiling for iOS 7 you are using iOS 7 specific GUI elements ([that differs a lot from iOS 6](http://www.idownloadblog.com/2013/06/14/ios-6-vs-ios-7-the-different-ui-views/)). Phones that are still on iOS 6 (about 16%) will however see the iOS 6 GUI elements for obvious reasons, even if you compile it for iOS 7. ...
If your application is working fine in iOS 7 and you need to run it iOS 6 then you need to manage the application using this method: ``` if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending){ //CGRect gridFrame; if ([[UIScreen mainScreen] bounds].size.height == 568) { // Do n...
20,992,710
When I am using Xcode 5 and I set the deployment target as 7.0, the application runs perfectly with both 4-inch and 3.5-inch displays. I have downloaded the iOS 6 SDK already. When I change the base SDK to iOS 6 and set the deployment target as iOS 6.1 my GUI is affected in a way that changes every image, navigation ...
2014/01/08
[ "https://Stackoverflow.com/questions/20992710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3631801/" ]
Long story short - you can't use iOS 7 GUI in your iOS 6 app. If you want you can just create your custom GUI and use it in your app. But some elements will be different, you better read this guide: * [Apple docs](https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/Controls....
If your application is working fine in iOS 7 and you need to run it iOS 6 then you need to manage the application using this method: ``` if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending){ //CGRect gridFrame; if ([[UIScreen mainScreen] bounds].size.height == 568) { // Do n...
20,992,710
When I am using Xcode 5 and I set the deployment target as 7.0, the application runs perfectly with both 4-inch and 3.5-inch displays. I have downloaded the iOS 6 SDK already. When I change the base SDK to iOS 6 and set the deployment target as iOS 6.1 my GUI is affected in a way that changes every image, navigation ...
2014/01/08
[ "https://Stackoverflow.com/questions/20992710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3631801/" ]
Use this code: ``` if([[[UIDevice currentDevice] systemVersion] isEqualToString: @"7.0"]) { //do stuff } else { // code here } ```
If your application is working fine in iOS 7 and you need to run it iOS 6 then you need to manage the application using this method: ``` if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending){ //CGRect gridFrame; if ([[UIScreen mainScreen] bounds].size.height == 568) { // Do n...
42,461,569
After installing and starting VNC server on *Compute Engine*'s **Ubuntu16 instance** VNC session cannot be made. I would like to open **Network**'s Firewall ports to see if it would make a difference. How to configure Firewall rule? [![enter image description here](https://i.stack.imgur.com/4TW9m.png)](https://i.stack...
2017/02/25
[ "https://Stackoverflow.com/questions/42461569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1107049/" ]
first create your firewall rule for tcp or udp, then set tag in firewall rule. after creating firewall rule note down tag, go to VM instances click on edit add tag name that you created in firewall rule. it will open that port. [![enter image description here](https://i.stack.imgur.com/xa6Fo.png)](https://i.stack.img...
[!VM Edit for tag[1](https://i.stack.imgur.com/v1qVV.jpg)](https://i.stack.imgur.com/v1qVV.jpg) This screenshot to edit VM instances and add your tag that you created in firewall rule.
74,219,992
I am new to the Vue 3 ecosystem. I am building a search form using the composition API. I have a child component that contains a search form input. It emits a `doEmitSearch` event, and has a payload of the `searchterm`. In the parent component I receive the emitted event `@doEmitSearch=”doTriggerSearch”` In the pare...
2022/10/27
[ "https://Stackoverflow.com/questions/74219992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19801945/" ]
Wrap the RadioListTile with a Card widget. It will contain the ListTile in the container.
You can replace `SizedBox` with `Container`, and use `clipBehavior: Clip.hardEdge` to remove the overflows. see code below: ``` return Column( children: [ Container( height: 500, width: 500, clipBehavior: Clip.hardEdge, child: ListView(children: radioTiles), ) ], ); ```
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
The iPhone SDK agreement is also rather vague about whether you're even allowed to run scripting languages (outside of a WebView's Javascript). My reading is that it is OK - as long as none of the scripts you execute are downloaded from the network (so pre-installed and user-edited scripts seem to be OK). IANAL etc et...
The only significant "external" language for iPhone development that I'm aware of with semi-significant support in terms of frameworks and compatibility is [MonoTouch](http://monotouch.net/), a C#/.NET environment for developing on the iPhone.
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
Not currently, currently the only languages available to access the iPhone SDK are C/C++, Objective C and Swift. There is no technical reason why this could not change in the future but I wouldn't hold your breath for this happening in the short term. That said, Objective-C and Swift really are not too scary... > >...
**2019 Update:** While Python-iOS development is relatively immature and likely will prevent (afaik) your app from having native UI and functionality that could be achieved in an Apple-supported development language, Apple now seems to allow embedding Python interpreters in Native Swift/Obj-C apps. This supports impo...
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
It seems this is now something developers are allowed to do: the iOS Developer Agreement was changed yesterday and appears to have been ammended in a such a way as to make embedding a Python interpretter in your application legal: **SECTION 3.3.2 — INTERPRETERS** **Old:** > > 3.3.2 An Application may not itself ins...
You can do this with PyObjC, with a jailbroken phone of course. But if you want to get it into the App Store, they will not allow it because it "interprets code." However, you may be able to use [Shed Skin](http://code.google.com/p/shedskin/), although I'm not aware of anyone doing this. I can't think of any good reaso...
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
Yes you can. You write your code in tinypy (which is restricted Python), then use tinypy to convert it to C++, and finally compile this with XCode into a native iPhone app. Phil Hassey has published a game called Elephants! using this approach. Here are more details, <http://www.philhassey.com/blog/2009/12/23/elephant...
[Pythonista](http://omz-software.com/pythonista) has an Export to Xcode feature that allows you to export your Python scripts as Xcode projects that build standalone iOS apps. <https://github.com/ColdGrub1384/Pyto> is also worth looking into.
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
[BeeWare](https://pybee.org) is an open source framework for authoring native iOS & Android apps.
I think it was not possible earlier but I recently heard about PyMob, which seems interesting because the apps are written in Python and the final outputs are native source codes in various platforms (Obj-C for iOS, Java for Android etc). This is certainly quite unique. [This](http://pyzia.com/technology.html) webpage ...
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
[BeeWare](https://pybee.org) is an open source framework for authoring native iOS & Android apps.
Technically, as long as the interpreted code ISN'T downloaded (excluding JavaScript), the app may be approved. Rhomobiles "Rhodes" framework does just that, bundling mobile Ruby, a lightweight version of Rails, and your app for distribution via the app-store. Because both the interpreter and the interpreted code are pa...
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
Yes you can. You write your code in tinypy (which is restricted Python), then use tinypy to convert it to C++, and finally compile this with XCode into a native iPhone app. Phil Hassey has published a game called Elephants! using this approach. Here are more details, <http://www.philhassey.com/blog/2009/12/23/elephant...
An update to the iOS Developer Agreement means that you can use whatever you like, as long as you meet the developer guidelines. Section 3.3.1, which restricted what developers could use for iOS development, has been entirely removed. Source: <http://daringfireball.net/2010/09/app_store_guidelines>
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
It seems this is now something developers are allowed to do: the iOS Developer Agreement was changed yesterday and appears to have been ammended in a such a way as to make embedding a Python interpretter in your application legal: **SECTION 3.3.2 — INTERPRETERS** **Old:** > > 3.3.2 An Application may not itself ins...
The only significant "external" language for iPhone development that I'm aware of with semi-significant support in terms of frameworks and compatibility is [MonoTouch](http://monotouch.net/), a C#/.NET environment for developing on the iPhone.
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
**2019 Update:** While Python-iOS development is relatively immature and likely will prevent (afaik) your app from having native UI and functionality that could be achieved in an Apple-supported development language, Apple now seems to allow embedding Python interpreters in Native Swift/Obj-C apps. This supports impo...
The only significant "external" language for iPhone development that I'm aware of with semi-significant support in terms of frameworks and compatibility is [MonoTouch](http://monotouch.net/), a C#/.NET environment for developing on the iPhone.
43,315
Using [PyObjC](http://pyobjc.sourceforge.net/), you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
2008/09/04
[ "https://Stackoverflow.com/questions/43315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
It seems this is now something developers are allowed to do: the iOS Developer Agreement was changed yesterday and appears to have been ammended in a such a way as to make embedding a Python interpretter in your application legal: **SECTION 3.3.2 — INTERPRETERS** **Old:** > > 3.3.2 An Application may not itself ins...
[BeeWare](https://pybee.org) is an open source framework for authoring native iOS & Android apps.
48,718,503
i am confused with REST. I have a service which transforms a json into a excel file. This is a service, and doesnt represent an entity and thus has no state. Is it OK to create a REST service for this with HTTP GET or what is the best practice to add such service to our collection of restful services? ... It is not ...
2018/02/10
[ "https://Stackoverflow.com/questions/48718503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8773394/" ]
This sounds like a POST call. You are creating an object which in this case in an Excel document. The only quirk here is that the server does not save an instance of it. However, this could be future functionality and the API would still make sense if you decided to save the spreadsheets (Although the response would th...
If you have a path/endpoint in your service that returns a spreadsheet, the most appropriate method to use is `GET`, because you are retrieving the spreadsheet. For REST it doesn't really matter if the spreadsheet is created on the fly. From the perspective of the protocol the excel file is a representation of your 's...
3,595
Still today the cliche of a German is being tall, blond and blue-eyed. Surprisingly the expression *"blauäugig"* is most often used with an obvious negative connotation: > > Professor Otmar Issing, der ebenfalls die Regierung berät, kritisierte den Vorschlag als blauäugig und wenig erfolgversprechend.[Süddeutsche Zei...
2012/01/18
[ "https://german.stackexchange.com/questions/3595", "https://german.stackexchange.com", "https://german.stackexchange.com/users/23/" ]
This comes from the fact that newborn do have blue eyes, without exception. Since newborn are obviously unacquainted with everything, *blauäugig sein* means to be naive, unexperienced and credulous. Here is a [quite good explanation](http://www.redensarten.net/Blauaeugig.html) which points out: > > Blauäugig sein be...
Em1 already answered the origin of the word. I would like to comment on your question about discrimination: > > Do people with blue eyes feel discriminated by the usage of "blauäugig"? > > > One could think that this is somewhat similar to blond people and the prejudice about them being stupid. But my perception ...
144,443
I need to redirect all traffic incoming on port 9750 (the port chat server) to another machine on the same subnet. Ports clients - dynamic. ``` iptables -t nat -A PREROUTING -p tcp -d x.x.x.a --dport 9750 -j DNAT --to-destination x.x.x.b:9750 iptables -t nat -A POSTROUTING -p tcp --dport 9750 -j MASQUERADE ``` Howe...
2014/07/14
[ "https://unix.stackexchange.com/questions/144443", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/77451/" ]
I'm not sure what your intentions were with `x.x.x.a` and `x.x.x.b`. For the PREROUTING rule you need to specify the external interface and the internal machine's IP:Port. For port forwarding you don't need a MASQUERADE rule. However, you do need a rule to allow the traffic on the FORWARD chain. ``` iptables -A PRERO...
You did not provide packet forwarding configuration, so I hope you missed it. Temporarily you can enable it by:- ``` echo 1 >/proc/sys/net/ipv4/ip_forward ``` To make it permanent open /etc/sysctl.conf and provide this parameter:- ``` net.ipv4.ip_forward=1 ```
47,753,891
I am trying to integrate redis to scalacache. Keys are usually string but values can be objects, Set[String], etc. Cache is initialized by this ``` val cache: RedisCache = RedisCache(config.host, config.port) private implicit val scalaCache: ScalaCache[Array[Byte]] = ScalaCache(cacheService.cache) ``` But while call...
2017/12/11
[ "https://Stackoverflow.com/questions/47753891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2644513/" ]
If you look at the [MRO](https://docs.python.org/3/glossary.html#term-method-resolution-order) of the class `Car` you can see: ``` >>> Car.__mro__ (<class '__main__.Car'>, <class '__main__.ReferenceData'>, <type 'object'>) ``` So methods are looked up first on `Car`, then on `ReferenceData` and finally on `object`. ...
Don't use inheritance. It's a overused abstraction in many cases, and this is an example. By using dependency-injection, you can easily default to the actual DB, but replace your backend with a mocked one. ``` class MockReferenceData(object): def dbName(self): return 'mock' def totalNumberOfSeats(self): r...
47,753,891
I am trying to integrate redis to scalacache. Keys are usually string but values can be objects, Set[String], etc. Cache is initialized by this ``` val cache: RedisCache = RedisCache(config.host, config.port) private implicit val scalaCache: ScalaCache[Array[Byte]] = ScalaCache(cacheService.cache) ``` But while call...
2017/12/11
[ "https://Stackoverflow.com/questions/47753891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2644513/" ]
Thanks @mata i also did the same i changed the order and it worked. ``` def extend_instance(obj, cls): """Apply mixins to a class instance after creation""" base_cls = obj.__class__ base_cls_name = obj.__class__.__name__ obj.__class__ = type(base_cls_name, (cls, base_cls),{}) ```
Don't use inheritance. It's a overused abstraction in many cases, and this is an example. By using dependency-injection, you can easily default to the actual DB, but replace your backend with a mocked one. ``` class MockReferenceData(object): def dbName(self): return 'mock' def totalNumberOfSeats(self): r...
47,753,891
I am trying to integrate redis to scalacache. Keys are usually string but values can be objects, Set[String], etc. Cache is initialized by this ``` val cache: RedisCache = RedisCache(config.host, config.port) private implicit val scalaCache: ScalaCache[Array[Byte]] = ScalaCache(cacheService.cache) ``` But while call...
2017/12/11
[ "https://Stackoverflow.com/questions/47753891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2644513/" ]
If you look at the [MRO](https://docs.python.org/3/glossary.html#term-method-resolution-order) of the class `Car` you can see: ``` >>> Car.__mro__ (<class '__main__.Car'>, <class '__main__.ReferenceData'>, <type 'object'>) ``` So methods are looked up first on `Car`, then on `ReferenceData` and finally on `object`. ...
Thanks @mata i also did the same i changed the order and it worked. ``` def extend_instance(obj, cls): """Apply mixins to a class instance after creation""" base_cls = obj.__class__ base_cls_name = obj.__class__.__name__ obj.__class__ = type(base_cls_name, (cls, base_cls),{}) ```
7,343,081
I want a dialog that adjusts brightness of the screen using `SeekBar`. How to display custom dialog with `SeekBar` that adjusts brightness of screen?
2011/09/08
[ "https://Stackoverflow.com/questions/7343081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/703851/" ]
[You can use this API](http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#screenBrightness). This will change screen brightness of your window and not of the whole system. ``` // Make the screen full bright for this activity. WindowManager.LayoutParams lp = getWindow()....
This [code snippet](http://androidcodesnips.blogspot.com/2011/07/reducing-dimness-while-running-progress.html) should help you ``` pdlg = ProgressDialog.show(getParent(), "Loading...", ""); WindowManager.LayoutParams lp = pdlg.getWindow().getAttributes(); p.dimAmount=0.0f; //Dim Amount pdlg.getWindow().setAttr...
7,343,081
I want a dialog that adjusts brightness of the screen using `SeekBar`. How to display custom dialog with `SeekBar` that adjusts brightness of screen?
2011/09/08
[ "https://Stackoverflow.com/questions/7343081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/703851/" ]
[You can use this API](http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#screenBrightness). This will change screen brightness of your window and not of the whole system. ``` // Make the screen full bright for this activity. WindowManager.LayoutParams lp = getWindow()....
Hey you can set the system brightness like this: ``` //Set the system brightness using the brightness variable value System.putInt(cResolver, System.SCREEN_BRIGHTNESS, brightness); //Get the current window attributes LayoutParams layoutpars = window.getAttributes(); //Set the brightness of this window layoutpars.scre...
7,343,081
I want a dialog that adjusts brightness of the screen using `SeekBar`. How to display custom dialog with `SeekBar` that adjusts brightness of screen?
2011/09/08
[ "https://Stackoverflow.com/questions/7343081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/703851/" ]
This [code snippet](http://androidcodesnips.blogspot.com/2011/07/reducing-dimness-while-running-progress.html) should help you ``` pdlg = ProgressDialog.show(getParent(), "Loading...", ""); WindowManager.LayoutParams lp = pdlg.getWindow().getAttributes(); p.dimAmount=0.0f; //Dim Amount pdlg.getWindow().setAttr...
Hey you can set the system brightness like this: ``` //Set the system brightness using the brightness variable value System.putInt(cResolver, System.SCREEN_BRIGHTNESS, brightness); //Get the current window attributes LayoutParams layoutpars = window.getAttributes(); //Set the brightness of this window layoutpars.scre...
27,981,990
I am new to db2. Is there a query to check whether a table is journaled in DB2 or not. if it is journaled what is the name of the journal. I found this query: Find all journals in library MJATST. ``` SELECT * FROM TABLE (QSYS2.OBJECT_STATISTICS('MJATST ','JRN') ) AS X ``` but i couldn't find something similar to ta...
2015/01/16
[ "https://Stackoverflow.com/questions/27981990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2333119/" ]
You can create dictionary with `Func<string, IComparable>` mapping to properties of your class. ``` public class ItemWithProperty { public string Property { get; set; } } public static void Main() { Dictionary<string, Func<ItemWithProperty, IComparable>> stringPropertyMap = new Dictionary<string, Func<ItemWit...
You use this if you change your method signature: ``` private static IEnumerable<dynamic> ApplySort(IEnumerable<dynamic> listToBeSorted, ICollection<KeyValuePair<string, string>> sorters) { var orderBy = (sorters == null || sorters.Count == 0) ? new KeyValuePair<string, string>("createddate", "1") : so...
412,241
I have a fresh install of ubuntu 16.04 on a razer stealth rz09 with nvidia gtx1060 gpu (this gpu being the reason i got the machine). The system freezes often upon login, with both the current and previous kernels. If I use one of the grub options to do a dpkg repair occasionally I am able to boot, and I've managed to ...
2017/12/21
[ "https://unix.stackexchange.com/questions/412241", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/118522/" ]
Using 'nomodeset' in grub as described [here](https://www.linuxmint.com/pictures/screenshots/rosa/nomodeset_bios.webm) and then install of driver using standard install worked for me.
Well, I had the same problem: My PC was freezing randomly. I tried Ubuntu 16, 17 and 18.04 and everything was the same. I tried several drivers and didn't get a solution. I tried several solutions that I found in the forums and got bad and harmful results. My solution was: I stopped using the graphical nvidia card, re...
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
This is a model which supports many aspects, 1. Supports Sites, Locations and Warehouses etc. 2. Supports Categorization and Grouping 3. Support Generic Product (Ex. "Table Clock" and specific product "Citizen C123 Multi Alarm Clock" ) 4. Also support Brand Variants (by various manufacturers) 5. Has CSM (color / size ...
Try multiple tables with links ``` table_products id name table_product_sales id product_id quantity price_per transaction_time AS DATETIME SELECT table_product_sales.*, table_product.name FROM table_product JOIN table_product_sales ON table_product_sales.product_id = table_product.id GROUP BY DATE(transaction_time...
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
This is a model which supports many aspects, 1. Supports Sites, Locations and Warehouses etc. 2. Supports Categorization and Grouping 3. Support Generic Product (Ex. "Table Clock" and specific product "Citizen C123 Multi Alarm Clock" ) 4. Also support Brand Variants (by various manufacturers) 5. Has CSM (color / size ...
I'd have a table with a row per item per day - store the date, the item ID, the quantity sold, and the price sold at (store this even though it's also in the product table - if that changes, you want the value you actually sold at preserved). You can compute totals per item-day and totals per day in queries. Tables: ...
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
This is a model which supports many aspects, 1. Supports Sites, Locations and Warehouses etc. 2. Supports Categorization and Grouping 3. Support Generic Product (Ex. "Table Clock" and specific product "Citizen C123 Multi Alarm Clock" ) 4. Also support Brand Variants (by various manufacturers) 5. Has CSM (color / size ...
I think you need a table with fields showing the transaction properties per customer OR a table with fields - date, product(foreign), quantity - this way you'll have no problem with new products
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
This is a model which supports many aspects, 1. Supports Sites, Locations and Warehouses etc. 2. Supports Categorization and Grouping 3. Support Generic Product (Ex. "Table Clock" and specific product "Citizen C123 Multi Alarm Clock" ) 4. Also support Brand Variants (by various manufacturers) 5. Has CSM (color / size ...
Try modelling your sales as a transaction - with a "header", i.e. who sold to, when sold, invoice # (if applicable), etc. and "line items", i.e. 20 \* product\_x @ $5 = $100. The safest approach is to avoid relying upon prices etc. from the products table - as these will presumably change over time, and instead copy mu...
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
I'd have a table with a row per item per day - store the date, the item ID, the quantity sold, and the price sold at (store this even though it's also in the product table - if that changes, you want the value you actually sold at preserved). You can compute totals per item-day and totals per day in queries. Tables: ...
Try modelling your sales as a transaction - with a "header", i.e. who sold to, when sold, invoice # (if applicable), etc. and "line items", i.e. 20 \* product\_x @ $5 = $100. The safest approach is to avoid relying upon prices etc. from the products table - as these will presumably change over time, and instead copy mu...
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
Inventory can get quite complex to model. First you need to understand that you need to be able to tell the value of the inventory onhand based on what you paid for it. This means you cannot rely on a product table that is updated to the current price. While you might want such a table to help you figure out what to se...
Try multiple tables with links ``` table_products id name table_product_sales id product_id quantity price_per transaction_time AS DATETIME SELECT table_product_sales.*, table_product.name FROM table_product JOIN table_product_sales ON table_product_sales.product_id = table_product.id GROUP BY DATE(transaction_time...
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
I'd have a table with a row per item per day - store the date, the item ID, the quantity sold, and the price sold at (store this even though it's also in the product table - if that changes, you want the value you actually sold at preserved). You can compute totals per item-day and totals per day in queries. Tables: ...
I think you need a table with fields showing the transaction properties per customer OR a table with fields - date, product(foreign), quantity - this way you'll have no problem with new products
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
Inventory can get quite complex to model. First you need to understand that you need to be able to tell the value of the inventory onhand based on what you paid for it. This means you cannot rely on a product table that is updated to the current price. While you might want such a table to help you figure out what to se...
I think you need a table with fields showing the transaction properties per customer OR a table with fields - date, product(foreign), quantity - this way you'll have no problem with new products
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
Try modelling your sales as a transaction - with a "header", i.e. who sold to, when sold, invoice # (if applicable), etc. and "line items", i.e. 20 \* product\_x @ $5 = $100. The safest approach is to avoid relying upon prices etc. from the products table - as these will presumably change over time, and instead copy mu...
I think you need a table with fields showing the transaction properties per customer OR a table with fields - date, product(foreign), quantity - this way you'll have no problem with new products
4,380,094
I am searching for a streaming solution, my company need to record and stream a live event on a Website, I am looking for hint as to which technology we should use, and what do we need in our setup. This is how I see that for now : We will need to install 3 camera, 1 console (to manage which camera is streamed), 1 St...
2010/12/07
[ "https://Stackoverflow.com/questions/4380094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355519/" ]
I'd have a table with a row per item per day - store the date, the item ID, the quantity sold, and the price sold at (store this even though it's also in the product table - if that changes, you want the value you actually sold at preserved). You can compute totals per item-day and totals per day in queries. Tables: ...
Inventory can get quite complex to model. First you need to understand that you need to be able to tell the value of the inventory onhand based on what you paid for it. This means you cannot rely on a product table that is updated to the current price. While you might want such a table to help you figure out what to se...
42,702
I am working on pagination and i am able to display my records on my VF page and i have done pagination to get the record get display. But the pagination work only when the no of records is less than 2000. If the number of records are more than 2000 and when we click on the last button which show all the last records s...
2014/07/09
[ "https://salesforce.stackexchange.com/questions/42702", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/8757/" ]
There is a good article about pagination in Apex here: <https://developer.salesforce.com/page/Paginating_Data_for_Force.com_Applications> that lists various options. You have two options for pagination inside of Visualforce pages, OFFSET pagination, and [StandardSetController](https://www.salesforce.com/us/developer/d...
I would look into using `StandardSetController`, see the docs [here](https://www.salesforce.com/us/developer/docs/pages/Content/apex_pages_standardsetcontroller.htm). This does not make it unlimited however, but it ups the limit from 2,000 to 10,000, which might help. In general, I try to make filters on the page to al...
28,439,621
I am using google's SlidingTabLayout in my view, but i want to add dynamically new tabs to it. I'm using this <http://developer.android.com/samples/SlidingTabsBasic/src/com.example.android.common/view/SlidingTabLayout.html> This is my code which initialize it: ``` // Create the adapter that will return a fragmen...
2015/02/10
[ "https://Stackoverflow.com/questions/28439621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2180161/" ]
There's probably a nicer, more efficient way, but simply calling `setViewPager()` every time you add a page to your `ViewPager` will work.
Here is a nice tutorial. <http://www.android4devs.com/2015/01/how-to-make-material-design-sliding-tabs.html> In short, you can supply them with your Pager Adapter. Override the getPageTitle method in order to supply something custom. E.g. ``` @Override public CharSequence getPageTitle(int position) { return _it...
70,637,629
I am using the discord-py-slash-command library and have setup my commands. However when I type my command in the chat I get interaction failed each time. I have given my bot the correct scope and reinvited it to the server several times. Can someone take a look at my code an tell me what is going on? I have followed s...
2022/01/09
[ "https://Stackoverflow.com/questions/70637629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11521276/" ]
Edit: I am editing my answer because at the time I was not sure what library you were using. Your code works just fine, however, If you are going to use `intents=discord.Intents.all()` you need to be sure to enable presence as well as server members intents in the developer console of the bot. If you do not need to ...
i switched over to the nextcord library for slash commands and the behavior is working as expected... I will consider this closed
30,163,755
I am using zxing api for creating barcode. But while creating i am not able to write barcode content as label below the barcode. output -- ![enter image description here](https://i.stack.imgur.com/ZW6Nc.png) output required -- ![enter image description here](https://i.stack.imgur.com/wW9dv.png) The code to generate...
2015/05/11
[ "https://Stackoverflow.com/questions/30163755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2463343/" ]
As the QRCode specifiaction does not provide an option to include the content into the image I do not think zxing or any other barcode generator does offer this functionality. You will have to add the text to the image on your own. Be aware that you have to leave enough white space around the QRCode. Your above image d...
@tobltobs. I search a lot but didn't find any way in zxing api to do as i am expecting . So as per your suggestion i created a image in which i pasted my barcode after generating & reading it.Then i write barcode content as String below that image . ![enter image description here](https://i.stack.imgur.com/cyUAT.png)
30,163,755
I am using zxing api for creating barcode. But while creating i am not able to write barcode content as label below the barcode. output -- ![enter image description here](https://i.stack.imgur.com/ZW6Nc.png) output required -- ![enter image description here](https://i.stack.imgur.com/wW9dv.png) The code to generate...
2015/05/11
[ "https://Stackoverflow.com/questions/30163755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2463343/" ]
As the QRCode specifiaction does not provide an option to include the content into the image I do not think zxing or any other barcode generator does offer this functionality. You will have to add the text to the image on your own. Be aware that you have to leave enough white space around the QRCode. Your above image d...
`Barcode4j` can be used to embed text along with the bar code. [This link](https://chillyfacts.com/generate-barcodes-dynamically-using-java/) has working java code.
13,191,595
The context is, I've added some changes to a file using `add -p` and because of the way git was presenting the patches I can't be sure the result will be good. I want to see the file as if I'd committed, then pushed, and then someone else had pulled the file. Not the diff, I just want to see that final version of the f...
2012/11/02
[ "https://Stackoverflow.com/questions/13191595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335847/" ]
You can use `git cat-file`. ``` $ git add -p my_file.c $ git cat-file blob HEAD:my_file.c ``` Note that the path is relative to the top of the repository.
If you are not obliged to go through the command line you can use 'git gui' that lets you stage the hunks of code you prefer while giving you the preview of the final result.
20,541
In some cryptographic protocols I have seen messages protected for confidentiality, authenticity, replaying attacks, reordering attacks, etc. What protects a protocol from an attacker in a privileged network position (e.g. in control of a majority of the fibre networks connecting countries) from just dropping message...
2014/11/30
[ "https://crypto.stackexchange.com/questions/20541", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/18397/" ]
Message sequencing AND hash-tabling for a trail of backward messages. The loss of a single message is not a disaster, actually. To be not over-paranoid, implement "resend request" in your protocol. If it works and hashes are matched - it can be just a communication error. But if it fails - a line should be dropped imme...
Assuming that your question excludes any kind of “regular” transmission error (which might also lead to one of the messages not reaching the receiver) the receiver should regard message #236 to be potentially malicious since the “ticket” (what you call “sequence number”) for message #236 can not be verified as genuine....
20,541
In some cryptographic protocols I have seen messages protected for confidentiality, authenticity, replaying attacks, reordering attacks, etc. What protects a protocol from an attacker in a privileged network position (e.g. in control of a majority of the fibre networks connecting countries) from just dropping message...
2014/11/30
[ "https://crypto.stackexchange.com/questions/20541", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/18397/" ]
Not much in the cryptographic protocols themselves. But you can do other things to get around such attacks: * Request signed read receipts, or received receipts. So, if I send a message from my phone to yours, it sends back a reply that your phone has received the message (or that you have opened it). If such a receip...
Assuming that your question excludes any kind of “regular” transmission error (which might also lead to one of the messages not reaching the receiver) the receiver should regard message #236 to be potentially malicious since the “ticket” (what you call “sequence number”) for message #236 can not be verified as genuine....
20,541
In some cryptographic protocols I have seen messages protected for confidentiality, authenticity, replaying attacks, reordering attacks, etc. What protects a protocol from an attacker in a privileged network position (e.g. in control of a majority of the fibre networks connecting countries) from just dropping message...
2014/11/30
[ "https://crypto.stackexchange.com/questions/20541", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/18397/" ]
Message sequencing AND hash-tabling for a trail of backward messages. The loss of a single message is not a disaster, actually. To be not over-paranoid, implement "resend request" in your protocol. If it works and hashes are matched - it can be just a communication error. But if it fails - a line should be dropped imme...
Not much in the cryptographic protocols themselves. But you can do other things to get around such attacks: * Request signed read receipts, or received receipts. So, if I send a message from my phone to yours, it sends back a reply that your phone has received the message (or that you have opened it). If such a receip...
129,049
From further investigations I see that someone came with an idea that gives support to my theory that elves don't have body fat. Their idea was that Elves [store their energy as ethanol](https://worldbuilding.stackexchange.com/questions/128909/how-could-elves-survive-without-any-fat-cell-in-their-body/128932#128932) ...
2018/11/01
[ "https://worldbuilding.stackexchange.com/questions/129049", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/-1/" ]
Elves have thicker skin. Literally. One of the purposes of fat in the body is kinetic: it serves as a cushion to absorb and distribute the force of impacts - not just in the sense of punches or falling rocks, but also things like the ground impacting your foot as you walk around on it. Since your elves don't have fat...
Type 1 Muscle Tissue -------------------- As a species your elves have a predisposition to [Type 1 muscle tissue](https://en.wikipedia.org/wiki/Muscle#Types), which is 'slow twitch'. A normal seditary man or a woman is believed to have 45% Type 2 muscle mass and 55% Type 1. However long distance runners have [higher p...
33,795,507
At the moment I can list all the files in a directory. I am using this code and it works fine: ``` <?php if ($handle = opendir('./uploaded')) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { echo '<div class="col-md-3"><div class="pane...
2015/11/19
[ "https://Stackoverflow.com/questions/33795507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try [fstat](http://php.net/manual/en/function.fstat.php) for more details Description ¶ ``` array fstat ( resource $handle ) ``` Gathers the statistics of the file opened by the file pointer handle. This function is similar to the `stat()` function except that it operates on an open file pointer instead of a filen...
Try Like this.. ``` <?php if ($handle = opendir('./uploaded')) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { echo '<div class="col-md-3"><div class="panel panel-default"><!-- Default panel contents --><div class="panel-heading">'.$entry.'</div><...
69,725,262
Have a look at the dataframe (df) below. | Date | Modules | | --- | --- | | 26-11-2021 | NA, Advanced chemistry, Biochemistry | | 25-11-2021 | Food physics, Food chemistry | I would like to alphabetically order the content of the modules column. Desired output: | Date | Modules | | --- | --- | | 26-11-2021 | Advance...
2021/10/26
[ "https://Stackoverflow.com/questions/69725262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16949460/" ]
collapse the sorted string back into one string using `toString`. ``` df$Modules <- sapply(strsplit(as.character(df$Modules), ',\\s*'), function(x) toString(sort(x))) df # Date Modules #1 26-11-2021 Advanced chemistry, Biochemistry, NA #2 25-11-2021 Fo...
you could use order i guess? ``` v<-c("Z","X","Y","A","B","C") df<-data.frame(1:6,v) > df[order(df$v),] X1.6 v 4 4 A 5 5 B 6 6 C 2 2 X 3 3 Y 1 1 Z ```
69,725,262
Have a look at the dataframe (df) below. | Date | Modules | | --- | --- | | 26-11-2021 | NA, Advanced chemistry, Biochemistry | | 25-11-2021 | Food physics, Food chemistry | I would like to alphabetically order the content of the modules column. Desired output: | Date | Modules | | --- | --- | | 26-11-2021 | Advance...
2021/10/26
[ "https://Stackoverflow.com/questions/69725262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16949460/" ]
collapse the sorted string back into one string using `toString`. ``` df$Modules <- sapply(strsplit(as.character(df$Modules), ',\\s*'), function(x) toString(sort(x))) df # Date Modules #1 26-11-2021 Advanced chemistry, Biochemistry, NA #2 25-11-2021 Fo...
We may use `separate_rows` from `tidyr` ``` library(dplyr) library(tidyr) df1 %>% separate_rows(Modules, sep = ",\\s*") %>% arrange(Date, Modules) %>% group_by(Date) %>% summarise(Modules = toString(Modules)) # A tibble: 2 × 2 Date Modules <chr> <chr> ...
69,725,262
Have a look at the dataframe (df) below. | Date | Modules | | --- | --- | | 26-11-2021 | NA, Advanced chemistry, Biochemistry | | 25-11-2021 | Food physics, Food chemistry | I would like to alphabetically order the content of the modules column. Desired output: | Date | Modules | | --- | --- | | 26-11-2021 | Advance...
2021/10/26
[ "https://Stackoverflow.com/questions/69725262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16949460/" ]
We may use `separate_rows` from `tidyr` ``` library(dplyr) library(tidyr) df1 %>% separate_rows(Modules, sep = ",\\s*") %>% arrange(Date, Modules) %>% group_by(Date) %>% summarise(Modules = toString(Modules)) # A tibble: 2 × 2 Date Modules <chr> <chr> ...
you could use order i guess? ``` v<-c("Z","X","Y","A","B","C") df<-data.frame(1:6,v) > df[order(df$v),] X1.6 v 4 4 A 5 5 B 6 6 C 2 2 X 3 3 Y 1 1 Z ```
63,575,441
I tried to open pentaho spoon but it doesnt launch . The error is "System does not find the path" I use "-Xms1024m" and C:\Program Files\Java\jre1.8.0\_261 path as an environment but still does not working. Can someone help me please? [![enter image description here](https://i.stack.imgur.com/8hE1X.png)](https://i.sta...
2020/08/25
[ "https://Stackoverflow.com/questions/63575441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12390450/" ]
> > "*I know the standard talks about temporary lifetime for structs that contain arrays, but in this case there is no array in the structure.*" > > > You mean this paragraph: > > A non-lvalue expression with structure or union type, where the structure or union contains a member with array type (including, recu...
The call to `foo(2, 4)` returns a *copy* of the variable `s` inside the function. This returned (and temporary) copy will have a lifetime to the end of the full expression, which is the assignment `a = foo(2, 4).x`. This means that the assignment to `a` is done before the lifetime of the temporary structure ends, whi...
63,575,441
I tried to open pentaho spoon but it doesnt launch . The error is "System does not find the path" I use "-Xms1024m" and C:\Program Files\Java\jre1.8.0\_261 path as an environment but still does not working. Can someone help me please? [![enter image description here](https://i.stack.imgur.com/8hE1X.png)](https://i.sta...
2020/08/25
[ "https://Stackoverflow.com/questions/63575441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12390450/" ]
The call to `foo(2, 4)` returns a *copy* of the variable `s` inside the function. This returned (and temporary) copy will have a lifetime to the end of the full expression, which is the assignment `a = foo(2, 4).x`. This means that the assignment to `a` is done before the lifetime of the temporary structure ends, whi...
From the C Standard > > 4 **A full expression is** an expression that is not part of another > expression or of a declarator. Each of the following is a full > expression: an initializer that is not part of a compound literal; > **the expression in an expression statement**; the controlling expression of a selection ...
63,575,441
I tried to open pentaho spoon but it doesnt launch . The error is "System does not find the path" I use "-Xms1024m" and C:\Program Files\Java\jre1.8.0\_261 path as an environment but still does not working. Can someone help me please? [![enter image description here](https://i.stack.imgur.com/8hE1X.png)](https://i.sta...
2020/08/25
[ "https://Stackoverflow.com/questions/63575441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12390450/" ]
The structure returned by `foo` is just a value (also called an rvalue). It is not an object and does not have any lifetime. Consider a function `int foo(void) { return 3; }`. This returns an `int` value of 3, and we would not expect to be able to take its address, as in `printf("%p", (void *) &foo());`. The 3 is just...
The call to `foo(2, 4)` returns a *copy* of the variable `s` inside the function. This returned (and temporary) copy will have a lifetime to the end of the full expression, which is the assignment `a = foo(2, 4).x`. This means that the assignment to `a` is done before the lifetime of the temporary structure ends, whi...
63,575,441
I tried to open pentaho spoon but it doesnt launch . The error is "System does not find the path" I use "-Xms1024m" and C:\Program Files\Java\jre1.8.0\_261 path as an environment but still does not working. Can someone help me please? [![enter image description here](https://i.stack.imgur.com/8hE1X.png)](https://i.sta...
2020/08/25
[ "https://Stackoverflow.com/questions/63575441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12390450/" ]
> > "*I know the standard talks about temporary lifetime for structs that contain arrays, but in this case there is no array in the structure.*" > > > You mean this paragraph: > > A non-lvalue expression with structure or union type, where the structure or union contains a member with array type (including, recu...
From the C Standard > > 4 **A full expression is** an expression that is not part of another > expression or of a declarator. Each of the following is a full > expression: an initializer that is not part of a compound literal; > **the expression in an expression statement**; the controlling expression of a selection ...