Search Results

Search found 1402 results on 57 pages for 'dataset'.

Page 35/57 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • jQuery to store data for sessions

    - by Ted
    I am trying to use jQuery AJAX. What my requirement is, i wish to load user names from DB in dataset, convert it to JSON format and store it in memory or using jQuery data for use while a user is browsing my site, i.e for a session. This way I can use autocomplete or my own code to display data to user. Can anyone help me design such a scenario?

    Read the article

  • How to return xml from .net webservice

    - by kaibuki
    Hi Guys!! I am reading data and filling a data set and want to return xml, in a .net web service. so far I am trying to use return mydataset.getxml(); but it is not helping as my method return type is "DataSet" so is there any way I can get a well formatted xml. Thanks

    Read the article

  • Paginating data, has to be a better way

    - by John Tyler
    I've read like 10 or so "tutorials", and they all involve the same thing: Pull a count of the data set Pull the relevant data set (LIMIT, OFFSET) IE: SELECT COUNT(*) FROM table WHERE something = ? SELECT * FROM table WHERE something =? LIMIT ? offset ?` Two very similar queries, no? There has to be a better way to do this, my dataset is 600,000+ rows and already sluggish (results are determined by over 30 where clauses, and vary from user to user, but are properly indexed of course).

    Read the article

  • Importing ShapeFiles into Oracle XE

    - by WeeJames
    Hi, I'm looking to import one of the Shapefiles supplied with the Ordnance Survey Boundary-Line opensource set into Oracle XE. http://data.gov.uk/dataset/os-boundary-line Unfortunately I'm completely unsure how to go about this, despite much Googling. Anyone got any pointers or tips or a link to a guide? Cheers James

    Read the article

  • How to handle when SSRS does not automatically update fields based on database query?

    - by badpanda
    So I am trying to change the number of fields in my dataset in SSRS and the refresh button is not picking up the added field from the SQL server. The query is definitely returning the correct data, as I have double checked in the server engine itself. Also, I have tried manually adding the field using the SSRS menu, but as soon as I execute it disappears. Any suggestions or similar experiences?

    Read the article

  • Hidden divs for "lazy javascript" loading? Possible security/other issues?

    - by xyld
    I'm curious about people's opinion's and thoughts about this situation. The reason I'd like to lazy load javascript is because of performance. Loading javascript at the end of the body reduces the browser blocking and ends up with much faster page loads. But there is some automation I'm using to generate the html (django specifically). This automation has the convenience of allowing forms to be built with "Widgets" that output content it needs to render the entire widget (extra javascript, css, ...). The problem is that the widget wants to output javascript immediately into the middle of the document, but I want to ensure all javascript loads at the end of the body. When the following widget is added to a form, you can see it renders some <script>...</script> tags: class AutoCompleteTagInput(forms.TextInput): class Media: css = { 'all': ('css/jquery.autocomplete.css', ) } js = ( 'js/jquery.bgiframe.js', 'js/jquery.ajaxQueue.js', 'js/jquery.autocomplete.js', ) def render(self, name, value, attrs=None): output = super(AutoCompleteTagInput, self).render(name, value, attrs) page_tags = Tag.objects.usage_for_model(DataSet) tag_list = simplejson.dumps([tag.name for tag in page_tags], ensure_ascii=False) return mark_safe(u'''<script type="text/javascript"> jQuery("#id_%s").autocomplete(%s, { width: 150, max: 10, highlight: false, scroll: true, scrollHeight: 100, matchContains: true, autoFill: true }); </script>''' % (name, tag_list,)) + output What I'm proposing is that if someone uses a <div class=".lazy-js">...</div> with some css (.lazy-js { display: none; }) and some javascript (jQuery('.lazy-js').each(function(index) { eval(jQuery(this).text()); }), you can effectively force all javascript to load at the end of page load: class AutoCompleteTagInput(forms.TextInput): class Media: css = { 'all': ('css/jquery.autocomplete.css', ) } js = ( 'js/jquery.bgiframe.js', 'js/jquery.ajaxQueue.js', 'js/jquery.autocomplete.js', ) def render(self, name, value, attrs=None): output = super(AutoCompleteTagInput, self).render(name, value, attrs) page_tags = Tag.objects.usage_for_model(DataSet) tag_list = simplejson.dumps([tag.name for tag in page_tags], ensure_ascii=False) return mark_safe(u'''<div class="lazy-js"> jQuery("#id_%s").autocomplete(%s, { width: 150, max: 10, highlight: false, scroll: true, scrollHeight: 100, matchContains: true, autoFill: true }); </div>''' % (name, tag_list,)) + output Nevermind all the details of my specific implementation (the specific media involved), I'm looking for a consensus on whether the method of using lazy-loaded javascript through hidden a hidden tags can pose issues whether security or other related? One of the most convenient parts about this is that it follows the DRY principle rather well IMO because you don't need to hack up a specific lazy-load for each instance in the page. It just "works". UPDATE: I'm not sure if django has the ability to queue things (via fancy template inheritance or something?) to be output just before the end of the </body>?

    Read the article

  • Dynamically loading modules in Python (+ threading question)

    - by morpheous
    I am writing a Python package which reads the list of modules (along with ancillary data) from a configuration file. I then want to iterate through each of the dynamically loaded modules and invoke a do_work() function in it which will spawn a new thread, so that the code runs in a separate thread. At the moment, I am importing the list of all known modules at the beginning of my main script - this is a nasty hack I feel, and is not very flexible, as well as being a maintenance pain. This is the function that spawns the threads. I will like to modify it to dynamically load the module when it is encountered. The key in the dictionary is the name of the module containing the code: def do_work(work_info): for (worker, dataset) in work_info.items(): #import the module defined by variable worker here... t = threading.Thread(target=worker.do_work, args=[dataset]) # I'll NOT dameonize since spawned children need to clean up on shutdown # Since the threads will be holding resources #t.daemon = True t.start() Question 1 When I call the function in my script (as written above), I get the following error: AttributeError: 'str' object has no attribute 'do_work' Which makes sense, since the dictionary key is a string (name of the module to be imported). When I add the statement: import worker before spawning the thread, I get the error: ImportError: No module named worker This is strange, since the variable name rather than the value it holds are being used - when I print the variable, I get the value (as I expect) whats going on? Question 2 As I mentioned in the comments section, I realize that the do_work() function written in the spawned children needs to cleanup after itself. My understanding is to write a clean_up function that is called when do_work() has completed successfully, or an unhandled exception is caught - is there anything more I need to do to ensure resources don't leak or leave the OS in an unstable state? Question 3 If I comment out the t.daemon flag statement, will the code stil run ASYNCHRONOUSLY?. The work carried out by the spawned children are pretty intensive, and I don't want to have to be waiting for one child to finish before spawning another child. BTW, I am aware that threading in Python is in reality, a kind of time sharing/slicing - thats ok Lastly is there a better (more Pythonic) way of doing what I'm trying to do?

    Read the article

  • Look over my C# SQLite Query, what am I doing wrong?

    - by CODe
    I'm writing a WinForms database application using SQLite and C#. I have a sqlite query that is failing, and I'm unsure as to where I'm going wrong, as I've tried everything I could think of. public DataTable searchSubs(String businessName, String contactName) { string SQL = null; if ((businessName != null && businessName != "") && (contactName != null && contactName != "")) { // provided business name and contact name for search SQL = "SELECT * FROM SUBCONTRACTOR WHERE BusinessName LIKE %@BusinessName% AND Contact LIKE %@ContactName%"; } else if ((businessName != null && businessName != "") && (contactName == null || contactName == "")) { // provided business name only for search SQL = "SELECT * FROM SUBCONTRACTOR WHERE BusinessName LIKE %@BusinessName%"; } else if ((businessName == null || businessName == "") && (contactName != null && contactName != "")) { // provided contact name only for search SQL = "SELECT * FROM SUBCONTRACTOR WHERE Contact LIKE %@ContactName%"; } else if ((businessName == null || businessName == "") && (contactName == null || contactName == "")) { // provided no search information SQL = "SELECT * FROM SUBCONTRACTOR"; } SQLiteCommand cmd = new SQLiteCommand(SQL); cmd.Parameters.AddWithValue("@BusinessName", businessName); cmd.Parameters.AddWithValue("@ContactName", contactName); cmd.Connection = connection; SQLiteDataAdapter da = new SQLiteDataAdapter(cmd); DataSet ds = new DataSet(); try { da.Fill(ds); DataTable dt = ds.Tables[0]; return dt; } catch (Exception e) { MessageBox.Show(e.ToString()); return null; } finally { cmd.Dispose(); connection.Close(); } } I continually get an error saying that it is failing near the %'s. That's all fine and dandy, but I guess I'm structuring it wrong, but I don't know where! I tried adding apostrophes around the "like" variables, like this: SQL = "SELECT * FROM SUBCONTRACTOR WHERE Contact LIKE '%@ContactName%'"; and quite honestly, that is all I can think of. Anyone have any ideas?

    Read the article

  • 50 million+ Rows of Data - CSV or MySQL

    - by eWizardII
    Hello, I have a CSV file which is about 1GB big and contains about 50million rows of data, I am wondering is it better to keep it as a CSV file or store it as some form of a database. I don't know a great deal about MySQL to argue for why I should use it or another database framework over just keeping it as a CSV file. I am basically doing a Breadth-First Search with this dataset, so once I get the initial "seed" set the 50million I use this as the first values in my queue. Thanks,

    Read the article

  • I insert new parent row and child rowstate changes from Added to unchanged

    - by Joel
    rowsUpdated is an int32 to count how many rows are updated rowsToUpdate = dataset.ParentTable.Select("", "", dataviewRowState.Added) if rowsToUpdate isNot Nothing then for each row as datarow in RowsToUpdate changes the rowstate: rowsUpdated = rowsUpdated + ParentTableAdapter.update(row) Next row End if I'm sure it's something I'm over looking but I just can't see it. Thanks in advance, Joel

    Read the article

  • iPhone XML SOAP requests or .NET Web Services

    - by CocoaNewBee
    I've been trying to to consume SOAP requests (.NET web services) and have found some pretty good tools that I wanted to share: 1) http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/ Really easy clean way to perform all the call needed for consuming the services. 2) http://code.google.com/p/mac-soapclient/ SOAP Client uses WSDL files you provide to dynamically create a graphical user interface for any given SOAP-based web service Hopefully that will help someone as much as me!!! Happy coding !

    Read the article

  • How to pick random (small) data samples using Map/Reduce?

    - by Andrei Savu
    I want to write a map/reduce job to select a number of random samples from a large dataset based on a row level condition. I want to minimize the number of intermediate keys. Pseudocode: for each row if row matches condition put the row.id in the bucket if the bucket is not already large enough Have you done something like this? Is there any well known algorithm? A sample containing sequential rows is also good enough. Thanks.

    Read the article

  • Add a datatable to a data set

    - by Jibu P C_Adoor
    Hii... I have a data table 'dt1' that is belongs to 'ds1'. I have created another instance of dataset 'ds2' and try to add the datatable 'dt1' to 'ds2'. Now i got one exception 'DataTable already belongs to another data set'. Is there any reliable way to add the dt1 to ds2?

    Read the article

  • Paging in my web page

    - by Jibu P C_Adoor
    Hi, I have a large data set and i have to apply paging on that data set and after that the result set should be another data set. What is the reliable method to achieve that. I have tried with 'PagedDataSource' class but i don't know how it is possible to convert to dataset or data table. In my case i need a general solution. I have to bind to a control like gridview as well as i have to used it with normal html table.

    Read the article

  • crystal reports sticky problem

    - by mahesh
    hi I have a project with following sql table companymaster expbill invcarat companyId companyid companyId name invno invno address buyer srno telno consignee qty rate amount I have tried many times by the way of ADO.Dataset with multiple sql query but reports show like sticky problems. the details section repeating from diferent companyID and invno am tired don't know how to overcome from this kindly provide me better solution with good example.

    Read the article

  • DataGridView cells not editable when using an outside thread call

    - by joslinm
    Hi, I'm not able to edit my datagridview cells when a number of identical calls takes place on another thread. Here's the situation: Dataset table is created in the main window The program receives in files and processes them on a background thread in class TorrentBuilder : BackgroundWorker creating an array objects of another class Torrent My program receives those objects from the BW result and adds them into the dataset The above happens either on my main window thread or in another thread: I have a separate thread watching a folder for files to come in, and when they do come in, they proceed to call TorrentBuilder.RunWorkerAsynch() from that thread, receive the result, and call an outside class that adds the Torrent objects into the table. When the files are received by the latter thread, the datagridview isn't editable. All of the values come up properly into the datagridview, but when I click on a cell to edit it: I can write letters and everything, but when I click out of it, it immediately reverts back to its original value. If I restart the program, I can edit the same cells just fine. If the values are freshly added from the main window thread, I can edit the cells just fine. The outside thread is called from my main window thread, and sits there in the background. I don't believe it to be ReadOnly because I would have gotten an exception. Here's some code: From my main window class: private void dataGridView_DragDrop(object sender, DragEventArgs e) { ArrayList al = new ArrayList(); string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); foreach (string file in files) { string extension = Path.GetExtension(file); if (Path.GetExtension(file).Equals(".zip") || Path.GetExtension(file).Equals(".rar")) { foreach (string unzipped in dh.UnzipFile(file)) al.Add(unzipped); } else if (Path.GetExtension(file).Equals(".torrent")) { al.Add(file); } } dataGridViewProgressBar.Visible = true; tb.RunWorkerCompleted += new RunWorkerCompletedEventHandler(tb_DragDropCompleted); tb.ProgressChanged += new ProgressChangedEventHandler(tb_DragDropProgress); tb.RunWorkerAsync() } void tb_DragDropCompleted(object sender, RunWorkerCompletedEventArgs e) { data.AddTorrents((Torrent[])e.Result); builder.Dispose(); dh.MoveProcessedFiles(data); dataGridViewProgressBar.Visible = false; } From my outside Thread while (autocheck) { if (torrentFiles != null) { builder.RunWorkerAsync(torrentFiles); while (builder.IsBusy) Thread.Sleep(500); } } void builder_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) { data.AddTorrents((Torrent[])e.Result); builder.Dispose(); dh.MoveProcessedFiles(xml); data.Save(); //Save just does an `AcceptChanges()` and saves to a XML file }

    Read the article

  • Grid View Button Passing Data Via On Click

    - by flyersun
    Hi, I'm pretty new to C# and asp.net so aplogies if this is a really stupid question. I'm using a grid view to display a number of records from a database. Each row has an Edit Button. When the button is clicked I want an ID to be passed back to a funtion in my .cs file. How do I bind the rowID to the Button field? I've tired using a hyper link instead but this doens't seem to work because I'm posting back to the same page which already has a Permanter on the URL. asp.net <asp:GridView ID="gvAddresses" runat="server" onrowcommand="Edit_Row"> <Columns> <asp:ButtonField runat="server" ButtonType="Button" Text="Edit"> </Columns> </asp:GridView> c# int ImplantID = Convert.ToInt32(Request.QueryString["ImplantID"]); Session.Add("ImplantID", ImplantID); List<GetImplantDetails> DataObject = ImplantDetails(ImplantID); System.Data.DataSet DSImplant = new DataSet(); System.Data.DataTable DTImplant = new DataTable("Implant"); DSImplant.Tables.Add(DTImplant); DataColumn ColPostCode = new DataColumn(); ColPostCode.ColumnName = "PostCode"; ColPostCode.DataType = typeof(string); DTImplant.Columns.Add(ColPostCode); DataColumn ColConsigneeName = new DataColumn(); ColConsigneeName.ColumnName = "Consignee Name"; ColConsigneeName.DataType = typeof(string); DTImplant.Columns.Add(ColConsigneeName); DataColumn ColIsPrimaryAddress = new DataColumn(); ColIsPrimaryAddress.ColumnName = "Primary"; ColIsPrimaryAddress.DataType = typeof(int); DTImplant.Columns.Add(ColIsPrimaryAddress); DataColumn ColImplantCustomerDetailsID = new DataColumn(); ColImplantCustomerDetailsID.ColumnName = "Implant ID"; ColImplantCustomerDetailsID.DataType = typeof(int); DTImplant.Columns.Add(ColImplantCustomerDetailsID); foreach (GetImplantDetails Object in DataObject) { DataRow DRImplant = DTImplant.NewRow(); DRImplant["PostCode"] = Object.GetPostCode(); DRImplant["Consignee Name"] = Object.GetConsigneeName(); DRImplant["Primary"] = Object.GetIsPrimaryAddress(); DRImplant["Implant ID"] = Object.GeTImplantCustomerDetailsID(); DTImplant.Rows.Add(DRImplant); <--- this is what I need to be added to the button } gvAddresses.DataSource = DTImplant; gvAddresses.DataBind();

    Read the article

  • SQLite Asp.net Path Problem

    - by drorhan
    when using data source=|DataDirectory|\mydb.sqlite in visual studio 2008 i can not see the tables in query builder and in dataset designer. How can i fix this? it is a web application for .net 3.5 thanks a lot

    Read the article

  • Extract Address Information from a Web Page

    - by Brian Boatright
    I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done. Ideally I would like to have a web page on our admin (ASP.NET/VB.NET) where you enter a URL and it scraps the page and returns a Dataset that I can put in a Grid.

    Read the article

  • php: parsing and converting array structure

    - by mwb
    I need to convert one array structure into another array structure. I hope someone will find it worthy their time to show how this could be done in a simple manner. It's a little above my array manipulation skills. The structure we start out with looks like this: $cssoptions = array( array( 'group' => 'Measurements' , 'selector' => '#content' , 'rule' => 'width' , 'value' => '200px' ) // end data set , array( 'group' => 'Measurements' , 'selector' => '#content' , 'rule' => 'margin-right' , 'value' => '20px' ) // end data set , array( 'group' => 'Colors' , 'selector' => '#content' , 'rule' => 'color' , 'value' => '#444' ) // end data set , array( 'group' => 'Measurements' , 'selector' => '.sidebar' , 'rule' => 'margin-top' , 'value' => '10px' ) // end data set ); // END $cssoptions It's a collection of discreet datasets, each consisting of an array that holds two key = value pairs describing a 'css-rule' and a 'css-rule-value'. Further, each dataset holds a key = value pair describing the 'css-selector-group' that the 'css-rule' should blong to, and a key = value pair describing a 'rule-group' that should be used for structuring the rendering of the final css into a neat css code block arranged by the kind of properties they describe (colors, measurement, typography etc..) Now, I need to parse that, and turn it into a new structure, where the: 'rule' => 'rule-name' , 'value' => 'value-string' for each dataset is converted into: 'rule-name' => 'value-string' ..and then placed into a new array structure where all 'rule-name' = 'value-string' pairs should be aggregated under the respective 'selector-values' Like this: '#content' => array( 'width' => '200px' , 'margin-right' => '20px' ) // end selecor block ..and finally all those blocks should be grouped under their respective 'style-groups', creating a final resulting array structure like this: $css => array( 'Measurements' => array( '#content' => array( 'width' => '200px' , 'margin-right' => '20px' ) // end selecor block , '.sidebar' => array( 'margin-top' => '10px' ) // end selector block ) // end rule group , 'Colors' => array( '#content' => array( 'color' => '#444' ) // end selector block ) // end rule group ); // end css

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >