Search Results

Search found 1862 results on 75 pages for 'matt varblow'.

Page 51/75 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Data scheme question

    - by Matt
    I am designing a data model for a local city page, more like requirements for it. So 4 tables: Country, State, City, neighbourhood. Real life relationships is: Country owns multiple State which owns multiple cities which ows multiple neighbourhoods. In the data model: Do we link these with FK the same way or link each with each? Like in each table there will even be a Country ID, State ID, CityID and NeighbourhoodID so each connected with each? Other wise to reach neighbourhood from country we need to join 2 other tables in between? There are more tables I need to maintain for IP addess of cities, latitude/longitude, etc.

    Read the article

  • Intermittent NoClassDefFoundError error running Selenium JUnit tests

    - by Matt Sheppard
    For some time, I've been running a substantial set of JUnit / Selenium tests against a number of platforms on a nightly basis. Intermittently (about once in every 40 runs), all the tests for a given platform fail with a NoClassDefFoundError on the common superclass of all my tests as follows. java.lang.NoClassDefFoundError: [common super class of all my selenium tests] at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructors(Class.java:1459) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) Re-invoking the tests will generally get the tests running normally, so it's clearly something dependent on some condition I am not considering. What might be causing this error to occur seemingly randomly?

    Read the article

  • Ajax problem after deleting a div, then creating a new one

    - by Matt Nathanson
    I'm building a custom CMS where you can add and delete clients using ajax and jquery 1.4.2. My problem lies after I delete a div. The ajax is used to complete this and refresh automatically.. But when I go to create a new div (without a hard refresh) it puts it back in the slot of the div I just deleted. How can I get this to completely forget about the div i just deleted and place the new div in the next database table? link for reference: http://staging.sneakattackmedia.com/cms/ //Add New client // function AddNewClient() { dataToLoad = 'addClient=yes'; $.ajax({ type: 'post', url: '/clients/controller.php', datatype: 'html', data: dataToLoad, target: ('#clientssidebar'), async: false, success: function(html){ $(this).click(function() {reInitialize()}); //$('#clientssidebar').html(html); $('div#' + clientID).slideDown(800); $(this).click(function() { ExpandSidebar()});}, error: function() { alert('An error occured! 222');} });}; //Delete Client // function DeleteClient(){ var yes = confirm("Whoa there chief! Do you really want to DELETE this client?"); if (yes == 1) { dataToLoad = 'clientID=' + clientID + '&deleteClient=yes', $.ajax({ type: 'post', url: '/clients/controller.php', datatype: 'html', data: dataToLoad, success: function(html) { alert('Client' + clientID + ' should have been deleted from the database.'); $(this).click(function() {reInitialize()}); $('div#' +clientID).slideUp(800); }, error: function() { alert('error'); }});};}; //Re Initialize // function reInitialize() { $('#addnew').click(function() {AddNewClient()}); $('.deletebutton').click(function() {clientID = $(this).parent().attr('id'); DeleteClient()}) $('.clientblock').click(function() {clientID = $(this).attr('id'); ExpandSidebar()});}; //Document Ready // $(document).ready(function(){ if ($('isCMS')){ editCMS = 1; $('.deletebutton').click(function() {clientID = $(this).parent().attr('id'); DeleteClient()}); $('#addnew').click(function() {AddNewClient()}); $('.clientblock').click(function() {clientID = $(this).attr('id'); ExpandSidebar()}); $('.clientblock').click(function() {if (clickClient ==true) { $(this).css('background-image', 'url(/images/highlightclient.png)'); $(this).css('margin-left' , '30px'); }; $(this).click(function(){ $(this).css('background-image', ''); }); $('.uploadbutton').click(function(){UploadThings()}); }); } else ($('#clientscontainer')) { $('#editbutton').css('display', 'none'); }; }); Please help!!!

    Read the article

  • Is there unreachable code in this snippet? I don't think so, but Resharper is telling me otherwise.

    - by The Matt
    I have the following method I came across in a code review. Inside the loop Resharper is telling me that if (narrativefound == false) is incorrect becuase narrativeFound is always true. I don't think this is the case, because in order to set narrativeFound to true it has to pass the conditional string compare first, so how can it always be true? Am I missing something? Is this a bug in Resharper or in our code? public Chassis GetChassisForElcomp(SPPA.Domain.ChassisData.Chassis asMaintained, SPPA.Domain.ChassisData.Chassis newChassis) { Chassis c = asMaintained; List<Narrative> newNarrativeList = new List<Narrative>(); foreach (Narrative newNarrative in newChassis.Narratives) { bool narrativefound = false; foreach (Narrative orig in asMaintained.Narratives) { if (string.Compare(orig.PCode, newNarrative.PCode) ==0 ) { narrativefound = true; if (newNarrative.NarrativeValue.Trim().Length != 0) { orig.NarrativeValue = newNarrative.NarrativeValue; newNarrativeList.Add(orig); } break; } if (narrativefound == false) { newNarrativeList.Add(newNarrative); } } } c.SalesCodes = newChassis.SalesCodes; c.Narratives = newNarrativeList; return c; }

    Read the article

  • Using AJAX to get a specific DOM Element (using Javascript, not jQuery)

    - by Matt Frost
    How do you use AJAX (in plain JavaScript, NOT jQuery) to get a page (same domain) and display just a specific DOM Element? (Such as the DOM element marked with the id of "bodyContent"). I'm working with MediaWiki 1.18, so my methods have to be a little less conventional (I know that a version of jQuery can be enabled for MediaWiki, but I don't have access to do that so I need to look at other options). I apologize if the code is messy, but there's a reason I need to build it this way. I'm mostly interested in seeing what can be done with the Javascript. Here's the HTML code: <div class="mediaWiki-AJAX"><a href="http://www.domain.com/whatever"></a></div> Here's the Javascript I have so far: var AJAXs = document.getElementsByClassName('mediaWiki-AJAX'); if (AJAXs.length > 0) { for (var i = AJAXs.length - 1; i >= 0; i--) { var URL = AJAXs[i].getElementsByTagName('a')[0].href; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { AJAXs[i].innerHTML = xmlhttp.responseText; } } xmlhttp.open('GET',URL,true); xmlhttp.send(); } }

    Read the article

  • Trap SIGPIPE when trying to write without reader

    - by Matt
    I am trying to implement a named-pipe communication solution in BASH between two processes. The first process runs a script which echo something in a named-pipe: send(){ echo 'something' > $NAMEDPIPE } And the second script is supposed to read the named-pipe via another script which contains: while true;do if read line < $NAMEDPIPE;do someCommands fi done Not that the named pipe has been previously created using the traditional command mkfifo $NAMEDPIPE My problem is that the reader script is not always running so that if the writer script try to write in the named-pipe it stay blocked until a reader connect the pipe. I want to avoid this behavior, and a solution would be to trap a SIGPIPE signal. Indeed, according to man 7 signal is supposed to be send when trying to write in a pipe with no reader. So I changed my red function by: read(){ trap 'echo "SIGPIPE received"' SIGPIPE echo 'something' > $NAMEDPIPE } But when I run the reader script, the script stay blocked, and not "SIGPIPE received" appears... Am I mistaking on the signal mechanism or is there any better solution to my problem ? Thank you for your help.

    Read the article

  • How to create a view of table that contains a timestamp column?

    - by Matt Faus
    This question is an extension of a previous one I have asked. I have a table (2014_05_31_transformed.Video) with a schema that looks like this. I have put up the JSON returned by the BigQuery API describing it's schema in this gist. I am trying to create a view against this table with an API call that looks like this: { 'view': { 'query': u 'SELECT deleted_mod_time FROM [2014_05_31_transformed.Video]' }, 'tableReference': { 'datasetId': 'latest_transformed', 'tableId': u 'Video', 'projectId': 'redacted' } } But, the BigQuery API is returning this error: HttpError: https://www.googleapis.com/bigquery/v2/projects/124072386181/datasets/latest_transformed/tables?alt=json returned "Invalid field name "deleted_mod_time.usec". Fields must contain only letters, numbers, and underscores, start with a letter or underscore, and be at most 128 characters long." The schema that the BigQuery API does not make any distinction between a TIMESTAMP data type and a regular nullable INTEGER data type, so I can't think of a way to programmatically correct this problem. Is there anything I can do, or is this a bug with BigQuery's view implementation?

    Read the article

  • How do I get Asp.net MVC BeginForm to add closing tag correctly?

    - by Matt
    I seem to be missing something obvious here, but cannot see what it is. My problem is that the closing form tag for BeginForm is not being added to my markup. I am looping through a collection and creating a form for each item, but the forms arent closing properly. Any suggestions please? Thanks <% foreach (var item in Model) { %> <% using (Html.BeginForm("EditUser","Users")) { %> <tr> <td> <input id="contactID" type="hidden" value="<%= item.ContactID %>" /> <%=item.Email %> </td> <td> <%=item.Market.MarketName%> </td> <td> <%=item.ContactType.ContactTypeName%> </td> <td> <input type="submit" value="Edit" /> </td> </tr> <%} %> <% } %>

    Read the article

  • Can I get a table name from a join select resultset metadata

    - by Matt
    Below is my code trying to retrieve table name form Resultset ResultSet rs = stmt.executeQuery("select * from product"); ResultSetMetaData meta = rs.getMetaData(); int count = meta.getColumnCount(); for (int i=0; i<count; i++) { System.out.println(meta.getTableName(i)); } But it returns empty, no mention it is a join select resultset. Is there any other approaches to retrieve table name from reusltset metadata?

    Read the article

  • listview tile layout problem (vb.net)

    - by Matt Facer
    hi guys, I have a listview which displays (eventually) an album cover of an itunes play list with the album name under it. the problem I am having is that I cannot get the album art (currently a blank square) ABOVE the album name. It always is on the side... how do I do it? I've tried adding column headers and alsorts... code to set up the listview Dim myImageList As ImageList albumList.View = View.Tile albumList.TileSize = New Size(120, 150) ' Initialize the item icons. myImageList = New ImageList() myImageList.Images.Add(Image.FromFile("c:/test.jpg")) myImageList.ImageSize = New Size(80, 80) albumList.LargeImageList = myImageList I then do a loop to display each album name which uses Dim item0 As New ListViewItem(New String() _ {Albums(i).Name}, 0) albumList.Items.Add(item0) the output is http://i111.photobucket.com/albums/n122/mfacer/Screenshot2010-05-02at164815.png but as i said, I want the album name under the orange box.... any ideas?? Thanks for any info!

    Read the article

  • C# System.Diagnostics.Process redirecting Standard Out for large amounts of data

    - by Matt
    I running an exe from a .NET app and trying to redirect standard out to a streamreader. The problem is that when I do myprocess.exe out.txt out.txt is close to 14mb. When I do the command line version it is very fast but when I run the process from my csharp app it is excruciatingly slow because I believe the default streamreader flushes every 4096 bytes. Is there a way to change the default stream reader for the Process object?

    Read the article

  • Cocoa NSWindow not updating with data

    - by Matt S.
    I have an NSWindow that shows up when you click either of two items (both from an NSTableView). I have a setter method that tells the window what information to display. This all works perfectly, until it comes time to display the data in the window. If I cause the window to display from one tableview, then try to have it display the new data from another it doesn't do it, it keeps the old data on. I am using the exact same method to get and display the data from both possible ways to have the window show up, and the data is changing correctly. To display the window I'm using [mywindow makeKeyAndOrderFront:self];

    Read the article

  • How can I mark a file as descended from 2 other files in Mercurial?

    - by Matt Joiner
    I had 2 Python similar scripts, that I've since merged into one (and now takes some parameters to differ the behaviour appropriately). Both of the previous files are in the tip of my Mercurial repository. How can I indicate that the new file, is a combination of the 2 older files that I intend to remove? Also note, that 1 file has been chosen in favor of the other, and some code moved across, so if it's not possible to create a version controlled file with a new name, then assimilating one file's history into the other will suffice.

    Read the article

  • .NET equivalent of httpunit

    - by Matt
    I will openly admit that I fall on the side of Test Driven Development. I have run into a situation that I would like to test, but I haven't found a good way to do so. I have been working in ASP.NET MVC and I would like to test that the parts of code that I am putting into the view layer (and I know that I need to keep that as minimal as possible). I am looking for an equivalent in .NET to httpunit in Java or something similar.

    Read the article

  • jQuery autocomplete: how to split the string result?

    - by Matt
    I have the following situation with an autocomplete plugin on an .aspx page. It is working fine. The result from the autocomplete search yields a product id and a product description is concatenated with it (i.e. 2099 -- A Product). I know that I need to use split() with this but where do I put it? I'm still rather new to jQuery and javascript. $(document).ready(function() { $('.divAutoComplete').autocomplete("LookupCodes.aspx?type=FC", { mustMatch: true }); });

    Read the article

  • Passing an Ajax variable to a Codeigniter function

    - by Matt
    Hello, I think this is a simple one. I have a Codeigniter function which takes the inputs from a form and inserts them into a database. I want to Ajaxify the process. At the moment the first line of the function gets the id field from the form - I need to change this to get the id field from the Ajax post (which references a hidden field in the form containing the necessary value) instead. How do I do this please? My Codeigniter Controller function function add() { $product = $this->products_model->get($this->input->post('id')); $insert = array( 'id' => $this->input->post('id'), 'qty' => 1, 'price' => $product->price, 'size' => $product->size, 'name' => $product->name ); $this->cart->insert($insert); redirect('home'); } And the jQuery Ajax function $("#form").submit(function(){ var dataString = $("input#id") //alert (dataString);return false; $.ajax({ type: "POST", url: "/home/add", data: dataString, success: function() { } }); return false; }); As always, many thanks in advance.

    Read the article

  • Converting from Mercurial to Subversion

    - by Matt Joiner
    Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to Subversion in order to conform with the company standard. Are there any tools or suggestions for how to achieve this without a loss of revision history and the like?

    Read the article

  • Configuration Element Collection Section

    - by Matt
    I would like to set up a custom app configuration element collection section like this <logSectionGroup> <logSection name="Testttt"> <properties name ="Pride"> <pathName="TestingLog.txt"/> <deleteRetention="100"/> <deleteZeroRetention="5"/> <wildcard="*.txt"/> </properties> <properties name ="Adhoc"> <pathName="blah.txt"/> <deleteRetention="70"/> <deleteZeroRetention="3"/> <wildcard="*.*"/> </properties> </logSection> </logSectionGroup> Is this possible? Properties would be the configuration element, and log section would be the configuration element collection. The problem is, I've only seen where you can have multiple instances of a single element instead of multiple elements. <Section name="Section1"> <Section name="Section1"> <SubSection name="SubSection1"> <Item name="Item1" /> <Item name="Item2" /> </SubSection> <SubSection name="SubSection2"> <Item name="Item1" /> <Item name="Item2" /> </SubSection> </Section> When you use GetElementKey() you have it return element "name" in the above example but how would you return 4 different elements like "pathName" "deleteRetention" etc. Here is my Definition for PropElement Public Class PropElement Inherits ConfigurationElement <ConfigurationProperty("pathName", IsRequired:=True)> _ Public Property PathName() As String Get Return CStr(Me("pathName")) End Get Set(ByVal value As String) Me("pathName") = value End Set End Property <ConfigurationProperty("deleteRetention", DefaultValue:="0", IsRequired:=False)> _ Public Property DeleteRetention() As Integer Get Return CStr(Me("deleteRetention")) End Get Set(ByVal value As Integer) Me("deleteRetention") = value End Set End Property <ConfigurationProperty("deleteZeroRetention", DefaultValue:="0", IsRequired:=False)> _ Public Property DeleteZeroRetention() As Integer Get Return CStr(Me("deleteZeroRetention")) End Get Set(ByVal value As Integer) Me("deleteZeroRetention") = value End Set End Property <ConfigurationProperty("wildcard", DefaultValue:="*.*", IsRequired:=False)> _ Public Property Wildcard() As String Get Return CStr(Me("wildcard")) End Get Set(ByVal value As String) Me("wildcard") = value End Set End Property End Class

    Read the article

  • Pointing to vectors

    - by Matt Munson
    #include <iostream> #include <vector> using namespace std; int main () { vector <int> qwerty; qwerty.push_back(5); vector <int>* p = &qwerty; cout << p[0]; //error: no match for 'operator<<' in 'std::cout << * p' } I'm generally unclear on how to use pointers with vectors, so I'm pretty mystified as to why this is not working. To my mind, this should print 5 to screen.

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >