Search Results

Search found 31721 results on 1269 pages for 'adjacency list'.

Page 110/1269 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Limiting the list of archives in wordpress based on date

    - by Gaurav
    I am using wordpress and I am displaying my archives list in a sidebar using the function wp_get_archives('type=monthly'); I have posts from Feb 2005 to April 2010 but I want to display June 2009 onwards links. (i.e. june 2009, july 2009, ....april 2010). How do I prevent Feb 2005 - may 2005 from being displayed in the archives list. (Please don't suggest adding a limit i.e. wp_get_archives('type=daily&limit=15'); . That will not solve my problem)

    Read the article

  • Change list link to foreign key change page

    - by Adam
    When viewing the admin change list for a model, is it possible to make the columns that correspond to foreign keys links to their respective pages? A simple example is I have a Foo object which contains Bar as a foreign key. If I'm viewing the admin change list for Foo (and have it set to include Bar in the display_list columns), the main column would link to the Foo instance's edit page while the Bar column would link to the Boo instance's edit page. I understand I can override the template that's used, but I was curious if there was a solution that didn't require that.

    Read the article

  • Alternative to "assign to a function call" in a python

    - by Pythonista's Apprentice
    I'm trying to solve this newbie puzzle: I've created this function: def bucket_loop(htable, key): bucket = hashtable_get_bucket(htable, key) for entry in bucket: if entry[0] == key: return entry[1] else: return None And I have to call it in two other functions (bellow) in the following way: to change the value of the element entry[1] or to append to this list (entry) a new element. But I can't do that calling the function bucket_loop the way I did because "you can't assign to function call" (assigning to a function call is illegal in Python). What is the alternative (most similar to the code I wrote) to do this (bucket_loop(htable, key) = value and hashtable_get_bucket(htable, key).append([key, value]))? def hashtable_update(htable, key, value): if bucket_loop(htable, key) != None: bucket_loop(htable, key) = value else: hashtable_get_bucket(htable, key).append([key, value]) def hashtable_lookup(htable, key): return bucket_loop(htable, key) Thanks, in advance, for any help! This is the rest of the code to make this script works: def make_hashtable(size): table = [] for unused in range(0, size): table.append([]) return table def hash_string(s, size): h = 0 for c in s: h = h + ord(c) return h % size def hashtable_get_bucket(htable, key): return htable[hash_string(key, len(htable))] Similar question (but didn't help me): Python: Cannot Assign Function Call

    Read the article

  • Copying List of Files Through Powershell

    - by Driftpeasant
    So I'm trying to copy 44k files from one server to another. My Powershell script is: Import-CSV f:\script\Listoffiles.csv | foreach $line {Move-item $_.Source $_.Destination} With the Format for the CSV: Source, Destination E:\folder1\folder2\file with space.txt, \\1.2.3.4\folder1\folder2\file with space.txt I keep getting: A positional parameter cannot be found that accepts argument '\\1.2.3.4\folder1\folder2\file'. At line:1 char:10 + move-item <<<< E:\folder1\folder2\file with space.txt \\1.2.3.4\folder1\folder2\file with space.txt + CategoryInfo : InvalidArgument: (:) [Move-Item], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.MoveItemCommand So I've tried putting "s around both paths, and also 's, and I still get either Move-Item: Could not find a part of the path errors. Can anyone help me?

    Read the article

  • How to add a list-item at specific position

    - by Germanico Brismal
    Hi, I'd like to add a <li> at a specific position, for example: <ul id="list"> <li>Position 1</li> <li>Position 2</li> <li>Position 4</li> <ul> Let's say that I want to add a new <li> below/after <li>Position 2</li>, how can I do it using jQuery? I've tried to do it using the code below: $('#list li:eq(1)').append('<li>Position 3</li>'); But, it didn't work, because it appends the <li> inside the <li>Position 2</li>, instead add the <li> below/after the <li>Position 2</li>. Can someone give me some help? Thank you.

    Read the article

  • get the list and input from one function and run them in different function

    - by rookie
    i have a programm that generate the list and then i ask them to tell me what they want to do from the menu and this is where my problem start i was able to get the input form the user to different function but when i try to use the if else condition it doesn't check, below are my code def menu(x,l): print (x) if x == 1: return make_table(l) if x == 2: y= input("enter a row (as a number) or a column (as an uppercase letter") if y in [ "1",'2','3']: print("Minmum is:",minimum(y,l)) if x== 3: print ('bye') def main(): bad_filename = True l =[] while bad_filename == True: try: filename = input("Enter the filename: ") fp = open(filename, "r") for f_line in fp: f_str=f_line.strip() f_str=f_str.split(',') for unit_str in f_str: unit=float(unit_str) l.append(unit) bad_filename = False except IOError: print("Error: The file was not found: ", filename) #print(l) condition=True while condition==True: print('1- open\n','2- maximum') x=input("Enter the choice") menu(x,l) main() from the bottom function i can get list and i can get the user input and i can get the data and move it in second function but it wont work after that.thank you

    Read the article

  • Install windows xp using USB: removable disk option not available in boot device options list

    - by kowsar89
    I want to install windows xp with pendrive as my dvdrom doesnt work. When i go to bios setup and boot device options,i cant find any option for pendrive.Here's my boot device options: >1st FLOPPY DRIVE >3M-HDS728080PLA >PS-ASUS DVD-E818A >DISABLED And Here's my desktop configuration: intel(R) pentium(R) 4 CPU 2.66GHz 0.99GB RAM N.B: I bought my desktop in 2006. Now how can i install windows xp in my desktop using pendrive?

    Read the article

  • static effect on python

    - by fatai
    how we can construct static effect on python instead of using class and global ? not like that one : global a a = [] #simple ex ; fonk ( a , b , d) x = 1 a.append ( x) EDIT: I want to create temporary memory , if I exit the function namely fonk , I want to save change as list on temporary memory . We can do that demand only put static keyword in front of data type but in python , we dont have static, so I want that effect in python . Therefore , how can I do ? As above code say "a" represents temporary memory

    Read the article

  • Hiding samba share from browse list for unauthorised users

    - by karlbright
    Hey Guys, I have been trying to setup my samba shares correctly. The setup i was looking for was having a couple of shares available publicly, guest accounts are ok and can browse these shares all ok. I have this setup correctly. The problem comes when setting up a share that only certain users can view, although i have setup a share that will only allow certain users to access. I havent been able to hide this share from guests. I had a look into the browseable = yes option but this hides it from everyone, including the users that have logged in. Any idea on how to tackle this? The setup i have for this private share is follows: [private] comment = private share for certain users path = /media/drive/private create mask = 0777 directory mask = 0777 writable = yes public = no users = admin

    Read the article

  • Python - alternative to list.remove(x)?

    - by Seafoid
    Hi, I wish to compare two lists. Generally this is not a problem as I usually use a nested for loop and append the intersection to a new list. In this case, I need to delete the intersection of A and B from A. A = [['ab', 'cd', 'ef', '0', '567'], ['ghy5'], ['pop', 'eye']] B = [['ab'], ['hi'], ['op'], ['ej']] My objective is to compare A and B and delete A intersection B from A, i.e., delete A[0][0] in this case. I tried: def match(): for i in A: for j in i: for k in B: for v in k: if j == v: A.remove(j) list.remove(x) throws a ValueError.

    Read the article

  • List tags with commits in the same format like git branch -v

    - by NickSoft
    Hi I would like to list tags like it's listed by: # git branch -v * devel e7f5e36 firxed bugs master 63e9c56 remove unused code without the * (you can't checkout tag). It would be good to have an option to list full or short SHA1. A bash script is also fine, but it would be nice to use git commands more and shell scripting less. I've read this question Git - how to tell which commit a tag points to and it helped me, but it's not all I want. Edit: I didn't know that annotated tags had SHA1. I wanted SHA1 of commits that tag points to, not the tags themselfs.

    Read the article

  • Rsync with a list of variables

    - by EMKA
    I am trying to write a bash script that will rsync only a specific subset of folders. I am trying to figure out a more slick so that I can just add a variables such as FOLDER1='name of folder in home directory' and then rsync -arvz --delete /home/emka/$FOLDER1/ /home/emka/Desktop/Mount/$FOLDER1 Currently I have FOLDER1 through FOLDER13, but I do not want to have the above line thirteen times. Could someone give me a push on how to do this?

    Read the article

  • Magento - Using alternative "reviews count" on category list page

    - by Sam
    Hi All I noticed that on the category list page, the number of reviews (pulled from frontend/base/default/template/review/helper/summary_short.phtml) lists the full amount of reviews for an item, not the amount available to the store view you’re on. So, for example (using the sample data) the Samsung MM-A900M Ace has 5 reviews - however, when you click that link and are taken to the reviews page, it actually just has 2 (as only 2 are available to the English view). But on the reviews page, the review count is correct and says 2 reviews (this time pulled from frontend/base/default/template/review/product/view/count.phtml). Is there any way to use this review count on the category list?

    Read the article

  • Linq.Where-to-SQL on a text field comparing to a list of values

    - by StampedeXV
    Customer.text is a field in an T-SQL DB (that I do not control and thus may not alter) of type "text". I'd like to do something like this: List<string> compare = new List<string>(); compare.Add("one"); compare.Add("two"); var q = from t in customer where t.text.Contains( compare.First()) select t; this will work. But now I'd like to do something like: (!NOT WORKING!) var q = from t in customer where compare.Contains( t.text ) select t; How can I achieve this? Is it even possible?

    Read the article

  • list of all commits SHA1_HASH

    - by dorelal
    git init echo 'I am foo' > foo.txt git add foo.txt # this woould create a git commit object echo ' I am foo2' > foo.txt git add foo.txt # this would create another git commit object git commit -m 'doe' # this would create two git # objects: one commit object and one tree object How do I get a list of all 4 commits SHA1_HASH ? cd .git/objects ls (master)$ ls -al total 0 drwxr-xr-x 8 nsingh staff 272 Mar 27 16:44 . drwxr-xr-x 13 nsingh staff 442 Mar 27 16:44 .. drwxr-xr-x 3 nsingh staff 102 Mar 27 16:44 37 drwxr-xr-x 3 nsingh staff 102 Mar 27 16:43 a2 drwxr-xr-x 3 nsingh staff 102 Mar 27 16:44 e1 drwxr-xr-x 3 nsingh staff 102 Mar 27 16:42 e6 drwxr-xr-x 2 nsingh staff 68 Mar 27 16:42 info drwxr-xr-x 2 nsingh staff 68 Mar 27 16:42 pack I can find the list of all 4 commits by looking at file here but there must be a better way.

    Read the article

  • Change selected value of drop down list with jQuery

    - by Phairoh
    I have a drop down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery. Using regular JavaScript, I would do something like: ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it to. However, I need to do this with jQuery because I'm using a CSS class for my selector (stupid ASP.NET client ids...). Here are a few things I've tried: $("._statusDDL").val(2); // doesn't find 2 as a value $("._statusDDL").children("option").val(2) // also failed. How can I do it with jQuery?

    Read the article

  • A Solution For (IEnumerable<Base>)Derive; Yet?

    - by acidzombie24
    I have D1 and D2 which derive from B. When i write var ls = (IEnumerable<B>)(cond?lsD1:lsD2); I get a runtime cast error. IIRC this is a well known problem. My question is 1) Is this allowed yet? perhaps in .NET 4? I have 2010 but my project is a few months old, large and targets 3.5. 2) Is there a simple workaround? I only need to read the list not add anything or remove. Actually, ToArray() would probably work but is there another solution?

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >