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
40,304,803
I'm using `ng-repeat` for getting my url dynamically and using `ng-src` to bind that url through angularjs. Here's the code ``` <div class="x_panel" ng-repeat="data in allreviewdata|filter:search"> <div class="x_content"> <div class=" review-panel"> <div class="row"style="margin-bo...
2016/10/28
[ "https://Stackoverflow.com/questions/40304803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6529170/" ]
> > I want to highlight the Product Name (second th down in column) > > > I think the snippet below is what you looking for, you could do this using **[`:eq() selector`](https://api.jquery.com/eq-selector/)** : ``` //Add the highlight using $('tr:eq(1) th:eq('+$(this).index()+')').addClass('highlight'); //Then ...
See below code. You just have to use `prev()` so it will highlight prevous `td` ```js $("td").hover(function(){ $(this).addClass('highlight').siblings().first().addClass('highlight'); $('tr:nth-child(n+2) th:eq('+$(this).index()+')').addClass('highlight'); },function()...
40,304,803
I'm using `ng-repeat` for getting my url dynamically and using `ng-src` to bind that url through angularjs. Here's the code ``` <div class="x_panel" ng-repeat="data in allreviewdata|filter:search"> <div class="x_content"> <div class=" review-panel"> <div class="row"style="margin-bo...
2016/10/28
[ "https://Stackoverflow.com/questions/40304803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6529170/" ]
> > I want to highlight the Product Name (second th down in column) > > > I think the snippet below is what you looking for, you could do this using **[`:eq() selector`](https://api.jquery.com/eq-selector/)** : ``` //Add the highlight using $('tr:eq(1) th:eq('+$(this).index()+')').addClass('highlight'); //Then ...
You just need to update the jQuery selector slightly, to target the second row of the table rather than the first: ``` $("td").hover(function(){ $(this).addClass('highlight').siblings().first().addClass('highlight'); $('tr:nth-child(2) th:nth-child(' + ($(this).index() + 1) + ')').addClass('highlight'); },f...
40,304,803
I'm using `ng-repeat` for getting my url dynamically and using `ng-src` to bind that url through angularjs. Here's the code ``` <div class="x_panel" ng-repeat="data in allreviewdata|filter:search"> <div class="x_content"> <div class=" review-panel"> <div class="row"style="margin-bo...
2016/10/28
[ "https://Stackoverflow.com/questions/40304803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6529170/" ]
> > I want to highlight the Product Name (second th down in column) > > > I think the snippet below is what you looking for, you could do this using **[`:eq() selector`](https://api.jquery.com/eq-selector/)** : ``` //Add the highlight using $('tr:eq(1) th:eq('+$(this).index()+')').addClass('highlight'); //Then ...
I updated your jQuery code and made it a bit cleaner and fixed your problem. For that, I used internal jQuery functions like `.eq()` (works similar to the CSS `:nth-child`) to solve it. ``` $("td").hover(function(){ $(this).addClass('highlight').siblings().first().addClass('highlight'); $('tr').eq(1).children...
47,959,933
We run Wordpress in a sub folder of our main .NET solution on a cloud service. We have moved our MySQL from CloudDB to Azure MySQL, however it will only connect if we set the "Enforce SSL Connection" to disabled. The Wordpress wp-config.php has the following ``` define('DB_SSL', true); ``` I presume the issue is we...
2017/12/24
[ "https://Stackoverflow.com/questions/47959933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1342272/" ]
Here is what I did: 1. [Obtain SSL certificate](https://learn.microsoft.com/en-us/azure/mysql/howto-configure-ssl#step-1-obtain-ssl-certificate) and save the certificate file to the root of my Wordpress project. 2. Add the following into `wp-config.php`: ``` define('DB_SSL', true); ``` 3. Add this to the function `...
I found the solution to be much simpler when using an Azure mySQL database server in conjunction with a Wordpress container image. If you're using a VPS this may not apply. * Download the BaltimoreCyberTrustRoot.crt.pem referenced here: <https://learn.microsoft.com/en-us/azure/mysql/howto-configure-ssl> * Place the fi...
47,959,933
We run Wordpress in a sub folder of our main .NET solution on a cloud service. We have moved our MySQL from CloudDB to Azure MySQL, however it will only connect if we set the "Enforce SSL Connection" to disabled. The Wordpress wp-config.php has the following ``` define('DB_SSL', true); ``` I presume the issue is we...
2017/12/24
[ "https://Stackoverflow.com/questions/47959933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1342272/" ]
Here is what I did: 1. [Obtain SSL certificate](https://learn.microsoft.com/en-us/azure/mysql/howto-configure-ssl#step-1-obtain-ssl-certificate) and save the certificate file to the root of my Wordpress project. 2. Add the following into `wp-config.php`: ``` define('DB_SSL', true); ``` 3. Add this to the function `...
This will solve the issue by adding these lines to wp\_config.php ``` define(‘MYSQL_CLIENT_FLAGS’, MYSQLI_CLIENT_SSL); define(‘MYSQL_SSL_CA’, getenv(‘MYSQL_SSL_CA’)); define(‘MYSQL_CLIENT_FLAGS’, MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT ); ```
47,959,933
We run Wordpress in a sub folder of our main .NET solution on a cloud service. We have moved our MySQL from CloudDB to Azure MySQL, however it will only connect if we set the "Enforce SSL Connection" to disabled. The Wordpress wp-config.php has the following ``` define('DB_SSL', true); ``` I presume the issue is we...
2017/12/24
[ "https://Stackoverflow.com/questions/47959933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1342272/" ]
Here is what I did: 1. [Obtain SSL certificate](https://learn.microsoft.com/en-us/azure/mysql/howto-configure-ssl#step-1-obtain-ssl-certificate) and save the certificate file to the root of my Wordpress project. 2. Add the following into `wp-config.php`: ``` define('DB_SSL', true); ``` 3. Add this to the function `...
The solutions that work for me, add to wp-config.php: PHP7.x ``` define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT ); define( 'MYSQL_SSL_CA', getenv('MYSQL_SSL_CA')); ``` PHP5.x ``` define('MYSQL_CLIENT_FLAGS', MYSQL_CLIENT_SSL); define( 'MYSQL_SSL_CA', getenv('MYSQL_SSL...
47,959,933
We run Wordpress in a sub folder of our main .NET solution on a cloud service. We have moved our MySQL from CloudDB to Azure MySQL, however it will only connect if we set the "Enforce SSL Connection" to disabled. The Wordpress wp-config.php has the following ``` define('DB_SSL', true); ``` I presume the issue is we...
2017/12/24
[ "https://Stackoverflow.com/questions/47959933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1342272/" ]
I found the solution to be much simpler when using an Azure mySQL database server in conjunction with a Wordpress container image. If you're using a VPS this may not apply. * Download the BaltimoreCyberTrustRoot.crt.pem referenced here: <https://learn.microsoft.com/en-us/azure/mysql/howto-configure-ssl> * Place the fi...
The solutions that work for me, add to wp-config.php: PHP7.x ``` define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT ); define( 'MYSQL_SSL_CA', getenv('MYSQL_SSL_CA')); ``` PHP5.x ``` define('MYSQL_CLIENT_FLAGS', MYSQL_CLIENT_SSL); define( 'MYSQL_SSL_CA', getenv('MYSQL_SSL...
47,959,933
We run Wordpress in a sub folder of our main .NET solution on a cloud service. We have moved our MySQL from CloudDB to Azure MySQL, however it will only connect if we set the "Enforce SSL Connection" to disabled. The Wordpress wp-config.php has the following ``` define('DB_SSL', true); ``` I presume the issue is we...
2017/12/24
[ "https://Stackoverflow.com/questions/47959933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1342272/" ]
This will solve the issue by adding these lines to wp\_config.php ``` define(‘MYSQL_CLIENT_FLAGS’, MYSQLI_CLIENT_SSL); define(‘MYSQL_SSL_CA’, getenv(‘MYSQL_SSL_CA’)); define(‘MYSQL_CLIENT_FLAGS’, MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT ); ```
The solutions that work for me, add to wp-config.php: PHP7.x ``` define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT ); define( 'MYSQL_SSL_CA', getenv('MYSQL_SSL_CA')); ``` PHP5.x ``` define('MYSQL_CLIENT_FLAGS', MYSQL_CLIENT_SSL); define( 'MYSQL_SSL_CA', getenv('MYSQL_SSL...
23,629,980
Is it possible to set some parameters of template and leave the rest still as template parameters? Something like creating new template class, identical to the first but with smaller number of template parameters. A can not explain that clearly. Maybe a few lines of code help. ``` template<int A, typename B> class XX...
2014/05/13
[ "https://Stackoverflow.com/questions/23629980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3052438/" ]
``` template<class T>using WWW=XXX<D,T>; ``` or, if you have no space to do a `using` argument: ``` template<int D>struct WW{ template<class T>using W=XXX<D,T>; }; template<int D> class ZZZ : public YYY<WW<D>::template W> ``` I advise using different names.
Yakk's answer made ​​me realize that I can create structure which will define new class. ``` template<int E> struct SetPrameter { template<typename T> using XXX = XXX<E, T>; }; ``` I can use it this way: ``` template<int D> class ZZZ : public YYY<typename SetPrameter<D>::XXX> { //Some code }; ```
35,989,954
I am trying to creating an array I can pass to GCharts to display date vs the number of times that date occurs. I can create a hash ok, but how can you create a simple array with date and count. I tried converting my code to an array (`to_a`) but the array is too nested. @results is an active record relation, it cont...
2016/03/14
[ "https://Stackoverflow.com/questions/35989954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3437721/" ]
You can dynamically add a meta tag in your 404 component: ``` import { Component } from '@angular/core'; import { Meta } from '@angular/platform-browser'; @Component({ selector: 'app-notfound', templateUrl: './notfound.component.html', styleUrls: [] }) export class NotFoundComponent { constructor(private met...
The only way to tell google bot that this is 404 page is to send http status code 404. Regarding of prerender-status-code. It seems that you've read it on prernder.io. The real idea behind this meta tag is to tell prerender what is the page code it need throw to client. So you can control whether to send 404 (or any o...
55,134,713
My code doesn't seem to work and I cannot understand why. When the user enters a number to search for its location it doesn't show anything. If anyone could explain it to me I would greatly appreciate it. ``` void Array::binarySearch(vector<int> vect) { int search_val; ...
2019/03/13
[ "https://Stackoverflow.com/questions/55134713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8956451/" ]
Your `arrSort` function takes its parameter by value, so it receives (and sorts) a *copy* of the original array. To sort the array you're passing in, take the parameter by reference: ``` void Array::arrSort(vector<int> &vect) ```
As someone has pointed out, you must ensure that you are performing binary search on a sorted array. Perhaps, you should build and test each algorithm separately to ensure correctness before combining them together. Check out [std::sort](https://en.cppreference.com/w/cpp/algorithm/sort) to get your binary search funct...
275,035
I have come across it in the six episode of the first season of *Rick and Morty*. Here is the context: > > Jerry: Ahhh, well, (gets another jar of sauce out of the cupboard) I remember feeling that way about a young lady named your mom, and that's not an **urban diss**, your mom was my Jessica. I remember the first t...
2021/02/11
[ "https://ell.stackexchange.com/questions/275035", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/60696/" ]
*Urban diss* is not a common phrase. It's made up of these two parts: > > **diss** noun > > > *slang* > > : an insulting expression of disrespect or criticism > // … a much loved and much hated album; earning some equally passionate critical raves and *disses*. > — Brett Milano > > > <https://www.merriam...
Urban diss = inner-city put-down or insult. "Your mom" (yo' momma) is a type of joke. Example: Yo' momma's so fat that she has her own zip code!
19,110,622
I have 2 classes ConnectionUtil, DemoResultSet. The problem is when I run **insert 2 times()**.Then just only 1 record is inserted to database. The second insert create error: `"Error:The connection is closed."`. So when I uncomment `close() statement`. It run nice. I don't know what is the trouble. Anyone give me some...
2013/10/01
[ "https://Stackoverflow.com/questions/19110622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2284020/" ]
You are closing your connection inside the insert, so the second insert happens on a closed connection. The conn.close(), should really be placed like so: ``` public static void main(String[] args) throws Exception{ try{ initialize(); insert(); insert(); } finally{ conn.clo...
in your insert method you have `conn.close(); //uncomment it's okay` But its not! After you have closed this connection you do not open it again.
19,110,622
I have 2 classes ConnectionUtil, DemoResultSet. The problem is when I run **insert 2 times()**.Then just only 1 record is inserted to database. The second insert create error: `"Error:The connection is closed."`. So when I uncomment `close() statement`. It run nice. I don't know what is the trouble. Anyone give me some...
2013/10/01
[ "https://Stackoverflow.com/questions/19110622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2284020/" ]
You are closing your connection inside the insert, so the second insert happens on a closed connection. The conn.close(), should really be placed like so: ``` public static void main(String[] args) throws Exception{ try{ initialize(); insert(); insert(); } finally{ conn.clo...
the jdbc connection is a somewhat heavy object and the idea behind it is not not close it after every operation, but rather reuse the connection for multiple tasks. you should close your connection when your application is done. If you insist on own connections, you have to re-initialize after every close.
19,110,622
I have 2 classes ConnectionUtil, DemoResultSet. The problem is when I run **insert 2 times()**.Then just only 1 record is inserted to database. The second insert create error: `"Error:The connection is closed."`. So when I uncomment `close() statement`. It run nice. I don't know what is the trouble. Anyone give me some...
2013/10/01
[ "https://Stackoverflow.com/questions/19110622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2284020/" ]
You are closing your connection inside the insert, so the second insert happens on a closed connection. The conn.close(), should really be placed like so: ``` public static void main(String[] args) throws Exception{ try{ initialize(); insert(); insert(); } finally{ conn.clo...
the problem is you are trying to write to a Connection after closing said connection. you can uncomment that line, but that's just bad practice. my advice: call the initialize(); method not from inside the main method, but as first statement in the insert method. that way, you are sure you have the connection every ti...
68,389,843
I have written an expression for a parameter default value in SSRS. The expression is: ``` =Format(DateAdd(DateInterval.Day,Day(today()) * -1,DateAdd(DateInterval.Month,1,DateAdd(DateInterval.Year, -1, today()) ) ),"dd/MM/yyyy 23:59:59") ``` The plan is for the expression to return the date (UK time) of the end dat...
2021/07/15
[ "https://Stackoverflow.com/questions/68389843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4083478/" ]
Unless you are trying to pass the date as a string (bad idea) then there is no need to format the date, especially as it will only be used as a parameter. You could use this instead **Edited - thanks to Hannover Fist for pointing out the original error** ``` =TODAY.AddDays(1 - TODAY.Day).AddMonths(1).AddYears(-1).Ad...
Need to add CDATE function to convert the string to datetime, so: ``` =CDATE(Format(DateAdd(.... ,"dd/MM/yyyy 23:59:59")) ```
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
*Bridges made easy:* There is a project on sourceforge made just for your situation. <http://sourceforge.net/projects/bridger/> It even comes as a deb package. *With regard to 'dropping' packets:* 1. **Did you check to see if iptables is set to default drop?** `sudo iptables --list` should say "ACCEPT, ACCEPT, ACCEP...
You seem to need ip forwarding. try `cat /proc/sys/net/ipv4/ip_forward` If it's `0` issue: `echo 1 > /proc/sys/net/ipv4/ip_forward`
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
You seem to need ip forwarding. try `cat /proc/sys/net/ipv4/ip_forward` If it's `0` issue: `echo 1 > /proc/sys/net/ipv4/ip_forward`
Bridging can only work when an interface receives all packets otherwise they will get see packets addressed only to them. Your current setup might describe a configuration for a router though but not for a bridge. eth0 and wlan0 should have no ip addresses (meaning 0.0.0.0) and if desired, you could always use an IP a...
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
You seem to need ip forwarding. try `cat /proc/sys/net/ipv4/ip_forward` If it's `0` issue: `echo 1 > /proc/sys/net/ipv4/ip_forward`
configure wlan0 vi /etc/network/interface ``` iface eth0 inet static address 192.168.2.1 network 192.168.2.0 netmask 255.255.255.0 broadcast 192.168.2.255 ``` vi /etc/sysctl.conf ``` net.ipv4.ip_forward=1 ``` vi /etc/rc.local ``` iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o wlan0 -j MASQUERADE ```
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
I have some wireless bridges working on Debian Linux and Openwrt, so I am very familiar with this issue. You missed one important command: You forgot to tell your wireless driver to transmit 4-address frames (sometimes improperly/historically called WDS), which is required for 802.11/wireless bridging. Do this with th...
You seem to need ip forwarding. try `cat /proc/sys/net/ipv4/ip_forward` If it's `0` issue: `echo 1 > /proc/sys/net/ipv4/ip_forward`
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
*Bridges made easy:* There is a project on sourceforge made just for your situation. <http://sourceforge.net/projects/bridger/> It even comes as a deb package. *With regard to 'dropping' packets:* 1. **Did you check to see if iptables is set to default drop?** `sudo iptables --list` should say "ACCEPT, ACCEPT, ACCEP...
Bridging can only work when an interface receives all packets otherwise they will get see packets addressed only to them. Your current setup might describe a configuration for a router though but not for a bridge. eth0 and wlan0 should have no ip addresses (meaning 0.0.0.0) and if desired, you could always use an IP a...
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
*Bridges made easy:* There is a project on sourceforge made just for your situation. <http://sourceforge.net/projects/bridger/> It even comes as a deb package. *With regard to 'dropping' packets:* 1. **Did you check to see if iptables is set to default drop?** `sudo iptables --list` should say "ACCEPT, ACCEPT, ACCEP...
configure wlan0 vi /etc/network/interface ``` iface eth0 inet static address 192.168.2.1 network 192.168.2.0 netmask 255.255.255.0 broadcast 192.168.2.255 ``` vi /etc/sysctl.conf ``` net.ipv4.ip_forward=1 ``` vi /etc/rc.local ``` iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o wlan0 -j MASQUERADE ```
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
*Bridges made easy:* There is a project on sourceforge made just for your situation. <http://sourceforge.net/projects/bridger/> It even comes as a deb package. *With regard to 'dropping' packets:* 1. **Did you check to see if iptables is set to default drop?** `sudo iptables --list` should say "ACCEPT, ACCEPT, ACCEP...
I have some wireless bridges working on Debian Linux and Openwrt, so I am very familiar with this issue. You missed one important command: You forgot to tell your wireless driver to transmit 4-address frames (sometimes improperly/historically called WDS), which is required for 802.11/wireless bridging. Do this with th...
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
I have some wireless bridges working on Debian Linux and Openwrt, so I am very familiar with this issue. You missed one important command: You forgot to tell your wireless driver to transmit 4-address frames (sometimes improperly/historically called WDS), which is required for 802.11/wireless bridging. Do this with th...
Bridging can only work when an interface receives all packets otherwise they will get see packets addressed only to them. Your current setup might describe a configuration for a router though but not for a bridge. eth0 and wlan0 should have no ip addresses (meaning 0.0.0.0) and if desired, you could always use an IP a...
520,172
I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a `hostapd.conf`: (some details changed for security, and yes, I know WEP is no good)... ``` interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ss...
2012/12/16
[ "https://superuser.com/questions/520172", "https://superuser.com", "https://superuser.com/users/100777/" ]
I have some wireless bridges working on Debian Linux and Openwrt, so I am very familiar with this issue. You missed one important command: You forgot to tell your wireless driver to transmit 4-address frames (sometimes improperly/historically called WDS), which is required for 802.11/wireless bridging. Do this with th...
configure wlan0 vi /etc/network/interface ``` iface eth0 inet static address 192.168.2.1 network 192.168.2.0 netmask 255.255.255.0 broadcast 192.168.2.255 ``` vi /etc/sysctl.conf ``` net.ipv4.ip_forward=1 ``` vi /etc/rc.local ``` iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o wlan0 -j MASQUERADE ```
53,209,317
I've been looking into changing my app fully to vue front, but there are some things that are bugging me, like: In laravel blade now I am using (posts page): ``` @foreach($posts as $post) <post data="{!! json_encode($post) !!}"> @if(auth()->user()->id === $post->user->id) <edit-post></edit-post> @endi...
2018/11/08
[ "https://Stackoverflow.com/questions/53209317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10230696/" ]
Oracle introduced the `unpivot` operator in version 11.1, exactly for this kind of problem. Illustrated below. I create the sample data in a `with` clause (not part of the query to answer your question; you should remove it, and use the actual table name). Note that `values` is an oracle reserved word, so it shouldn't ...
One method uses `cross join`: ``` select t.sno, s.name, sp.salesprofit, (case when sp.salesprofit = 'Sales' then sales else profit end) as values from t cross join (select 'Profit' as salesprofit from dual union all select 'Sales' from dual ) sp; ``` The advantage of this approach over a `unio...
23,290,425
So I am creating a search function within my windows form that will allow the user to search for records based on what they have entered into the textbox. I have working code for finding records based off of every filter but the DateTime one. for example: ``` if (customerID_rb.Checked == true) { ...
2014/04/25
[ "https://Stackoverflow.com/questions/23290425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3559899/" ]
You should *never* concatenate parameters into a SQL string. * It leaves you vulnerable to [SQL injection attacks](http://bobby-tables.com/). * It creates performance problems, as each unique value will create a new SQL query, having a different hash for the query, which defeats the execution-plan caching mechanism of...
You don't need to specipy the datatype `DateTime`, Just write the query with column name only like ``` sqlQuery = "SELECT CustomerID, CustomerName, Telephone, DateAndTime, Status, Description from Calls WHERE columnname = '" + item +"'"; ```
23,290,425
So I am creating a search function within my windows form that will allow the user to search for records based on what they have entered into the textbox. I have working code for finding records based off of every filter but the DateTime one. for example: ``` if (customerID_rb.Checked == true) { ...
2014/04/25
[ "https://Stackoverflow.com/questions/23290425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3559899/" ]
You should *never* concatenate parameters into a SQL string. * It leaves you vulnerable to [SQL injection attacks](http://bobby-tables.com/). * It creates performance problems, as each unique value will create a new SQL query, having a different hash for the query, which defeats the execution-plan caching mechanism of...
Generally speaking, best would be to add sql parameters, but in string format: ``` " ... WHERE DateAndTime = '" + item.ToString("yyyyMMdd") +"'" ``` The yyyyMMdd should be safe to use in all cultures. The above is assuming, you have to search a date, not including time. Mostly times are only searched on with gre...
6,359,873
I have a really old, Access 97 app which needs to be modernized. I'd like to make something more modern, but it would likely be a bit to expensive to rewrite the whole applikation to a real winapp (or webapp). So the idea now is to upgrade to Access 2010. However we tried the automatic upgrade tool, and that broke. The...
2011/06/15
[ "https://Stackoverflow.com/questions/6359873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/409971/" ]
There have been a lot of changes between Access 97 and 2010. Each upgrade (97 to 2003, 2003 to 2007, etc.) had quirks that you needed to be aware of. The conversions weren't usually simple tasks, especially when you had a complicated database with lots of things going on. Taking the leap from 97 directly to 2010 will b...
I don't have Access 2010 and don't know about that automatic upgrade tool you mentioned. With Access 2007, I can import objects into a new empty MDB from an earlier version database in stages. First import tables, and verify data imported correctly. Next import standard and class modules. Run Debug->Compile, and fix ...
32,778,041
I'm seeing this error "Uncaught TypeError: w[l].push is not a function" in my Google Tag Manager javascript. What's going on? I'm using the normal GTM script, and I've got a simple dataLayer defined: ``` <script> dataLayer = { "foo": "bar" } </script> ```
2015/09/25
[ "https://Stackoverflow.com/questions/32778041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8331/" ]
dataLayer **must** be a list of objects, not an object. <https://developers.google.com/tag-manager/devguide?hl=en> Instead of: ``` <script> dataLayer = { "foo": "bar" } </script> ``` Use: ``` <script> dataLayer = [{ "foo": "bar" }] </script> ```
This error also occurs if you're using the dataLayer.push method with an = sign. Wrong: `dataLayer.push = ({` Correct: `dataLayer.push({`
32,778,041
I'm seeing this error "Uncaught TypeError: w[l].push is not a function" in my Google Tag Manager javascript. What's going on? I'm using the normal GTM script, and I've got a simple dataLayer defined: ``` <script> dataLayer = { "foo": "bar" } </script> ```
2015/09/25
[ "https://Stackoverflow.com/questions/32778041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8331/" ]
dataLayer **must** be a list of objects, not an object. <https://developers.google.com/tag-manager/devguide?hl=en> Instead of: ``` <script> dataLayer = { "foo": "bar" } </script> ``` Use: ``` <script> dataLayer = [{ "foo": "bar" }] </script> ```
May not be your case but I have seen this on my sites because I had a Adobe DTM DataLayer and also a GTM datalayer defined with the same name. GTM datalayer object is an array were as the datalayer object in Adobe DTM is a json object. To resolve this, I used a different variable(GTMDataLayer), this variable would re...
32,778,041
I'm seeing this error "Uncaught TypeError: w[l].push is not a function" in my Google Tag Manager javascript. What's going on? I'm using the normal GTM script, and I've got a simple dataLayer defined: ``` <script> dataLayer = { "foo": "bar" } </script> ```
2015/09/25
[ "https://Stackoverflow.com/questions/32778041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8331/" ]
This error also occurs if you're using the dataLayer.push method with an = sign. Wrong: `dataLayer.push = ({` Correct: `dataLayer.push({`
May not be your case but I have seen this on my sites because I had a Adobe DTM DataLayer and also a GTM datalayer defined with the same name. GTM datalayer object is an array were as the datalayer object in Adobe DTM is a json object. To resolve this, I used a different variable(GTMDataLayer), this variable would re...
11,119,261
My goal is to have a modal dialog display when the user navigates back to my app. This modal dialog asks them for a 6 digit PIN that they defined. I'm new to Java GUI and Android development so my problem is..... I find that if the user chooses to minimize the app while the enterpin dialog is showing, if they return t...
2012/06/20
[ "https://Stackoverflow.com/questions/11119261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1440354/" ]
I believe you're looking for `onResume();` + `onPause();` and not `onRestart();` to create your dialog. You should use `onRestart();` to set a flag for the PIN dialog to be shown but not to create the dialog. I'd suggest you move it to the `onCreate();` method, make it a property of the activity you're working on and ...
I get around the same problem (pin entry or otherwise) by storing by dialog in a property of the activity, whenever I show a dialog I use something along these lines: ``` protected android.app.Dialog onCreateDialog(int id) { if (this.currentDialog != null) { this.currentDialog.dismiss(); } ...
60,066,404
Okay, so I am making a madlibs website anyways, I am trying to get all input box's to clear after they submit their answer. I thought I could do this by putting all the variables in a array but I guess not? Would appreciate the help! The clear function and variable is at the bottom of the c/p in the code block. HTML...
2020/02/04
[ "https://Stackoverflow.com/questions/60066404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11718346/" ]
this statement is messing you up: ``` var entry = document.getElementById(["noun1Input", "noun2Input", "noun3Input"]); ``` What's that suppose to do? ```js function clearAll(){ var inputs = document.getElementsByTagName('input'); for(i=0;i<inputs.length;i++){ var noun = 'noun' + (i+1); var ...
**Is this what you are trying to achieve ? (Done in the most crude way)** ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Madlibs</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel=...
60,066,404
Okay, so I am making a madlibs website anyways, I am trying to get all input box's to clear after they submit their answer. I thought I could do this by putting all the variables in a array but I guess not? Would appreciate the help! The clear function and variable is at the bottom of the c/p in the code block. HTML...
2020/02/04
[ "https://Stackoverflow.com/questions/60066404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11718346/" ]
this preserves most of your code and just fixes what wasn't working. The solution above is a bit better as the javascript is minimized ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Madlibs</title> <meta name="description" content="" /> <meta name="viewport" content="wid...
**Is this what you are trying to achieve ? (Done in the most crude way)** ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Madlibs</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel=...
60,066,404
Okay, so I am making a madlibs website anyways, I am trying to get all input box's to clear after they submit their answer. I thought I could do this by putting all the variables in a array but I guess not? Would appreciate the help! The clear function and variable is at the bottom of the c/p in the code block. HTML...
2020/02/04
[ "https://Stackoverflow.com/questions/60066404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11718346/" ]
this preserves most of your code and just fixes what wasn't working. The solution above is a bit better as the javascript is minimized ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Madlibs</title> <meta name="description" content="" /> <meta name="viewport" content="wid...
this statement is messing you up: ``` var entry = document.getElementById(["noun1Input", "noun2Input", "noun3Input"]); ``` What's that suppose to do? ```js function clearAll(){ var inputs = document.getElementsByTagName('input'); for(i=0;i<inputs.length;i++){ var noun = 'noun' + (i+1); var ...
374,847
I have noticed that "logs" and "tmp" content take 36GB and 21GB respectively. I need to free up some disk space and currently wondering is it vise to clean them. Thanks!
2012/03/29
[ "https://serverfault.com/questions/374847", "https://serverfault.com", "https://serverfault.com/users/73290/" ]
Delete logs older than 7 days. ``` find tomcat/logs/ -mtime +7 -print0 | xargs -r -0 rm -rf ``` You probably want to add this as a cronjob too. Before deleting temp-files, you should make sure that nothing is holding them open.
You should set up tomcat in logrotate properly. Something like this as /etc/logrotate.d/tomcat: ``` /var/log/tomcat/*.log /var/log/tomcat/*.out { copytruncate daily rotate 7 compress missingok } ``` tmp you might want to sweep using the find command that pkhamre showed, but I would use logrotate on th...
22,252,337
In my ASP.NET MVC view, I have a drop down list and three radio buttons, as given ``` @Html.RadioButtonFor(m => m.ClientDur1.LookupValueID, "true", new { Name = "grp", @id = "CM1", @checked = "true" }) @Model.ClientDur1.Val1 @Html.RadioButtonFor(m => m.ClientDur2.LookupValueID, "false", new { Name = "grp", @id = "CM2"...
2014/03/07
[ "https://Stackoverflow.com/questions/22252337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2260976/" ]
On your Css, find this code ``` mini-nav ul > li:last-child { border-right: none; } ``` and add "margin:0" into it so it like this : ``` mini-nav ul > li:last-child { border-right: none; margin:0; } ``` Finally, this is what you want ? [DEMO](http://jsfiddle.net/nucleo1985/ruffG/3/) Working code if link was br...
It's because `.mini-nav ul li` is ``` position:relative; margin-right:-4px; ``` You've made it go right 4 pixels and that's throwing it out.
1,425,705
Is there any free code generating tool that can connect to crm server and create code for selected entities? The code should use SDK assemblies. **UPDATE:** @friism C# code if possible, each entity one class and each attribute one property so it's not necessary to use Properties collection. That's basically what I ...
2009/09/15
[ "https://Stackoverflow.com/questions/1425705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41384/" ]
Supposedly this [MSCRM Developer Toolkit](http://code.msdn.microsoft.com/E2DevTkt) contains a code generation feature. I haven't used it. I tried installing - but I had some installation issues. Maybe you'll have more luck.
The MSCRM Developer Toolkit contains a code generation feature. AND it's a huge pain to install.
1,425,705
Is there any free code generating tool that can connect to crm server and create code for selected entities? The code should use SDK assemblies. **UPDATE:** @friism C# code if possible, each entity one class and each attribute one property so it's not necessary to use Properties collection. That's basically what I ...
2009/09/15
[ "https://Stackoverflow.com/questions/1425705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41384/" ]
Supposedly this [MSCRM Developer Toolkit](http://code.msdn.microsoft.com/E2DevTkt) contains a code generation feature. I haven't used it. I tried installing - but I had some installation issues. Maybe you'll have more luck.
We have a library called XrmLinq, it does exactly what LINQ to SQL does, generates classes by looking at the entities in crm. Take a look <http://www.xrmlinq.com>
1,425,705
Is there any free code generating tool that can connect to crm server and create code for selected entities? The code should use SDK assemblies. **UPDATE:** @friism C# code if possible, each entity one class and each attribute one property so it's not necessary to use Properties collection. That's basically what I ...
2009/09/15
[ "https://Stackoverflow.com/questions/1425705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41384/" ]
Supposedly this [MSCRM Developer Toolkit](http://code.msdn.microsoft.com/E2DevTkt) contains a code generation feature. I haven't used it. I tried installing - but I had some installation issues. Maybe you'll have more luck.
The CRM SDK (4.0.0012) now includes a free code-gen tool and LINQ query provider. Shan
1,425,705
Is there any free code generating tool that can connect to crm server and create code for selected entities? The code should use SDK assemblies. **UPDATE:** @friism C# code if possible, each entity one class and each attribute one property so it's not necessary to use Properties collection. That's basically what I ...
2009/09/15
[ "https://Stackoverflow.com/questions/1425705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41384/" ]
We have a library called XrmLinq, it does exactly what LINQ to SQL does, generates classes by looking at the entities in crm. Take a look <http://www.xrmlinq.com>
The MSCRM Developer Toolkit contains a code generation feature. AND it's a huge pain to install.
1,425,705
Is there any free code generating tool that can connect to crm server and create code for selected entities? The code should use SDK assemblies. **UPDATE:** @friism C# code if possible, each entity one class and each attribute one property so it's not necessary to use Properties collection. That's basically what I ...
2009/09/15
[ "https://Stackoverflow.com/questions/1425705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41384/" ]
We have a library called XrmLinq, it does exactly what LINQ to SQL does, generates classes by looking at the entities in crm. Take a look <http://www.xrmlinq.com>
The CRM SDK (4.0.0012) now includes a free code-gen tool and LINQ query provider. Shan
74,554,704
I get these errors when I try to statically link my Go program that uses Gopacket: ``` /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libpcap.a(pcap-dbus.o): in function `dbus_write': (.text+0x103): undefined reference to `dbus_message_demarshal' /usr/bin/ld: (.text+0x119): undefined reference...
2022/11/24
[ "https://Stackoverflow.com/questions/74554704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233706/" ]
When you declare a function with positional parameters you need to provide those parameters when you call that function. ``` import 'package:flutter/material.dart'; class Services { static Future<String> greeting(String name) async { /// this function doesn't need to be Future /// but when you call API to g...
Have you looked at the Uri [replace](https://api.flutter.dev/flutter/dart-core/Uri/replace.html) method? You can do the following: ``` Uri.parse('$url/auth/mhs_siakad/perwalian/get_paket').replace(queryParameters:{ "smt":"$smt"}); ``` Update on FutureBuilder: ``` // Put this outside your build function Future<Ma...
27,823,958
I'm using Intellij IDE and I want to implement websocket in a javascript that's evaluated by Nashorn Java8. I have the following line at the top of my javascript file: ``` var socket = new WebSocket("http://localhost:12345/echo"); ``` Yet it is giving me this error: ``` Caused by: javax.script.ScriptException: Refe...
2015/01/07
[ "https://Stackoverflow.com/questions/27823958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4429611/" ]
Nashorn is a ECMAScript5 compatible JavaScript engine. WebSocket API is not a part of ECMAScript 5 but browser API. You can implement WebSocket API using any available Java WebSocket client libraries. For example, <http://jfarcand.wordpress.com/2011/12/21/writing-websocket-clients-using-asynchttpclient/> or <https://...
For enabling WebSocket API support in Nashorn the Java 9's HttpClient module `jdk.incubator.httpclient` can be another option. It's API is somewhat simpler compared to other Java WebSocket client libraries. I have put together a basic example of how to use it to enable the WebSocket API in Nashorn: <https://github.com/...
14,831,265
I have a table with around 100 million rows consisting of three columns (all INT): ``` id | c_id | l_id ``` Even though I use indices even a basic ``` select count(*), c_id from table group by c_id; ``` takes 16 seconds (MYISAM) to 25 seconds (InnoDB) to complete. Is there any way to speed up this process ...
2013/02/12
[ "https://Stackoverflow.com/questions/14831265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1382965/" ]
See execution plan for possible ways to do the same queries [SqlFiddle](http://sqlfiddle.com/#!2/821fc/3), `SELECT COUNT(id)` will be faster if `c_id` is not indexed on the test set i have provided. otherwise you should use `COUNT(*)` since optimization of index may not be used in the query. **It is also dependent o...
It's not the `Count(*)` that gives the performance issue but grouping on 100 million rows. You should add an index on the c\_id column
12,373,472
I'm handling myDialog1\_KeyDown event, and if Enter key is pressed my method moves focus to the next element like this: ``` UIElement focusedElement = Keyboard.FocusedElement as UIElement; if (focusedElement != null) { if(focusedElement.MoveFocus(newTraversalRequest(FocusNavigationDirection.Next))) e.Handled =...
2012/09/11
[ "https://Stackoverflow.com/questions/12373472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/935836/" ]
A solution might be to forbid the close button to have focus at all, assuming you don't need it. See [Focusable](http://msdn.microsoft.com/en-us/library/system.windows.iinputelement.focusable.aspx) property. If you create the button in code: `closeButton.Focusable = false`. If in XAML: `<Button Focusable="false" Comman...
You don't say what you expect to happen. You could check if the current control is the last field (you must have an ID for it). If the user is currently in that last field, don't move forward to the next field.
1,045,609
2007 formula written with A1 style, how is it possible to convert the A1 style formula to R1C1 in c# so that later on i can use it for range.FormulaArray=... in documentation it says that FormulaArray should be given in R1C1 style... for example this one ``` "=ROUND((IF(Sheet4!A1:HM232=1,0,"+ "IF(Sheet...
2009/06/25
[ "https://Stackoverflow.com/questions/1045609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use the [Application.ConvertFormula](http://msdn.microsoft.com/en-us/library/bb223281.aspx) function.
I think, there are different ways to write formula. You cannot change the A1 style formula to R1C1 style using range.Formula. You will have to use range.FormulaR1C1, if you wish to assign formula in R1C1 notation. What are you trying to do exactly?
1,045,609
2007 formula written with A1 style, how is it possible to convert the A1 style formula to R1C1 in c# so that later on i can use it for range.FormulaArray=... in documentation it says that FormulaArray should be given in R1C1 style... for example this one ``` "=ROUND((IF(Sheet4!A1:HM232=1,0,"+ "IF(Sheet...
2009/06/25
[ "https://Stackoverflow.com/questions/1045609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use the [Application.ConvertFormula](http://msdn.microsoft.com/en-us/library/bb223281.aspx) function.
Do you mean you want to change the way Excel does it's cell referencing programmatically? I think you would do it this way: ``` Application.ReferenceStyle = xlR1C1; ``` After you do that you can then use range.FormulaArray in R1C1 format instead of A1.
1,045,609
2007 formula written with A1 style, how is it possible to convert the A1 style formula to R1C1 in c# so that later on i can use it for range.FormulaArray=... in documentation it says that FormulaArray should be given in R1C1 style... for example this one ``` "=ROUND((IF(Sheet4!A1:HM232=1,0,"+ "IF(Sheet...
2009/06/25
[ "https://Stackoverflow.com/questions/1045609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use the [Application.ConvertFormula](http://msdn.microsoft.com/en-us/library/bb223281.aspx) function.
Converts **A1 to row col**: Code with good quality example: [Converting Excel column letters to corresponding column numbers](https://stackoverflow.com/questions/15260075/converting-excel-column-letters-to-corresponding-column-numbers)
56,767,514
I want to next date and previous date using next and previous button in react. I have tried by creating two buttons Next and previous button but it's not working properly when the month starts and ends.. These are buttons : ``` <button onClick={() => this.previousDate(this.state.selectdate)} >Previous</button><inpu...
2019/06/26
[ "https://Stackoverflow.com/questions/56767514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5493372/" ]
For a more accurate update, we could change the dates by their values in milliseconds. Consider this sandbox and the code below: <https://codesandbox.io/s/gallant-euler-67w40> ``` import React from "react"; import ReactDOM from "react-dom"; import "./styles.css"; class App extends React.Component { state = { s...
``` const myDate = new Date() myDate.setDate(myDate.getDate() - 1) ``` this decrement the day, however an advice is to use a library like luxon for the dates
65,912,295
I have this statement in my View layer ``` TextEditingController controllerDestino = TextEditingController(); ``` And I want to recover this controllerDestino, to use within a method that is in my Controller layer. ``` statusUberNaoChamado() { showBoxAdress = true; changeMainButton("Chamar", Color(0xFF1ebbd8), ()...
2021/01/27
[ "https://Stackoverflow.com/questions/65912295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14978699/" ]
Define/instantiate the TextEditingController as a field inside your GetxController you're using to control your form / implement business logic. ``` class DestinoFormControllerX extends GetxController { static DestinoFormControllerX get i => Get.find(); final GlobalKey<FormBuilderState> key = GlobalKey<FormBuilder...
I faced with same problem again and found my question after one year. It's seems that controller should be declared: ``` final foo = TextEditingController().obs; ``` And be accessed with: ``` TextField( controller: Get.find<SearchFormController>().foo.value, keyboardType: TextInputType.number, ), ``` getting ...
74,659,333
I have a fixed size `u8` array of size `2048`, which gets filled from a network data of varying lengths. I need to copy this data to a `vec` of `u8` of size equal to received length. This is how I used to do in c++ ``` char buff[2048]; ssize_t data_len = recvfrom(socket, buff, sizeof(buff), 0, nullptr, nullptr); std...
2022/12/02
[ "https://Stackoverflow.com/questions/74659333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3938402/" ]
A simple ```rust let vec = buff[..data_len].to_vec(); ``` will do if your type is `Clone`. `buff[..data_len]` takes a slice of the first `data_len` elements, `to_vec` then turns that slice into a `Vec` If it isn't you can use a variation of @Emoun s answer: ```rust let vec = buff.into_iter().take(data_len).collect...
You could use [`Iterator::take`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.take): ```rust let array: [u8;2048] = ..; let data_vec: Vec<_> = array.iter().cloned().take(data_len).collect(); ```
42,668,642
I have an image and I need to measure how long user touch the image or has mouse pressed on the image. So I use mouse down event to to get the start time and mouse up event to get the finish time. However, when running on android device, the long touch triggers the context menu to pop up, which I don't want. I can hide...
2017/03/08
[ "https://Stackoverflow.com/questions/42668642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4517895/" ]
Instead of using `mousedown` and `mouseup` you should use `touchstart` and `touchend`
Answering my own question. I got confused by my colleague who said that browsers are smart enough to convert touch events into mouse events, which is not true. To solve the problem, I need to additionally listen for touch end event as pointed by @Mazz. JsFiddle for the solution ```html <body> <img id="image" src="...
33,388,604
``` update [RegistryCopy].[dbo].[RegFile_New] SET r.[FileNo] = v.[Cont#Account (New ACC)] where r.[FileNo] IN ( SELECT r.[FileNo] FROM [RegistryCopy].[dbo].[RegFile_New] as R INNER JOIN [Registry_Malta_Recovered].[dbo].OLD_NEW_AccountsFromSap as v ON r.FileNo] = v.[Acct in legacy (Old ACC)] ...
2015/10/28
[ "https://Stackoverflow.com/questions/33388604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1542323/" ]
It seems that "r" and "v" identifiers are available for the sub-query only. Please try to use `UPDATE FROM` syntax as it was done here: [Update a table using JOIN in SQL Server?](https://stackoverflow.com/questions/1604091/update-a-table-using-join-in-sql-server)
It is complaining because you are telling it to update this table/alias called `r` but this `r` is not found in the table name above. You can rewrite the query to be this: ``` UPDATE r SET r.[FileNo] = v.[Cont#Account (New ACC)] FROM [RegistryCopy].[dbo].[RegFile_New] as r INNER JOIN [Registry_Malta_Recovered].[dbo]....
33,388,604
``` update [RegistryCopy].[dbo].[RegFile_New] SET r.[FileNo] = v.[Cont#Account (New ACC)] where r.[FileNo] IN ( SELECT r.[FileNo] FROM [RegistryCopy].[dbo].[RegFile_New] as R INNER JOIN [Registry_Malta_Recovered].[dbo].OLD_NEW_AccountsFromSap as v ON r.FileNo] = v.[Acct in legacy (Old ACC)] ...
2015/10/28
[ "https://Stackoverflow.com/questions/33388604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1542323/" ]
Your statement is invalid. You're referring to aliases in the outer query that are defined in the inner query (subquery), and you're also referring to fields in the outer query for tables that are only defined in the inner query. This is the closest approximation of your query: ``` UPDATE r SET [FileNo] = v.[Cont#Acc...
It is complaining because you are telling it to update this table/alias called `r` but this `r` is not found in the table name above. You can rewrite the query to be this: ``` UPDATE r SET r.[FileNo] = v.[Cont#Account (New ACC)] FROM [RegistryCopy].[dbo].[RegFile_New] as r INNER JOIN [Registry_Malta_Recovered].[dbo]....
33,388,604
``` update [RegistryCopy].[dbo].[RegFile_New] SET r.[FileNo] = v.[Cont#Account (New ACC)] where r.[FileNo] IN ( SELECT r.[FileNo] FROM [RegistryCopy].[dbo].[RegFile_New] as R INNER JOIN [Registry_Malta_Recovered].[dbo].OLD_NEW_AccountsFromSap as v ON r.FileNo] = v.[Acct in legacy (Old ACC)] ...
2015/10/28
[ "https://Stackoverflow.com/questions/33388604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1542323/" ]
It seems that "r" and "v" identifiers are available for the sub-query only. Please try to use `UPDATE FROM` syntax as it was done here: [Update a table using JOIN in SQL Server?](https://stackoverflow.com/questions/1604091/update-a-table-using-join-in-sql-server)
Your statement is invalid. You're referring to aliases in the outer query that are defined in the inner query (subquery), and you're also referring to fields in the outer query for tables that are only defined in the inner query. This is the closest approximation of your query: ``` UPDATE r SET [FileNo] = v.[Cont#Acc...
12,866,535
I have one optionSet named STATES. Another named RESTAURANTS. My goal is to filter the Restaurants optionSet according to what State is selected. My current method is to design the values of the options where: ``` States[0] = 1000 States[1] = 2000 States[2] = 3000 ``` Then, Restaurants: ``` Restaurants[3] = 10...
2012/10/12
[ "https://Stackoverflow.com/questions/12866535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/899530/" ]
Exclude all CkFinder assemblies from project, then you can run project.
For any with this problem check if you included in your project an folder that is an project too.
64,287
I have a custom CMS, that we're looking to port over into Wordpress. (I can see you asking yourself: > > *Why not just stick with the custom CMS?* > > > Well, it's outdated, clunky, and getting to be too much of a hassle to maintain; there are also many features of WordPress that we would really like to take adva...
2012/09/05
[ "https://wordpress.stackexchange.com/questions/64287", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/19856/" ]
There is a plugin by [Scribu](http://scribu.net/) called [Category Checklist Tree](http://wordpress.org/extend/plugins/category-checklist-tree/) that disables this "feature".
Backtrace ========= Let's first check where this actually happens: The meta box gets added on `post.php` and `post-new.php` screens. ``` # inside ~/wp-admin/edit-form-advanced.php // TAGS: if ( !is_taxonomy_hierarchical($tax_name) ) add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', null, 'side',...
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
Use `git rm --cached` to remove this directory from repository (it should stay in your working directory) and then put it's name into .gitignore file. At the end commit both .gitignore and directory removal.
Create a file named .gitignore and add the path of the folder you want to ignore (end with a "/"). Complete doc : <https://help.github.com/articles/ignoring-files>
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
Use `git rm --cached` to remove this directory from repository (it should stay in your working directory) and then put it's name into .gitignore file. At the end commit both .gitignore and directory removal.
If you are using the terminal and have multiple files which are deleted to be removed from git, do this: ``` git status | grep [d]eleted | awk '{print $3}' | xargs git rm --cache ```
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
It sounds like you want to remove a git *repository* that was automatically created by an IDE. (Note that `git` doesn't track *folders*, only files.) If that's the case, just remove the `.git` directory and you'll be left with a folder that isn't tracked by git at all.
Use `git rm --cached` to remove this directory from repository (it should stay in your working directory) and then put it's name into .gitignore file. At the end commit both .gitignore and directory removal.
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
Use `git rm --cached` to remove this directory from repository (it should stay in your working directory) and then put it's name into .gitignore file. At the end commit both .gitignore and directory removal.
Note that git does not store directories; it only stores files. This means that if you have committed any files from the subdirectory into your git repository, then you need to remove them with `git rm <filename>`. You also need to follow the instructions given by `git status` to remove files from the index. For exampl...
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
If you are using the terminal and have multiple files which are deleted to be removed from git, do this: ``` git status | grep [d]eleted | awk '{print $3}' | xargs git rm --cache ```
Create a file named .gitignore and add the path of the folder you want to ignore (end with a "/"). Complete doc : <https://help.github.com/articles/ignoring-files>
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
It sounds like you want to remove a git *repository* that was automatically created by an IDE. (Note that `git` doesn't track *folders*, only files.) If that's the case, just remove the `.git` directory and you'll be left with a folder that isn't tracked by git at all.
Create a file named .gitignore and add the path of the folder you want to ignore (end with a "/"). Complete doc : <https://help.github.com/articles/ignoring-files>
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
Note that git does not store directories; it only stores files. This means that if you have committed any files from the subdirectory into your git repository, then you need to remove them with `git rm <filename>`. You also need to follow the instructions given by `git status` to remove files from the index. For exampl...
Create a file named .gitignore and add the path of the folder you want to ignore (end with a "/"). Complete doc : <https://help.github.com/articles/ignoring-files>
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
It sounds like you want to remove a git *repository* that was automatically created by an IDE. (Note that `git` doesn't track *folders*, only files.) If that's the case, just remove the `.git` directory and you'll be left with a folder that isn't tracked by git at all.
If you are using the terminal and have multiple files which are deleted to be removed from git, do this: ``` git status | grep [d]eleted | awk '{print $3}' | xargs git rm --cache ```
14,615,992
I have a local folder that is under git, when I was playing with some git stuff in different IDES, etc it got added to the git but I don't want it to be under git control, I just want it to be a normal folder for now! until I decide to add it to some repo later. I am new to git so don't know much commands but if I run...
2013/01/30
[ "https://Stackoverflow.com/questions/14615992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/320724/" ]
It sounds like you want to remove a git *repository* that was automatically created by an IDE. (Note that `git` doesn't track *folders*, only files.) If that's the case, just remove the `.git` directory and you'll be left with a folder that isn't tracked by git at all.
Note that git does not store directories; it only stores files. This means that if you have committed any files from the subdirectory into your git repository, then you need to remove them with `git rm <filename>`. You also need to follow the instructions given by `git status` to remove files from the index. For exampl...
8,839,844
If I have this function for button click ``` -(IBAction)loginButton:(UIButton *)sender{ } ``` How can I call this button function from this another method ``` -(void)increaseAmount { myNumber = myNumber+0.01; if (myNumber >= 1) { [self loginButton:sender]; } progressViewAuto.progress = myNumber;} ``` I...
2012/01/12
[ "https://Stackoverflow.com/questions/8839844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1140157/" ]
Simply pass in `nil` or even `self`.
You probably just want to send `nil`, like this: ``` [self loginButton:nil]; ```
8,839,844
If I have this function for button click ``` -(IBAction)loginButton:(UIButton *)sender{ } ``` How can I call this button function from this another method ``` -(void)increaseAmount { myNumber = myNumber+0.01; if (myNumber >= 1) { [self loginButton:sender]; } progressViewAuto.progress = myNumber;} ``` I...
2012/01/12
[ "https://Stackoverflow.com/questions/8839844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1140157/" ]
And, if you want to be perfectly correct, you can link your UIButton to `IBOutlet UIButton* theLoginButton;` and then say `[self loginButton:theLoginButton];`. But this would only be needed if you actually reference the sender in your loginButton routine, and that's the exception rather than the rule.
You probably just want to send `nil`, like this: ``` [self loginButton:nil]; ```
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
Using Threadabort is not recommened. It's evil. Why not use another mechanism like an (Auto/Manual)ResetEvent? Start the thread with the splash-screen, wait on the event. If the other code is done loading stuff, set the event en allow the splash-screen to close itself the normal (nice) way.
Change the exception type to **ThreadAbortException** and add a call to **ResetAbort()** ``` try { Program.splashThread.Abort(); } catch(ThreadAbortException ex) { Thread.ResetAbort(); } ``` In general, aborting threads is considered very bad practice and can lead to all sorts...
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
Some points. The ThreadAbort exception IS the reason the thread aborts. It is not a side effect of you calling abort. When you call abort on a thread, the runtime forces a threadabort exception to be propagated to the thread. This exception can be caught because it allows the user to perform some cleanup before the thr...
Why would you do that? Just set a flag that the thread polls, then eventually when the thread picks it up it'll close itself.
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
You don't need to cancel the thread. I'll exemplify with code. In the splash screen form: ``` public void CloseSplash() { Invoke((MethodInvoker)delegate { this.Close(); }); } ``` In the Program.cs file: ``` private static Splash _splash = null; public static void CloseSplash() { if (_splash...
Try this code. It's working fine for me. ``` void splash() { try { SplashScreen.SplashForm frm = new SplashScreen.SplashForm(); frm.AppName = "HR"; Application.Run(frm); } catch (ThreadAbortException ex) { Thread.ResetAbort(); } } ```
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
Please refer to the following link obtained doing a Google search (first result returned): <http://msdn.microsoft.com/en-us/library/5b50fdsz.aspx> Pay special attention to this part: When this method is invoked on a thread, the system throws a **ThreadAbortException** in the thread to abort it. **ThreadAbortExceptio...
Try this code. It's working fine for me. ``` void splash() { try { SplashScreen.SplashForm frm = new SplashScreen.SplashForm(); frm.AppName = "HR"; Application.Run(frm); } catch (ThreadAbortException ex) { Thread.ResetAbort(); } } ```
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
You don't need to cancel the thread. I'll exemplify with code. In the splash screen form: ``` public void CloseSplash() { Invoke((MethodInvoker)delegate { this.Close(); }); } ``` In the Program.cs file: ``` private static Splash _splash = null; public static void CloseSplash() { if (_splash...
Using Threadabort is not recommened. It's evil. Why not use another mechanism like an (Auto/Manual)ResetEvent? Start the thread with the splash-screen, wait on the event. If the other code is done loading stuff, set the event en allow the splash-screen to close itself the normal (nice) way.
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
You don't need to cancel the thread. I'll exemplify with code. In the splash screen form: ``` public void CloseSplash() { Invoke((MethodInvoker)delegate { this.Close(); }); } ``` In the Program.cs file: ``` private static Splash _splash = null; public static void CloseSplash() { if (_splash...
Change the exception type to **ThreadAbortException** and add a call to **ResetAbort()** ``` try { Program.splashThread.Abort(); } catch(ThreadAbortException ex) { Thread.ResetAbort(); } ``` In general, aborting threads is considered very bad practice and can lead to all sorts...
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
Change the exception type to **ThreadAbortException** and add a call to **ResetAbort()** ``` try { Program.splashThread.Abort(); } catch(ThreadAbortException ex) { Thread.ResetAbort(); } ``` In general, aborting threads is considered very bad practice and can lead to all sorts...
Why would you do that? Just set a flag that the thread polls, then eventually when the thread picks it up it'll close itself.
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
Some points. The ThreadAbort exception IS the reason the thread aborts. It is not a side effect of you calling abort. When you call abort on a thread, the runtime forces a threadabort exception to be propagated to the thread. This exception can be caught because it allows the user to perform some cleanup before the thr...
Try this code. It's working fine for me. ``` void splash() { try { SplashScreen.SplashForm frm = new SplashScreen.SplashForm(); frm.AppName = "HR"; Application.Run(frm); } catch (ThreadAbortException ex) { Thread.ResetAbort(); } } ```
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
You don't need to cancel the thread. I'll exemplify with code. In the splash screen form: ``` public void CloseSplash() { Invoke((MethodInvoker)delegate { this.Close(); }); } ``` In the Program.cs file: ``` private static Splash _splash = null; public static void CloseSplash() { if (_splash...
Some points. The ThreadAbort exception IS the reason the thread aborts. It is not a side effect of you calling abort. When you call abort on a thread, the runtime forces a threadabort exception to be propagated to the thread. This exception can be caught because it allows the user to perform some cleanup before the thr...
951,070
I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on. How do I deal with this...
2009/06/04
[ "https://Stackoverflow.com/questions/951070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46724/" ]
Change the exception type to **ThreadAbortException** and add a call to **ResetAbort()** ``` try { Program.splashThread.Abort(); } catch(ThreadAbortException ex) { Thread.ResetAbort(); } ``` In general, aborting threads is considered very bad practice and can lead to all sorts...
Try this code. It's working fine for me. ``` void splash() { try { SplashScreen.SplashForm frm = new SplashScreen.SplashForm(); frm.AppName = "HR"; Application.Run(frm); } catch (ThreadAbortException ex) { Thread.ResetAbort(); } } ```
51,737,444
I need to 1) Find a zipfile at a particular directory location 2) If it exists then unzip it 3) Out of its contents find a specific file and move it to other directory. ``` def searchfile(): for file in os.listdir('/user/adam/datafiles'): if fnmatch.fnmatch(file, 'abc.zip'): return True return False ``` ...
2018/08/08
[ "https://Stackoverflow.com/questions/51737444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6505848/" ]
The antd library recently made a breaking change to its typings, and your version constraint auto updates to the latest version in the same major version, introducing the error. If you fix the antd version (remove the "^") and run `npm install` again you should be fine.
open `C:\Users\SCC\Desktop\xxx\web-shop\node_modules\antd\lib\upload\interface.d.ts`, then delete the **?** behind `lastModifiedDate`.
69,301,525
The docs for `Compare(T? x, T? y)` say: > > Returns: > > A signed integer that indicates the relative values of x and y > > Less than zero – x is less than y. > > Zero – x equals y. > > Greater than zero – x is greater than y. > > > Consider this example: ```cs using System; using System.Collections....
2021/09/23
[ "https://Stackoverflow.com/questions/69301525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9971404/" ]
It needs to have a defined comparison in terms of `IComparable<T>` / `IComparer<T>`, and it has *elected* that `null` is less than anything else. This is specified [here](https://learn.microsoft.com/en-us/dotnet/api/system.nullable.compare). The only other option would have been to throw an exception, which most people...
This experiment will blow your mind (just like mine): ``` int? a = null; int b = 0; if (a < b) log.Debug("null is smaller than 0"); else if (a == b) log.Debug("null is equal to 0"); else log.Debug("null is larger than 0"); ``` output : `null is larger than 0` This does not mean that it is larger, it j...
61,785,233
I am having a really really hard time plotting a time series plot from a data frame python. Please find datatype below. ``` Time_split datetime64[ns] Total_S4_Sig1 float64 ``` The time\_split column is the X axis and is the time variable. The total s4 is the Y variable and is a float. ``` 0 15:2...
2020/05/13
[ "https://Stackoverflow.com/questions/61785233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12368485/" ]
You should be able to fix it with the installation of ``` yum perl-Devel-Peek ```
No. It's only available as part of Perl. It's has been part of Perl since 5.6 in 2000.
113,758
There is one grid-view in our web application. But as you can see, group and category are eating up the space. [![enter image description here](https://i.stack.imgur.com/igMwB.png)](https://i.stack.imgur.com/igMwB.png) Is there any better ideas for such layouts? Even if there is total change in the layout, that will be...
2017/11/23
[ "https://ux.stackexchange.com/questions/113758", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/93053/" ]
I think you should also try a card layout. For example: [![Card layout example](https://i.stack.imgur.com/a7nIY.png)](https://i.stack.imgur.com/a7nIY.png) This layout provides multiple benefits: * **Aids quick scanning** + Cards are easier to scan compared to tables. * **Easily adapt to small screens** + Cards wi...
You may try a tree hierachy style organization. Something like this : ![mockup](https://i.stack.imgur.com/CKN26.png) [download bmml source](/plugins/mockups/download?image=http%3a%2f%2fi.stack.imgur.com%2fCKN26.png) – Wireframes created with [Balsamiq Mockups](http://www.balsamiq.com/products/mockups)
23,011,018
I have a bash array of floating point numbers, say it is called `vals` and intialized like this -- ``` # load data from the datafile.txt vals=`cat datafile.txt` vals=($vals) ``` The `datafile.txt` looks like this -- ``` 0.012256791324227446 0.012424287090558156 0.013912725724889032 0.014678182257134693 ``` Now ...
2014/04/11
[ "https://Stackoverflow.com/questions/23011018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1118211/" ]
Do like this because you are expecting multiple records to be returned: ``` var result = db.tblPeople .Where(p => p.id == id) .Select(s => s.tblCars .SelectMany(z => z.tblCarType)).ToList(); ```
This is what you want/need: db.tblPeople.Where(p => p.id == id).**SelectMany**(s => s.tblCars.Select(z => z.tblCarType)).ToList();
23,011,018
I have a bash array of floating point numbers, say it is called `vals` and intialized like this -- ``` # load data from the datafile.txt vals=`cat datafile.txt` vals=($vals) ``` The `datafile.txt` looks like this -- ``` 0.012256791324227446 0.012424287090558156 0.013912725724889032 0.014678182257134693 ``` Now ...
2014/04/11
[ "https://Stackoverflow.com/questions/23011018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1118211/" ]
Use [`SelectMany`](http://msdn.microsoft.com/en-us/library/system.linq.enumerable.selectmany.aspx) in order to flatten `IEnumerable<IEnumerable<CarType>>` into `IEnumerable<CarType>`. ``` var carTypes = db.tblPeople .Where(p => p.id == id) .SelectMany(s => s.tblCars .Select(z => z....
This is what you want/need: db.tblPeople.Where(p => p.id == id).**SelectMany**(s => s.tblCars.Select(z => z.tblCarType)).ToList();
23,011,018
I have a bash array of floating point numbers, say it is called `vals` and intialized like this -- ``` # load data from the datafile.txt vals=`cat datafile.txt` vals=($vals) ``` The `datafile.txt` looks like this -- ``` 0.012256791324227446 0.012424287090558156 0.013912725724889032 0.014678182257134693 ``` Now ...
2014/04/11
[ "https://Stackoverflow.com/questions/23011018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1118211/" ]
Use [`SelectMany`](http://msdn.microsoft.com/en-us/library/system.linq.enumerable.selectmany.aspx) in order to flatten `IEnumerable<IEnumerable<CarType>>` into `IEnumerable<CarType>`. ``` var carTypes = db.tblPeople .Where(p => p.id == id) .SelectMany(s => s.tblCars .Select(z => z....
Do like this because you are expecting multiple records to be returned: ``` var result = db.tblPeople .Where(p => p.id == id) .Select(s => s.tblCars .SelectMany(z => z.tblCarType)).ToList(); ```
9,441,387
When trying to run my project I get this error and I don´t know what it means : > > \_OBJC\_CLASS\_$\_MyWindowController", referenced from: > objc-class-ref in AppDelegate. > > ld: symbol(s) not found for architecture x86\_64 > clang: error: linker command failed with exit code 1 (use -v to see invocation) > ...
2012/02/25
[ "https://Stackoverflow.com/questions/9441387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/981969/" ]
Select the application target, go to the **Build Phases** tab and make sure **MyWindowController.m** is in **Compile Sources**, otherwise add it. Also, if you use a **xib** file associated with it, make sure it is in **Copy Bundle Resources**.
Check to see if the framework that your MyWindowController object is based on has been added to your project. Good luck!
69,606,521
I m trying to remove the last 0 in the fibonacci series as i m removing return 0; the last value is showing garbage value something like 735150 what should i edit to get the desired output as 0 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 as i m getting the output 0 1 2 3 5 8 13 21 34 55 89 144 233...
2021/10/17
[ "https://Stackoverflow.com/questions/69606521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15244897/" ]
I'm perfectly aware this isn't code review but OP asked for a simpler version. This is not conforming to the odd copy constructor requirement, but rather to show that printing the fibonacci numbers can be dealt with in a few(8) lines of code. ``` #include <iostream> #include <vector> #include <algorithm> // This is ...
I have made some changes as shown in the [below](https://onlinegdb.com/-KtOwdc0S) code. First you don't need to create a copy of the object f1. You can just directly call `f1.calc()`. Second `calc`'s return type is changed to void. Third, constructor initializer list is used. You can check the working program [here](ht...
4,175,262
I'm working with a PIC18F and am trying to send data via hyperterminal. When I send data at a slow rate by pressing one key every half secondish it recieves the data and echos it correctly but when I start pressing the keys at a faster rate the MCU locks up. Not sure what causes this. ``` while(index<length){ whil...
2010/11/13
[ "https://Stackoverflow.com/questions/4175262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507041/" ]
(I did work on MCUs but haven't a deal with PICs, so i'll try to help with common problems) 1. You do not check any receiver error flags. Receiver may lock up in Overrun Error state and do not receive further, until you clear Overrun flag. Add check for error conditions and resolve them accordinly to PIC documentation...
Maybe when you send 2 characters while it is busy sending the "received" one of them is discarded and you never reach your `length`?
4,175,262
I'm working with a PIC18F and am trying to send data via hyperterminal. When I send data at a slow rate by pressing one key every half secondish it recieves the data and echos it correctly but when I start pressing the keys at a faster rate the MCU locks up. Not sure what causes this. ``` while(index<length){ whil...
2010/11/13
[ "https://Stackoverflow.com/questions/4175262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507041/" ]
(I did work on MCUs but haven't a deal with PICs, so i'll try to help with common problems) 1. You do not check any receiver error flags. Receiver may lock up in Overrun Error state and do not receive further, until you clear Overrun flag. Add check for error conditions and resolve them accordinly to PIC documentation...
On most microcontrollers, a UART receiver overrun will cause the newly-received byte to be discarded and a flag to be set, but the receiver will continue to operate normally. On the PIC, a receiver overrun will cause the UART to die until the CREN bit is cleared and re-set.
35,594,379
``` int i = 5; int j = 3; int k; double a, b; k = j / 2 * i / 10; a = 0.1 * i * j / 2.0; b = 0.1 * (j / i) + 3.0; ``` So by doing it by hand one would get k=0.75, a=0.75, and b=3.06. Yet when I solve it in Visual Studio I get 0, 0.75, and 3.00. I was hoping someone could shed light on this. I know int means only who...
2016/02/24
[ "https://Stackoverflow.com/questions/35594379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5886599/" ]
All of your variables should be `double` because if they are `int` integer operation will occur and your result will not contain decimal places. ``` double i = 5; double j = 3; double k; double a, b; k = j / 2 * i / 10; a = 0.1 * i * j / 2.0; b = 0.1 * (j / i) + 3.0; ```
In your code, * `i` and `j` are of type `int` * the integer constants used here are also of type `int`, So, in case of ``` k = j / 2 * i / 10; ``` integer division / multiplication will take place and the *final* result will be **promoted** to type `double`. This is not what you want. either * use `double` for ...
35,594,379
``` int i = 5; int j = 3; int k; double a, b; k = j / 2 * i / 10; a = 0.1 * i * j / 2.0; b = 0.1 * (j / i) + 3.0; ``` So by doing it by hand one would get k=0.75, a=0.75, and b=3.06. Yet when I solve it in Visual Studio I get 0, 0.75, and 3.00. I was hoping someone could shed light on this. I know int means only who...
2016/02/24
[ "https://Stackoverflow.com/questions/35594379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5886599/" ]
All of your variables should be `double` because if they are `int` integer operation will occur and your result will not contain decimal places. ``` double i = 5; double j = 3; double k; double a, b; k = j / 2 * i / 10; a = 0.1 * i * j / 2.0; b = 0.1 * (j / i) + 3.0; ```
Operators for basic data types returns the strongest type of its two operands. `(j / i)` is a division of integral data types, because `i` and `j` are of type `int`. Since `i` is initialized by `5` and `j` is initialized by `3` the result type of the division is `int` and the result value is `0`. Either you adapt yo...
35,594,379
``` int i = 5; int j = 3; int k; double a, b; k = j / 2 * i / 10; a = 0.1 * i * j / 2.0; b = 0.1 * (j / i) + 3.0; ``` So by doing it by hand one would get k=0.75, a=0.75, and b=3.06. Yet when I solve it in Visual Studio I get 0, 0.75, and 3.00. I was hoping someone could shed light on this. I know int means only who...
2016/02/24
[ "https://Stackoverflow.com/questions/35594379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5886599/" ]
All of your variables should be `double` because if they are `int` integer operation will occur and your result will not contain decimal places. ``` double i = 5; double j = 3; double k; double a, b; k = j / 2 * i / 10; a = 0.1 * i * j / 2.0; b = 0.1 * (j / i) + 3.0; ```
since `j` and `i` are integers, `j/i` will result in integer `0`. Integer division only gives the quotient and the remainder is discarded. E.g `10/4 equals to 2`
7,203,909
I am running some tasks in UI part of my application. While doing this lengthy task I need to show progress dialog so I am using AsysnTask to perform this. When user pressed back button while progress bar going on , I need to cancel progress bar and I need to suspend that background work going on. I am calling "dism...
2011/08/26
[ "https://Stackoverflow.com/questions/7203909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/651545/" ]
In java threads are never terminated prematurely. You can kill a thread using native API, but Java API does not allow this anymore (even though there are some functions left that expose this interface, but they are not implemented and just throw exceptions). Android exposes same philosophy, threads can not be terminat...
AsyncTasks have two important methods for this purpose: `cancel()` and `isCancelled()`. Somewhere in your `doInBackground()`, you should be checking the value of `isCancelled()` and finish executing if it returns true. One important difference from normal execution is that once `doInBackground()` returns, `onCancelled...
7,203,909
I am running some tasks in UI part of my application. While doing this lengthy task I need to show progress dialog so I am using AsysnTask to perform this. When user pressed back button while progress bar going on , I need to cancel progress bar and I need to suspend that background work going on. I am calling "dism...
2011/08/26
[ "https://Stackoverflow.com/questions/7203909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/651545/" ]
In java threads are never terminated prematurely. You can kill a thread using native API, but Java API does not allow this anymore (even though there are some functions left that expose this interface, but they are not implemented and just throw exceptions). Android exposes same philosophy, threads can not be terminat...
You can check by this ``` @Override protected Void doInBackground(Void... params) { function1; function2; if(!isCancelled() ) { function3; function4; } return null; } ```
799,388
I have created custom IAM policy to have a read access to loadbalancer. But I am getting error as... > > An error occurred fetching load balancer data: User: > arn:aws:iam::000000000000:user/xxxxxxxx is not authorized to > perform: elasticloadbalancing:DescribeLoadBalancers > > > Bellow is the policy. ``` { ...
2016/08/26
[ "https://serverfault.com/questions/799388", "https://serverfault.com", "https://serverfault.com/users/189551/" ]
Generally speaking, the `Describe*` actions do not support resource-level permissions. For `Describe*` actions, you need to use `*` as your resource, otherwise, the commands will fail as not permitted. Documentation and more information: <http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/load-balancer-...
Here is the solution I figured out. Bellow is the policies. Read only AWS LB Access Policy: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticloadbalancing:Describe*" ], "Resource": "*" } ]...
7,824,313
I have a problem with a ListView that happens only when I have scrolled down to see my list items. Here is my main xml file: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:lay...
2011/10/19
[ "https://Stackoverflow.com/questions/7824313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003124/" ]
Add a [new](http://msdn.microsoft.com/en-us/library/sd2w2ew5%28v=VS.100%29.aspx) constraint: ``` class Request<T> where T : new() { private T sw; public void Request() { sw = new T(); } } ``` This tells the compiler that `T` will always have an accessible parameterless constructor (no, you can'...
You need to declare the constraint `where T : new()` in the class declaration. This is restricting `T` to types with a public default constructor. For example: ``` class Request<T> where T : new() { private T sw; public Request() { sw = new T(); } } ``` More information: <http://msdn.micr...
7,824,313
I have a problem with a ListView that happens only when I have scrolled down to see my list items. Here is my main xml file: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:lay...
2011/10/19
[ "https://Stackoverflow.com/questions/7824313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1003124/" ]
Add a [new](http://msdn.microsoft.com/en-us/library/sd2w2ew5%28v=VS.100%29.aspx) constraint: ``` class Request<T> where T : new() { private T sw; public void Request() { sw = new T(); } } ``` This tells the compiler that `T` will always have an accessible parameterless constructor (no, you can'...
You need to tell the compiler that T always implements a parameterless constructor. ``` class Request<T> where T : new() ```
22,541,671
i am triyng to generate header file for native use (c/c++) from a java file using eclipse. from the command line i can only reach the javah when i am in this location : ``` C:\Program Files (x86)\Java\jdk1.7.0_51\bin> ``` but i cant reference my java class like so : ``` C:\Program Files (x86)\Java\jdk1.7.0_51\bin>j...
2014/03/20
[ "https://Stackoverflow.com/questions/22541671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/923290/" ]
There appears to be a couple of issues to solve here. First. I'm not sure that your source code is set up correctly. If indeed your class is com.or.jnihelloworld.nativeclass then it should be in directory: C:\Users\Or Azran\workspace\JniHelloWorld\src\com\or\jnihelloworld\nativeclass.java However, assuming that the c...
Your PATH doesn't include the bin directory of the JDK.