Search Results

Search found 1105 results on 45 pages for 'thx'.

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

  • advanced python autovivification

    - by Zhang18
    This question is about implementing the full PERL autovivification in python. I know similary questions were asked before and so far the best answre is http://stackoverflow.com/questions/635483/what-is-the-best-way-to-implement-nested-dictionaries-in-python/652284#652284. However, I'm looking to do this: a['x']['y'].append('z') without declaring a['x']['y'] = [] first, or rather, not declaring a['x'] = {} either. I know dict and list classes sorta don't mix so this is hard, but I'm interested in seeing if someone has an ingenius solution probably involving creating an inherited class from dict but defined a new append method on it? I also know this might throw off some python purists who will ask me to stick with Perl. But even just for a challenge, I'd like to see something. thx!

    Read the article

  • Using thread in aspx-page making a webrequest

    - by Mike Ribeiro
    Hi, I kind of new to the hole threading stuff so bare with me here.. I have a aspx-page that takes some input and makes a reqest: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format("{0}?{1}", strPostPath, strPostData)); request.Method = "GET"; request.Timeout = 5000; // set 5 sec. timeout request.ProtocolVersion = HttpVersion.Version11; try { HttpWebResponse response = (HttpWebResponse)request.GetResponse(); /do some with response } catch (WebException exce) { //Log some stuff } The thing is that this function is used ALOT. Is there any advantage to make every request in a separate thread and exactly how would that look like? Thx!

    Read the article

  • Android: chronometer widget and layout() method could not work well at the same time

    - by Lennard
    I write a test android app, in which there are only two views, a chronometer and a imageview. Using the layout() method of the imageview to dynamically change the position of it, I wish to implement drag-and-drop effect. It does work. However, each time the chronometer ticks, the imageview is always reverted to its original position, which seems that the whole screen is reloaded from the layout xml. So, does anybody know how to prevent the imageview from reverting to the original place, and let chronometer and drag-and-drop effect coexist? Thx

    Read the article

  • Struct sockaddr, sin_family is not a member

    - by leon22
    According to this article from msdn ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms740496(v=vs.85).aspx) the struct varies depending on which protocol is selected! Now I want to use this code from http://www.intelliproject.net/articles/showArticle/index/check_tcp_udp_port to check if a port is open or not! Now I have the struct sockaddr as follows: struct sockaddr { ushort sa_family; char sa_data[14]; }; but need this strcuture: struct sockaddr { short sin_family; u_short sin_port; struct in_addr sin_addr; char sin_zero[8]; }; Which changes are necessary? (Ws2_32.lib is linked and following includes #define WIN32_LEAN_AND_MEAN // sockets #include "windows.h" #include <winsock2.h> #include <ws2tcpip.h> Thx

    Read the article

  • jQuery 1.4.2 - Ajax & increasing IE 8 Process Handles

    - by mac866
    Hi, I'm requesting every second some data over $.ajax. $.ajax({ type: "POST", url: "ServiceEndpointUrl", data: "", success: function(result) { ... Do Work ... } } } } }); This code leads into an continuous growing number of handles in IE 8 (Windows 7 / verified with Task Manager & Process Explorer). Firefox & Chrome does not have this problem. This page is displayed all day long - this leads into thousands of handles & will sometimes crash the complete browser. My workaround is to reload the complete page every hour - but this can't be the solution ;-) Any suggestions how to "close" these Ajax-Handles? thx

    Read the article

  • Drag/Drop movieclip event in JSFL? (Flash IDE)

    - by niels
    Lately im trying to do some experimental things with JSFL, and i was wondering if it is possible to listener for an event when a component (that i have made) or movieclip is dragged from library on the stage. i want to create something that i'll get a component and drop it on a mc. when the component is dropped on the mc the component will save the mc as a reference in some var. maybe with events isnt the way to go but i have no clue if this is possible or how to do it another way. i hope someone can help me get started thx in advance

    Read the article

  • c++ undefined references with static library

    - by stupid_idiot
    hi guys i'm trying to make a static library from a class but when trying to use it i always get errors with undefined references on anything. the way i proceeded was creating the object file like g++ -c myClass.cpp -o myClass.o and then packing it with ar rcs myClass.lib myClass.o there is something i'm obviously missing generaly with this.. i bet it's something with symbols.. thx for any advices, i know it's most probably something i could find out if reading some tutorial so sorry if bothering with stupid stuff again :) edit: myClass.h: class myClass{ public: myClass(); void function(); }; myClass.cpp: #include "myClass.h" myClass::myClass(){} void myClass::function(){} program using the class: #include "myClass.h" int main(){ myClass mc; mc.function(); return 0; } finally i compile it like this: g++ -o main.exe -L. -l myClass main.cpp

    Read the article

  • Java webservice does not return all struct array

    - by Aykut
    Hi I wrote a webservice which runs correctly. In the webservice, there is a class which contains other classes' arrays and the webservice returns this class's instance. for example public class cls1 implements Serializable{ cls2[] cls2Arr; cls3[] cls3Arr; } I fill this arrays (cls2Arr and cls3Arr) correctly in service side. When I read this arrays from client, I see only last item of arrays. I checked on the service side before the webservice returns, and the cls1 instance and everything else looked good. What can be a reason ? Thx

    Read the article

  • Layout Bug in IE (div relative)

    - by Florian
    Hi, I have a problem with IE (all versions). I have a header div with a relative position and inside this another div with absolute position and right alignment. <div id="header" style="position: relative; width: 1000px; height: 60px;"> content http://stadtwerke-bitburg.de/fileadmin/overflow_prob_IE.png Now when I open the pulldown menu in FF/Safari/Opera everything is all right. Whereas in IE everything which is taller than 60px disappears behind my header div. Is there a workaround for this problem with CSS or do I have to write javascript to get this fixed? thx TC

    Read the article

  • android service exported attribute??

    - by doloop
    Hi, I am quite new about android platform. I want to export my service to be public used. I find something on developer doc android:exported Whether or not components of other applications can invoke the service or interact with it — "true" if they can, and "false" if not. When the value is "false", only components of the same application or applications with the same user ID can start the service or bind to it. but i dont understand it Can anyone show me a brief example of how to use it? many thx

    Read the article

  • do we need to escape the character '<'

    - by Ozkan
    In C# ASP.NET, if we have the characters < or in a string. Do we need to escape it like: string a = "\<test\>abcdef\</test\>" because this string will be send to an external method via webservices. And in that method, it will be converted to a some kind of xml file. contentHtml = "<?xml version=\"1.0\" encoding=\"utf-16\"?>" + contentHtml; content_ws.AddContent(contentHtml); //AddContent() method is a external method (via webservices) Thx for help

    Read the article

  • selecting ppp of multiple interfaces

    - by Neeraj
    Hi everyone, I am currently having a hard time on getting the mobile broadband connection running on ubuntu 10.04(lucid lynx). I am using a USB modem and used wvdial to connect to the web It went like: Sending ATZ ... OK sending some more flags OK modem initialized connecting Local IP x.x.x.x Remote IP y.y.y.y Primary DNS z.z.z.z Secondary DNS a.a.a.a (Some more output) I tested this with invalid username to make sure it is really connected and i think it was connected as connection failed with invalid usernames. Now when I do a remote ping say 8.8.8.8 (Google DNS servers), the ping says unreachable I think this might be because the system may be using the ethernet to send packets which was indeed disconnected. So can anyone help me out with this. How can I select ppp as the interface to send packets or is there some other problem. A command line solution will be appreciated as my network manager applet doesnt works correctly. Any help is much much appreciated. -- thx

    Read the article

  • Doesn't JavaScript support closures with local variables?

    - by qollin
    I am very puzzled about this code: var closures = []; function create() { for (var i = 0; i < 5; i++) { closures[i] = function() { alert("i = " + i); }; } } function run() { for (var i = 0; i < 5; i++) { closures[i](); } } create(); run(); From my understanding it should print 0,1,2,3,4 (isn't this the concept of closures?). Instead it prints 5,5,5,5,5. I tried Rhino and Firefox. Could someone explain this behavior to me? Thx in advance.

    Read the article

  • Spring-Hibernate: How to submit a for when the object has one-to-many relations?

    - by Czar
    Hi, I have a form changeed the properties of my object CUSTOMER. Each customer has related ORDERS. The ORDER's table has a column customer_id which is used for the mapping. All works so far, I can read customers without any problem. When I now e.g. change the name of the CUSTOMER in the form (which does NOT show the orders), after saving the name is updated, but all relations in the ORDERS table are set to NULL (the customer_id for the items is set to NULL. How can I keep the relationship working? THX

    Read the article

  • Powershell - Select the values of one property on all objects of an array

    - by Sylvain Reverdy
    Sorry, I'm still a noob on Powershell and I could not find an answer on Internet... Let's say we have an array of objects $objects. Let's say these objects have a "Name" property. This is what I want to do $results = @() $objects | %{ $results += $_.Name } this works but can it be done on a better way? If I do something like : $results = objects | Select Name $results is an array of objects having a Name property. I want $results to contain an array of Names So, is there a better way ? Thx a lot

    Read the article

  • Check if row already exists, if so tell the referenced table the id

    - by flhe
    Let's assume I have a table magazine: CREATE TABLE magazine ( magazine_id integer NOT NULL DEFAULT nextval(('public.magazine_magazine_id_seq'::text)::regclass), longname character varying(1000), shortname character varying(200), issn character varying(9), CONSTRAINT pk_magazine PRIMARY KEY (magazine_id) ); And another table issue: CREATE TABLE issue ( issue_id integer NOT NULL DEFAULT nextval(('public.issue_issue_id_seq'::text)::regclass), number integer, year integer, volume integer, fk_magazine_id integer, CONSTRAINT pk_issue PRIMARY KEY (issue_id), CONSTRAINT fk_magazine_id FOREIGN KEY (fk_magazine_id) REFERENCES magazine (magazine_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ); Current INSERTS: INSERT INTO magazine (longname,shotname,issn) VALUES ('a long name','ee','1111-2222'); INSERT INTO issue (fk_magazine_id,number,year,volume) VALUES (currval('magazine_magazine_id_seq'),'8','1982','6'); Now a row should only be inserted into 'magazine', if it does not already exist. However if it exists, the table 'issue' needs to get the 'magazine_id' of the row that already exists in order to establish the reference. How can i do this? Thx in advance!

    Read the article

  • SVN: authz directory identifiers not support

    - by ledy
    Without using the authz, all the svn users can login and use the repos without issues. However, I would like to limit the access to some directories - not to be readable or writeable for all users. svnserve --version = 1.6.6 I tried both, granting access to users and groups. I also tried it separate, only group or only user access. [groups] admingroup=i_can_access_anything limitedgroup=i_am_limited [/] #*= @admingroup=rw i_can_access_anything=rw [projectX] #i also tried [repository:/projectX] #*= @limitedgroup=rw i_am_limited=rw Trying to access the / or /projectX at the svn fails. = access denied Without the authz, it works properly, but also grants access to other projects that do not belong to the "limited" user group :-/ Do you see what's wrong there? Thx

    Read the article

  • absolute positioned element clipping if position outside its parent item IE7

    - by yazz
    Hi Im trying to position an element so its slightly positioned outside its parent item. In IE8 it works but in IE7 the positioned element gets clipped. Here's my code HTML: <div id="parent"> <div id="child">text</div> </div> The CSS #parent { height: 40px; width: 400px; position: relative; } #child { position: absolute; width: 100px; height: 60px; top: 0px; left: 0px; } In IE7 you will see that the last 20px of the child element gets clipped. How can I solve this? THX

    Read the article

  • Count Upwards for ID jQuery

    - by Tom
    Hi Guys, I have the following HTML structure <div id="test-1-yay"></div> ... bunch of code ... <div id="test-2-yay"></div> ... bunch of code ... <div id="test-3-yay"></div> I was wondering how I can use jQuery to basically identify each of these "id's" and then apply some jQuery to them ? I'm new to this so little unsure ? Something like if $('#test-1-yay' || '#test-2-yay' || '#test-3-yay') { do stuff to all ID's } But the prob is I want this to continue as it could go to #test-201-yay, #test-202-yay etc ? Thx

    Read the article

  • Cannot add an entity that already exists. (LINQ to SQL)

    - by Vicheanak
    Hello guys, in my database there are 3 tables CustomerType CusID EventType EventTypeID CustomerEventType CusID EventTypeID Dim db = new CustomerEventDataContext Dim newEvent = new EventType newEvent.EventTypeID = txtEventID.text db.EventType.InsertOnSubmit(newEvent) db.SubmitChanges() 'To select the last ID of event' Dim lastEventID = (from e in db.EventType Select e.EventTypeID Order By EventTypeID Descending).first() Dim chkbx As CheckBoxList = CType(form1.FindControl("CheckBoxList1"), CheckBoxList) Dim newCustomerEventType = New CustomerEventType Dim i As Integer For i = 0 To chkbx.Items.Count - 1 Step i + 1 If (chkbx.Items(i).Selected) Then newCustomerEventType.INTEVENTTYPEID = lastEventID newCustomerEventType.INTSTUDENTTYPEID = chkbxStudentType.Items(i).Value db.CustomerEventType.InsertOnSubmit(newCustomerEventType) db.SubmitChanges() End If Next It works fine when I checked only 1 Single ID of CustomerEventType from CheckBoxList1. It inserts data into EventType with ID 1 and CustomerEventType ID 1. However, when I checked both of them, the error message said Cannot add an entity that already exists. Any suggestions please? Thx in advance.

    Read the article

  • How to remove caracters like (), ' * [] form a grep results with grep, awk or sed?

    - by easyyu
    For example if I made a file with grep that give me a next result: 16 Jan 07:18:42 (name1), xx.210.49.xx), 16 Jan 07:19:14 (name2), xx.210.xx.24), 16 Jan 07:19:17 (name3), xx.140.xxx.79), 16 Jan 07:19:44 (name4), xx.210.49.xx), 16 Jan 07:19:56 (name5), xx.140.xxx.79), ,then how to sed awk or grep to remove all except date name and IP to look like this: 16 Jan 07:18:42 name1 xx.210.49.xx 16 Jan 07:19:14 name2 xx.210.xx.24 16 Jan 07:19:17 name3 xx.140.xxx.79 16 Jan 07:19:44 name4 xx.210.49.xx 16 Jan 07:19:56 name5 xx.140.xxx.79 My grep command look like this: grep 'double' $DAEMON | awk -F" " '{print $2" "$1" "$3" "$8" "$10}' > $DBLOG Thx.

    Read the article

  • Creating Filter for my Associated View

    - by Hooman
    Senario: Open an account in CRM 2011 beta and click on activities on the left navigation pane, you will now see activities of the selected account and now have two filter drop down lists on the top which allow you to view activities of the account or sub accounts of this account. Is this filter drop downs something customizable or is it a feature only available for system entities (like acitivity)? Is this functionality provided because Activity entity have N:1 relationship with Type of Behavior = System? can we provide the same or similar functionality by using Type of behavior = Parental!?!? Thx

    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

  • navigation between screens Iphone programming

    - by Sephy
    Hi, I don't know if my question will be clear or not, but i'm starting basic stuff with iphone programming, and i'm trying to understand how to go from a screen to another. lets say i have a screen with a "next page" button and another page with a "return" button. I have a general idea of how to do this, but I don't know how to put it together. I think I need an IBAction method for each button, and in each method a navigation controller with pushViewController. So far, i've tried the following code, but even if it compiles properly and runs when i push the button, there is no change of screen... -(IBAction) toNext(id)sender{ NSLog(@"before code"); NextViewController *nvc = [[NextViewController alloc] initWithNibName:@"NextView" bundle:nil]; [self.navigationController pushViewController:nvc animated:YES]; [nvc release]; NSLog(@"after code"); } If someone had a nice tuto for me, it could be of some help... thx

    Read the article

  • How to log POSTed forms submissions?

    - by justSteve
    Back in the ASP classic days when i needed to write out the name/value pairs of forms submitted by POST i thru this loop into the page: on error resume next for each x in Request.Form Response.AppendToLog x & "=" & Request(x) next It threw all the form fields and values into the log just as GETs are. Does IIS7 .net give me any better method? (this is for the dev/testing portion of the project i don't have any concern about the space or cycles used to accomplish this). thx

    Read the article

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