Search Results

Search found 8354 results on 335 pages for 'welton v3 50'.

Page 65/335 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Many-to-one relationship in SQLAlchemy

    - by Arrieta
    This is a beginner-level question. I have a catalog of mtypes: mtype_id name 1 'mtype1' 2 'mtype2' [etc] and a catalog of Objects, which must have an associated mtype: obj_id mtype_id name 1 1 'obj1' 2 1 'obj2' 3 2 'obj3' [etc] I am trying to do this in SQLAlchemy by creating the following schemas: mtypes_table = Table('mtypes', metadata, Column('mtype_id', Integer, primary_key=True), Column('name', String(50), nullable=False, unique=True), ) objs_table = Table('objects', metadata, Column('obj_id', Integer, primary_key=True), Column('mtype_id', None, ForeignKey('mtypes.mtype_id')), Column('name', String(50), nullable=False, unique=True), ) mapper(MType, mtypes_table) mapper(MyObject, objs_table, properties={'mtype':Relationship(MType, backref='objs', cascade="all, delete-orphan")} ) When I try to add a simple element like: mtype1 = MType('mtype1') obj1 = MyObject('obj1') obj1.mtype=mtype1 session.add(obj1) I get the error: AttributeError: 'NoneType' object has no attribute 'cascade_iterator' Any ideas?

    Read the article

  • Problem with loop MATLAB

    - by Jessy
    no time scores 1 10 123 2 11 22 3 12 22 4 50 55 5 60 22 6 70 66 . . . . . . n n n Above a the content of my txt file (thousand of lines). 1st column - number of samples 2nd column - time (from beginning to end ->accumulated) 3rd column - scores I wanted to create a new file which will be the total of every three sample of the scores divided by the time difference of the same sample. e.g. (123+22+22)/ (12-10) = 167/2 = 83.5 (55+22+66)/(70-50) = 143/20 = 7.15 new txt file 83.5 7.15 . . . n so far I have this code: fid=fopen('data.txt') data = textscan(fid,'%*d %d %d') time = (data{1}) score= (data{2}) for sample=1:length(score) ..... // I'm stucked here .. end ....

    Read the article

  • Need complete picture of virtual adress space

    - by claws
    Hello, This image gives a good picture about Virtual Adress space. But it only says half of the story. It only gives complete picture of User Adress space ie.. lower 50% (or 75% in some cases). What about the rest 50% (or 25%) which is occupied by the kernel. I know kernel also has so many different things like kernel modules , device drivers, core kernel itself. There must be some kind of layout right? What is its layout? If you say its Operating System dependent. I would say, there are two major operating systems Windows & Linux. Please give answer for any one these.

    Read the article

  • Selected number of records from database in DB2.

    - by Abhi
    Hi All, I have to fetch only 50 records at a time from database(DB2), for this I have been usig Row_Number but now the persons are telling that this Row_Number is not stable and has bugs in it so now I have to write a different querry for the same as I have to fetch only 50 records at a time. so please can any body help me out for the same. Thanks in advance. The Query which I have been using is SELECT PLC.* FROM ( SELECT ROW_NUMBER() OVER (ORDER BY PRDLN_CTLG_OID) AS Row, PRDLN_CTLG_OID, PRODUCT_LINE_OID AS PRODUCT_LINE_OID, RTRIM(CATALOG_ID) AS CATALOG_ID, FROM PROD_LINE_CATALOG WHERE PRODUCT_LINE_OID=:productLineOID AND ACTV_IND = 1 ORDER BY CATALOG_ID) PLC WHERE Row >= :startIndex AND Row <= :endIndex ORDER BY PLC.CATALOG_ID DESC WITH UR

    Read the article

  • converting tag number to int

    - by Ehtesham Sajed
    i m using Visual C++2008. i've assigned tag value=2 of all buttons from button property(using drag n drop). now i want to make some math calculation with tag value. need to change it in int. what is the default data type tag? i used this code, //code sample if(((int)this-button1-Tag)((int)this-button2-Tag)((int)this-button3-Tag)==50) { ........ //i.e, if tag value of button1*tag value of button2*tag value of button 3==50 then... ........ } generated following run time error on a messegebox An unhandled exception of type 'System.InvalidCastException' occurred in learncpp1.exe Additional information: Specified cast is not valid.

    Read the article

  • IE6 Overflow Issue

    - by Nimbuz
    <div style="float:left; width:50%;"> div 1 <div style="position:absolute; width:105%">nested element</div> </div> <div style="float:left; width:50%;"> div 2 </div If an element exceeds the width of its floated parent element, the next element is pushed down unless I apply overflow:hidden on both floated elements, which defeats the purpose because I DO NOT want to hide the overflowing content. Is there any fix for it?

    Read the article

  • Aggregation over a few models - Django

    - by RadiantHex
    Hi folks, I'm trying to compute the average of a field over various subsets of a queryset. Player.objects.order_by('-score').filter(sex='male').aggregate(Avg('level')) This works perfectly! But... if I try to compute it for the top 50 players it does not work. Player.objects.order_by('-score').filter(sex='male')[:50].aggregate(Avg('level')) This last one returns the exact same result as the query above it, which is wrong. What am I doing wrong? Help would be very much appreciated!

    Read the article

  • Raphael how to get last path and last circle, if i have 2 elements in the paper?

    - by 3gwebtrain
    I need to find the last path or circle in a paper, in order to perform further calculations to draw more elements, and calling 'paper.bottom' only gets the last element. Is there any way to get shapes of specific types, e.g. bottom.path, bottom.circle or traverse for the n'th child? I want to avoid using jQuery selectors, as i can't retrieve any properties from those. An example of a paper populated with shapes: var paper = Raphael('paper',500,500); var c1 = paper.circle(100,100,50) var p1 = paper.path("M10 20l70 0") var c2 = paper.circle(200,100,50)

    Read the article

  • Sending images using Http Post

    - by primal
    I want to send an image from the android client to the Django server using Http Post. The image is chosen from the gallery. At present, I am using list value name Pairs to send the necessary data to the server and receiving responses from Django in JSON. Can the same approach be used for images (with urls for images embedded in JSON responses)? Also which of, accesssing images remotely without downloading them from the server or downloading and storing them in a Bitmap array and using them locally is a better method? The images are few in number (<10) and small in size (50*50 dip). Any tutorial to tackle these problems would be much appreciated.

    Read the article

  • parsing command option with default values and range constrains in C

    - by agramfort
    Hi, I need to parse command line arguments in C. My arguments are basically int or float with default values and range constrains. I've started to implement something that look like this: option_float(float* out, int argc, char* argv, char* name, description, float default_val, int is_optional, float min_value, float max_value) which I call for example with: float* pct; option_float(pct, argc, argv, "pct", "My super percentage option", 50, 1, FALSE, 0, 100) however I don't want to reinvent the wheel ! My objective is to have error checking of range constrains, throw an error when the option is not optional and is not set. And generate the help message usually given by usage() function. The usage text would look like this: --pct My super percentage option (default : 50). Should be in [0, 100] I've started with getopt but it is too limited for what I want to do and I feel it still requires me to write too much code for a simple usecase like this. thanks

    Read the article

  • mysql query to concat information from 3 tables - getting incorrect result count

    - by iPfaffy
    I have 3 tables in my database. ab_contacts id first_name last_name addressbook_id ab_addressbooks name id co_comments id link_id comment I'd like to create a query that will let me select all the contacts and comments related to them in a given addressbook. To select all the people in a given addressbook, I can use: select count(*) from ab_contacts where addressbook_id = '50'; This returns 8152 people. However, when I run my query: select ab_contacts.first_name, ab_contacts.last_name, ab_contacts.email, ab_addressbooks.name, co_comments.comments from ab_contacts JOIN ab_addressbooks ON (ab_contacts.addressbook_id = ab_addressbooks.id) JOIN co_comments ON (ab_contacts.id = co_comments.link_id) WHERE ab_contacts.addressbook_id = '50';` the format works, but I only get 1045 results. I'm sure there is something I am missing, but I cannot figure it out. Any help would be greatly appreciated.

    Read the article

  • Tkinter mouse event initially triggered

    - by user3714884
    I'm currently learning Tkinter and I cannot find a solution for my problem here nor outside Stackoverflow. In a nutshell, all events that I bind to my widgets are triggered initialy and don't respond to my actions. In this example, the red rectangle appears on the canvas when I run the code, and color=random.choice(['red', 'blue']) revealed that the event binding doesn't work after that: import Tkinter as tk class application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.can = tk.Canvas(master, width=200, height=200) self.can.bind('<Button-2>', self.draw()) self.can.grid() def draw(self): self.can.create_rectangle(50, 50, 100, 100, fill='red') app = application() app.mainloop() I use a Mac platform, but I haven't got a clue about its role in the problem. Could anyone please point me at the mistake i did here?

    Read the article

  • Drawing unfilled rectangle shape in c++ openGL

    - by Bahaa
    I want to draw unfilled rectangle shape in openGL using c++ programming language but when I used the glBegin(GL_QUADS) or glBegin(GL_POLYGON), the resulted shape is filled but I want to be unfilled. How I can draw unfilled rectangle. void draweRect(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(0.0,0.0,1.0); glLineWidth(30); glBegin(GL_POLYGON); glVertex2i(50,90); glVertex2i(100,90); glVertex2i(100,150); glVertex2i(50,150); glEnd(); glFlush(); }

    Read the article

  • PHP memcache - check if any server is available in pool?

    - by Industrial
    Hi everyone, I have the following code: $cluster['local'] = array('host' => '192.168.1.1', 'port' => '11211', 'weight' => 50); $cluster['local2'] = array('host' => '192.168.1.2', 'port' => '11211', 'weight' => 50); $this->memcache = new Memcache; foreach ($this->cluster() as $cluster) { $this->memcache->addServer($cluster['host'], $cluster['port'], $this->persistent, $cluster['weight'], 10, 10, TRUE , 'failure' ); } I would like to make a function that checks if any of my servers in my memcache Pool is available. How could this be done?

    Read the article

  • GAE app.yaml appears to be inconsistently routing requests

    - by kamens
    I have the following in app.yaml: - url: /gae_mini_profiler/static static_dir: gae_mini_profiler/static - url: /gae_mini_profiler/.* script: gae_mini_profiler/main.py - url: .* script: main.py and the following in gae_mini_profiler/main.py: def main(): logging.critical("gae_mini_profiler request!") run_wsgi_app(application) However, when I fire requests to, say, /gae_mini_profiler/request?request=ABC, and repeatedly reload the page, sometimes I will get the proper response (as well as a "gae_mini_profiler request!" log entry, and sometimes I get a blank response and nothing in the App Engine logs other than a 200 with an empty response body. This is completely reproducible, only happens in the live environment, and I'd say ~50% of the refreshes work while 50% do not. This only happens in production. Any ideas?

    Read the article

  • Eclipse - How to show warning for unused method parameter ?

    - by Brad
    I am using Eclipse v3.5. In previous Eclipse versions i remember if i have defined a method with a parameter and didn't use it internally a warning appears, like this : public void myMethod( int x ) { // Didn't use x here so a warning appears at the x parameter. } But in v3.5 i do not see this warning. How can i enable it in Eclipse ?

    Read the article

  • string holding text every \n

    - by gcc
    I tried to take input in form of string, specifically: int i=0; char c[50][500]; for(;i<50;++i) scanf("%s",A[i]); The input is x is a website that allows the easy[1] creation and editing of any number of interlinked web pages via a web browser using a simplified markup language or a WYSIWYG text editor. In my program, I want the text to be stored as: A[0]="x is a website that allows the easy[1] creation and editing of any number of interlinked" A[1]=" web pages via a web browser using a simplified markup language or a WYSIWYG text editor." But my code causes the text to be stored as A[0]="is" A[1]="a" A[2]="website" .... What am I doing wrong?

    Read the article

  • VIM: Columnvise Increment inside and outside?

    - by hhh
    By outside, I want solutions that does not use Vim's scripting hacks but try to reuse certain basic *ix tools. Inside Vim stuff asks for solutions to get the column-increment with inside stuff such as scripting. 1 1 1 2 1 3 1 ---> 4 1 5 1 6 . . . . Vim has a script that does column-vise icrementing here. It has gathered about 50/50 ups and down, perhaps tasting a bit reinventing-the-wheel. How do you column-increment stuff in Vim without using such script? Then the other question is, how do you column-increment stuff without/outside Vim? Most elegant, reusable and preferrably-small wins the race!

    Read the article

  • SQL Server concurrency and generated sequence

    - by Goyuix
    I need a sequence of numbers for an application, and I am hoping to leverage the abilities of SQL Server to do it. I have created the following table and procedure (in SQL Server 2005): CREATE TABLE sequences ( seq_name varchar(50) NOT NULL, seq_value int NOT NULL ) CREATE PROCEDURE nextval @seq_name varchar(50) AS BEGIN DECLARE @seq_value INT SET @seq_value = -1 UPDATE sequences SET @seq_value = seq_value = seq_value + 1 WHERE seq_name = @seq_name RETURN @seq_value END I am a little concerned that without locking the table/row another request could happen concurrently and end up returning the same number to another thread or client. This would be very bad obviously. Is this design safe in this regard? Is there something I can add that would add the necessary locking to make it safe? Note: I am aware of IDENTITY inserts in SQL Server - and that is not what I am looking for this in particular case. Specifically, I don't want to be inserting/deleting rows. This is basically to have a central table that manages the sequential number generator for a bunch of sequences.

    Read the article

  • MoveWindow API doesn't work well on Vista

    - by Dex Ilic
    Hello! I have an application on Vista which loops through all processes and finds associated main windows in order to move and resize them. The problem is that some windows get moved and resized and some don't. Also it even seems that moved and resized windows aren't moved and resized according to the MoveWindow function call because they are resized to title bar and all of them are on the same line (same y coordinate). Here's the sample code: IntPtr handle; Process[] processList = Process.GetProcesses(); int i = 0; foreach (Process process in processList) { handle = process.MainWindowHandle; if (handle != IntPtr.Zero) //If the process has window then move and resize it. { bool moveResult = MoveWindow(handle, i * 50, i * 50, 500, 500, true); i++; } } Is this because of Vista? What alternative should I use?

    Read the article

  • jquery for loop on click image swap

    - by user2939914
    I've created a for loop of images. I would like each image to swap with another image on click individually. Here's the jQuery I've written so far: for ( var i = 1; i < 50; i++) { $('article').append('<div class="ps-block" id="' + i + '"><img src="img/bw/' + i + 'bw.png"></div>'); } $('img').click(function() { var imgid = $(this).attr('id'); $(this).attr("src", "img/color/" + imgid + ".png"); }); I also attempted to use this code inside the for loop after the append, but i ends up returning 50 every time you click since the loop has already ran: $('img[src="img/bw/' + i + 'bw.png"]').click(function() { $(this).attr("src", "img/color/" + this.id + ".png"); }); Thanks!

    Read the article

  • Problem with joining to an empty table

    - by Imran Omar Bukhsh
    I use the following query: select * from A LEFT JOIN B on ( A.t_id != B.t_id) to get all the records in A that are not in B. The results are fine except when table B is completely empty, but then I do not get any records, even from table A. Later It wont work yet! CREATE TABLE IF NOT EXISTS T1 ( id int(11) unsigned NOT NULL AUTO_INCREMENT, title varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, t_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table T1 INSERT INTO T1 (id, title, t_id) VALUES (1, 'apple', 1), (2, 'orange', 2); -- -- Table structure for table T2 CREATE TABLE IF NOT EXISTS T2 ( id int(11) NOT NULL AUTO_INCREMENT, title varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, t_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table T2 INSERT INTO T2 (id, title, t_id) VALUES (1, 'dad', 2); Now I want to get all records in T1 that do not have a corresponding records in T2 I try SELECT * FROM T1 LEFT OUTER JOIN T2 ON T1.t_id != T2.t_id and it won't work

    Read the article

  • PHP: extract email and name from data file

    - by pi-2r
    I need to extract the name and the e-mail from one data file. the file contains more than 500 lines and I want to extract this two informations almost all the data. I would like to use preg_match_all, but my function doesn't work ... $chaine = " ----------------- 11/21/12 16:06:54 tcp static-qvn-qvt-127041 MAIL [email protected] NAME tata1 ----------------- 11/21/12 16:06:54 tcp static-qvn-qvt-127041 MAIL [email protected] NAME tata2 * ----------------- 11/21/12 16:06:54 tcp static-qvn-qvt-127041 MAIL [email protected] NAME tata3 "; //$chaine =" #76:50#89:1#86:50#49:1#84:22"; $motif="/MAIL([a-z]{2,4}+)NAME([a-z]{2,4}+)/"; preg_match_all($motif,$chaine,$out); $nb=count($out[0]); for($i=0;$i<$nb;$i++) { echo $out[0][$i].'<br/>'; }

    Read the article

  • selected index event is not working in dropdown

    - by prince23
    <asp:DropDownList ID="ddlTime" runat="server" CausesValidation="true" AutoPostBack="true" onselectedindexchanged="ddlTime_SelectedIndexChanged"> <asp:ListItem Selected Value = "True">--Select--</asp:ListItem> <asp:ListItem>8.50</asp:ListItem> <asp:ListItem>9.00</asp:ListItem> <asp:ListItem>9.50</asp:ListItem> </asp:DropDownList> I have drop down with the event changing . but when ever i select an value this event is not firing at all protected void ddlTime_SelectedIndexChanged(object sender, EventArgs e) { } What is the issue that is causing here any help would be great thank you

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >