FAQ Database Discussion Community


Django Dynamic Admin Site

python,django,django-models,django-admin,exclude
I want to create a dynamic admin site, that based on if the field is blank or not will show that field. So I have a model that has a set number of fields, but for each individual entry will not contain all of the fields in my model and...

PHP preg_match exclude

php,regex,preg-match,pcre,exclude
OK this regex will match string like 2aa, a2, 2aaaaaa, aaaa2, aaa2aaaa, 2222a2222-2222-aaaa... in short, mix of alphanumeric characters in a sequence: preg_match("/(?:\d+[a-z]|[a-z]+\d)[a-z\d]*/i") now I want to exclude something but I'm stuck, something like this doesn't work preg_match("/(?!1920x1200|1920x1080)(?:\d+[a-z]|[a-z]+\d)[a-z\d]*/i") for example the string aaaaa222aaa1920x1200bbbbb1234556789 is still matched but it shouldn't because...

How to exclude kernel updates in Raspbian (Raspberry Pi)

kernel,debian,packages,updates,exclude
I always use 'sudo apt-get update && sudo apt-get dist-upgrade' in Raspberry Pi but I need to keep my kernel current version. I want to upgrade all packages except kernel ones. Is it possible? Can I use an option in this command? Thanks

Regex has 3 slashes

regex,grep,exclude
I would like to remove all the lines, that has not at least 3 slashes. eg. dataset: /aafsaf/badba/asbsa /asgas/ asgsagasg asgasga sagsgasg/agsg/vas/ /1/2/3/4 Should give back /aafsaf/badba/asbsa sagsgasg/agsg/vas/ /1/2/3/4 I know it's basic, I just can't find it! Thanks a lot!...

Tar all folders and files except folders with a specific name

unix,tar,exclude
Im trying to tar a folder with subdirectories but i want to exclude all folders with the name "log". I have search and seen that the tar command have the option of --exclude the problem is that this option required to be specific folder not a dynamic one. Is there...

exclude files from pushing and pulling

git,gitignore,exclude
I have a remote repository that is mirrored to a development site and downloaded to my local machine to work with. When I push changes they update the site by hooks. Update The thing i need: Repository holds whole project with working "configuraion.php" for development site (working online resource for...

C# excluding words from dictionary

c#,wpf,dictionary,exclude,tolower
I am reading through documents, and splitting words to get each word in the dictionary, but how could I exclude some words? Like "the/a/an". This is my function: private void Splitter(string[] file) { try { tempDict = file .SelectMany(i => File.ReadAllLines(i) .SelectMany(line => line.Split(new[] { ' ', ',', '.', '?',...

jQuery: Prevent child from inheriting the parent's attributes?

javascript,jquery,html,css,exclude
With jQuery: How do I prevent the children (<span>) from inheriting the parents' (<p>) attributes? I've been working on and researching this for 2+ hours; nothing has worked. Problem section: $("p").not("span").css("cursor", "pointer"); <p>...<span>...</span></p> Full code: <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <style>body {font-family:Arial,san-serif;font-size:25pt;}</style> <body> <p>Always shown |...

I am having trouble excluding a custom taxonomy from an archive page for a custom post type in wordpress

php,wordpress,custom-post-type,exclude
I have written a piece of code to build a paginated archive page for a custom post type. I cannot exclude a certain custom taxonomy. can anyone help, please? $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query->query('showposts=30&post_type=my_custom_post_type'.'&paged='.$paged); ...

Exclude multiple non-consecutive IP addresses from Google Analytics

regex,google-analytics,ip,exclude
I have over 100 satellite offices with static IPs that I need to exclude from my Google Analytics report. The limit seems to be 255 characters which is nowhere near enough. They are not consecutive or in blocks either so not easy to implement a regex. Any ideas if this...

Another .Net regular expression to accept anything other than

html,regex,exclude
I am trying to write a regular expression to match anything other than <anythext>. i.e. I need to show an error message if user tries to submit any text within angular brackets. I have come up with <[^>]*> to match any expression like <anytext> I have tried many online regular...

Exclude package from external JAR in Android Studio during Gradle build process

android,jar,android-studio,gradle,exclude
Lets say I have an Android Studio project and JAR x.jar which I include in my build.gradle: compile files('libs/x.jar') How can I tell Gradle to not include the package xyz in the x.jar? Is there something like: compile files('libs/x.jar'){ exclude: "xyz" } Or is this not possible for a jar...

MySQL doesn't exclude query results from other query

mysql,compare,exclude,notin
I have an experiment DB, and try to get all the participants that wish to be recontacted except for the ones that participated in one specific experiment. The query works, except that it only doesn't include the participants that took part only in this experiment, but does include participants that...

How to exclude row data based on equal values in same view?

mysql,view,exclude
Given simple view reports.uid, reports.mail, reports.jobcode, reports.jobcodedescr, reports.regionname, reports.supervisorid, reports.supemail FROM reports_accredit_fscore_allmanagers How can I exclude rows where the uid on a row is not anywhere in the supervisorid list? I have tried several context but I keep getting my entire list. Right now that view has 440 employees and...

Excluding lines containing a specific string from REGEX REPLACE in CMake

regex,replace,cmake,exclude,ogre
This is my first post but I have been using StackOverflow for years. Thanks for helping me every time. I am writing a script in CMake that is supposed to rewrite a portion of a .cfg file (it is the resources.cfg file from Ogre 3D engine) so that: when running...

how to use maven bundle plugin to exclude package out of bundle

osgi,pom.xml,exclude,maven-bundle-plugin
i have a bundle that uses maven-jaxb2-plugin to generate all classes to target/generated/src/main/java. Then i use maven bundle plugin to create a bundle. It simply works. Now, i want to exclude (remove) a generated package com.xxx.yyyy.common out of this bundle. So i use: <Export-Package> !com.xxx.yyyy.common,com.xxx.* </Export-Package> But after having a...

What should 'git log ^X' show?

git,logging,exclude
$ git log --oneline 05f1c3b master: Modified 1.txt f7433e0 Updated by master e30dff9 Modified 1.txt 82ebf7a Modified 1.txt cbb2785 master: Added 4.txt after rebase branch was created 980a5d6 b1: Added 1.txt badc046 Resolved merge conflict 47a2d78 Mods by b2 c3eb61e Added by b1 9378e3d 1ST commit The following shows nothing:...

Create a dynamic admin site

python,django,django-models,django-admin,exclude
I want to create a dynamic admin site, that based on if the field is blank or not will show that field. So I have a model that has a set number of fields, but for each individual entry will not contain all of the fields in my model and...

Exclude Numerous Values for SQL Server

sql,sql-server,exclude
I'm currently still learning SQL, however, I can't seem to actually find out how to exclude multiple usernames. Example I have 2 columns at hand, 1 being username and another having the state of active or not. UserName Status =============== ABC Y CDE Y FGH Y IJK Y LMN Y...

Django, exclude() function on list

python,django,list,django-queryset,exclude
I have a list and I would to remove from it all elements that are contained into an other list. So, I would to have something like to 'exclude' queryset but on a list. Now this is my code: list = Friend.objects.friends(self.request.user) i_am_blocking = User.objects.filter(blocks_received__user_blocking=self.request.user) is_blocking_me = User.objects.filter(blocks_set__user_blocked=self.request.user) blocked_users =...

bash - for loop for IP range excluding certain IPs

bash,for-loop,ip,ip-address,exclude
I have the below for loop for ip in 10.11.{32..47}.{0..255} do echo "<ip>${ip}</ip>" done I want to exclude this iprange: 10.11.{32..35}.{39..61} from the above for loop. This ip range is a subset of the above one. Is there a way to do that? I tried this, this doesn't work: abc=10.11.{34..37}.{39..61}...

Ant exclude does not exclude directory

java,ant,exclude
I want to package some specific libraries into a package. Therefore, i want to below ant task: <property name="src" location="src"/> <property name="build" location="bin"/> <property name="target" location="c:\\temp\\invoke.jar"/> <target name="dist" depends="compile" description="generate the distribution" > <echo message="Start jar java.lang.invoke package.."/> <delete file="${target}" /> <jar destfile="${target}" basedir="${build}"> <fileset dir="${build}/"> <include...

Regex: How to search for a pattern but not include it in the output

regex,exclude
Is there a way to include a pattern in the search but then not include it in the final output? I'm trying to find a way to take out just the state in the source code of an address. So my input is <strong class="street-address"> <address itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span...

How do i exclude most of my html from the jquery?

jquery,html,menu,exclude
I'm working on a website for a project, where I need my menu bar to be fixed on top even when the user scrolls down.It's an one-page website. I can't seem to make that happen. Also, I have a problem with my navigation. I have the following jquery: $(document).ready(function(){ $('a[href^="#"]').on('click',function...