Search Results

Search found 2767 results on 111 pages for 'alex king'.

Page 73/111 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • How can I transform a DataTable in a group-by date DataTable with LINQ?

    - by alex
    I have a untyped DataTable that looks like this (srcTbl): date col_1 col_2 ... col_n 1.3.2010 00:00 12.5 0 ... 100 1.3.2010 01:00 0 0 ... 100 1.3.2010 22:00 0 0 ... 100 1.3.2010 23:00 12.5 0 ... 100 ... 31.3.2010 00:00 2 0 ... 100 31.3.2010 01:00 2 0 ... 200 I need to sum up the rows grouped by dates to get a DataTable like that (dstTbl): date, col_1 col_2 ... col_n 1.3.2010 15 0 ... 400 ... 31.3.2010 4 0 ... 300 Is this possible by using LINQ and if then how?

    Read the article

  • How to setup Eclipse PDT on a bare Windows box?

    - by Alex R
    I have installed Eclipse PDT All-In-One and nothing works (I can edit PHP source but cannot execute any PHP Scripts). Do I also need to install my own PHP interpreter? Do I need XAMPP? WAMP? Cygwin? XDebug? Zend? I'm looking for the smallest amount of stuff that I need to install to get a working PHP IDE, starting with an empty install of Windows Vista.

    Read the article

  • MongoDB: embedding performance question

    - by Alex
    I just started learning MongoDB, and I really like the idea of embedding collections instead of referencing them. MongoDB's documentation recommends to use embedding if performance is needed. I just thought about a simple forum model. Let's say, every board category has several boards, every board has several topics, and every topic has several messages. All of these collections are embedded. After some time the size of the board category will be huge. Way more than the 2MB limit. Does this mean that there's a flaw in this design?

    Read the article

  • Implications of Fulltext Search over many columns

    - by Alex
    Hello, I have a really wide table which includes separate columns for billing address, shipping address, primary address, names, aliases etc. (I can't normalize this table further, and that's not the question here anyways). I'm implementing SQL Server fulltext search, and I'm wondering whether I should limit the search ability to just the primary fields (primary address and names for example), or if I can extend the search ability across all columns without occurring too much of a performance or memory penalty. I've done some basic testing with 10,000 sample rows and it's quite fast but I don't have much experience with fulltext indexing, especially its dictionary internals, so I don't know if the index is going to grow over time, or if there is anything else to consider. Thoughts?

    Read the article

  • My Linq to Sql Insert code seems to work fine but I don't get a record in the database

    - by Alex
    Here is my code. In the debugger, I can see that the code is running. No errors are thrown. But, when I go back to the table, no row has been inserted. What am I missing?? protected void submitButton_Click(object sender, EventArgs e) { CfdDataClassesDataContext db = new CfdDataClassesDataContext(); string sOfficeSought = officesSoughtDropDownList.SelectedValue; int iOfficeSought; Int32.TryParse(sOfficeSought, out iOfficeSought); Account act = new Account() { FirstName = firstNameTextBox.Text, MiddleName = middleNamelTextBox.Text, LastName = lastNameTextBox.Text, Suffix = suffixTextBox.Text, CampaignName = campaignNameTextBox.Text, Address1 = address1TextBox.Text, Address2 = address2TextBox.Text, TownCity = townCityTextBox.Text, State = stateTextBox.Text, ZipCode = zipTextBox.Text, Phone = phoneTextBox.Text, Fax = faxTextBox.Text, PartyAffiliation = partyAfilliatinoTextBox.Text, EmailAddress = emailTextBox.Text, BankName = bankNameTextBox.Text, BankMailingAddress = bankAddressTextBox.Text, BankTownCity = bankTownCityTextBox.Text, BankState = bankStateTextBox.Text, BankZip = bankZipTextBox.Text, TreasurerFirstName = treasurerFirstNameTextBox.Text, TreasurerMiddleName = treasurerMiddleNamelTextBox.Text, TreasurerLastName = treasurerLastNameTextBox.Text, TreasurerMailingAddress = treasurerMailingAddressTextBox.Text, TreasurerTownCity = treasurerTownCityTextBox.Text, TreasurerState = treasurerStateTextBox.Text, TreasurerZipCode = treasurerZipTextBox.Text, TreasurerPhone = treasurerPhoneTextBox.Text //OfficeSought = iOfficeSought }; act.Suffix = suffixTextBox.Text; db.SubmitChanges(); }

    Read the article

  • No data when attempting to get JSONP data from cross domain PHP script

    - by Alex
    I am trying to pull latitude and longitude values from another server on a different domain using a singe id string. I am not very familiar with JQuery, but it seems to be the easiest way to go about getting around the same origin problem. I am unable to use iframes and I cannot install PHP on the server running this javascript, which is forcing my hand on this. My queries appear to be going through properly, but I am not getting any results back. I was hoping someone here might have an idea that could help, seeing as I probably wouldn't recognize most obvious errors here. My javascript function is: var surl = "http://...omitted.../pull.php"; var idnum = 5a; //in practice this is defined above alert("BEFORE"); $.ajax({ url: surl, data: {id: idnum}, dataType: "jsonp", jsonp : "callback", jsonp: "jsonpcallback", success: function (rdata) { alert(rdata.lat + ", " + rdata.lon); } }); alert("BETWEEN"); function jsonpcallback(rtndata) { alert("CALLED"); alert(rtndata.lat + ", " + rtndata.lon); } alert("AFTER"); When my javascript is run, the BEFORE, BETWEEN and AFTER alerts are displayed. The CALLED and other jsonpcallback alerts are not shown. Is there another way to tell if the jsoncallback function has been called? Below is the PHP code I have running on the second server. I added the count table to my database just so that I can tell when this script is run. Every time I call the javascript, count has had an extra item inserted and the id number is correct. <?php header("content-type: application/json"); if (isset($_GET['id']) || isset($_POST['id'])){ $db_handle = mysql_connect($server, $username, $password); if (!$db_handle) { die('Could not connect: ' . mysql_error()); } $db_found = mysql_select_db($database, $db_handle); if ($db_found) { if (isset($_POST['id'])){ $SQL = sprintf("SELECT * FROM %s WHERE loc_id='%s'", $loctable, mysql_real_escape_string($_POST['id'])); } if (isset($_GET['id'])){ $SQL = sprintf("SELECT * FROM %s WHERE loc_id='%s'", $loctable, mysql_real_escape_string($_GET['id'])); } $result = mysql_query($SQL, $db_handle); $db_field = mysql_fetch_assoc($result); $rtnjsonobj -> lat = $db_field["lat"]; $rtnjsonobj -> lon = $db_field["lon"]; if (isset($_POST['id'])){ echo $_POST['jsonpcallback']. '('. json_encode($rtnjsonobj) . ')'; } if (isset($_GET['id'])){ echo $_GET['jsonpcallback']. '('. json_encode($rtnjsonobj) . ')'; } $SQL = sprintf("INSERT INTO count (bullshit) VALUES ('%s')", $_GET['id']); $result = mysql_query($SQL, $db_handle); $db_field = mysql_fetch_assoc($result); } mysql_close($db_handle); } else { $rtnjsonobj -> lat = 404; $rtnjsonobj -> lon = 404; echo $_GET['jsonpcallback']. '('. json_encode($rtnjsonobj) . ')'; }?> I am not entirely sure if the jsonp returned by this PHP is correct. When I go directly to the PHP script without including any parameters, I do get the following. ({"lat":404,"lon":404}) The callback function is not included, but that much can be expected when it isn't included in the original call. Does anyone have any idea what might be going wrong here? Thanks in advance!

    Read the article

  • Localization of attribute values in .NET

    - by Alex Angas
    How can I localize/internationalize attribute values in .NET? My specific example is for ASP.NET web parts such as WebDisplayName, WebDescription, etc. where I inherit from the base class that uses these attributes. Also, is there any difference to doing this with attributes declared in my own classes? Thanks!

    Read the article

  • Distributing a function over a single dimension of an array in MATLAB?

    - by Alex Feinman
    I often find myself wanting to collapse an n-dimensional matrix across one dimension, and can't figure out if there is a concise incantation I can use to do this. For example, when parsing an image, I often want to do something like this. (Note! Illustrative example only. I know about rgb2gray for this specific case.) img = imread('whatever.jpg'); s = size(img); for i=1:s(1) for j=1:s(2) bw_img = mean(img(i,j,:)); end end I would love to express this as something like: bw = on(color, 3, @mean); or bw(:,:,1) = mean(color); Is there a short way to do this?

    Read the article

  • RSA key length and export limitations

    - by Alex Stamper
    I know, there are a lot of limitations to the length of used key (import and export limitations for nearly each country). Usually, it varies from 64 to 256 bits. To use more bits, it is obligatory to ask permission from authorities. But it is recommended to use 1024 bits keys for RSA as minimum! Does it mean that I cannot just use RSA without any problems with law and so on?

    Read the article

  • Accessing inbound HTTP headers in meteor?

    - by Alex K
    I'm working on an application that relies on data that the browser sends within the HTTP headers (and there's no way around this). This also happens to be my first time working with something node.js based, so it's very likely I'm completely missing something simple! Basically what I want to be able to do is call a method on the server from the client, and in that method read the HTTP headers that the client sent.

    Read the article

  • Question about JSON?

    - by Alex
    Hi all, I have a fairly simple question: In Javascript how can I return the boolean (if its found in the JSON) rather than the actual value? Example: var myJSON = { "foo" : "bar", "bar" : "foo" }; var keyToLookFor = "foo"; var found = myJSON[keyToLookFor]; if (found) { // I know I can test if the string exists in the if } // but is there a way I could just return something like: return found; // instead of testing found in the if statement and then returning true?

    Read the article

  • Trying to start a service on boot on Android

    - by Alex
    I've been trying to start a service when a device boots up on android, but I cannot get it to work. I've looked a number of links online but none of the code is working. Am I forgetting something? This is my code. Manifest <receiver android:name=".StartServiceAtBootReceiver" android:enabled="true" android:exported="false" android:label="StartServiceAtBootReceiver"> <intent-filter> <action android:name="android.intent.action._BOOT_COMPLETED"/> </intent-filter> </receiver> <service android:enabled="true" android:name="com.test.RunService"/> Receiver OnReceive public void onReceive(Context context, Intent intent) { if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) { Intent serviceLauncher = new Intent(context, RunService.class); context.startService(serviceLauncher); Log.v("TEST", "Service loaded at start"); } } Thanks,

    Read the article

  • Implement loops for python 3

    - by Alex
    Implement this loop: total up the product of the numbers from 1 to x. Implement this loop: total up the product of the numbers from a to b. Implement this loop: total up the sum of the numbers from a to b. Implement this loop: total up the sum of the numbers from 1 to x. Implement this loop: count the number of characters in a string s. i'm very lost on implementing loops these are just some examples that i am having trouble with-- if someone could help me understand how to do them that would be awesome

    Read the article

  • Can't install a ruby gem because of an error?

    - by Alex
    Hey there, trying to install a ruby gem but I keep getting the following error: ERROR:failed to build gem native extension /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at/System/ Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h I'm not exactly sure what is happening here. Is there anyone that knows what is going on and how to fix it? Thanks!

    Read the article

  • How to use the vtable to determine class type

    - by Alex Silverman
    I was recently on an interview for a position where C/C++ is the primary language and during one question I was told that it's possible to use the vtable to determine which class in a hierarchy a base pointer actually stores. So if, for example you have class A { public: A() {} virtual ~A() {} virtual void method1() {} }; class B : public A { public: B() {} virtual ~B() {} virtual void method1() {} }; and you instantiate A * pFoo = new B(), is it indeed possible to use the vtable to determine whether pFoo contains a pointer to an instance of A or B?

    Read the article

  • The question about the basics of LINQ to SQL working

    - by Alex
    I just started learning LINQ to SQL, and so far I'm impressed with the easy of use and good performance. I used to think that when doing LINQ queries like from Customer in DB.Customers where Customer.Age > 30 select Customer Get all customers from the database ("SELECT * FROM Customers"), move them to the Customers array and then make a search in that Array using .NET methods. This is very inefficient, what if there are hundreds of thousands of customers in the database? Making such big SELECT queries would kill the web application. Now after experiencing how actually fast LINQ to SQL is, I start to suspect that when doing that query I just wrote, LINQ somehow converts it to a SQL Query string SELECT * FROM Customers WHERE Age > 30 And only when necessary it will run the query. So my question is: am I right? And when is the query actually run? The reason why I'm asking is not only because I want to understand how it works in order to build good optimized applications, but because I came across the following problem. I have 2 tables, one of them is Books, the other has information on how many books were sold on certain days. My goal is to select books that had at least 50 sales/day in past 10 days. It's done with this simple query: from Book in DB.Books where (from Sale in DB.Sales where Sale.SalesAmount >= 50 and Sale.DateOfSale >= DateTime.Now.AddDays(-10) select Sale.BookID).Contains(Book.ID) select Book The point is, I have to use the checking part in several queries and I decided to create an array with IDs of all popular books: var popularBooksIDs = from Sale in DB.Sales where Sale.SalesAmount >= 50 and Sale.DateOfSale >= DateTime.Now.AddDays(-10) select Sale.BookID; BUT when I try to do the query now: from Book in DB.Books where popularBooksIDs.Contains(Book.ID) select Book It doesn't work! That's why I think that we can't use thins kinds of shortcuts in LINQ to SQL queries, like we can't use them in real SQL. We have to create straightforward queries, am I right?

    Read the article

  • In MS Access is there a way to allow forms to update while maintaning Read Only

    - by Alex
    I have several forms linked tables via queries. The form pull data such as sales and ratios by selecting a product from the main's form's combo box. I am however having to issues: 1- I would ultimately prefer the combo box to be a free entry; however by just entering in the box and hitting enter (not a button called “enter on a screen” which would initiate recalcs, just normal enter), while it does bring the new information in sub-forms it also changes the information in the original table. If I make the table read only that it just doesn't allow the form to work by saying that the table is read only. 2- The same Read only issue occurs when another user with read only rights tries to use the database. I understand that ready only is functioning as intended, however I am wondering if there is way to make some functions work while disallowing the updating. I am unfortunately learning on the go, so go easy plz. Thank you

    Read the article

  • Reinstantiating a GUI (JFrame) object

    - by Alex
    Hi guys, basically I want my JFrame to become a completely new JFrame object when an event is triggered. I have some code that basically calls [CODE]GUI gui = new GUI(x, y)[/CODE] the only problem I'm having is that as well as creating the new GUI object, it is not deleting the old window. Can anyone tell me how to get rid of the old window. Thanks.

    Read the article

  • Errors/Warnings/Debug Info no longer appears in Debug Console

    - by Alex L
    Hi Guys: This one is driving me crazy. When I run my App and open the Debug Console there is nothing there! Nope, not even the output from my NSLog statements. Before I would see a bunch of debug information starting with [Session Started ...] and ending with 'Terminating in response to SpringBoard's termination'. The Status Bar at the bottom of the Console says my App was successfully launched. Even Errors and Warnings from my code no longer appear. How do I get this to show up again? Any help would be greatly appreciated.

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >