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
14,656,712
I'm attempting to read a file's datemodified value, but I've been unable to do so. I'm continually receiving "Inappropriate I/O control operation" errors. This is a windows directory structure that I'm attempting read. I've attempted to pass through the full file-path along with the file name ($outputFilePath."/".$file...
2013/02/01
[ "https://Stackoverflow.com/questions/14656712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2030881/" ]
Here's a slightly different approach - doesn't need the character types. Uses multiplication as a bit shifting technique. I wrote it so it will still work when str.length is not a multiple of 4 - but you did in fact state in your question that it would be... Note - I did not try to do "clever coding" - so I made sure ...
This uses HTML5 typed arrays so it does require a [modern browser](http://caniuse.com/#feat=typedarrays) ``` function strToU32(str) { var u8 = new Uint8Array(str.length); str.split("").forEach(function(char,i){ var code = char.charCodeAt(0); u8[i] = code; }) var u32 = new Uint32Array...
39,560,117
I'm tryng to built a controller for a newsletter, her is my code: **Controller** ``` public function postNews(Request $request, $user) { $this->validate($request, [ 'email' => 'required | email' ]); $user = User::findOrFail($id); $data = array( 'email' => $request->email); $tok...
2016/09/18
[ "https://Stackoverflow.com/questions/39560117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6845885/" ]
``` <form method="post" action="/posts"> <input name="email" type="email"> <button type="submit">subscribe</button> </form> Route::post('/posts', 'YourController@userSubscribe'); public function userSubscribe(Request $request){ $data = $request->input('email'); //Validate $data if necessary and save in the DB } ...
You should make POST request ``` <form action="posts/{{user}}" method="POST"> ```
39,560,117
I'm tryng to built a controller for a newsletter, her is my code: **Controller** ``` public function postNews(Request $request, $user) { $this->validate($request, [ 'email' => 'required | email' ]); $user = User::findOrFail($id); $data = array( 'email' => $request->email); $tok...
2016/09/18
[ "https://Stackoverflow.com/questions/39560117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6845885/" ]
You should remove the, ``` Route::post('posts/{user}', '....'); ``` use as, ``` Route::post('posts', '....'); ``` And also use the controller function with $user variable in the parameters. I hope this will help you.
You should make POST request ``` <form action="posts/{{user}}" method="POST"> ```
59,092,732
I'm trying to implement some authorization to routes with the CanCanCan gem but for some routes, it won't work and it's either always authorizes no matter what or not authorized at all. I want only users with a role id of 5 (admin) to access the update action of the prices controller, this is my ability.rb code: ``` ...
2019/11/28
[ "https://Stackoverflow.com/questions/59092732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6252815/" ]
A few different comments: In your ability.rb I'd say use ``` if user.role.name == 'admin' ``` instead of ``` if user.role.id == 5 ``` as unless you set your ids manually you may well have to change this for production. Also ``` can :update, PricesController if user.role.id == 3 ``` should be ``` can :updat...
The ability definition should be: ``` can :update, Price if user.role.id == 3 ``` You authorize models - not controllers. When calling authorize you should pass the resource instance you are updating or the class if there is no instance: ``` authorize! :read, @thing authorize! :index, Thing ``` But the controlle...
869,035
I've installed ubuntu 16.04 LTS, removing windows 7, through bootable pen. Everything went well during installation. With ubuntu already running, after doing all the updates, most of the times, after a while my touchpad and keyboard freezes. First, I'm unable to click anywhere but can move mouse, no keyboard working. T...
2017/01/07
[ "https://askubuntu.com/questions/869035", "https://askubuntu.com", "https://askubuntu.com/users/639292/" ]
It was the graphics driver - i installed nvidia and works like a champ now (same issue, same pc) [Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics](https://askubuntu.com/questions/760934/graphics-issues-after-while-installing-ubuntu-16-04-16-10-with-nvidia-graphics) basically - `Ctrl`+...
--- 1. sudo gedit /etc/default/grub GRUB\_CMDLINE\_LINUX\_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi\_enforce\_resources=lax" 2. sudo bash -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend' 3. sudo nano /lib/udev/rules.d/60-persistent-v4l.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="04f2", ATTRS{idProduc...
869,035
I've installed ubuntu 16.04 LTS, removing windows 7, through bootable pen. Everything went well during installation. With ubuntu already running, after doing all the updates, most of the times, after a while my touchpad and keyboard freezes. First, I'm unable to click anywhere but can move mouse, no keyboard working. T...
2017/01/07
[ "https://askubuntu.com/questions/869035", "https://askubuntu.com", "https://askubuntu.com/users/639292/" ]
Just want to thank and confirm this has helped me. TLDR: I use Dell Latitude E6420 with Ubuntu 21.10, the package name used is nvidia-driver-390. ``` sudo apt install nvidia-driver-390 ``` First I tried driver version 495 (package name: nvidia-driver-495), it rebooted and go to to safe graphics - 640x480 resolution...
--- 1. sudo gedit /etc/default/grub GRUB\_CMDLINE\_LINUX\_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi\_enforce\_resources=lax" 2. sudo bash -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend' 3. sudo nano /lib/udev/rules.d/60-persistent-v4l.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="04f2", ATTRS{idProduc...
47,142,652
I want to merge two text file and append new values in file using python. I've **file1.txt** and **file2.txt** - I want to take new value from file **file2.txt** and append to **file1.txt**. If same key is exist in file1.txt - then append new value with existing one or create a new line item. In this example - I've it...
2017/11/06
[ "https://Stackoverflow.com/questions/47142652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4714486/" ]
Let's start with creating your files: ``` with open("file1.txt", "w") as f: f.write("""itemNumber1 itemName1,itemModel1,itemPrice1,itemSoldby1|itemName11,itemModel11,itemPrice11,itemSoldby11|itemName12,itemModel12,itemPrice12,itemSoldby12| itemNumber2 itemName2,itemModel2,itemPrice2,itemSoldby2|itemName12,itemMode...
if you want you can try with the pythonic way using some list comprehension without using any external lib : ``` with open('jappa.txt','r') as file_a, open('appa.txt','r') as file_b: file_1=[item.split() for item in file_b] #storing file_1 content file_2=[item.split() for item in file_a] #storing file_2 conten...
1,234,650
[Banach limit](http://en.wikipedia.org/wiki/Banach_limit), as a non-constructive object, is not unique. The Banach limit for some sequences, say, convergent sequences, sequences satisfying $a\_n = a\_{n+m}$ for all $n$ and some $m$, the Banach limit is uniquely determined, but there also exists some bounded sequence $\...
2015/04/14
[ "https://math.stackexchange.com/questions/1234650", "https://math.stackexchange.com", "https://math.stackexchange.com/users/50681/" ]
As Andreas Caranti pointed out, there do exist finite extensions that are splitting fields and yet are not separable. I think now that the best way to make sense of the terminology is to abandon the idea of a "finite normal extension." Leave the definition of a **normal extension** $E$ of $F$ as a splitting field over ...
No, a finite extension can be a splitting field, and still not be separable. The standard example consists in taking a function field $E = F(t)$ over the field $F$ with $p$ elements, $p$ a prime. Then one takes the subfield $K = F(t^{p})$. Now $E$ is the splitting field over $K$ of the polynomial $f = x^{p} - t^{p} \i...
2,407,063
I'm looking at market stats here for sdk distribution: <http://developer.android.com/resources/dashboard/platform-versions.html> saying that 31% of marketplace users are still running 1.5. Is it true that an OS update went out for G1 and myTouch users? I'm wondering why so many people are still running 1.5 if so? Jus...
2010/03/09
[ "https://Stackoverflow.com/questions/2407063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/246114/" ]
Many devices are being announced with 1.5 but will be upgraded before or soon after launch, as I see it many rooted phones that came with 1.5 or lower are almost all at 1.6. Some $100 devices announced will never go higher than 1.6 because of performance issues unless Google actually optimizes newer versions of Android...
Reports suggest that most devices will be upgraded to 2.0 in the coming months and those that aren't will be running 1.6. So you have to weigh up the advantage of using the setView() method over the potential loss in device compatibility.
2,407,063
I'm looking at market stats here for sdk distribution: <http://developer.android.com/resources/dashboard/platform-versions.html> saying that 31% of marketplace users are still running 1.5. Is it true that an OS update went out for G1 and myTouch users? I'm wondering why so many people are still running 1.5 if so? Jus...
2010/03/09
[ "https://Stackoverflow.com/questions/2407063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/246114/" ]
Many devices are being announced with 1.5 but will be upgraded before or soon after launch, as I see it many rooted phones that came with 1.5 or lower are almost all at 1.6. Some $100 devices announced will never go higher than 1.6 because of performance issues unless Google actually optimizes newer versions of Android...
strangly enough LG is just releasing a new phone based on 1.5 <http://www.reghardware.co.uk/2010/03/17/review_phone_lg_gw620/>
2,407,063
I'm looking at market stats here for sdk distribution: <http://developer.android.com/resources/dashboard/platform-versions.html> saying that 31% of marketplace users are still running 1.5. Is it true that an OS update went out for G1 and myTouch users? I'm wondering why so many people are still running 1.5 if so? Jus...
2010/03/09
[ "https://Stackoverflow.com/questions/2407063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/246114/" ]
Many devices are being announced with 1.5 but will be upgraded before or soon after launch, as I see it many rooted phones that came with 1.5 or lower are almost all at 1.6. Some $100 devices announced will never go higher than 1.6 because of performance issues unless Google actually optimizes newer versions of Android...
I'm one of the users running 1.5 on my HTC Hero, this is not because I don't want to update but because they haven't released it yet, fortunately 2.1 is being released in April for Orange customers in the UK. Furthermore the reason some devices take some time to upgrade are mostly due to HTC improving and upgrading th...
53,926,260
I have tried calling kill from process A to process B and the process B has successful reacted to the signal. The problem is I don't want to send signals from the kill function directly for two reasons: 1) Sometimes the process A may not have the permissions, ex. process B is ran by another user 2) I want to be able ...
2018/12/25
[ "https://Stackoverflow.com/questions/53926260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3140379/" ]
Based upon your comments it seems that you want B to be able to receive messages but when it receives a "signal" message it needs to act like it received a regular signal. You mentioned that the B needed to react to `SIGTERM` or `SIGINT` from the "signal" message. The way to achieve this is depends upon using POSIX me...
Message queues can’t achieve how signals do. With signal it is possible to asynchronously interrupt or kill process but with message queue when receiving process checks message or wait on it and exits after receiving message, it actually will ignore that message rest of path of execution(synchronous). But, It is possib...
53,926,260
I have tried calling kill from process A to process B and the process B has successful reacted to the signal. The problem is I don't want to send signals from the kill function directly for two reasons: 1) Sometimes the process A may not have the permissions, ex. process B is ran by another user 2) I want to be able ...
2018/12/25
[ "https://Stackoverflow.com/questions/53926260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3140379/" ]
Based upon your comments it seems that you want B to be able to receive messages but when it receives a "signal" message it needs to act like it received a regular signal. You mentioned that the B needed to react to `SIGTERM` or `SIGINT` from the "signal" message. The way to achieve this is depends upon using POSIX me...
If you were using a POSIX message queues (using mq\_send/mq\_receive), then process B can request (with mq\_notify) to be sent a signal every time a message is sent to the message queue. However, your example seems to be using a SYSV legacy message queue (msgsnd) which does not suppport any kind of notify.
26,146,712
I want upload a file to my account in google drive. This process should be without human intervention. Is there any way to upload a file in my google drive using the google drive api providing my user and my password? What I've done so far: * I created a project in <https://console.developers.google.com> and enable...
2014/10/01
[ "https://Stackoverflow.com/questions/26146712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2871845/" ]
It should be possible by using [Eclipse Tycho](http://www.eclipse.org/tycho/). You'll be using maven and that works perfectly with IntellIj. > > Tycho is focused on a Maven-centric, manifest-first approach to building **Eclipse** plug-ins, features, update sites, RCP applications and OSGi bundles. Tycho is a set of ...
It might be possible using [Osmorc](https://plugins.jetbrains.com/plugin/1816-osmorc), but I haven't tried that. However, I have a method that works (using IntelliJ 2017.1, but it should be similar for other versions). It does not require Eclipse Tycho, which I couldn't use because my plugin used XCore which doesn't se...
1,582,844
I found this problem on an old FB post and have just been humbled by it. Let $f(x)$ be continuous on $[0,n]$ such that $n > 0$ and $f(x) + f(n - x)$ does not vanish on $[0,n]$ then evaluate $$ \int\_0^n \frac{f(x)}{f(x) + f(n-x)}dx $$ Any clues/hints would be appreciated.
2015/12/20
[ "https://math.stackexchange.com/questions/1582844", "https://math.stackexchange.com", "https://math.stackexchange.com/users/80630/" ]
Let $\displaystyle I = \int\_0^n \frac{f(x)}{f(x) + f(n-x)}dx$ Let $y = n-x$ Then $dy = -dx$ and $\displaystyle I = -\int\_n^0 \frac{f(n-y)}{f(n-y) + f(y)}dy = \int\_0^n \frac{f(n-x)}{f(n-x) + f(x)}dx$ So \begin{align} 2I &= I + I\\ 2I &= \int\_0^n \frac{f(x)}{f(x) + f(n-x)}dx + \int\_0^n \frac{f(n-x)}{f(n-x) + f...
Let $I$ be our integral. Make the substitution $u=n-x$. After you have completed the change of variable, change the dummy variable of integration back to $x$. We now have a new expression for $I$. Add the old expression, and *look*.
518,211
rpmbuild will scan Perl modules to find Perl dependencies, but it doesn't understand optional modules and its generated Perl module requirement list will often be wrong. How can I turn this feature off *just for Perl dependencies*, but leave the rest of the automatic features on? I've tried `AutoReqProv: no` but that a...
2012/12/12
[ "https://superuser.com/questions/518211", "https://superuser.com", "https://superuser.com/users/22550/" ]
If you want to exclude specific file or dir from scan path for dependencies, try something like this: ``` %filter_requires_in %{_datarootdir}/%{name}/extra %filter_setup ``` You can use following macros: * %filter\_from\_requires * %filter\_requires\_in These are all macros from 'redhat-rpm-config' RPM package. Fo...
``` /usr/lib/rpm/macros.perl ``` There are all global macros defined, you could define them to something that does nothing. Otherwise it will be most likely in the generic macros in the same directory.
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
We did some of the using NHibernate, however we stopped the project since it didn't provide us with the ROI we wanted. We ended up writing our own ORM/SQL layer which worked very well (worked since I no longer work there, I'm guessing it still works). Our system used a open source project to generate the SQL (don't re...
I am a little confused as to how the orm would be used then at runtime? If the ORM would dynamically build something at runtime, how does the runtime code know what the orm did dynamically? "have it at that point allow me to manipulate the data" - What is manipulating the data? I may be missing something here and i...
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
Acording to this blog you can in fact use [NHibernate with dynamic mapping](http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx). It takes a bit of tweaking though...
I am a little confused as to how the orm would be used then at runtime? If the ORM would dynamically build something at runtime, how does the runtime code know what the orm did dynamically? "have it at that point allow me to manipulate the data" - What is manipulating the data? I may be missing something here and i...
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
We did some of the using NHibernate, however we stopped the project since it didn't provide us with the ROI we wanted. We ended up writing our own ORM/SQL layer which worked very well (worked since I no longer work there, I'm guessing it still works). Our system used a open source project to generate the SQL (don't re...
IDataReader doesn't map anything to an object you know. So your example should be written using classic query builder.
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
Acording to this blog you can in fact use [NHibernate with dynamic mapping](http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx). It takes a bit of tweaking though...
IDataReader doesn't map anything to an object you know. So your example should be written using classic query builder.
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
We did some of the using NHibernate, however we stopped the project since it didn't provide us with the ROI we wanted. We ended up writing our own ORM/SQL layer which worked very well (worked since I no longer work there, I'm guessing it still works). Our system used a open source project to generate the SQL (don't re...
Have you looked into using the ADO.NET Entity Framework? [MSDN: LINQ to Entities](http://msdn.microsoft.com/en-us/library/bb386964.aspx) It allows you to map database tables to an object model in such a manner that you can code without thinking about which database vendor is being used, and without worrying about min...
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
Acording to this blog you can in fact use [NHibernate with dynamic mapping](http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx). It takes a bit of tweaking though...
We did some of the using NHibernate, however we stopped the project since it didn't provide us with the ROI we wanted. We ended up writing our own ORM/SQL layer which worked very well (worked since I no longer work there, I'm guessing it still works). Our system used a open source project to generate the SQL (don't re...
136,366
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework (latest Framework is okay) 2) Must be able to use Sybase, Oracle, MSSQL interchangeably 3) The schema is mostly static, BUT there are dynamic parts. I am somewhat familiar with SubSonic and NHibernate, but not deeply. I get...
2008/09/25
[ "https://Stackoverflow.com/questions/136366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12706/" ]
Acording to this blog you can in fact use [NHibernate with dynamic mapping](http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx). It takes a bit of tweaking though...
Have you looked into using the ADO.NET Entity Framework? [MSDN: LINQ to Entities](http://msdn.microsoft.com/en-us/library/bb386964.aspx) It allows you to map database tables to an object model in such a manner that you can code without thinking about which database vendor is being used, and without worrying about min...
11,312
Are there any restrictions on cashing a high-value personal check (say just less than $100,000) from a bank where I don't hold an account. My friend will give me a check for the amount from BofA, but my account is with Chase. 1. How long will it take for the amount to become available in my Chase account? 2. Will I b...
2011/09/30
[ "https://money.stackexchange.com/questions/11312", "https://money.stackexchange.com", "https://money.stackexchange.com/users/4669/" ]
No regulatory restrictions Your bank might hold it for an extra amount of time, you can ask them to lift that before you deposit it.
The last time I tried to cash a payroll check (not a personal check), drawn from BoA, at BoA, when I did not hold an account there, they were going to charge me. I would have gotten cash immediately, but I opted not to pay their fee. I don't remember the fee, and it's been about 5 years, so things may have changed. Yo...
11,312
Are there any restrictions on cashing a high-value personal check (say just less than $100,000) from a bank where I don't hold an account. My friend will give me a check for the amount from BofA, but my account is with Chase. 1. How long will it take for the amount to become available in my Chase account? 2. Will I b...
2011/09/30
[ "https://money.stackexchange.com/questions/11312", "https://money.stackexchange.com", "https://money.stackexchange.com/users/4669/" ]
What happened in my case. 1. I deposited the amount in my Chase account, and it was available for me the next morning. I did tell the teller that it was kind of urgent and she told me that it will be available after clearing at midnight. 2. I was not able to cash the check at BofA, as they said the branches will not h...
No regulatory restrictions Your bank might hold it for an extra amount of time, you can ask them to lift that before you deposit it.
11,312
Are there any restrictions on cashing a high-value personal check (say just less than $100,000) from a bank where I don't hold an account. My friend will give me a check for the amount from BofA, but my account is with Chase. 1. How long will it take for the amount to become available in my Chase account? 2. Will I b...
2011/09/30
[ "https://money.stackexchange.com/questions/11312", "https://money.stackexchange.com", "https://money.stackexchange.com/users/4669/" ]
No regulatory restrictions Your bank might hold it for an extra amount of time, you can ask them to lift that before you deposit it.
While there is not a regulatory restriction, the bank can choose not to cash the check (its a private entity remember). In general, I would not accept a personal check of that size for several reasons 1) Any amount of $10,000 MUST be reported to the government so they can investigate potential fraud claims. 2) Most ...
11,312
Are there any restrictions on cashing a high-value personal check (say just less than $100,000) from a bank where I don't hold an account. My friend will give me a check for the amount from BofA, but my account is with Chase. 1. How long will it take for the amount to become available in my Chase account? 2. Will I b...
2011/09/30
[ "https://money.stackexchange.com/questions/11312", "https://money.stackexchange.com", "https://money.stackexchange.com/users/4669/" ]
What happened in my case. 1. I deposited the amount in my Chase account, and it was available for me the next morning. I did tell the teller that it was kind of urgent and she told me that it will be available after clearing at midnight. 2. I was not able to cash the check at BofA, as they said the branches will not h...
The last time I tried to cash a payroll check (not a personal check), drawn from BoA, at BoA, when I did not hold an account there, they were going to charge me. I would have gotten cash immediately, but I opted not to pay their fee. I don't remember the fee, and it's been about 5 years, so things may have changed. Yo...
11,312
Are there any restrictions on cashing a high-value personal check (say just less than $100,000) from a bank where I don't hold an account. My friend will give me a check for the amount from BofA, but my account is with Chase. 1. How long will it take for the amount to become available in my Chase account? 2. Will I b...
2011/09/30
[ "https://money.stackexchange.com/questions/11312", "https://money.stackexchange.com", "https://money.stackexchange.com/users/4669/" ]
What happened in my case. 1. I deposited the amount in my Chase account, and it was available for me the next morning. I did tell the teller that it was kind of urgent and she told me that it will be available after clearing at midnight. 2. I was not able to cash the check at BofA, as they said the branches will not h...
While there is not a regulatory restriction, the bank can choose not to cash the check (its a private entity remember). In general, I would not accept a personal check of that size for several reasons 1) Any amount of $10,000 MUST be reported to the government so they can investigate potential fraud claims. 2) Most ...
31,041,243
I've gone through and fuzzy matched each element in a list of 20,000+ movie titles with each other element, which returns a value for each pair: ``` from fuzzywuzzy import fuzz titles = ['Scary Movie', 'Happy Movie', 'Sappy Movie', 'Crappy Movie'] print fuzz.ratio(titles[2],titles[3]) >>> 91 #/100 higher value deno...
2015/06/25
[ "https://Stackoverflow.com/questions/31041243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2001075/" ]
Using list comprehensions and `itertools.product`: ``` from itertools import product [(x, y, fuzz.ratio(x, y)) for (x, y) in product(titles, repeat=2)] ``` Nice and lazy solution using [`toolz`](https://github.com/pytoolz/toolz) ``` from toolz.curried import pipe, filter, map pipe( product(titles, repeat=2), ...
Maybe you can store the `fuzzed` ratio in a dictionary with the `(x,y)` tuple as the key, would make it easier to search the `ratio` for each pair later on. For that you can create an empty dictionary outside the for loop , and then in for loop assign the `fuzz.ratio(x , y)` to the key `(x, y)` for that dictionary. Ex...
31,041,243
I've gone through and fuzzy matched each element in a list of 20,000+ movie titles with each other element, which returns a value for each pair: ``` from fuzzywuzzy import fuzz titles = ['Scary Movie', 'Happy Movie', 'Sappy Movie', 'Crappy Movie'] print fuzz.ratio(titles[2],titles[3]) >>> 91 #/100 higher value deno...
2015/06/25
[ "https://Stackoverflow.com/questions/31041243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2001075/" ]
You only need to iterate over [`combinations`](https://docs.python.org/3/library/itertools.html#itertools.combinations) of the titles since the ratio doesn't depend on the order. This is significantly faster than iterating over a [`product`](https://docs.python.org/3/library/itertools.html#itertools.product) of it. Fo...
Maybe you can store the `fuzzed` ratio in a dictionary with the `(x,y)` tuple as the key, would make it easier to search the `ratio` for each pair later on. For that you can create an empty dictionary outside the for loop , and then in for loop assign the `fuzz.ratio(x , y)` to the key `(x, y)` for that dictionary. Ex...
31,041,243
I've gone through and fuzzy matched each element in a list of 20,000+ movie titles with each other element, which returns a value for each pair: ``` from fuzzywuzzy import fuzz titles = ['Scary Movie', 'Happy Movie', 'Sappy Movie', 'Crappy Movie'] print fuzz.ratio(titles[2],titles[3]) >>> 91 #/100 higher value deno...
2015/06/25
[ "https://Stackoverflow.com/questions/31041243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2001075/" ]
Using list comprehensions and `itertools.product`: ``` from itertools import product [(x, y, fuzz.ratio(x, y)) for (x, y) in product(titles, repeat=2)] ``` Nice and lazy solution using [`toolz`](https://github.com/pytoolz/toolz) ``` from toolz.curried import pipe, filter, map pipe( product(titles, repeat=2), ...
You only need to iterate over [`combinations`](https://docs.python.org/3/library/itertools.html#itertools.combinations) of the titles since the ratio doesn't depend on the order. This is significantly faster than iterating over a [`product`](https://docs.python.org/3/library/itertools.html#itertools.product) of it. Fo...
37,081,107
In my project I have to track any vehicle through google map. In that case I have to update the marker position after 1 minute set by me . But my problem is that every time the google map get refreshed . Here is my code : ``` public class MapsActivity extends FragmentActivity { private GoogleMap mMap; String json_st...
2016/05/06
[ "https://Stackoverflow.com/questions/37081107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5033709/" ]
Using Events is perhaps the easiest way to do this sort of thing. Basically, add a library like [EventBus](https://github.com/greenrobot/EventBus) and every time you receive a new location data, inside your **onEvent()** method, update your marker position on the map. The easiest way would be to clear the map first t...
I guess you need to specify the icon for: ``` MarkerOptions options = new MarkerOptions() .position(latLng) .icon(R.drawable.pin_stop) .title(imei); mMap.addMarker(options); ```
35,894,442
I am using the jQuery DataTables plugin (<https://datatables.net/>). I am trying to get the last page to be the first page. I am sorting by date and would like the latest entries to be at the bottom of the visible area. So if the "Records per page:" is 10, then the latest date should be at the bottom. I am using the ...
2016/03/09
[ "https://Stackoverflow.com/questions/35894442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Please check this code: `$('#datatable').DataTable().page('last').draw('page');`
It turns out it was as simple as capitalizing the "D" in dataTables. Changed: ``` var table_companies = $('#table_companies').dataTable({ ``` to: ``` var table_companies = $('#table_companies').DataTable({ ```
129,298
Recently, I got hired as a pharmacy technician at a mom and pop shop in my hometown. I'm fresh out of school and don't have a lot of experience in a pharmacy. I like my new job because its a steady pace work environment and very laid back. I've made a few mistakes since I've started working but nothing extreme, but the...
2019/02/16
[ "https://workplace.stackexchange.com/questions/129298", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/99888/" ]
Everyone makes mistakes; even people who are great at their job do. Try to not take it so hard; that serves no purpose and only stresses you out (which makes it more likely you will make mistakes). What you do need to do is learn from your mistakes and apologize when you make them. As far as your coworkers and their a...
Be open and friendly and try to do the best that you can. The other employee is likely annoyed at you because they feel that they gave you a simple instruction and you didn't follow it. This could be your fault due to some misunderstanding or it might be their fault due to insufficiently clear instructions (both of th...
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
You cant go far without mastering templates in C++ if your writing code on windows. ATL, STL and various other windows libraries heavily use templates. Side note\*. If your using visual studio , you might want to learn the quirks which are used in visual studio to support templates. For example , many windows librarie...
I'd say understanding templates is a requirement for modern C++ style and idioms and getting the most out of the language. They aren't as difficult as one is often made to believe. If you are a beginner I'd absolutely recommend a book like [Accelerated C++](http://www.buschnick.net/Book_Reviews/About.shtml#Accelerated%...
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
Of course they are used in the industry. Just look at the Standard Template Library (STL)! You definitely should know how to work with templates, and better, learn how to do some fancy things with them like template metaprogramming, ok, that may be optional, but template classes are not! **EDIT:** Even more, a lot of...
I'd say understanding templates is a requirement for modern C++ style and idioms and getting the most out of the language. They aren't as difficult as one is often made to believe. If you are a beginner I'd absolutely recommend a book like [Accelerated C++](http://www.buschnick.net/Book_Reviews/About.shtml#Accelerated%...
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
You'll need them sooner or later ;) But for a beginner they are a bit tricky to write (but easy to use, so use STL intensively). And after mastering other c++ skills (const-correctness, operators overloading, learning about compilation units etc) and gaining some experience you will start coding templates for yourself....
Of course they are used in the industry. Just look at the Standard Template Library (STL)! You definitely should know how to work with templates, and better, learn how to do some fancy things with them like template metaprogramming, ok, that may be optional, but template classes are not! **EDIT:** Even more, a lot of...
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
At my employer, the **main** thing we use that's in C++ and not in C is indeed generics, AKA "templates". Inheritance &c are nice (but with pluses and minuses), but templates are *absolutely crucial* -- **the** main, cost-less advantage of C++ over plain C. Master them, you **won't** be wasting time!-)
No, don't spend to much time on learning how to **implement** them. The other answers correctly explain that you certainly should learn how to *use* them. That makes sense; many libraries provide class templates and you should be learn to use those libraries. But writing your own templates is much rarer.
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
Of course they are used in the industry. Just look at the Standard Template Library (STL)! You definitely should know how to work with templates, and better, learn how to do some fancy things with them like template metaprogramming, ok, that may be optional, but template classes are not! **EDIT:** Even more, a lot of...
No, don't spend to much time on learning how to **implement** them. The other answers correctly explain that you certainly should learn how to *use* them. That makes sense; many libraries provide class templates and you should be learn to use those libraries. But writing your own templates is much rarer.
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
In addition to what the others said, they can be incredibly useful in your own code, and you definitely will come across it while reading others', so there is no harm in learning it.
No, don't spend to much time on learning how to **implement** them. The other answers correctly explain that you certainly should learn how to *use* them. That makes sense; many libraries provide class templates and you should be learn to use those libraries. But writing your own templates is much rarer.
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
You'll need them sooner or later ;) But for a beginner they are a bit tricky to write (but easy to use, so use STL intensively). And after mastering other c++ skills (const-correctness, operators overloading, learning about compilation units etc) and gaining some experience you will start coding templates for yourself....
I'd say understanding templates is a requirement for modern C++ style and idioms and getting the most out of the language. They aren't as difficult as one is often made to believe. If you are a beginner I'd absolutely recommend a book like [Accelerated C++](http://www.buschnick.net/Book_Reviews/About.shtml#Accelerated%...
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
You'll need them sooner or later ;) But for a beginner they are a bit tricky to write (but easy to use, so use STL intensively). And after mastering other c++ skills (const-correctness, operators overloading, learning about compilation units etc) and gaining some experience you will start coding templates for yourself....
No, don't spend to much time on learning how to **implement** them. The other answers correctly explain that you certainly should learn how to *use* them. That makes sense; many libraries provide class templates and you should be learn to use those libraries. But writing your own templates is much rarer.
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
At my employer, the **main** thing we use that's in C++ and not in C is indeed generics, AKA "templates". Inheritance &c are nice (but with pluses and minuses), but templates are *absolutely crucial* -- **the** main, cost-less advantage of C++ over plain C. Master them, you **won't** be wasting time!-)
As others have noted, Templates are a very important part of the C++ language. In fact, they're a turing-complete language themselves ;) However, not only does the STL make heavy use of templates (ever used std::vector or std::pair?), lots of other libraries do, too... the most notable is probably boost. I hope that gi...
1,727,266
I'm new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?
2009/11/13
[ "https://Stackoverflow.com/questions/1727266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/210204/" ]
You'll need them sooner or later ;) But for a beginner they are a bit tricky to write (but easy to use, so use STL intensively). And after mastering other c++ skills (const-correctness, operators overloading, learning about compilation units etc) and gaining some experience you will start coding templates for yourself....
As others have noted, Templates are a very important part of the C++ language. In fact, they're a turing-complete language themselves ;) However, not only does the STL make heavy use of templates (ever used std::vector or std::pair?), lots of other libraries do, too... the most notable is probably boost. I hope that gi...
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can check its parent task ID, using `getppid()`
You can check whether its standard input is a terminal: ``` if(isatty(0)) { ... } ```
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can't find out in general whether a program was started "from the command line" (by a user's explicit command), but you can find out whether its standard input and output are talking to a terminal/command window: ``` #include <unistd.h> isatty(fileno(stdin)) ``` and `stdout` return whether standard input/standar...
I would set an environment variable, in the parent process, to some value (say the parent pid), and have the child process check for it. It is unlikely that a shell user would set this variable (call it something unlikely to name-clash), so if this variable is set to the expected value, then you know that it is being ...
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can't find out in general whether a program was started "from the command line" (by a user's explicit command), but you can find out whether its standard input and output are talking to a terminal/command window: ``` #include <unistd.h> isatty(fileno(stdin)) ``` and `stdout` return whether standard input/standar...
You can check whether its standard input is a terminal: ``` if(isatty(0)) { ... } ```
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can't find out in general whether a program was started "from the command line" (by a user's explicit command), but you can find out whether its standard input and output are talking to a terminal/command window: ``` #include <unistd.h> isatty(fileno(stdin)) ``` and `stdout` return whether standard input/standar...
In short: you can't doing it directly. In long: look you can check the `getppid()` value and compare it with the `bash` PID or`b.out` PID TO search for a process inside the process table with Known PID with C you can do this: 1) get the `PPID` of `a.out` and search with this value in `/porc` and then if you fin...
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
I would set an environment variable, in the parent process, to some value (say the parent pid), and have the child process check for it. It is unlikely that a shell user would set this variable (call it something unlikely to name-clash), so if this variable is set to the expected value, then you know that it is being ...
You can check whether its standard input is a terminal: ``` if(isatty(0)) { ... } ```
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can't find out in general whether a program was started "from the command line" (by a user's explicit command), but you can find out whether its standard input and output are talking to a terminal/command window: ``` #include <unistd.h> isatty(fileno(stdin)) ``` and `stdout` return whether standard input/standar...
You can check its parent task ID, using `getppid()`
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can do multiple things, but none will be 100% reliable: * `isatty(0)` to check whether standard input is a TTY terminal, * check for the parent task ID (`getppid()`), then lookup the parent's PID to match it against its executable's path (using whatever you want. a call to `ps` and some parsing could do, or have f...
You can check whether its standard input is a terminal: ``` if(isatty(0)) { ... } ```
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can check its parent task ID, using `getppid()`
In short: you can't doing it directly. In long: look you can check the `getppid()` value and compare it with the `bash` PID or`b.out` PID TO search for a process inside the process table with Known PID with C you can do this: 1) get the `PPID` of `a.out` and search with this value in `/porc` and then if you fin...
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can do multiple things, but none will be 100% reliable: * `isatty(0)` to check whether standard input is a TTY terminal, * check for the parent task ID (`getppid()`), then lookup the parent's PID to match it against its executable's path (using whatever you want. a call to `ps` and some parsing could do, or have f...
In short: you can't doing it directly. In long: look you can check the `getppid()` value and compare it with the `bash` PID or`b.out` PID TO search for a process inside the process table with Known PID with C you can do this: 1) get the `PPID` of `a.out` and search with this value in `/porc` and then if you fin...
3,957,807
I have a simple C/CPP process running on a linux system. This is a.out. Another process is capable to start a.out inside its code. This is b.out. What code do I need inside a.out to understand that it is executed from the command line? Eg ./a.out Is there a way a process to know if it started from the cmd or started...
2010/10/18
[ "https://Stackoverflow.com/questions/3957807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270661/" ]
You can't find out in general whether a program was started "from the command line" (by a user's explicit command), but you can find out whether its standard input and output are talking to a terminal/command window: ``` #include <unistd.h> isatty(fileno(stdin)) ``` and `stdout` return whether standard input/standar...
You can do multiple things, but none will be 100% reliable: * `isatty(0)` to check whether standard input is a TTY terminal, * check for the parent task ID (`getppid()`), then lookup the parent's PID to match it against its executable's path (using whatever you want. a call to `ps` and some parsing could do, or have f...
69,213
![enter image description here](https://i.stack.imgur.com/OpMn3.png) As shown in this image, I am unable to create a SPUserToken or run the SPSecurity.RunWithElevatedPrivileges() delegate in order to elevate the current user for the purpose of managing list item permissions. Is there a different Microsoft.Sharepoint l...
2013/05/27
[ "https://sharepoint.stackexchange.com/questions/69213", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/17261/" ]
My guess would be that you've selected the default of creating a "Sandboxed solution" in which `SPUserToken` and `SPSecurity` isn't supported. If you need to run elevated, then your solution should be a Farm solution (or and app with AllowAppOnlyPolicy). Click the SharePoint project node ('DOCApp') and check the prop...
Have you tried with complete code for `RunWithElevatedPrivileges` or `SPUserToken` code? It seems that you have correctly referred the `Microsoft.SharePoint` (in Microsoft.SharePoint.dll) assembly in source code. Try an example below with `RunWithElevatedPrivileges`: ``` SPSecurity.RunWithElevatedPrivileges(delegate(...
41,452,797
So, I have very little coding background and hence have absolutely no idea how to even approach this. I'm trying to browse [Fortune Tech](http://fortune.com/tech/ "Fortune Tech") to read news from most of 2016 and there's a link when you scroll to the end which you need to click in order to view more headlines. It sa...
2017/01/03
[ "https://Stackoverflow.com/questions/41452797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3745962/" ]
I can help get you started. You will want to download the extension [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en) so you can inject code into a webpage automatically. This is the code you want to have in a custom script. ``` // ==UserScript== // @name ...
**Using JQuery:** ``` $('#section-see-more').click(); $('html, body').animate({ scrollTop: $(document).height()-$(window).height()}, 1400, "easeOutQuint" ); ``` The website you mentioned does not currently have jQuery on it, so you would have to load it into the page manually. This is a tedious process ...
2,863,557
Let's take a **really simple example** on using jQuery to ajaxify our page... ``` $.load("getOrders.aspx", {limit: 25}, function(data) { // info as JSON is available in the data variable }); ``` and in the ASP.NET (**HTML part**) page *(only one line)* ``` <%@ Page Language="C#" AutoEventWireup="true" ...
2010/05/19
[ "https://Stackoverflow.com/questions/2863557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
Basic page life cycle will answer your question Full article : <http://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle.aspx> ![alt text](https://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle/9.jpg) check same question answer : [Page.Request behaviour](https://stackoverflow.com/questions/2719554/page-reque...
You can very well use the Page Init method. But if you have controls in your page and want to access any property of those controls then better to use the Page load event, but in your case you don't need to use page load event. You can go through the [Asp.Net Page Life cycle here](http://msdn.microsoft.com/en-us/libr...
2,863,557
Let's take a **really simple example** on using jQuery to ajaxify our page... ``` $.load("getOrders.aspx", {limit: 25}, function(data) { // info as JSON is available in the data variable }); ``` and in the ASP.NET (**HTML part**) page *(only one line)* ``` <%@ Page Language="C#" AutoEventWireup="true" ...
2010/05/19
[ "https://Stackoverflow.com/questions/2863557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
Basic page life cycle will answer your question Full article : <http://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle.aspx> ![alt text](https://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle/9.jpg) check same question answer : [Page.Request behaviour](https://stackoverflow.com/questions/2719554/page-reque...
Page life-cycle only has meanings in context of page elements (controls), so i don't see any differences in your case, since you don't have any other child controls in your page - this is totally irrelevant. But here is the real question: if you don't have any rendering of html in your page (only data serialization), ...
2,863,557
Let's take a **really simple example** on using jQuery to ajaxify our page... ``` $.load("getOrders.aspx", {limit: 25}, function(data) { // info as JSON is available in the data variable }); ``` and in the ASP.NET (**HTML part**) page *(only one line)* ``` <%@ Page Language="C#" AutoEventWireup="true" ...
2010/05/19
[ "https://Stackoverflow.com/questions/2863557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
Either one would work, because you're essentially throwing out the page lifecycle by calling response.Clear() and response.End(). Technically you could even go as far as putting that code in prerender and it would work. By accessing the Response object you're basically going over the head of the page and cutting it off...
You can very well use the Page Init method. But if you have controls in your page and want to access any property of those controls then better to use the Page load event, but in your case you don't need to use page load event. You can go through the [Asp.Net Page Life cycle here](http://msdn.microsoft.com/en-us/libr...
2,863,557
Let's take a **really simple example** on using jQuery to ajaxify our page... ``` $.load("getOrders.aspx", {limit: 25}, function(data) { // info as JSON is available in the data variable }); ``` and in the ASP.NET (**HTML part**) page *(only one line)* ``` <%@ Page Language="C#" AutoEventWireup="true" ...
2010/05/19
[ "https://Stackoverflow.com/questions/2863557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
Page life-cycle only has meanings in context of page elements (controls), so i don't see any differences in your case, since you don't have any other child controls in your page - this is totally irrelevant. But here is the real question: if you don't have any rendering of html in your page (only data serialization), ...
You can very well use the Page Init method. But if you have controls in your page and want to access any property of those controls then better to use the Page load event, but in your case you don't need to use page load event. You can go through the [Asp.Net Page Life cycle here](http://msdn.microsoft.com/en-us/libr...
2,863,557
Let's take a **really simple example** on using jQuery to ajaxify our page... ``` $.load("getOrders.aspx", {limit: 25}, function(data) { // info as JSON is available in the data variable }); ``` and in the ASP.NET (**HTML part**) page *(only one line)* ``` <%@ Page Language="C#" AutoEventWireup="true" ...
2010/05/19
[ "https://Stackoverflow.com/questions/2863557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
Either one would work, because you're essentially throwing out the page lifecycle by calling response.Clear() and response.End(). Technically you could even go as far as putting that code in prerender and it would work. By accessing the Response object you're basically going over the head of the page and cutting it off...
Page life-cycle only has meanings in context of page elements (controls), so i don't see any differences in your case, since you don't have any other child controls in your page - this is totally irrelevant. But here is the real question: if you don't have any rendering of html in your page (only data serialization), ...
36,557,070
I have the following code on my build.gradle: ``` productFlavors { juridico { applicationId "br.com.eit.appprovaconcursos" } enem { applicationId "com.ioasys.appprova" } } buildTypes { defaultConfig { debuggable false mini...
2016/04/11
[ "https://Stackoverflow.com/questions/36557070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1107651/" ]
I found out this weird result comes from `testCoverageEnabled true`. If your release build enabled test coverage, it generates coverage reports then your APK becomes debuggable APK. Set `testCoverageEnabled` to `false` solve the problem, and it also make sense to not generating coverage reports on release build.
As workaround I set debuggable to true in the defaultConfig and in release I override the configuration and set debuggable to false.
59,263,080
``` #include <cstring> char* str0; const char* str1 = "abc"; // assign str1 to str0 strcpy(str0, str1); // syntax correct, but run time error str0 = str1; // syntax error, cannot convert const char* to char* string n_str = str1; str0 = n_str; // syntax error, cannot convert ... cout << str0 << ...
2019/12/10
[ "https://Stackoverflow.com/questions/59263080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12509180/" ]
``` std::string str0; const std::string str1 = "abc"; // assign str1 to str0 str0 = str1; cout << str0 << endl; // output: abc ``` If you insist on using C: ``` char* str0; const char* str1 = "abc"; str0 = malloc(strlen(str1) + 1); // if you use a c++ compiler you need instead: // str0 = (char*) malloc(strlen(st...
`const` is part of the type, and as such, you can cast it "away". This is considered bad practice, but you should think of `const` as a strong suggestion of the original programmer, not to modify it. ``` const char * str1 = "abc"; char * str2 = (char*) str1; ```
59,263,080
``` #include <cstring> char* str0; const char* str1 = "abc"; // assign str1 to str0 strcpy(str0, str1); // syntax correct, but run time error str0 = str1; // syntax error, cannot convert const char* to char* string n_str = str1; str0 = n_str; // syntax error, cannot convert ... cout << str0 << ...
2019/12/10
[ "https://Stackoverflow.com/questions/59263080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12509180/" ]
Copying `strings` is an expensive operation. But moving `strings` from one place to another is efficient. casts away the `const` ```cpp str0 = (char*) str1; ``` or use `std::string` class template library for managing strings. `std::string` owns the character buffer that stores the string value. characters are part...
`const` is part of the type, and as such, you can cast it "away". This is considered bad practice, but you should think of `const` as a strong suggestion of the original programmer, not to modify it. ``` const char * str1 = "abc"; char * str2 = (char*) str1; ```
59,263,080
``` #include <cstring> char* str0; const char* str1 = "abc"; // assign str1 to str0 strcpy(str0, str1); // syntax correct, but run time error str0 = str1; // syntax error, cannot convert const char* to char* string n_str = str1; str0 = n_str; // syntax error, cannot convert ... cout << str0 << ...
2019/12/10
[ "https://Stackoverflow.com/questions/59263080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12509180/" ]
Let's look one issue at a time ```cpp strcpy(str0, str1); ``` [strcpy](https://en.cppreference.com/w/cpp/string/byte/strcpy) copies the characters pointed by str1 into the memory pointed by str0. str1 points to "abc", but str0 doesn't point to anything, hence the runtime error. I would recommend using std::string ev...
`const` is part of the type, and as such, you can cast it "away". This is considered bad practice, but you should think of `const` as a strong suggestion of the original programmer, not to modify it. ``` const char * str1 = "abc"; char * str2 = (char*) str1; ```
59,263,080
``` #include <cstring> char* str0; const char* str1 = "abc"; // assign str1 to str0 strcpy(str0, str1); // syntax correct, but run time error str0 = str1; // syntax error, cannot convert const char* to char* string n_str = str1; str0 = n_str; // syntax error, cannot convert ... cout << str0 << ...
2019/12/10
[ "https://Stackoverflow.com/questions/59263080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12509180/" ]
``` std::string str0; const std::string str1 = "abc"; // assign str1 to str0 str0 = str1; cout << str0 << endl; // output: abc ``` If you insist on using C: ``` char* str0; const char* str1 = "abc"; str0 = malloc(strlen(str1) + 1); // if you use a c++ compiler you need instead: // str0 = (char*) malloc(strlen(st...
Copying `strings` is an expensive operation. But moving `strings` from one place to another is efficient. casts away the `const` ```cpp str0 = (char*) str1; ``` or use `std::string` class template library for managing strings. `std::string` owns the character buffer that stores the string value. characters are part...
59,263,080
``` #include <cstring> char* str0; const char* str1 = "abc"; // assign str1 to str0 strcpy(str0, str1); // syntax correct, but run time error str0 = str1; // syntax error, cannot convert const char* to char* string n_str = str1; str0 = n_str; // syntax error, cannot convert ... cout << str0 << ...
2019/12/10
[ "https://Stackoverflow.com/questions/59263080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12509180/" ]
Let's look one issue at a time ```cpp strcpy(str0, str1); ``` [strcpy](https://en.cppreference.com/w/cpp/string/byte/strcpy) copies the characters pointed by str1 into the memory pointed by str0. str1 points to "abc", but str0 doesn't point to anything, hence the runtime error. I would recommend using std::string ev...
Copying `strings` is an expensive operation. But moving `strings` from one place to another is efficient. casts away the `const` ```cpp str0 = (char*) str1; ``` or use `std::string` class template library for managing strings. `std::string` owns the character buffer that stores the string value. characters are part...
37,536,232
When i try to use AngularJs with SemanticUI.js, the console says > > Uncaught ReferenceError : jQuery is not defined > > > Here is my example of implementation : ``` <html> <head> <!-- I'm head of the document --> </head> <body> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/angular.min...
2016/05/31
[ "https://Stackoverflow.com/questions/37536232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4484016/" ]
This seems pretty straightforward: just use `sum()`, don't mess around with `lag()` ... Get data: ``` df<- read.table(header=TRUE, text=" ID DRUG FED DVID CONC 1 1 1 1 20 1 1 1 2 40 2 2 0 1 30 2 2 0 2 100 ") ``` Process: ``` library(dplyr) df %>% group...
A simple Base R approach would be using `aggregate` ``` aggregate(CONC ~ ID + DRUG + FED, df, sum) # ID DRUG FED CONC #1 2 2 0 130 #2 1 1 1 60 ```
37,536,232
When i try to use AngularJs with SemanticUI.js, the console says > > Uncaught ReferenceError : jQuery is not defined > > > Here is my example of implementation : ``` <html> <head> <!-- I'm head of the document --> </head> <body> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/angular.min...
2016/05/31
[ "https://Stackoverflow.com/questions/37536232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4484016/" ]
This seems pretty straightforward: just use `sum()`, don't mess around with `lag()` ... Get data: ``` df<- read.table(header=TRUE, text=" ID DRUG FED DVID CONC 1 1 1 1 20 1 1 1 2 40 2 2 0 1 30 2 2 0 2 100 ") ``` Process: ``` library(dplyr) df %>% group...
Or from `data.table` ``` library(data.table) setDT(df)[, .(SumConc = sum(CONC)), .(ID, DRUG, FED)] # ID DRUG FED SumConc #1: 1 1 1 60 #2: 2 2 0 130 ```
51,626
My goal is to compare a calculated bond length with experimental data. Benzene is obviously common enough to expect sufficient experimental data to be available for it on the internet. I have found two sources for the C-C bond length in benzene, and the numbers differ very slightly. [This source](http://www.britannic...
2016/05/23
[ "https://chemistry.stackexchange.com/questions/51626", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/12866/" ]
A deviation within the low picometres is nothing to worry about, there are many reasons for this. Primary literature, like peer-reviewed journals, will always publish an analysis of the obtained values along with any error bars, i.e. how accurate the measurement is. When you have disagreeing values it is worthwhile to...
This is just a logical explanation but this might or might not be wrong. Due do resonance in benzene if we look at canonical forms, at a single moment there are alternate single and double carbon carbon bonds..due to rapid interchange between these positions the average(or experimentally calculated) value of carbon-car...
7,334,498
I need split my current Django application into two sites. Site A will contain the public facing site which would contain all the static pages and the registration system. The other site — Site B — is the site for registered users. They can also log-in to application site through Site B. If I'm not mistaken, I can...
2011/09/07
[ "https://Stackoverflow.com/questions/7334498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/304151/" ]
For this case, you would have 2 settings.py files called settings\_A.py and settings\_B.py which specify `from settings import *` A would have SITE=1 and B would have SITE=B. you can then set these files in your apache configs by setting the environment variable for each virtual host DJANGO\_SETTINGS\_MODULE=settings\...
You could use (external) LDAP authentication for both sites. You would need a LDAP server somewhere reachable for both sites. I never used this and I don't know how well it integrates with Django auth though. See <http://packages.python.org/django-auth-ldap/>
7,334,498
I need split my current Django application into two sites. Site A will contain the public facing site which would contain all the static pages and the registration system. The other site — Site B — is the site for registered users. They can also log-in to application site through Site B. If I'm not mistaken, I can...
2011/09/07
[ "https://Stackoverflow.com/questions/7334498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/304151/" ]
Django's `django.contrib.sites` framework is nice if both sites are running under the same server and access the same database. If you have a distributed application (different sites on different hosts or different sites on different databases), you can resort to single sign-on solutions. I use OpenID with a custom pr...
For this case, you would have 2 settings.py files called settings\_A.py and settings\_B.py which specify `from settings import *` A would have SITE=1 and B would have SITE=B. you can then set these files in your apache configs by setting the environment variable for each virtual host DJANGO\_SETTINGS\_MODULE=settings\...
7,334,498
I need split my current Django application into two sites. Site A will contain the public facing site which would contain all the static pages and the registration system. The other site — Site B — is the site for registered users. They can also log-in to application site through Site B. If I'm not mistaken, I can...
2011/09/07
[ "https://Stackoverflow.com/questions/7334498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/304151/" ]
Django's `django.contrib.sites` framework is nice if both sites are running under the same server and access the same database. If you have a distributed application (different sites on different hosts or different sites on different databases), you can resort to single sign-on solutions. I use OpenID with a custom pr...
You could use (external) LDAP authentication for both sites. You would need a LDAP server somewhere reachable for both sites. I never used this and I don't know how well it integrates with Django auth though. See <http://packages.python.org/django-auth-ldap/>
74,480,923
EF Core 6 introduced the ability to auto-include navigations (<https://learn.microsoft.com/en-us/ef/core/querying/related-data/eager#model-configuration-for-auto-including-navigations>).I have a model that is related to multiple tables and I would like to configure it to auto-include multiple related tables but have be...
2022/11/17
[ "https://Stackoverflow.com/questions/74480923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13706650/" ]
Looks like you are thinking that the whole configuration should be with *single* fluent API call chain. Which is true for fluent APIs that return the `EntityTypeBuilder<T>` (from `ModelBuilder.Entity<T>()` call) they are called on. However many configuration APIs (like `Property`, `Navigation`, `HasMany`, `HasOne`, `...
Of course the `.AutoInclude()` implementation has a more complex logic but under the hood it uses the `.SetIsEagerLoaded(bool?)` method. Here is an extension method that could be a good starting point. It's kind of 'brute force' as it tries to find a navigation for each and every property of the entity. ```cs publ...
64,230,272
I have a hard requirement to use a single ELB Classic (CLB) load balancer. Can a single ELB Classic (CLB) distribute traffic between two different Auto Scaling Groups, both running the same application code with no special path based routing needed from an ALB (Application Load Balancer). For example, in a high availa...
2020/10/06
[ "https://Stackoverflow.com/questions/64230272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5781926/" ]
A single classis ELB cannot have multiple ASGs associated with it, but the newer Application Load Balancer can do this.
It turns out that it is possible to associate more than one Autoscaling Group (all with the same application code in it's instances) with the same ELB Classic (CLB). It's just not a common use-case which is why people don't think it can be done.
20,563,706
Well, I am new to C. I would like to know as my title says. Suppose I declare pointers as following, ``` char *chptr1; char **chptr2; int *i; int **ii; struct somestruct *structvar1; struct somestruct **structvar2; ``` Then, 1. Do I need to allocate memory for every variable, before storing data into them? 2. Is t...
2013/12/13
[ "https://Stackoverflow.com/questions/20563706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1702242/" ]
Pointers point at things. It's up to you what you make them point at. * You can leave them uninitialized and don't use them: `int * q;` That's a little silly. * You can make them point to something that exists: `int x; int * q = &x;` * You can store the address of dynamically allocated memory in them: `int * q = mallo...
First thing you need to understand is, pointers are variables which are used to store addresses of memory or addresses of other variables. When you declare a pointer, you are allocating memory for that pointer and not to data pointing by that pointer. For example, ``` char *ptr; //Here you allocated memory for pointer...
20,563,706
Well, I am new to C. I would like to know as my title says. Suppose I declare pointers as following, ``` char *chptr1; char **chptr2; int *i; int **ii; struct somestruct *structvar1; struct somestruct **structvar2; ``` Then, 1. Do I need to allocate memory for every variable, before storing data into them? 2. Is t...
2013/12/13
[ "https://Stackoverflow.com/questions/20563706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1702242/" ]
First thing you need to understand is, pointers are variables which are used to store addresses of memory or addresses of other variables. When you declare a pointer, you are allocating memory for that pointer and not to data pointing by that pointer. For example, ``` char *ptr; //Here you allocated memory for pointer...
I think that in C, a variable is a pointer added \* with a memory. And a pure pointer has no memory. So if we want to store a data, we need to give the pointer a memory. Sure, there are many ways to assign the memory. First: ``` uint32_t x; uint32_t *p = &x; uint32_t array[10]; uint32_t *q = array;// equals to int *q...
20,563,706
Well, I am new to C. I would like to know as my title says. Suppose I declare pointers as following, ``` char *chptr1; char **chptr2; int *i; int **ii; struct somestruct *structvar1; struct somestruct **structvar2; ``` Then, 1. Do I need to allocate memory for every variable, before storing data into them? 2. Is t...
2013/12/13
[ "https://Stackoverflow.com/questions/20563706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1702242/" ]
First thing you need to understand is, pointers are variables which are used to store addresses of memory or addresses of other variables. When you declare a pointer, you are allocating memory for that pointer and not to data pointing by that pointer. For example, ``` char *ptr; //Here you allocated memory for pointer...
> > Do I need to allocate memory for every variable, before storing data into them? > > > It depends on the use case. Let's assume you have aprogram where you can enter a user name, but if no user name is entered, a hardcoded value "Default User" is shown. Now you want to pass arround that name. If the user enter...
20,563,706
Well, I am new to C. I would like to know as my title says. Suppose I declare pointers as following, ``` char *chptr1; char **chptr2; int *i; int **ii; struct somestruct *structvar1; struct somestruct **structvar2; ``` Then, 1. Do I need to allocate memory for every variable, before storing data into them? 2. Is t...
2013/12/13
[ "https://Stackoverflow.com/questions/20563706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1702242/" ]
Pointers point at things. It's up to you what you make them point at. * You can leave them uninitialized and don't use them: `int * q;` That's a little silly. * You can make them point to something that exists: `int x; int * q = &x;` * You can store the address of dynamically allocated memory in them: `int * q = mallo...
I think that in C, a variable is a pointer added \* with a memory. And a pure pointer has no memory. So if we want to store a data, we need to give the pointer a memory. Sure, there are many ways to assign the memory. First: ``` uint32_t x; uint32_t *p = &x; uint32_t array[10]; uint32_t *q = array;// equals to int *q...
20,563,706
Well, I am new to C. I would like to know as my title says. Suppose I declare pointers as following, ``` char *chptr1; char **chptr2; int *i; int **ii; struct somestruct *structvar1; struct somestruct **structvar2; ``` Then, 1. Do I need to allocate memory for every variable, before storing data into them? 2. Is t...
2013/12/13
[ "https://Stackoverflow.com/questions/20563706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1702242/" ]
Pointers point at things. It's up to you what you make them point at. * You can leave them uninitialized and don't use them: `int * q;` That's a little silly. * You can make them point to something that exists: `int x; int * q = &x;` * You can store the address of dynamically allocated memory in them: `int * q = mallo...
> > Do I need to allocate memory for every variable, before storing data into them? > > > It depends on the use case. Let's assume you have aprogram where you can enter a user name, but if no user name is entered, a hardcoded value "Default User" is shown. Now you want to pass arround that name. If the user enter...
20,563,706
Well, I am new to C. I would like to know as my title says. Suppose I declare pointers as following, ``` char *chptr1; char **chptr2; int *i; int **ii; struct somestruct *structvar1; struct somestruct **structvar2; ``` Then, 1. Do I need to allocate memory for every variable, before storing data into them? 2. Is t...
2013/12/13
[ "https://Stackoverflow.com/questions/20563706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1702242/" ]
> > Do I need to allocate memory for every variable, before storing data into them? > > > It depends on the use case. Let's assume you have aprogram where you can enter a user name, but if no user name is entered, a hardcoded value "Default User" is shown. Now you want to pass arround that name. If the user enter...
I think that in C, a variable is a pointer added \* with a memory. And a pure pointer has no memory. So if we want to store a data, we need to give the pointer a memory. Sure, there are many ways to assign the memory. First: ``` uint32_t x; uint32_t *p = &x; uint32_t array[10]; uint32_t *q = array;// equals to int *q...
7,992,484
I want to fetch count from table per day but the time column is in long so I can not just simply group by time column. I have to group by date in time column. How can I do this? Table: ``` Column | type ---------------- id | Long (bigint) name | String (varchar) time | Long (bigint) ``` I have ...
2011/11/03
[ "https://Stackoverflow.com/questions/7992484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/559070/" ]
First of all we will convert our timestamp to date and then group by date! ``` select mt.time,count(*) from my_table mt group by DATE( FROM_UNIXTIME( mt.time )); ``` hoping this will work. cheer :)
``` SELECT DATE(FROM_UNIXTIME(`time`)) AS date_from_time, COUNT(1) FROM my_table GROUP BY date_from_time ```
58,381,568
In HTML we can use fieldset-legend like this: Code: ``` <fieldset> <legend>Heading</legend> </fieldset> ``` O/P: [![enter image description here](https://i.stack.imgur.com/aZGmQ.png)](https://i.stack.imgur.com/aZGmQ.png) How can I design the same things using react-native? [Here](https://stackoverflow.com/a/4...
2019/10/14
[ "https://Stackoverflow.com/questions/58381568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3835843/" ]
I got a technique to create this fieldset-legend without any library/package. Here is my JSX code: JSX view: ``` <View style={styles.fieldSet}> <Text style={styles.legend}>Heading</Text> <Text>Some Text or control</Text> </View> ``` JSX style: ``` const styles = StyleSheet.create({ fieldSet:{ m...
You could you Readymade package - [`react-native-fieldset`](https://www.npmjs.com/package/react-native-fieldset) Its very easy to work with it. You could directly do- ``` import FieldSet from 'react-native-fieldset'; import { View, Text } from 'react-native'; //... return ( <View> <FieldSet label="Field...
58,381,568
In HTML we can use fieldset-legend like this: Code: ``` <fieldset> <legend>Heading</legend> </fieldset> ``` O/P: [![enter image description here](https://i.stack.imgur.com/aZGmQ.png)](https://i.stack.imgur.com/aZGmQ.png) How can I design the same things using react-native? [Here](https://stackoverflow.com/a/4...
2019/10/14
[ "https://Stackoverflow.com/questions/58381568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3835843/" ]
I got a technique to create this fieldset-legend without any library/package. Here is my JSX code: JSX view: ``` <View style={styles.fieldSet}> <Text style={styles.legend}>Heading</Text> <Text>Some Text or control</Text> </View> ``` JSX style: ``` const styles = StyleSheet.create({ fieldSet:{ m...
This FieldSet is not working import React from 'react'; import { View, Text, StyleSheet, TouchableOpacity, SafeAreaView, TextInput } from 'react-native'; import FieldSet from 'react-native-fieldset'; import LinearGradient from 'react-native-linear-gradient' // create a component export default function MyComponent() ...
14,190,814
I want to create a facility to print the data with a combination of ajax, json, and CodeIgniter. but when the data is returned, the error occurs in ajax. I've made ​​the ajax and the controller. ajax ``` formPembayaran.on('submit', function(e){ e.preventDefault(); var serialized = $(this).serializ...
2013/01/07
[ "https://Stackoverflow.com/questions/14190814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1878292/" ]
Resolution independence. You want to keep your mathematical representation of your UI as accurate as practicable, only translating to pixel int values when you actually need to draw to the output device (and even then, not really). That's so that you can apply any number of transformations to your views and still get ...
The dimensions are actually points that on non-retina screens have a 1 to 1 relation to pixels, but for retina screens 1 point = 2 pixels. So on a retina screen you can actually increment by half a point.
14,190,814
I want to create a facility to print the data with a combination of ajax, json, and CodeIgniter. but when the data is returned, the error occurs in ajax. I've made ​​the ajax and the controller. ajax ``` formPembayaran.on('submit', function(e){ e.preventDefault(); var serialized = $(this).serializ...
2013/01/07
[ "https://Stackoverflow.com/questions/14190814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1878292/" ]
The reason for the floats are that modern CPUs and GPUs a are optimized to work with many floating point numbers in parallel. This is true for iOS as well as Mac. With Quartz you don't address individual pixels, but everything you draw is always antialiased. When you have a coordinate 1.0, 1.0 then this actually adds ...
The dimensions are actually points that on non-retina screens have a 1 to 1 relation to pixels, but for retina screens 1 point = 2 pixels. So on a retina screen you can actually increment by half a point.
14,190,814
I want to create a facility to print the data with a combination of ajax, json, and CodeIgniter. but when the data is returned, the error occurs in ajax. I've made ​​the ajax and the controller. ajax ``` formPembayaran.on('submit', function(e){ e.preventDefault(); var serialized = $(this).serializ...
2013/01/07
[ "https://Stackoverflow.com/questions/14190814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1878292/" ]
The reason for the floats are that modern CPUs and GPUs a are optimized to work with many floating point numbers in parallel. This is true for iOS as well as Mac. With Quartz you don't address individual pixels, but everything you draw is always antialiased. When you have a coordinate 1.0, 1.0 then this actually adds ...
Resolution independence. You want to keep your mathematical representation of your UI as accurate as practicable, only translating to pixel int values when you actually need to draw to the output device (and even then, not really). That's so that you can apply any number of transformations to your views and still get ...
30,993,727
I keep getting an error which crashes my program. "com.example.AutoResizeTextClock.AutoResizeTextClock has no default constructor" I assume it is the android:name in my AndroidManifest.XML but I don't know what the problem is. Any help would be appreciated! AndroidManifest.XML ``` <manifest xmlns:android="http://s...
2015/06/23
[ "https://Stackoverflow.com/questions/30993727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5022108/" ]
Your code is a bit confused. In your manifest xml you call it an Activity, but your Java code is for a View. These are two different things. An Activity must derive from Activity (or a subclass of it) and must have a default constructor- usually it has no constructors and lets the compiler generate a default one. A Vie...
Create a default constructor for your class that takes no parameters. ``` public AutoResizeTextClock() { } ```
30,993,727
I keep getting an error which crashes my program. "com.example.AutoResizeTextClock.AutoResizeTextClock has no default constructor" I assume it is the android:name in my AndroidManifest.XML but I don't know what the problem is. Any help would be appreciated! AndroidManifest.XML ``` <manifest xmlns:android="http://s...
2015/06/23
[ "https://Stackoverflow.com/questions/30993727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5022108/" ]
Your code is a bit confused. In your manifest xml you call it an Activity, but your Java code is for a View. These are two different things. An Activity must derive from Activity (or a subclass of it) and must have a default constructor- usually it has no constructors and lets the compiler generate a default one. A Vie...
[Default Constructors](http://www.serc.iisc.ernet.in/facilities/ComputingFacilities/systems/cluster/vac-7.0/html/language/ref/clrc15cplr376.htm): > > A default constructor is a constructor that either has no parameters, > or if it has parameters, all the parameters have default values. If no > user-defined construc...
30,993,727
I keep getting an error which crashes my program. "com.example.AutoResizeTextClock.AutoResizeTextClock has no default constructor" I assume it is the android:name in my AndroidManifest.XML but I don't know what the problem is. Any help would be appreciated! AndroidManifest.XML ``` <manifest xmlns:android="http://s...
2015/06/23
[ "https://Stackoverflow.com/questions/30993727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5022108/" ]
Your code is a bit confused. In your manifest xml you call it an Activity, but your Java code is for a View. These are two different things. An Activity must derive from Activity (or a subclass of it) and must have a default constructor- usually it has no constructors and lets the compiler generate a default one. A Vie...
In addition to the above two comments: Remember to init your context, attributeset and defStyle with default values or your base class won't be setup properly.
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
A year and a half later and this issue occurred for me as well. I just installed it via `npm install --save video.js` and moved the file from the dist folder into my public scripts folder and it worked.
### try: ``` <script type="text/javascript"> $("#button1").on("click", function(){ console.log( "You clicked a paragraph!" ); var myPlayer = window.videojs('example_video_1'); }); </script> ```
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
A year and a half later and this issue occurred for me as well. I just installed it via `npm install --save video.js` and moved the file from the dist folder into my public scripts folder and it worked.
import videojs from 'video.js';
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
I just made sure that the video.js file was the last attached script tag in the HTML. It worked for me.
### try: ``` <script type="text/javascript"> $("#button1").on("click", function(){ console.log( "You clicked a paragraph!" ); var myPlayer = window.videojs('example_video_1'); }); </script> ```
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
You must install or use from [@videojs/http-streaming](https://github.com/videojs/http-streaming#npm). I had same problem and solved by it.
I just made sure that the video.js file was the last attached script tag in the HTML. It worked for me.
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
You must install or use from [@videojs/http-streaming](https://github.com/videojs/http-streaming#npm). I had same problem and solved by it.
### try: ``` <script type="text/javascript"> $("#button1").on("click", function(){ console.log( "You clicked a paragraph!" ); var myPlayer = window.videojs('example_video_1'); }); </script> ```
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
You must install or use from [@videojs/http-streaming](https://github.com/videojs/http-streaming#npm). I had same problem and solved by it.
add the event listener 'DOMContentLoaded' before calling the videojs object: ``` window.addEventListener('DOMContentLoaded', (event) => { videojs('element-id', { controls: true, autoplay: false, preload: 'auto' }); }); ```
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
I just made sure that the video.js file was the last attached script tag in the HTML. It worked for me.
import videojs from 'video.js';
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
You must install or use from [@videojs/http-streaming](https://github.com/videojs/http-streaming#npm). I had same problem and solved by it.
import videojs from 'video.js';
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
A year and a half later and this issue occurred for me as well. I just installed it via `npm install --save video.js` and moved the file from the dist folder into my public scripts folder and it worked.
I just made sure that the video.js file was the last attached script tag in the HTML. It worked for me.
23,736,601
I am coming across a strange error in my GRAILS application. I have the following two domain classes ``` class IncidentLog { String log Date dateCreated User createdBy static belongsTo = [incident: Incident] static constraints = { createdBy nullable:true log nullable:true } ``` } ``` class Incident{ stati...
2014/05/19
[ "https://Stackoverflow.com/questions/23736601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2406072/" ]
A year and a half later and this issue occurred for me as well. I just installed it via `npm install --save video.js` and moved the file from the dist folder into my public scripts folder and it worked.
add the event listener 'DOMContentLoaded' before calling the videojs object: ``` window.addEventListener('DOMContentLoaded', (event) => { videojs('element-id', { controls: true, autoplay: false, preload: 'auto' }); }); ```