Search Results

Search found 3459 results on 139 pages for 'if modified since'.

Page 73/139 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • How to set variable size for List control item in Flex?

    - by joejax
    The following code display a list of comments using List control. The item height set to a fixed value (150), so it seems working: if the content is too long, the scrollbar shows... However, what I really want is not to set the height but let it to change according to the content size. Is there any way to accomplish this? <mx:List id="commentList" width="100%" dataProvider="{commentSet.commentArrayColl}" rowCount="{commentSet.commentArrayColl.length}" > <mx:itemRenderer> <mx:Component> <mx:VBox width="100%" height="150" > <mx:Text text="{data.commentContent}" /> <mx:Text text="{data.username} ({data.modified})"/> </mx:VBox> </mx:Component> </mx:itemRenderer> </mx:List>

    Read the article

  • How to localize static content in database with Django

    - by man with python
    My app has tables for languages and countries (actually django-countries at the moment, but open for suggestions). The tables are populated when I initialize the database and remain static after that. What would be the ideal localization mechanism for the contents of these tables, so that I can show the country and language names to users in their chosen site language? I'm aware of projects like django-multilingual and transdb, but IMO they are more suitable for dynamic content, i.e. stuff that's supposed to be modified. Please englighten me!

    Read the article

  • Regular expressions in python unicode

    - by Remy
    I need to remove all the html tags from a given webpage data. I tried this using regular expressions: import urllib2 import re page = urllib2.urlopen("http://www.frugalrules.com") from bs4 import BeautifulSoup, NavigableString, Comment soup = BeautifulSoup(page) link = soup.find('link', type='application/rss+xml') print link['href'] rss = urllib2.urlopen(link['href']).read() souprss = BeautifulSoup(rss) description_tag = souprss.find_all('description') content_tag = souprss.find_all('content:encoded') print re.sub('<[^>]*>', '', content_tag) But the syntax of the re.sub is: re.sub(pattern, repl, string, count=0) So, I modified the code as (instead of the print statement above): for row in content_tag: print re.sub(ur"<[^>]*>",'',row,re.UNICODE But it gives the following error: Traceback (most recent call last): File "C:\beautifulsoup4-4.3.2\collocation.py", line 20, in <module> print re.sub(ur"<[^>]*>",'',row,re.UNICODE) File "C:\Python27\lib\re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or buffer What am I doing wrong?

    Read the article

  • What approaches are available to revert an IDirect3DDevice9 instance to its default render state?

    - by Rafael Goodman
    Given an instance of IDirect3DDevice9, what approaches are available to put it in its original render state (i.e. the state it was in when the device was initially created)? The cleanest way that I've come across is to create a state block via IDirect3DDevice9::CreateStateBlock just after the device has been created so that it can be applied later. Unfortunately, I'm operating under the constraints of an existing project such that I can't modify the device creation code; by the time my component gets the device, its default state has been modified. As a result, I'm looking for alternative approaches. Thx! ~Raf

    Read the article

  • Printing complex widgets in Qt

    - by Jens
    I have a complex widget with tons of different subwidgets, e.g. subclasses of QLabel. I want to print this widget, but obviously I do not want to print the background, I want to print with differing text colors or have the style of frames slightly modified. As I do not really want to iterate through all subwidgets with a special "print" function, which I would need to attach to all widgets (how to add "print" to a QLabel?), I would like to use paintEvent. If I have a hierarchy MyWidget - derived from - some QWidget, I would like to insert a sublayer MyWidget - MyPrintWidget - some QWidget, where myPrintWidget::paintEvent would check, if the current print is going to the screen (thus call QWidget::paintEvent), else if we are printing to the printer, call some function MyPrintWidget::drawWidget instead. Is this the right way to print-enable a widget? How can I figure out in paintEvent, that I'm printing to a printer instead of the screen? Is there a good example of printing complex widgets?

    Read the article

  • Please help me to resolve my ajax error

    - by Rajesh Rolen- DotNet Developer
    i am using asp.net (.net framework 2.0) i am getting below error for my ajax popup extender error : Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near 'The server rejected '. actually is not giving me error on localhost, i have uploaded it on 2 other different server on 1 server its working fine but on other server its giving me above error. (on server where is working fine has got windows 2000 and on which its giving error its ms windows 2003). this is link where its giving me error : highschoolers its on "Join new for free" button ..

    Read the article

  • Does anyone actually use the phrase DHTML anymore?

    - by lafoaug
    I'm not sure if this is exactly appropriate but I have what I think is a interesting question. Does anyone actually use the phrase DHTML anymore in a professional environment? I came across the the word the other day for the first time in years and shuddered at the thought of it. To me the acronym Dynamic HTML just sounds so 1999, it brings me back to the days when I first discovered programming and web development and thought it was awesome to have scripts which modified the status bar and made things fly around the page. I for one have never used the phrase recently and would never dream of saying it in a professional environment to clients or colleges as I feel there is an amateur and dated stigma attached to it. What are your thoughts?

    Read the article

  • static, define, and const in C

    - by yCalleecharan
    Hi, I've read that static variables are used inside function when one doesn't want the variable value to change/initialize each time the function is called. But what about defining a variable static in the main program before "main" e.g. #include <stdio.h> static double m = 30000; int main(void) { value = m * 2 + 3; } Here the variable m has a constant value that won't get modified later in the main program. In the same line of thought what difference does it make to have these instead of using the static definition: const double m = 30000; or #define m 30000 //m or M and then making sure here to use double operations in the main code so as to convert m to the right data type. Thanks a lot...

    Read the article

  • Django i18n: makemessages only on site level possible?

    - by AndiDog
    I have several strings in my site that don't belong to any app, for example {% block title %}{% trans "Login" %}{% endblock %} or a modified authentication form used to set the locale cookie class AuthenticationFormWithLocaleOption(AuthenticationForm): locale = forms.ChoiceField(choices = settings.LANGUAGES, required = False, initial = preselectedLocale, label = _("Locale/language")) Now when I execute django-admin.py makemessages --all -e .html,.template in the site directory, it extracts the strings from all Python, .html and .template files, including those in my apps. That is because I develop my apps inside that directory: Directory structure: sitename myapp1 myapp2 Is there any way to extract all strings that are not in my apps? The only solution I found is to move the app directories outside the site directory structure, but I'm using bzr-externals (similar to git submodules or svn externals) so that doesn't make sense in my case. Moving stuff that needs translation into a new app is also possible but I don't know if that is the only reasonable solution.

    Read the article

  • InfoPath browser form submitting dirty fields changed through javascript

    - by Xavier
    I'm trying to submit an InfoPath browser form with fields that have been modified through the Spell Checker included in Sharepoint server. The spell checker checks all the fields in the page and once the user closes the SpellChecker dialog, it changes the textboxes with the new values through javascript. When I click Submit, debug the FormEvents_Submit in the form code behind and try to do a GetNodeValue("XPath to changed field"), it still shows the old values. I realize that this may be a problem of doing postbacks and I'd like to do a full page postback once the SpellChecker is done changing all the textboxes. Any suggestions would be appreciated. Thanks.

    Read the article

  • using lazy C++ for stub generation

    - by Abruzzo Forte e Gentile
    Hi all Have you ever used lazy C++? I am trying to create .CPP files out of .H files. In forum I read that it is possible with your tool but I tried touse it and I didn't succeed. Can you help me? I used the option -c with a Test.h file with exactly the following declaration. class TEST_A { public: TEST_A(); ~TEST_A(); void fooA( MyNamespace::String& aName ); }; The only thing I have is a Cpp file with written #define LZZ_INLINE #undef LZZ_INLINE and the .h file modified with before the class #define LZZ_LINE inline class TEST_A { public: TEST_A(); ~TEST_A(); void fooA( MyNamespace::String& aName ); }; #undef LZZ_LINE What I am doing wrong?

    Read the article

  • Giving proper credit to a projects contributors

    - by Greg B
    I've recently been working with an opensource library for a commercial product. The opensource code is distributed from the website of the company who sells the proprietary product as a zip file. The library is a (direct) port to C# of the original library which is in Java. As such, it uses methods instead of getter/setter properties. The code contains copyright notices to the supplier of the product. The C# port was originally provided to the company by a 3rd party individual. I have modified the source to be more C# like and added a couple of small features. I want to put my version of the code out there (Google code or where ever) so that C# users of the software can benefit from a more native feeling library. How can I and/or how should I amend the copyright notice to give proper credit to The comercial owner of the original source The guy who provided the original C# port Myself and anyone else who contributes to the project in the future The source is provided under the LGPL V2.1,

    Read the article

  • How to expose a constructor variable(sic!) as read-only?

    - by Malax
    Hi StackOverflow! I have this rather simple question about Scala. Given that i have to following class definition: class Foo(var bar: Int) The code which is able to construct an instance of Foo must be able to pass the initial value for bar. But if I define bar as var the User is also able to change its value at runtime which is not what I want. The User should only be able to read bar. bar itself is modified internally so a val is not an option. I think I might be getting an answer very soon as this question is so simple. :-) Cheers, Malax

    Read the article

  • configure apache with sql

    - by Chava
    Hello, I am newly using Apache Tomcat6.0 I am unable to access sql database through my jsp and getting java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver Tried steps at http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html downloaded drivers mysql-connector-java-5.1.9 and mysql-5.0.85-win32 na dkept in tomcat\lib modified web.xml with context details but this didinot help me. Please suggest and provide steps if possible. JSP code Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); Connection con=DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:8080"); I am using sql server WampServer without a password and created databse and table successfully.

    Read the article

  • How to change a primary key in SQL to auto_increment?

    - by Jian Lin
    I have a table in MySQL that has a primary key: mysql> desc gifts; +---------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+-------------+------+-----+---------+-------+ | giftID | int(11) | NO | PRI | NULL | | | name | varchar(80) | YES | | NULL | | | filename | varchar(80) | YES | | NULL | | | effectiveTime | datetime | YES | | NULL | | +---------------+-------------+------+-----+---------+-------+ but I wanted to make it auto_increment. The following statement failed. How can it be modified so that it can work? thanks mysql> alter table gifts modify giftID int primary key auto_increment; ERROR 1068 (42000): Multiple primary key defined

    Read the article

  • Noptepad++ Gripes Around File Reloading And Window Numbers

    - by ChloeRadshaw
    I ve started using Notepad++ moving over from TextPad I have two main gripes: 1) Can you actually see all the files open in your Notepad++ in a document explorer view like you could with TextPad? 2) Can you configure Notepad++ to only update files open if that file is the active document? Often I have ten log files open and I want to see when they get modified when I click on them 3) Can you control window numbers? Sometimes I look at two files and I always used to switch between them by doing Window - 1 and then Window - 2. With notepad++ a window number seems to assigned and never changes

    Read the article

  • Somewhat newb question about assy and the heap.

    - by Eric M
    Ultimately I am just trying to figure out how to dynamically allocate heap memory from within assembly. If I call Linux sbrk() from assembly code, can I use the address returned as I would use an address of a statically (ie in the .data section of my program listing) declared chunk of memory? I know Linux uses the hardware MMU if present, so I am not sure if what sbrk returns is a 'raw' pointer to real RAM, or is it a cooked pointer to RAM that may be modified by Linux's VM system? I read this: How are sbrk/brk implemented in Linux?. I suspect I can not use the return value from sbrk() without worry: the MMU fault on access-non-allocated-address must cause the VM to alter the real location in RAM being addressed. Thus assy, not linked against libc or what-have-you, would not know the address has changed. Does this make sense, or am I out to lunch?

    Read the article

  • bulk update/delete entities of different kind in db.run_in_transaction

    - by Ray Yun
    Here goes pseudo code of bulk update/delete entities of different kind in single transaction. Note that Album and Song entities have AlbumGroup as root entity. class AlbumGroup: pass class Album: group = db.ReferenceProperty(reference_class=AlbumGroup,collection_name="albums") class Song: album = db.ReferenceProperty(reference_class=Album,collection_name="songs") def bulk_update_album_group(album_group): updated = [album_group] deleted = [] for album in album_group.albums: updated.append(album) for song in album.songs: if song.is_updated: updated.append(song) if song.is_deleted: deleted.append(song) db.put(updated) db.delete(deleted) a = AlbumGroup.all().filter("...").get() # bulk update/delete album group. for simplicity, album cannot be deleted. db.run_in_transaction(bulk_update_album_group,a) But I met a famous "Only Ancestor Queries in Transactions" error at the iterating reference properties like album.songs or album_group.albums. I guess ancestor() filter does not help because those entities are modified in memory. Should I not to iterate reference property in transaction function and always provide them as function parameters like def bulk_update_album_group(updated,deleted): ??? Is there any good coding pattern for this situation?

    Read the article

  • ArgumentException was unhandled Application.run

    - by user369758
    Hi I've been through many sites and can't seem to find an answer. I modified a view that was connected to a Datagridview connected through a tableadapter on a C# Winforms app and in order to "reconnect" I had to delete the tableadapter and reconnect it. This was to get rid of an error regarding Unique contstraints. So I fixed that and now the application launches but when I click on the tab that that grid is on I get: System.ArgumentException was unhandled Message="Cannot bind to the property or column Id on the DataSource.\r\nParameter name: dataMember" Source="System.Windows.Forms" ParamName="dataMember" StackTrace: at System.Windows.Forms.BindToObject.CheckBinding() at System.Windows.Forms.BindToObject.SetBindingManagerBase(BindingManagerBase lManager)......... I can't seem to find an answer to this problem. Can someone help me? Thanks

    Read the article

  • Proper permission and directoy location for Git Version Control

    - by CitadelCSAlum
    I am using Git Version Control on an remote server and I have set up a repository that multiple people will be using to push/fetch from. I have put the repo under /srv/subdir/git/.git I have been experiencing problem after problem it seems like. a) Is this location suitable for handling a project that will need to be accessed/modified by multiple developers and a designer? Or is there a better location? b)Do I need to modify the permissions on the subdir/ and git/ directories in order to allow remote access? If I do what is the appropriate permissions I should allow? I know this is a faily long request/question, but unfortunately like many other topics with well covered documentation, documentation does not always cover best practices. I would appreciate anybodies advice and suggestions? Thanks

    Read the article

  • Getting a table's values into a tree

    - by Jason
    So, I have a table like such: id|root|kw1|kw2|kw3|kw4|kw5|name 1| A| B| C| D| E| F|fileA 2| A| B| | | | |fileB 3| B| C| D| E| | |fileC 4| A| B| | | | |fileD (several hundred rows...) And I need to get it into a tree like the following: *A *B -fileB -fileD *C *D *E *F -fileA *B *C *D *E -fileC I'm pretty sure the table is laid out poorly but it's what I have to live with. I've read a little about Adjacency List Model & Modified Preorder Tree Traversal but I don't think my data is laid out correctly. I think this requires a recursive function, but I'm not at all sure how to go about that. I'm open to any ideas of how to get this done even if it means extracting the data into a new table just to process this. Are there any good options available to me or any good ways to do this? (Examples are a bonus of course)

    Read the article

  • create a folder and files in c:\program files\myApp\data in windows 7

    - by ile
    I have an old c++ application that needs to be modified to work with windows 7. Problem is in creating a new folder and saving a file in that folder. This folder should be created in c:\program files\myApp\data\newFolder. This is function I use to create new folder and get errors: if(!CreateDirectory(pathSamples,NULL)) //Throw Error { DWORD errorcode = GetLastError(); LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf, 0, NULL ); MessageBox(NULL, (LPCTSTR)lpMsgBuf, TEXT("Error"), MB_OK); } In XP this works, but in Windows 7 it doesn't. If I run application as administrator than the folder is created, otherwise "Access is denied" error is thrown. My question is following: Is there an option to make changes to the code so that the folder can be created in "program files" nad that files can be saved in this folder? PS I saw this thread already but it doesn't answer my question. Thanks, Ilija

    Read the article

  • Generating Ant build file for a project in eclipse

    - by Negai
    Hi everyone. I have a project written in Java using eclipse and I would like to generate an Ant build file for it. How can it be done? I constantly need to keep it synchronized with the source code, so that I could promote it along with the code to the common repository when with the project structure is modified. I'm sorry for a stupid question like this. I've browsed across the forums, but still no luck. Thanks in advance.

    Read the article

  • Editing/Modifying a .java file programmatically? (not the .class file)

    - by Jay
    So, here is a piece of code using CodeModel that generates java code: JCodeModel cm = new JCodeModel(); JDefinedClass dc = cm._class("foo.Bar"); JMethod m = dc.method(0, int.class, "foo"); m.body()._return(JExpr.lit(5)); File f = new File("C:/target/classes"); f.mkdirs(); cm.build(f); This code generates a .java file: package foo; public class Bar { int foo() { return 5; } } However, I DO NOT want CodeModel to create a new java file for me. I do have a .java file already and would like to add a few lines of code to a method inside it. So, I would like the API to modify the java file directly/ create a modified copy of it. Is there a way to doing this?

    Read the article

  • Parsing plain data with Javascript (JQuery)

    - by Angelus
    Well , I have this text in a Javascript Var: GIMP Palette Name: Named Colors Columns: 16 # 255 250 250 snow (255 250 250) 248 248 255 ghost white (248 248 255) 245 245 245 white smoke (245 245 245) 220 220 220 gainsboro (220 220 220) 255 250 240 floral white (255 250 240) 253 245 230 old lace (253 245 230) 250 240 230 linen (250 240 230) 250 235 215 antique white (250 235 215) 255 239 213 papaya whip (255 239 213) And What I need is to cut it in lines and put them in one Array , after that i must separate each number and the rest in an string. I'm getting crazy searching functions to do that but now i can't see anyone in Javascript. modified End expected format will be first the next: array[0]='255 250 250 snow (255 250 250)' Then i wanna take it and extract each line into some vars to use them: colour[0]=255; colour[1]=250; colour[2]=250; string=snow (255 250 250); (the vars will be reused with each line)

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >