Search Results

Search found 2312 results on 93 pages for 'whats your favourite'.

Page 79/93 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • Transparently surround a component with a link in Wicket

    - by Toni Menzel
    I want to be able to add links on certain items in an ListView. If an items is surrounded by the link or not is up to the code, so its not in the normal page markup. Say i have a markup like this: <div class="column" wicket:id="columnRepeater"> <span wicket:id="column"></span> </div> So essentially, while filling the repeater with a ListView i am able to find a custom renderer for the column component. (not my playingfield). What i want is to add a Link/Ajax Link around the column component. I learned using wicket:border lets you surround additional stuff. Now, the border markup looks like this: <wicket:border> <a wicket:id="link"><wicket:body/></a> </wicket:border> Now, i am a bit puzzled what the Border implementation looks like. Anyone there who can suggest a working java part? I have a couple of "work in progress" solutions but none works. Most questions have to do with usage of component ids. Is the border id = column ? Whats the id of the inner (border body) id then?

    Read the article

  • How do I get more separation between the end of the 1st div and the start of the 2nd div?

    - by user3075987
    I'm trying to get the 2nd div (the picture of the orange and copy) to go below the 1st div (the picture of the pear and copy), but see how the Orange copy is going up into the Pear copy. How can I have the Orange copy start below the Pear picture? Here's my jsfiddle: http://jsfiddle.net/huskydawgs/g8mbgr1e/4/ Here's my code: <div class="alignleft"> <p><img alt="Pear" src="http://eofdreams.com/data_images/dreams/pear/pear-01.jpg" width="144" height="150" /></p> The pear is native to coastal and mildly temperate regions of the Old World, from western Europe and north Africa east right across Asia. It is a medium-sized tree, reaching 10–17 metres (33–56 ft) tall, often with a tall, narrow crown; a few species are shrubby. The fruit is composed of the receptacle or upper end of the flower-stalk (the so-called calyx tube) greatly dilated. Enclosed within its cellular flesh is the true fruit: five cartilaginous carpels, known colloquially as the "core". From the upper rim of the receptacle are given off the five sepals[vague], the five petals, and the very numerous stamens. In ancient Egypt, artists used an orange mineral pigment called realgar for tomb paintings, as well as other uses. It was also used later by Medieval artists for the colouring of manuscripts. Pigments were also made in ancient times from a mineral known as orpiment. Orpiment was an important item of trade in the Roman Empire and was used as a medicine in China although it contains arsenic and is highly toxic. It was also used as a fly poison and to poison arrows. Because of its yellow-orange colour, it was also a favourite with alchemists searching for a way to make gold, both in China and the West. The pineapple is a herbaceous perennial which grows to 1.0 to 1.5 meters (3.3 to 4.9 ft) tall, although sometimes it can be taller. In appearance, the plant itself has a short, stocky stem with tough, waxy leaves. When creating its fruit, it usually produces up to 200 flowers, although some large-fruited cultivars can exceed this. Once it flowers, the individual fruits of the flowers join together to create what is commonly referred to as a pineapple. After the first fruit is produced, side shoots (called 'suckers' by commercial growers) are produced in the leaf axils of the main stem. These may be removed for propagation, or left to produce additional fruits on the original plant.[4] Commercially, suckers that appear around the base are cultivated. It has 30 or more long, narrow, fleshy, trough-shaped leaves with sharp spines along the margins that are 30 to 100 centimeters (1.0 to 3.3 ft) long, surrounding a thick stem. In the first year of growth, the axis lengthens and thickens, bearing numerous leaves in close spirals. After 12 to 20 months, the stem grows into a spike-like inflorescence up to 15 cm (6 in) long with over 100 spirally arranged, trimerous flowers, each subtended by a bract. Flower colors vary, depending on variety, from lavender, through light purple to red. Here's my CSS: .alignleft { float: left; margin: 0px 30px 20px 0px; } .alignright { float: right; margin: 0px 0px 20px 30px; }

    Read the article

  • Sharing NSMutableArray

    - by Lucas Veiga
    Hey everbody, im trying to share a NSMutableArray to another xib. The cartList.codigo is a NSMutableArray from a shared class, according to James Brannan's tutorial (http://www.vimeo.com/12164589). When i count it, it gives me 1. But when i load the another view, gives me 0. Whats wrong? View that adds: self.produtoCodigo = [[NSMutableArray alloc]init]; [self.produtoCodigo addObject:@"aa"]; CartViewController *carrinho = [[CartViewController alloc] initWithNibName:@"CartViewController" bundle:[NSBundle mainBundle]]; CartList *lista = [[CartList alloc] init]; carrinho.cartList = lista; carrinho.cartList.codigo = self.produtoCodigo; NSLog(@"QTD %i", [carrinho.cartList.codigo count]); View that wants to load the item added: - (void) viewDidAppear:(BOOL)animated { self.produtoCodigo = self.cartList.codigo; NSLog(@"%i", [self.produtoCodigo count]); [super viewDidLoad]; } Im loading the CartList class in both. Thanks!

    Read the article

  • VB.NET Update Access Database with DataTable

    - by sinDizzy
    I've been perusing some hep forums and some help books but cant seem to get my head wrapped around this. My task is to read data from two text files and then load that data into an existing MS Access 2007 database. So here is what i'm trying to do: Read data from first text file and for every line of data add data to a DataTable using CarID as my unique field. Read data from second text file and look for existing CarID in DataTable if exists update that row. If it doesnt exist add a new row. once im done push the contents of the DataTable to the database. What i have so far: Dim sSQL As String = "SELECT * FROM tblCars" Dim da As New OleDb.OleDbDataAdapter(sSQL, conn) Dim ds As New DataSet da.Fill(ds, "CarData") Dim cb As New OleDb.OleDbCommandBuilder(da) 'loop read a line of text and parse it out. gets dd, dc, and carId 'create a new empty row Dim dsNewRow As DataRow = ds.Tables("CarData").NewRow() 'update the new row with fresh data dsNewRow.Item("DriveDate") = dd dsNewRow.Item("DCode") = dc dsNewRow.Item("CarNum") = carID 'about 15 more fields 'add the filled row to the DataSet table ds.Tables("CarData").Rows.Add(dsNewRow) 'end loop 'update the database with the new rows da.Update(ds, "CarData") Questions: In constructing my table i use "SELECT * FROM tblCars" but what if that table has millions of records already. Is that not a waste of resources? Should i be trying something different if i want to update with new records? Once Im done with the first text file i then go to my next text file. Whats the best approach here: To First look for an existing record based on CarNum or to create a second table and then merge the two at the end? Finally when the DataTable is done being populated and im pushing it to the database i want to make sure that if records already exist with three primary fields (DriveDate, DCode, and CarNum) that they get updated with new fields and if it doesn't exist then those records get appended. Is that possible with my process? tia AGP

    Read the article

  • Why is my Android app force closing when I try to check if an EditText has a double

    - by user336861
    Scanner scanner = new Scanner(lapsPerMile_st); if (!scanner.hasNextDouble()) { Context context = getApplicationContext(); String msg = "Please Enter Digits and Decmials Only"; int duration = Toast.LENGTH_LONG; Toast.makeText(context, msg, duration).show(); lapsPerMileEditText.setText(""); return; } else { //Edit box has only digits, Set data and display stats data.setLapsPerMile(Integer.parseInt(lapsPerMile_st)); lapsRunLabel.setVisibility(0); lapsRunTextView.setText(Integer.toString(data.getLapsRun())); milesRunLabel.setVisibility(0); milesRunTextView.setText(Double.toString(data.getLapsRun()/data.getLapsPerMile())); } <EditText android:id="@+id/mileCount" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_marginTop="110dp" android:inputType="numberDecimal" android:maxLength="4" /> For some reason if I enter a non decimal number such as 3, or 5, it works fine but when I enter a floating point such as 3.4 or 5.8 it force closes. I cant seem to figure out whats going on. Any ideas? Thanks

    Read the article

  • C++ union data-structure, easy acccess of bits within a DWORD

    - by TK
    Im running through a set of DirectX tutorials online and I have the following structure: struct CUSTOMVERTEX { FLOAT x, y, z, rhw; // from the D3DFVF_XYZRHW flag DWORD color; // from the D3DFVF_DIFFUSE flag } My basic understanding of directX leads me to thing tha color is made up of 8-bit alpha, red, green and blue channels. I am attempting to get east access to these channels. Rather than write the following code numerous times (within the CUSTOMVERTEX structure): public: int red() { return (color & 0x00FF0000) >> 16; } I could write a more elegant somution with a combination of a union and a structure e.g. struct CUSTOMVERTEX { FLOAT x, y, z, rhw; // from the D3DFVF_XYZRHW flag #pragma pack(2) union { DWORD color; // from the D3DFVF_DIFFUSE flag struct { char a; char r; char g; char b; }; }; } However this does not appear to function as expected, the values in r, g, & b almost appear the reverse of whats in color e.g. if color is 0x12345678 a = 0x78, r = 0x56. Is this an endieness issue? Also what other problems could I be expecting from this solution? e.g. overflow from the color members? I guess what Im asking is ... is there a better way to do this?!

    Read the article

  • SpringMvc java.lang.NullPointerException When Posting Form To Server

    - by dev_darin
    I have a form with a user name field on it when i tab out of the field i use a RESTFUL Web Service that makes a call to a handler method in the controller. The method makes a call to a DAO class that checks the database if the user name exists. This works fine, however when the form is posted to the server i call the same exact function i would call in the handler method however i get a java.lang.NullPointerException when it accesses the class that makes a call to the DAO object. So it does not even access the DAO object the second time. I have exception handlers around the calls in all my classes that makes calls. Any ideas as to whats happening here why i would get the java.lang.NullPointerException the second time the function is called.Does this have anything to do with Spring instantiating DAO classes using a Singleton method or something to that effect? What can be done to resolve this? This is what happens the First Time The Method is called using the Web Service(this is suppose to happen): 13011 [http-8084-2] INFO com.crimetrack.jdbc.JdbcOfficersDAO - Inside jdbcOfficersDAO 13031 [http-8084-2] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query 13034 [http-8084-2] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT userName FROM crimetrack.tblofficers WHERE userName = ?] 13071 [http-8084-2] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource 13496 [http-8084-2] DEBUG org.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 1, parameter value [adminz], value class [java.lang.String], SQL type unknown 13534 [http-8084-2] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource 13537 [http-8084-2] INFO com.crimetrack.jdbc.JdbcOfficersDAO - No username was found in exception 13537 [http-8084-2] INFO com.crimetrack.service.ValidateUserNameManager - UserName :adminz does NOT exist The Second time When The Form Is 'Post' and a validation method handles the form and calls the same method the web service would call: 17199 [http-8084-2] INFO com.crimetrack.service.OfficerRegistrationValidation - UserName is not null so going to check if its valid for :adminz 17199 [http-8084-2] INFO com.crimetrack.service.OfficerRegistrationValidation - User Name in try.....catch block is adminz 17199 [http-8084-2] INFO com.crimetrack.service.ValidateUserNameManager - Inside Do UserNameExist about to validate with username : adminz 17199 [http-8084-2] INFO com.crimetrack.service.ValidateUserNameManager - UserName :adminz EXCEPTION OCCURED java.lang.NullPointerException

    Read the article

  • objective C underscore property vs self

    - by user1216838
    I'm was playing around with the standard sample split view that gets created when you select a split view application in Xcode, and after adding a few fields i needed to add a few fields to display them in the detail view. and something interesting happend in the original sample, the master view sets a "detailItem" property in the detail view and the detail view displays it. - (void)setDetailItem:(id) newDetailItem { if (_detailItem != newDetailItem) { _detailItem = newDetailItem; // Update the view. [self configureView]; } i understand what that does and all, so while i was playing around with it. i thought it would be the same if instead of _detailItem i used self.detailItem, since it's a property of the class. however, when i used self.detailItem != newDetailItem i actually got stuck in a loop where this method is constantly called and i cant do anything else in the simulator. my question is, whats the actual difference between the underscore variables(ivar?) and the properties? i read some posts here it seems to be just some objective C convention, but it actually made some difference.

    Read the article

  • initWithContentsOfURL seems to have issues with "long" URLs

    - by samsam
    Hi there I'm facing a rather strange Issue when trying to load data from an XML-Webservice. The webservice allows me to pass separated identifiers within the URL-Request. It is therefore possible for the URL to become rather long (240 characters). If I open said URL in firefox the response arrives as planned, if I execute the following code xmlData remains empty. NSString *baseUrl = [[NSString alloc] initWithString:[[[[kSearchDateTimeRequestTV stringByReplacingOccurrencesOfString:@"{LANG}" withString:appLanguageCode] stringByReplacingOccurrencesOfString:@"{IDENTIFIERS}" withString:myIdentifiers] stringByReplacingOccurrencesOfString:@"{STARTTICKS}" withString:[NSString stringWithFormat:@"%@", [[startTime getTicks] descriptionWithLocale:nil]]] stringByReplacingOccurrencesOfString:@"{ENDTICKS}" withString:[NSString stringWithFormat:@"%@", [[endTime getTicks] descriptionWithLocale:nil]]]]; NSLog(baseUrl); //looks good, if openend in browser, returnvalue is ok urlRequest = [NSURL URLWithString:baseUrl]; NSString *xmlData = [NSString stringWithContentsOfURL:urlRequest encoding:NSUTF8StringEncoding error:&err]; //err is nil, therefore i guess everything must be ok... :( NSLog(xmlData); //nothing... is there any sort of URL-Length restriction, does the same problem happened to anyone of you as well? whats a good workaround? thanks for your help sam

    Read the article

  • page variable in a repeater

    - by carrot_programmer_3
    Hi I'm having a bit of an issue with a asp.net repeater I'm building a categories carousel with the dynamic categories being output by a repeater. Each item is a LinkButton control that passes an argument of the category id to the onItemClick handler. a page variable is set by this handler to track what the selected category id is.... public String SelectedID { get { object o = this.ViewState["_SelectedID"]; if (o == null) return "-1"; else return (String)o; } set { this.ViewState["_SelectedID"] = value; } } problem is that i cant seem to read this value while iterating through the repeater as follows... <asp:Repeater ID="categoriesCarouselRepeater" runat="server" onitemcommand="categoriesCarouselRepeater_ItemCommand"> <ItemTemplate> <%#Convert.ToInt32(Eval("CategoryID")) == Convert.ToInt32(SelectedID) ? "<div class=\"selectedcategory\">":"<div>"%> <asp:LinkButton ID="LinkButton1" CommandName="select_category" CommandArgument='<%#Eval("CategoryID")%>' runat="server"><img src="<%#Eval("imageSource")%>" alt="category" /><br /> </div> </ItemTemplate> </asp:Repeater> calling <%=SelectedID%> in the item template works but when i try the following expression the value of SelectedID returns empty.. <%#Convert.ToInt32(Eval("CategoryID")) == Convert.ToInt32(SelectedID) ? "match" : "not a match"%> the value is being set as follows... protected void categoriesCarouselRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { SelectedID = e.CommandArgument); } Any ideas whats wrong here?

    Read the article

  • Using LINQ to isolate a particular obect from a list of objects

    - by dezkev
    Hello All, I am trying my hand at making an invaders clone. there are 30 aliens arranged in a 5x 6 matrix on screen. I need to give the bottom most alien the ability to fire a shot. I am using LINQ to group the aliens into 5 groups based on Location.X and then sort the groups descending.I then need to choose one of the groups ( that gives me 5 groups) and select the First alien in the group and use it;s coordinate to fire a shot. My code below ,well ,works , but aliens in ANY row are merrily firing shots- not just the bottom most. Pl look at my code below and tell me whats wrong. (r = an instance of the Random class, all aliens are in a list called invaders). { var query = (from inv in invaders group inv by inv.Location.X into invgroup orderby invgroup.Key descending select invgroup).ToList(); var invfirst = query[r.Next(query.Count)].First(); invaderShots.Add(new Shot( new Point(invfirst.Area.X + invfirst.Area.Width / 2, invfirst.Area.Y + invfirst.Area.Height + 5), displayrect, Shot.Direction.Down)); }

    Read the article

  • complete nub.. iostream file not found

    - by user1742389
    folks I am almost completely new to programming so please bear with me. I am using the first example from lydia.com c++ videos and failing. I am using Xcode 4.5.1 with a c++ command line project instead of eclipse and I am getting an error on compile of iostream file not found. the code is simple and I will include exactly what I have at the end of this message. I thought that iostream was a standard header that came with all even remotely recent versions of c++ compilers and am shocked to get this error and I cannot find any way to fix this. please tell me whats going on. #include <iostream> #include <stdio.h> #include <sstream> #include <vector> int main(int argc, char ** argv) { stringstream version; version << "GCC Version"; _GNUC_<<"."<<_GNUC_MINOR_<<"."<<_GNUC_PATCHLEVEL_<<_"\nVersion String: " <<_VERSION_; cout <<version.string() endl; vector<string> v={"one","two","three"}; for ( s : v ) { cout << s <<endl; } // insert code here... printf("Hello, World!\n"); return 0; } Thanks.

    Read the article

  • c# Wrapper to native c++ code, wrapping a parameter which is a pointer to an array

    - by mb300dturbo
    Hi, I have the following simple DLL in c++ un-managed code; extern "C" __declspec(dllexport) void ArrayMultiplier(float (*pointerArray)[3], int scalar, int length); void ArrayMultiplier(float (*pointerArray)[3], int scalar, int length) { for (int i = 0 ; i < length ; length++) { for (int j = 0; j < 3; j++) { pointerArray[i][j] = pointerArray[i][j] * scalar; } } } I have tried writing the following wrapper function for the above in c#: [DllImport("sample.dll")] public static extern void ArrayMultiplier(ref float elements, int scalar, int length); where elements is a 2 dimentional 3x3 array: public float[][] elements = { new float[] {2,5,3}, new float [] {4,8,6}, new float [] {5,28,3} }; The code given above compiles, but the program crashes when the wrapper function is called: Wrapper.ArrayMultiplier(ref elements, scalar, length); Please help me here, and tell me whats wrong with the code above, or how a wrapper can be written for a simple c++ function: void SimpleFunction(float (*pointerToArray)[3]); Thank you all in advance

    Read the article

  • jQuery dynamic validation

    - by kpomka
    Hi there Im trying to do a few things with jQuery validation plugin and seems stuck on one place. Here is some code: <script type="text/javascript"> $(document).ready(function(){ $('#myform').validate(); $('#email').rules('add', {required: true, messages: {required: 'email is required'}} ); $('#phone').rules('add', {required: true, messages: {required: 'phone is required'}} ); $('#validate').click(function(){ $('#result').text($('#myform').validate().form()); return false; }); }); </script> <form id="myform"> <div>email:<input type="text" id="email" /></div> <div>phone:<input type="text" id="phone" /></div> <div id="result"></div> <input id="valdate" type="image" src="images/submit.png" /> </form> As a result i keep getting a wrong error message. If i click on submit button 'phone is required' is shown near email input and 'email is required' isnt shown at all. Whats wrong with this code ?

    Read the article

  • Fire Box doesnot support program based calling function

    - by manish
    on clicking any row of the following program... i am firinf on function mail file click....function just having alert message that shoes deffrent file name on the bases of clicking... *its working properly in IE .....FireBox N other browser function doesnot call on clicking on any row.. whats problem..please help me......i am writing code for your better awareness* For Each info In fsi Response.Write("<span id=" & " 'userijd'" & " onmouseup=" & "mailfileclick('" & info.Name & "')" & ";>") Response.Write("<td width=" & "16%" & " bgcolor=" & "#FFFFFF" & " style=" & "border-bottom-style:&nbsp;solid;&nbsp;border-bottom-width:&nbsp;1px" & " bordercolor=" & "#C0C0C0" & " nowrap" & ">") Response.Write("<font face=" & "Arial" & "style=" & "font-size:&nbsp;9pt" & " color=" & "#000000" & ">" & Mid(contents, InStr(contents, "Date: ") + Len("Date:"), 17) & "</font></td>") Response.Write("</span>") Next

    Read the article

  • What is the best way to lay out elements in GWT?

    - by KutaBeach
    What is the best practice to specify the positions of elements in GWT widget? Imagine you have a task: place a set of widgets in page layout. What would you use to position all your buttons and inputs in some order? standart HTML markup with tables/divs + CSS styles for positioning GWT widgets: panels, grids, tables + CSS styles for positioning GWT widgets: panels, grids, tables + their native properties for positioning If 2 or 3 - what would you use to reproduce a standart HTML table with colspans, fixed width columns and paddings? ps UIBinder and XML markup. GWT 2.4 My opinion: one of the biggest advantages of GWT is the ability to prevent programmer from writing HTML markup and add cross-browser support for interfaces. We shouldn't drop these points so its better to choose p.3 and try to use CSS ONLY for decoration - i.e. colors, fonts etc. Another point of view: its a bad idea to place any styles inline. By specifying properties of the widgets in XML markup we are literally doing exactly this. Also, GWT doesn't have enough widgets to produce a normal layout. For example you need to create a simple table with collspans and fixed column width. How would you go about this? Looks like you have to embed several HorizontalPanels into VerticalPanels, specify width/height in everyone of them and produce a great paper of XML by this. So whats your opinion?

    Read the article

  • connecting to mysql from excel: ODBC driver does not support the requested properties.

    - by every_answer_gets_a_point
    i am trying to add data to mysql from excel. i am getting the above error on this line: rs.Open strSQL, oConn, adOpenDynamic, adLockOptimistic here is my code: Dim oConn As ADODB.Connection Private Sub ConnectDB() Set oConn = New ADODB.Connection oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _ "SERVER=localhost;" & _ "DATABASE=employees;" & _ "USER=root;" & _ "PASSWORD=some_pass;" & _ "Option=3" End Sub Function esc(txt As String) esc = Trim(Replace(txt, "'", "\'")) End Function Private Sub InsertData() Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset ConnectDB With wsBooks For rowCursor = 2 To 11 strSQL = "INSERT INTO tutorial (author, title, price) " & _ "VALUES ('" & esc(.Cells(rowCursor, 1)) & "', " & _ "'" & esc(.Cells(rowCursor, 2)) & "', " & _ esc(.Cells(rowCursor, 3)) & ")" rs.Open strSQL, oConn, adOpenDynamic, adLockOptimistic Next End With End Sub whats wrong with rs.Open strSQL, oConn, adOpenDynamic, adLockOptimistic ? why am i getting the odbc error?

    Read the article

  • Passing additional data value to strongly typed partial views in ASP.NET MVC

    - by fearofawhackplanet
    I have an OrderForm domain class, which has property subclasses, something like: interface IOrderForm { int OrderId { get; } ICustomerDetails CustomerDetails { get; set; } IDeliveryDetails DeliveryDetails{ get; set; } IPaymentsDetails PaymentsDetails { get; set; } IOrderDetails OrderDetails { get; set; } } My "Details" view is strongly typed inheriting from IOrderForm. I then have a strongly type partial for rendering each section: <div id="CustomerDetails"> <% Html.RenderPartial("CustomerDetails", Model.CustomerDetails); %> </div> <div id="DeliveryDetails"> <% Html.RenderPartial("DeliveryDetails", Model.DeliveryDetails); %> </div> ... etc This works ok up to this point, but I'm trying to add some nice ajax bits for updating some parts of the order form, and I've realised that each of my partial views also needs access to the IOrderForm.OrderId. Whats the easiest way to give my partials access to this value?

    Read the article

  • Java: Cleaing up connection reset (but not by peer).

    - by Zombies
    There seems to be some confusion as well contradicting statements on various SO answers: http://stackoverflow.com/questions/585599/whats-causing-my-java-net-socketexception-connection-reset . You can see here that the accepted answer states that the connecteion was closed by other side. But this is not true, closing a connection doesn't cause a connection reset. It is cauesed by "an underlying TCP/IP error." What I want to know is if a SocketException: Connection reset means really besides "unerlying TCP/IP Error." What really causes this? As I doubt it has anything to do with the connection being closed (since closing a connection isn't an exception worthy flag, and reading from a closed connection is, but that isn't an "underlying TCP/IP error." My hypothesis is this Connection reset is caused from a server's failure to acknowledge an ACK packet (either wholly or just improperly as per TCP/IP). And that a SocketTimeoutException is generated only when no data is generated to be read (since this is thrown during a read after a certain duration, and read is waiting for data, but is not concerned with ACK packets). In other words, read() throws SocketTimeoutException if it didn't read any bytes of actual data (DATA LAYER) in its allotted time.

    Read the article

  • Is it better for class data to be passed internally or accessed directly?

    - by AaronSzy
    Example: // access fields directly private void doThis() { return doSomeWork(this.data); } // receive data as an argument private void doThis(data) { return doSomeWork(data); } The first option is coupled to the value in this.data while the second option avoids this coupling. I feel like the second option is always better. It promotes loose coupling WITHIN the class. Accessing global class data willy-nilly throughout just seems like a bad idea. Obviously this class data needs to be accessed directly at some point. However, if accesses, to this global class data can be eliminated by parameter passing, it seems that this is always preferable. The second example has the advantage of working with any data of the proper type, whereas the first is bound to working with the just class data. Even if you don't NEED the additional flexibility, it seems nice to leave it as an option. I just don't see any advantage in accessing member data directly from private methods as in the first example. Whats the best practice here? I've referenced code complete, but was not able to find anything on this particular issue.

    Read the article

  • Why does exec:java work and exec:exec fail?

    - by whiskerz
    Hey there, just set up a simple project to test the functionality of the maven exec plugin. I have one class containing one "Hello World" main method. I've tested two configurations of the exec plugin. <goals> <goal>exec</goal> </goals> <configuration> <executable>java</executable> <arguments> <argument>-classpath</argument> <classpath/> <argument>test.exec.HelloWorldExec</argument> </arguments> </configuration> failed miserably, giving me a ClassNotFoundException, while <goals><goal>java</goal></goals> <configuration> <mainClass>test.exec.HelloWorldExec</mainClass> </configuration> worked. However I would like to be able to start my java main class in a separate process, so I'd like to understand whats different with exec:exec and how I can get it to work? Any help appreciated cheers Whizz

    Read the article

  • Redirect in codeigniter after login

    - by edelweiss
    Trying to do a redirect after a successful login. The login info is sent using ajax to the controller. My controller code as below public function login_controller_function() { $this->load->model('login_model'); if ($this->input->is_ajax_request()) { $user_name=$this->input->post('username'); $user_password = $this->input->post('password'); $this->load->helper('url'); $result = $this->login_model->verify_user($user_name,$user_password); // echo 'user_logged_in'; if(strcmp($result,'user_logged_in')==0) { redirect('welcome'); } } } But it is not working at all. Anyone knows whats wrong? Hi my html as requested. i am using twitter bootstrap as well <li class="divider-vertical"></li> <li><a href="#" id="login_btn">Login</a></li> <li><a href="<?php echo base_url('register'); ?>">Register</a></li> for the buttons so when i click the login button, a modal window will appear and ask for login info. so when i click on the login button, my js code will send an ajax request my js code as below /*Attempt register user jquery ajax*/ $('#login').click(function(){ var user_name = $('#loginHere').find('#user_name').val(); var user_password = $('#loginHere').find('#login_pwd').val(); if(user_name==""||user_password=="") return; var login_data = { username:user_name, password:user_password}; $.ajax({ type: "POST", dataType: "json", async: false, url:"login_register/login_controller_function", data: login_data, success: function(data) { if(data.login) { alert(data.redirect); window.location.replace(data.redirect); } else if(!data.login) { alert('data login not true'); } }, error:function(data){ alert('ajax error'); } }); }); });

    Read the article

  • JQuery remove() not working with a two word id

    - by Programer
    I have a button <button onclick="takedown()"> take down </button> that creates a H1 and button with the id of the text in my text field and h1 at the end for the h1 and button at the end for the button the button has a onclick onclick="delete()". This is that function function takedown(){ note = document.getElementById("noteinput").value; idh1 = note + "h1"; idbutton = note + "button"; idcenter = note + "center"; $('<center id="' + idcenter + '"> <h1 id="' + idh1 + '">' + note + '</h1> <button id="'+ idbutton +'" onclick="deletenote()"> Delete </button> </center>').appendTo("body"); } For the delete function the remove() works only if the id of the button and the h1 is one word. function deletenote(){ // First setting var idbuttondelete = event.target.id; var idh1delete = idbuttondelete.replace("button", "h1"); // Removing the button, h1,center $('#' + idbuttondelete).remove(); $('#' + idh1delete).remove(); } Does anybody know whats wrong or how to use JQuery to delete something if it has a two word id.

    Read the article

  • How to get XML nodes content when names include special Characters?

    - by paoloi
    Im trying to navigate an XML block similar to this one ($doc) using PHP simplexml_load_string and using xpath on $doc to get only the 'Day' block like this: $myday = $doc->xpath ('//Day'); that lets me access all data from the block as an object, meaning $doc-AdultCount returns 1 and $doc-Id returns "6a0" however I can't access "SpecialDeals" content not using: $doc-SpecialDeals nor using: $doc-SpecialDeals-a:string Whats is the right syntax in this case? Thanks in advance. <Days> <DaysId>687</DaysId> <Day> <AdultsCount>1</AdultsCount> <Availability>Available</Availability> <Id>6a0</Id> <RoomType>Studio</RoomType> <SpecialDeals xmlns:a="http://microsoft.com/2003/Arrays"> <a:string>Best Day Ever</a:string> </SpecialDeals> </Day> <DaysPrice>247.4</DaysPrice> </Days>");

    Read the article

  • Multi-user job/task tracking/queue software

    - by Bmsgaffer86
    Background: I test and repair electronic products with a team. There are many 'jobs' going through my lab at any point in time. It is getting difficult to track whats coming in and going out because I don't do every test or repair myself. Target: User can enter a job when they drop it off in my lab, and it will appear on the master list or queue. Needs to have priorities and due dates that can be adjusted by users. Ideally this would be web based and open-source, but I am flexible. Dream: A large monitor displaying a list of jobs in the master queue with details. This is very optional though, and would be in the best case scenario. I have done MANY hours of Google-ing and I am not sure if I have been using the right terminology, but I have not found anything that is simple enough to stand alone yet complex enough to be multi-user based. I am mildly proficient in VB, and have the drive to piece anything together that I have to. I am open to ANY help or suggestions.

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >