Daily Archives

Articles indexed Tuesday May 25 2010

Page 32/118 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • django sync db question

    - by Hulk
    In django models say this model exist in details/models.py class OccDetails(models.Model): title = models.CharField(max_length = 255) occ = models.ForeignKey(Occ) So when sync db is made the following fields get created and later to this of two more fields are added and sync db is made the new fields doesnt get created.How is this to be solved,Also what is auto_now=true in the below these are the new fields created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now_add=True, auto_now=True)

    Read the article

  • Splashscreen ProgressBar in Eclipse RCP has "dirty" corners

    - by pimpf0r
    Hi there, I am using the RCP Splash Screen along with the built-in ProgressBar (AbsolutePositionProgressMonitorPart). The splash image has a blue background color, but the background of the progressbar seems to be white, which leads to some white corners. There is no "setBackground" on BasicSplashHandler nor does getContent().setBackground(Color) has any noticeable effect. I don't want to be too picky, but since the splash is the first thing you see from the application, I think its very important to be tidy. So, do you have any idea how to get rid of these corners?

    Read the article

  • Displaying same record twice- SQL Reporting Services

    - by RyanW
    Ok, here's the situation: I need to display the same record in two different sections. stupid i know, but here's why. The Report I am building is grouped by one Field, called Day. Each record has date/times, an expected arrival date time, and an expected departure date/time. so, at this point we have something like this: Day..............Arrival Time..................Departure Time 18/5.............18/5 9.00am.........19/5 11.00am The boss only wants to show times that relate to the current day in the arrive/depart coloumns (easy enough with expressions), which ends up like this: Day..............Arrival Time..................Departure Time 18/5..............9.00am.........................- the next thing he wants is to display the departing time in the correct day 'group', but as you can imagine as soon as you move to the next row, well you move to the next row of the table. So the question is: is there anyway to display the same record on multiple coloumns? Have i missed something or have i got an unsolvable problem? NOTE: this is not the only data in my table either. there is (for example) a name coloumn which also needs to be displayed on both days.

    Read the article

  • FileContentResult and international characters

    - by suzi167
    Hello, I am using a fileContentResult to render a file to the browser. It works well except that it throws an exception when the fileName contains international characters. I remember reading somewhere that this feature does not support international characters but I am sure there mustbe a workaround or a best practice people follow in cases the application needs to upload files in countries other than US. Does anyone know of such a practice?Here is the ActionResult Method public ActionResult GetFile(byte[] value, string fileName) { string fileExtension = Path.GetExtension(fileName); string contentType = GetContentType(fileExtension); //gets the content Type return File(value, contentType, fileName); } THanks in advance Susan

    Read the article

  • One value display two columns in data grid

    - by Nair
    I have a XML with 3 values, they are 'name', 'department', 'value'. I want to display a data grid with four columns like Name, department, credit and debit. When I have a value positive in 'value' column I want to enter the value in debit column and 0 in credit column and vice versa.

    Read the article

  • priority queue implementation

    - by davit-datuashvili
    i have implemented priority queue and i am interested if it is correct public class priqueue { private int n,maxsize; int x[]; void swap(int i,int j){ int t=x[i]; x[i]=x[j]; x[j]=t; } public priqueue(int m){ maxsize=m; x=new int [maxsize+1]; n=0; } void insert(int t){ int i,p; x[++n]=t; for (i=n;i>1 && x[p=i/2] >x[i];i=p) swap(p,i); } public int extramin(){ int i,c; int t=x[1]; x[1]=x[n--]; for (i=1;(c=2*i)<=n;i=c){ if (c+1<=n && x[c+1]<x[c]) c++; if (x[i]<=x[c]) break; swap(c,i); } return t; } public void display(){ for (int j=0;j<x.length;j++){ System.out.println(x[j]); } } } public class priorityqueue { public static void main(String[] args) { priqueue pr=new priqueue(12); pr.insert(20); pr.insert(12); pr.insert(22); pr.insert(15); pr.insert(35); pr.insert(17); pr.insert(40); pr.insert(51); pr.insert(26); pr.insert(19); pr.insert(29); pr.insert(23); pr.extramin(); pr.display(); } } //result: 0 12 15 17 20 19 22 40 51 26 35 29 23

    Read the article

  • Windows Server 2008 R2 Server Core with AD Role having GUI Admin Console

    - by Robert Koritnik
    I would like to setup a machine with Windows Server 2008 R2 Server Core and install following server roles: Active Directory Domain Services Active Directory Federation Services Active Directory Lightweight Directory Services (I'm not sure whether I actually need this one - see note below) I'm obviously going to install Enterprise Edition. Question Can I have an AD administration graphical user interface to manage Active Directory on Server Core machine? I would really like to have it, because I'm not so keen to do stuff using power-shell, because I've never managed AD as well, so a GUI would be much more helpful, because I could at least visualize it a bit better and maybe understand AD structures. Note: I'm setting up development environment machine as well and installing Sharepoint Foundation 2010 on in so it would use this AD machine.

    Read the article

  • Blocking facebook's Like button in firefox

    - by Quiark
    Many sites today use widgets from facebook such as the Like button, list of friends who are fans of that site and so on. While it may be a nice feature, I perceive it to be a serious privacy intrusion, because facebook most likely stores information about which sites you visit. I also heard that when you are not logged into facebook, it still tracks the sites you visit (probably with a cookie) and once you log in attaches the data to your real account. For now, I want to keep using facebook, but I would like to block just these widgets so it can't track me. Is there any Firefox extension which could do that?

    Read the article

  • Reject an already accepted appointment?

    - by John
    Hallo all, I have accepted an appointment thru outlook, later due to another more important arrangement I have to reject the already accepted appointment. Is there any easy way to retrieve the invitation and reject it? Thanks in advance, John

    Read the article

  • Can I use Blender to create 3D wall image viewer application under Linux?

    - by sgon00
    Hi, Is that possible to use Blender to create Cooliris-like 3D wall image viewer application under Linux? I don't see many people use Blender (BGE) to create desktop application, so I am wondering if this is possible. People normally use Blender for modeling/movie and game engine. I can not find a good way to create 3D application in Linux so far. I was thinking about pyQT+opengl. But I feel that is hard to do. No robust and easy-to-use qt+opengl toolkit available from my research. I know a little bit of Blender, that's why I am asking if Blender is an alternative solution. (python is preferred) The image viewer doesn't have to be windowed. It can be full screen, like a game?. I would like to add many cool effects into this application. Hopefully cooler than Cooliris which is written in flash. Thanks a lot.

    Read the article

  • How to know the file type of the file which you are forcing the user to download?

    - by Starx
    I am trying to force the user to download a file. For that my script is: $file = "file\this.zip"; header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header("Content-Type: application/zip"); //This is what I need header("Content-Transfer-Encoding: binary"); readfile($file); The files I am going to upload my not be .zip all the time so I want to know the content type of the image I am going to receive in $file. How to accomplish this

    Read the article

  • What is the recommended way for calling remote JSON objects from native blackberry apps?

    - by jpartogi
    Dear all, IF I am to develop a native application on blackberry, what would be the recommended way to call remote JSON object? As I understand native blackberry apps is coded using Java, would it still be able to contact a remote JSON object from Ruby on Rails? Has there been any blackberry framework to ease this use case? Thank you very much for your help. I really appreciate it.

    Read the article

  • How to Use 3 Monitors

    - by The.Anti.9
    Right now my setup has a nice big 24" flatscreen in the center, and a 19" flatscreen to the left. And a big gaping hole on the right. I have a 3rd monitor to put there, but I'm not sure how to get the computer to recognize it. Do I need a graphics card with 3 ports? Or can I span the monitors over non SLI-Linked graphics cards? Is it possible to plug my 3rd monitor into the on-board VGA port and have it work?

    Read the article

  • Google App Engine appcfg.py data_upload Authentication fail

    - by Pradeep Upadhyay
    Hi, I am using appcfg.py to upload data to datastore from a csv file. But every time I try, I am getting error: [info ] Authentication failed even if i am using Admin id and password. In my app.yaml file I am having: handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py login: admin - url: .* script: MainHandler.py Can anybody please help me? Thanks in advance.

    Read the article

  • C++: static assert for const variables?

    - by shoosh
    Static asserts are very convenient for checking things in compile time. A simple static assert idiom looks like this: template<bool> struct StaticAssert; template<> struct StaticAssert<true> {}; #define STATIC_ASSERT(condition) do { StaticAssert<condition>(); } while(0) This is good for stuff like STATIC_ASSERT(sizeof(float) == 4) and: #define THIS_LIMIT (1000) ... STATIC_ASSERT(THIS_LIMIT > OTHER_LIMIT); But using #define is not the "C++" way of defining constants. C++ would have you use an anonymous namespace: namespace { const int THIS_LIMIT = 1000; } or even: static const int THIS_LIMIT = 1000; The trouble with this is that with a const int you can't use STATIC_ASSERT() and you must resort to a run-time check which is silly. Is there a way to properly solve this in current C++? I think I've read C++0x has some facility to do this...

    Read the article

  • How can I detect client-side when a page load is the result of an AJAX history point?

    - by Nick
    I'm trying to prevent a "flicker" effect that is occurring on my ASP.NET page which occurs when a user navigates to the page via the browser back button after having navigated away from it. The reason for the flicker is that I'm using an Update Panel which has some content in there on the initial page-load. As a result, when the page is loaded via a back button that initial content is shown very briefly before it is updated with the correct History-aware data. In order to overcome this I am intending on having the updatepanel hidden (display: none) on inital page load and then show it as long as we don't have any history to deal with. The problem is that I can't find out what to check to determine if there's any history. I can see that the Sys.Application has a _history member but when I'm checking it on page init it is null each time. Does anyone know what I should be checking to determine if there's history to deal with for a page load client-side? And at what point to do it?

    Read the article

  • Best way to store a database password in a startup script / config file?

    - by Mark Harrison
    So our web server apps need to connect to the database, and some other apps have startup scripts that execute at boot time. What's the best way to store the name/password for these applications, in terms of security, e.g. perhaps we don't want sysadmins to know the database password maintainability, e.g. making the configuration easy to change when the password changes, etc. both windows and linux solutions appreciated!

    Read the article

  • Using Memcached in Python/Django - questions.

    - by Thomas
    I am starting use Memcached to make my website faster. For constant data in my database I use this: from django.core.cache import cache cache_key = 'regions' regions = cache.get(cache_key) if result is None: """Not Found in Cache""" regions = Regions.objects.all() cache.set(cache_key, regions, 2592000) #(2592000sekund = 30 dni) return regions For seldom changed data I use signals: from django.core.cache import cache from django.db.models import signals def nuke_social_network_cache(self, instance, **kwargs): cache_key = 'networks_for_%s' % (self.instance.user_id,) cache.delete(cache_key) signals.post_save.connect(nuke_social_network_cache, sender=SocialNetworkProfile) signals.post_delete.connect(nuke_social_network_cache, sender=SocialNetworkProfile) Is it correct way? I installed django-memcached-0.1.2, which show me: Memcached Server Stats Server Keys Hits Gets Hit_Rate Traffic_In Traffic_Out Usage Uptime 127.0.0.1 15 220 276 79% 83.1 KB 364.1 KB 18.4 KB 22:21:25 Can sombody explain what columns means? And last question. I have templates where I am getting much records from a few table (relationships). So in my view I get records from one table and in templates show it and related info from others. Generating page last a few seconds for very small table (<100records). Is it some easy way to cache queries from templates? Have I to do some big structure in my view (with all related tables), cache it and send to template?

    Read the article

  • Underscore as a segment_separators in routing.yml

    - by Mickael
    In symfony project, I would like to use an underscore as a separator for the parameter in routing.yml. Url example: /article/lorem-1111_45.html In routing.yml rule_sample: url: /article/:info-:datePublished_:id.html param: { module: cms, action: test } options: segment_separators: ['-', '/', '.', '_'] requirements: info: ^([A-Za-z0-9\-]+)$ datePublished: \d+ id: \d+ This code doesnt work. I have the following error: Unable to parse "/article/:info-:datePublished_:id.html" route near ":id.html". Anybody knows how to implement this rule ?

    Read the article

  • Adding a Line Break in mySQL INSERT INTO text

    - by james
    Hi Could someone tell me how to add a new line in a text that i enter in a mySql table. I tried using the '\n in the line i entered with INSERT INTO statement but '\n is shown as it is. Actually i have created a table in Ms Access with some data. Ms Access adds new line with '\n. I am converting Ms Access table data into mySql . But when i convert, the '\n is ignored and all the text is shown in one single line when i display it from mySql table on a php form. Can anyone tell me how mySQL can add a new line in a text ? Awaiting response Thanks !!

    Read the article

  • Drupal 6 - Including a module form in a view

    - by espais
    I'm making use of the Favorites module, in order to allow my users to favorite nodes they like. Currently, I know that there is a block available for listing out the favorites, along with the 'Add to favorites' button at the top of this list. What I'd like to do is generate the form which includes the button, and include it within each node that I generate. I'd gotten it hacked up and quickly working by copying the generated form and placing it in my views-view--fields-.tpl.php template, however I believe that doing it this way goes against the thought behind Drupal, and probably introduces security issues with the form_id and form_token being hand-written. I've attempted to call the get_form function, and have passed it the form_id that I found in the generated form code, however I can't get Drupal to recognize it. From some Googling I've noticed that generating module forms programmatically may require a hook, but I haven't been able to find any good examples of this. What is the best way to go about creating this form?

    Read the article

  • Wordpress Plugin with Database connection

    - by Ajith
    Hi all, I am using WordPress Version 2.9.2 for my blog.when i am trying to include a database connection in one of my plug-in which is not working properly.Which did not get the database connection.But in all other directory it is possible to use a common connection.So,now I am using manual coding in all of my plug-in file.Any ways to getting a common connection in all of my plug-in.Help me please...

    Read the article

  • master-slave datastore replication, automatic failover, and wackamole

    - by z8000
    I have 2 dedicated servers provisioned for my next project's datastores. The datastores are configured for master-slave replication. There's no inherent automatic failover but I of course want this. That is, I'd love for access to the master datastore to always just work without having to configure a client library to detect when a master is down and failover to the slave. I've seen Wackamole which is based on the Spread Toolkit. You provide Wackamole with a set of IPs and a bunch of nodes, and regardless of the up/down state of any of the nodes, those IPs will stay available/up. Wackamole detects when a node goes down and ARPs the IP(s) that were up on the now-down node. It's pretty neat actually. So, my thought was to use Wackamole to keep the 2 virtual private IPs available/up. Clients would then just always use the same private IP to access the master datastore and the same but distinct IP for the slave datastore, even if those IPs were hosted on the same node. My datastore servers are accessed over a private network. I am unsure if this messes with Wackamole though. Is this lunacy? How do you generally handle automatic failover of private services like a datastore. FWIW, it shouldn't matter but the datastore is Redis. I don't want to hear "use mySQL" please :) Thanks.

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >