Search Results

Search found 3677 results on 148 pages for 'cs 79'.

Page 45/148 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • VIsual Studio : ASP.NET Extra Page Files

    - by Matthew
    Is there any way to write a VS Add-In or something else that would allow me to be able to link files to an ASPX page in ASP.NET. My goal is to be able to have this extra file created with every ASPX page, and then use a custom MS Build Task to analyze those files and do some stuff. So for example, when I created "MyPage.aspx", I'd actually see these files on disk... MyPage.aspx MyPage.aspx.cs MyPage.aspx.designer.cs MyPage.aspx.MyExtension I want to be able to see the file when I expand a page and be able to edit the file. Possible?

    Read the article

  • rabbitmq-erlang-client, using rebar friendly pkg, works on dev env fails on rebar release

    - by lfurrea
    I am successfully using the rebar-friendly package of rabbitmq-erlang-client for a simple Hello World rebarized and OTP "compliant" app and things work fine on the dev environment. I am able to fire up an erl console and do my application:start(helloworld). and connect to the broker, open up a channel and communicate to queues. However, then I proceed to do rebar generate and it builds up the release just fine, but when I try to fire up from the self contained release package then things suddenly explode. I know rebar releases are known to be an obscure art, but I would like to know what are my options as far as deployment for an app using the rabbitmq-erlang-client. Below you will find the output of the console on the crash: =INFO REPORT==== 18-Dec-2012::16:41:35 === application: session_record exited: {{{badmatch, {error, {'EXIT', {undef, [{amqp_connection_sup,start_link, [{amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>, "127.0.0.1",5672,0,0,0,infinity,none, [#Fun<amqp_auth_mechanisms.plain.3>, #Fun<amqp_auth_mechanisms.amqplain.3>], [],[]}], []}, {supervisor2,do_start_child_i,3, [{file,"src/supervisor2.erl"},{line,391}]}, {supervisor2,handle_call,3, [{file,"src/supervisor2.erl"},{line,413}]}, {gen_server,handle_msg,5, [{file,"gen_server.erl"},{line,588}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,227}]}]}}}}, [{amqp_connection,start,1, [{file,"src/amqp_connection.erl"},{line,164}]}, {hello_qp,start_link,0,[{file,"src/hello_qp.erl"},{line,10}]}, {session_record_sup,init,1, [{file,"src/session_record_sup.erl"},{line,55}]}, {supervisor_bridge,init,1, [{file,"supervisor_bridge.erl"},{line,79}]}, {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,227}]}]}, {session_record_app,start,[normal,[]]}} type: permanent

    Read the article

  • SQL indexes for "not equal" searches

    - by bortzmeyer
    The SQL index allows to find quickly a string which matches my query. Now, I have to search in a big table the strings which do not match. Of course, the normal index does not help and I have to do a slow sequential scan: essais=> \d phone_idx Index "public.phone_idx" Column | Type --------+------ phone | text btree, for table "public.phonespersons" essais=> EXPLAIN SELECT person FROM PhonesPersons WHERE phone = '+33 1234567'; QUERY PLAN ------------------------------------------------------------------------------- Index Scan using phone_idx on phonespersons (cost=0.00..8.41 rows=1 width=4) Index Cond: (phone = '+33 1234567'::text) (2 rows) essais=> EXPLAIN SELECT person FROM PhonesPersons WHERE phone != '+33 1234567'; QUERY PLAN ---------------------------------------------------------------------- Seq Scan on phonespersons (cost=0.00..18621.00 rows=999999 width=4) Filter: (phone <> '+33 1234567'::text) (2 rows) I understand (see Mark Byers' very good explanations) that PostgreSQL can decide not to use an index when it sees that a sequential scan would be faster (for instance if almost all the tuples match). But, here, "not equal" searches are really slower. Any way to make these "is not equal to" searches faster? Here is another example, to address Mark Byers' excellent remarks. The index is used for the '=' query (which returns the vast majority of tuples) but not for the '!=' query: essais=> EXPLAIN ANALYZE SELECT person FROM EmailsPersons WHERE tld(email) = 'fr'; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------ Index Scan using tld_idx on emailspersons (cost=0.25..4010.79 rows=97033 width=4) (actual time=0.137..261.123 rows=97110 loops=1) Index Cond: (tld(email) = 'fr'::text) Total runtime: 444.800 ms (3 rows) essais=> EXPLAIN ANALYZE SELECT person FROM EmailsPersons WHERE tld(email) != 'fr'; QUERY PLAN -------------------------------------------------------------------------------------------------------------------- Seq Scan on emailspersons (cost=0.00..27129.00 rows=2967 width=4) (actual time=1.004..1031.224 rows=2890 loops=1) Filter: (tld(email) <> 'fr'::text) Total runtime: 1037.278 ms (3 rows) DBMS is PostgreSQL 8.3 (but I can upgrade to 8.4).

    Read the article

  • Mysql partitioning: Partitions outside of date range is included

    - by Sturlum
    Hi, I have just tried to configure partitions based on date, but it seems that mysql still includes a partition with no relevant data. It will use the relevant partition but also include the oldest for some reason. Am I doing it wrong? The version is 5.1.44 (MyISAM) I first added a few partitions based on "day", which is of type "date" ALTER TABLE ptest PARTITION BY RANGE(TO_DAYS(day)) ( PARTITION p1 VALUES LESS THAN (TO_DAYS('2009-08-01')), PARTITION p2 VALUES LESS THAN (TO_DAYS('2009-11-01')), PARTITION p3 VALUES LESS THAN (TO_DAYS('2010-02-01')), PARTITION p4 VALUES LESS THAN (TO_DAYS('2010-05-01')) ); After a query, I find that it uses the "old" partition, that should not contain any relevant data. mysql> explain partitions select * from ptest where day between '2010-03-11' and '2010-03-12'; +----+-------------+------------+------------+-------+---------------+------+---------+------+------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+------------+-------+---------------+------+---------+------+------+-------------+ | 1 | SIMPLE | ptest | p1,p4 | range | day | day | 3 | NULL | 79 | Using where | +----+-------------+------------+------------+-------+---------------+------+---------+------+------+-------------+ When I select a single day, it works: mysql> explain partitions select * from ptest where day = '2010-03-11'; +----+-------------+------------+------------+------+---------------+------+---------+-------+------+-------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+------------+------+---------------+------+---------+-------+------+-------+ | 1 | SIMPLE | ptest | p4 | ref | day | day | 3 | const | 39 | | +----+-------------+------------+------------+------+---------------+------+---------+-------+------+-------+

    Read the article

  • XNA - Pong Clone - Reflecting ball when it hits a wall?

    - by toleero
    Hi guys, I'm trying to make the ball bounce off of the top and bottom 'Walls' of my UI when creating a 2D Pong Clone. This is my Game.cs public void CheckBallPosition() { if (ball.Position.Y == 0 || ball.Position.Y >= graphics.PreferredBackBufferHeight) ball.Move(true); else ball.Move(false); if (ball.Position.X < 0 || ball.Position.X >= graphics.PreferredBackBufferWidth) ball.Reset(); } At the moment I'm using this in my Ball.cs public void Move(bool IsCollidingWithWall) { if (IsCollidingWithWall) { Vector2 normal = new Vector2(0, 1); Direction = Vector2.Reflect(Direction,normal); this.Position += Direction; Console.WriteLine("WALL COLLISION"); } else this.Position += Direction; } It works, but I'm using a manually typed Normal and I want to know how to calculate the normal of the top and bottom parts of the screen?

    Read the article

  • Using Memcached in Python/Django - questions.

    - by Thomas
    I am starting use Memcached to make my website faster. For constant data in my database I use this: from django.core.cache import cache cache_key = 'regions' regions = cache.get(cache_key) if result is None: """Not Found in Cache""" regions = Regions.objects.all() cache.set(cache_key, regions, 2592000) #(2592000sekund = 30 dni) return regions For seldom changed data I use signals: from django.core.cache import cache from django.db.models import signals def nuke_social_network_cache(self, instance, **kwargs): cache_key = 'networks_for_%s' % (self.instance.user_id,) cache.delete(cache_key) signals.post_save.connect(nuke_social_network_cache, sender=SocialNetworkProfile) signals.post_delete.connect(nuke_social_network_cache, sender=SocialNetworkProfile) Is it correct way? I installed django-memcached-0.1.2, which show me: Memcached Server Stats Server Keys Hits Gets Hit_Rate Traffic_In Traffic_Out Usage Uptime 127.0.0.1 15 220 276 79% 83.1 KB 364.1 KB 18.4 KB 22:21:25 Can sombody explain what columns means? And last question. I have templates where I am getting much records from a few table (relationships). So in my view I get records from one table and in templates show it and related info from others. Generating page last a few seconds for very small table (<100records). Is it some easy way to cache queries from templates? Have I to do some big structure in my view (with all related tables), cache it and send to template?

    Read the article

  • TFS Automated Builds to Code Packages

    - by Adam Jenkin
    I would like to hear the best practices or know how people perform the following task in TFS 2008. I am intending on using TFS for building and storing web applications projects. Sometimes these projects can contain 100's of files (*.cs, *.acsx etc) During the lifetime of the website, a small bug will get raised resulting in say a stylesheet change, and a change to default.aspx.cs for example. On checking in these changes to TFS, and automated build would be triggered (great!), however for deploying the changes to the target production machine, I only need to deploy for example: style.css default.asx MyWebApplications.dll So my question is, can MSBuild be customized to generate a "code pack" of only the files which require deploying to the production server based on the changeset which cause the re-build?

    Read the article

  • Unit testing class in a web service in .net

    - by Dan Bailiff
    After some digging here, I took the advice in this thread: http://stackoverflow.com/questions/371961/how-to-unit-test-c-web-service-with-visual-studio-2008 I've created a separate class and my web service class is just a wrapper for that one. The problem is that when I try to create a unit test project in VS2008, it insists on creating a unit test that acts like I'm testing the web service calls instead of the class I specified. I can't get to the class I'm trying to test. I have a web service "subscription_api.asmx". The code behind is "subscription_api.cs" which contains the web method wrapper calls to the real code at "subscription.cs". I would expect to be able to do the following: [TestMethod()] public void GetSystemStatusTest() { subscription sub = new subscription(); XmlNode node = sub.GetSystemStatusTest(); Assert.IsNotNull(node); } But instead I get this mess which is autogenerated from VS'08: /// <summary> ///A test for GetSystemStatus ///</summary> // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example, // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server, // whether you are testing a page, web service, or a WCF service. [TestMethod()] [HostType("ASP.NET")] [AspNetDevelopmentServerHost("C:\\CVSROOT\\rnr\\pro\\product\\wms\\ss\\subscription_api", "/subscription_api")] [UrlToTest("http://localhost/subscription_api")] public void GetSystemStatusTest() { subscription_Accessor target = new subscription_Accessor(); // TODO: Initialize to an appropriate value XmlNode expected = null; // TODO: Initialize to an appropriate value XmlNode actual; actual = target.GetSystemStatus(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); } Additionally, there is a "subscription_api.accessor" in the Test References folder. When I try this: [TestMethod()] public void GetSystemStatusTest2() { subscription_Accessor sub = new subscription_Accessor(); XmlNode node = sub.GetSystemStatus(); Assert.IsNotNull(node); } I get an error: Test method subscription_api.Test.subscriptionTest.GetSystemStatusTest2 threw exception: System.TypeInitializationException: The type initializer for 'subscription_Accessor' threw an exception. ---> System.ArgumentNullException: Value cannot be null. I'm really new to unit testing and feel lost. How can I create a unit test just for my subscription class in "subscription.cs" without testing the web service? Am I limited to testing within the same project (I hope not)? Do I have to put the target class in its own project outside of the web service project?

    Read the article

  • g-wan - reproducing the performance claims

    - by user2603628
    Using gwan_linux64-bit.tar.bz2 under Ubuntu 12.04 LTS unpacking and running gwan then pointing wrk at it (using a null file null.html) wrk --timeout 10 -t 2 -c 100 -d20s http://127.0.0.1:8080/null.html Running 20s test @ http://127.0.0.1:8080/null.html 2 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 11.65s 5.10s 13.89s 83.91% Req/Sec 3.33k 3.65k 12.33k 75.19% 125067 requests in 20.01s, 32.08MB read Socket errors: connect 0, read 37, write 0, timeout 49 Requests/sec: 6251.46 Transfer/sec: 1.60MB .. very poor performance, in fact there seems to be some kind of huge latency issue. During the test gwan is 200% busy and wrk is 67% busy. Pointing at nginx, wrk is 200% busy and nginx is 45% busy: wrk --timeout 10 -t 2 -c 100 -d20s http://127.0.0.1/null.html Thread Stats Avg Stdev Max +/- Stdev Latency 371.81us 134.05us 24.04ms 91.26% Req/Sec 72.75k 7.38k 109.22k 68.21% 2740883 requests in 20.00s, 540.95MB read Requests/sec: 137046.70 Transfer/sec: 27.05MB Pointing weighttpd at nginx gives even faster results: /usr/local/bin/weighttp -k -n 2000000 -c 500 -t 3 http://127.0.0.1/null.html weighttp - a lightweight and simple webserver benchmarking tool starting benchmark... spawning thread #1: 167 concurrent requests, 666667 total requests spawning thread #2: 167 concurrent requests, 666667 total requests spawning thread #3: 166 concurrent requests, 666666 total requests progress: 9% done progress: 19% done progress: 29% done progress: 39% done progress: 49% done progress: 59% done progress: 69% done progress: 79% done progress: 89% done progress: 99% done finished in 7 sec, 13 millisec and 293 microsec, 285172 req/s, 57633 kbyte/s requests: 2000000 total, 2000000 started, 2000000 done, 2000000 succeeded, 0 failed, 0 errored status codes: 2000000 2xx, 0 3xx, 0 4xx, 0 5xx traffic: 413901205 bytes total, 413901205 bytes http, 0 bytes data The server is a virtual 8 core dedicated server (bare metal), under KVM Where do I start looking to identify the problem gwan is having on this platform ? I have tested lighttpd, nginx and node.js on this same OS, and the results are all as one would expect. The server has been tuned in the usual way with expanded ephemeral ports, increased ulimits, adjusted time wait recycling etc.

    Read the article

  • incorrect height in Chrome when "-webkit-appearance: none" and value="" on <input> tag

    - by Avi Steiner
    In Chrome v17.0.963.79 on Windows 7, I seem to be having an inexplicable problem when applying the -webkit-appearance: none style to an <input> tag. The problem is as follows: I have a stylesheet, let's call it potatofoot.css, which consists of the code .tbl { display: table; } .tblRow { display: table-row; } .tblCell { display: table-cell; } input { -webkit-appearance: none; }? and I have an html file, let's call it blech.html, which contains the code <div class="tbl"> <div class="tblRow"> <label class="tblCell">Name</label> <input type="text" class="tblCell" value="I'M NOT EMPTY! OH, YEAH!"> </div><!--end tblRow--> </div><!--end tbl--> This displays fine (see this jsfiddle). But when I empty the value attribute, as in this jsfiddle, the entire table grows from a height of 26px to a height of 31px, the label moves to the bottom, and the input stays at the top. However, if I remove -webkit-appearance: none;, everything shows up the same with and without out the value attribute being filled. What's going on?

    Read the article

  • What is the best way to add attributes to auto-generated entities (using VS2010 and EF4)

    - by Dani
    ASP.NET MVC2 has strong support for using attributes on entities (validation, and extending Html helper class and more). If I generated my Model from the Database using VS2010 EF4 Entity Data Model (edmx and it's cs class), And I want to add attributes on some of the entities. what would be the best practice ? how should I cope with updating the model (adding more fields / tables to the database and merging them into the edmx) - will it keep my attributes or generate a new cs file erasing everything ? (Manual changes to this file may cause unexpected behavior in your application.) (Manual changes to this file will be overwritten if the code is regenerated.)

    Read the article

  • How did My Object Get into ASP.NET Page State?

    - by Paul Knopf
    I know what this error is, how to fix it, etc. My question is that I don't know why my current page I am developing is throwing this error when I am not using the foo class directly in any way, nor am I setting anything to the viewstate. I am using postbacks alot, but like I said, I am not storing anything in the viewstate etc one integer. I am using nhibernate if that is relevant. Any idea why I need to mark this classes as serializable that arent being used? Where should I start investigating? [SerializationException: Type 'FlexiCommerce.Persistence.NH.ContentPersister' in Assembly 'FlexiCommerce.Persistence.NH, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.] System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +9434541 System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +247 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +160 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +218 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +388 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +444 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +133 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13 System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +2937 [ArgumentException: Error serializing value 'Music#2' of type 'FlexiCommerce.Components.Category.'] System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3252 System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +2276 [ArgumentException: Error serializing value 'System.Object[]' of type 'System.Object[].'] System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3252 System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +116 System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +57 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4 System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37 System.Web.UI.HiddenFieldPageStatePersister.Save() +79 System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +108 System.Web.UI.Page.SaveAllState() +315 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2492

    Read the article

  • Is this mingw bug ?

    - by Debanjan
    Hi, I have been trying to execute this program on my migw ,through code::blocks, #include <string.h> #include <math.h> #include <stdio.h> #define N 100 int p[N / 64]; int pr[N]; int cnt; void sieve() { int i,j; for(i=0;i<N;i++) pr[i]=1; pr[0]=pr[1]=0; for(i=2;i<N;i++) if(pr[i]) { p[cnt]=i; cnt++; for(j=i+i;j<=N;j+=i) pr[j]=0; } } int main(){ sieve(); int i; for(i=0;i<cnt;i++) printf("%d ",p[i]); puts(""); printf("Total number of prime numbers : %d",cnt); return 0; } In My system the output is : 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 Total number of prime numbers : 22 Which is completely insane,since I am completely sure about the implementation of my algorithm. So I decided to try it in Ideone where it gives correct output.Can anybody point out the reason ?

    Read the article

  • Working with a list, performing arithmetic logic in Python

    - by haea ohoh
    Suppose I have made a large list of numbers, and I want to make another one which I will add, pairwise, with the first list. Here's the first list, A: [109, 77, 57, 34, 94, 68, 96, 72, 39, 67, 49, 71, 121, 89, 61, 84, 45, 40, 104, 68, 54, 60, 68, 62, 91, 45, 41, 118, 44, 35, 53, 86, 41, 63, 111, 112, 54, 34, 52, 72, 111, 113, 47, 91, 107, 114, 105, 91, 57, 86, 32, 109, 84, 85, 114, 48, 105, 109, 68, 57, 78, 111, 64, 55, 97, 85, 40, 100, 74, 34, 94, 78, 57, 77, 94, 46, 95, 60, 42, 44, 68, 89, 113, 66, 112, 60, 40, 110, 89, 105, 113, 90, 73, 44, 39, 55, 108, 110, 64, 108] And here's B: [35, 106, 55, 61, 81, 109, 82, 85, 71, 55, 59, 38, 112, 92, 59, 37, 46, 55, 89, 63, 73, 119, 70, 76, 100, 49, 117, 77, 37, 62, 65, 115, 93, 34, 107, 102, 91, 58, 82, 119, 75, 117, 34, 112, 121, 58, 79, 69, 68, 72, 110, 43, 111, 51, 102, 39, 52, 62, 75, 118, 62, 46, 74, 77, 82, 81, 36, 87, 80, 56, 47, 41, 92, 102, 101, 66, 109, 108, 97, 49, 72, 74, 93, 114, 55, 116, 66, 93, 56, 56, 93, 99, 96, 115, 93, 111, 57, 105, 35, 99] How might I generate the arithmatic addition logic, processing each pairwise value one by one (A[0] and B[0], through A[99], B[99]) and producing the list C (A[0] + B[0] through A[99]+ B[99])?

    Read the article

  • Tricky SQL query - need to get time frames

    - by Andrew
    I am stumbled upon a problem, when I need a query which will produce a list of speeding time frames. Here is the data example [idgps_unit_location] [dt] [idgps_unit] [lat] [long] [speed_kmh] 26 10/18/2012 18:53 2 47 56 30 27 10/18/2012 18:53 2 49 58 31 28 10/18/2012 18:53 2 28 37 15 29 10/18/2012 18:54 2 56 65 33 30 10/18/2012 18:54 2 152 161 73 31 10/18/2012 18:55 2 134 143 64 32 10/18/2012 18:56 2 22 31 12 36 10/18/2012 18:59 2 98 107 47 37 10/18/2012 18:59 2 122 131 58 38 10/18/2012 18:59 2 91 100 44 39 10/18/2012 19:00 2 190 199 98 40 10/18/2012 19:01 2 194 203 101 41 10/18/2012 19:02 2 182 191 91 42 10/18/2012 19:03 2 162 171 78 43 10/18/2012 19:03 2 174 183 83 44 10/18/2012 19:04 2 170 179 81 45 10/18/2012 19:05 2 189 198 97 46 10/18/2012 19:06 2 20 29 10 47 10/18/2012 19:07 2 158 167 76 48 10/18/2012 19:08 2 135 144 64 49 10/18/2012 19:08 2 166 175 79 50 10/18/2012 19:09 2 9 18 5 51 10/18/2012 19:09 2 101 110 48 52 10/18/2012 19:09 2 10 19 7 53 10/18/2012 19:10 2 32 41 20 54 10/18/2012 19:10 1 54 63 85 55 10/19/2012 19:11 2 55 64 50 I need a query that would convert this table into the following report that shows frames of time when speed was 80: [idgps_unit] [dt_start] [lat_start] [long_start] [speed_start] [dt_end] [lat_end] [long_end] [speed_end] [speed_average] 2 10/18/2012 19:00 190 199 98 10/18/2012 19:02 182 191 91 96.66666667 2 10/18/2012 19:03 174 183 83 10/18/2012 19:05 189 198 97 87 1 10/18/2012 19:10 54 63 85 10/18/2012 19:10 54 63 85 85 Now, what have I tried? I tried putting this into separate tables, queries and do some joins... Nothing works and I am very frustrated... I am not even sure if this could be done via the query. Asking for the expert help!

    Read the article

  • ASP.NET MVC 2 Preview 2 Route Request Not Working

    - by Kezzer
    Here's the error: The incoming request does not match any route. Basically I upgraded from Preview 1 to Preview 2 and got rid of a load of redundant stuff in relation to areas (as described by Phil Haack). It didn't work so I created a brand new project to check out how its dealt with in Preview 2. The file Default.aspx no longer exists which contains the following: public void Page_Load(object sender, System.EventArgs e) { // Change the current path so that the Routing handler can correctly interpret // the request, then restore the original path so that the OutputCache module // can correctly process the response (if caching is enabled). string originalPath = Request.Path; HttpContext.Current.RewritePath(Request.ApplicationPath, false); IHttpHandler httpHandler = new MvcHttpHandler(); httpHandler.ProcessRequest(HttpContext.Current); HttpContext.Current.RewritePath(originalPath, false); } The error I received points to the line httpHandler.ProcessRequest(HttpContext.Current); yet in newer projects none of this even exists. To test it, I quickly deleted Default.aspx but then absolutely nothing worked, I didn't even receive any errors. Here's some code extracts: Global.asax.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace Intranet { public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); AreaRegistration.RegisterAllAreas(); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); } protected void App_Start() { RegisterRoutes(RouteTable.Routes); } } } Notice the area registration as that's what I'm using. Routes.cs using System.Web.Mvc; namespace Intranet.Areas.Accounts { public class Routes : AreaRegistration { public override string AreaName { get { return "Accounts"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute("Accounts_Default", "Accounts/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" }); } } } Check the latest docs for more info on this part. It's to register the area. The Routes.cs files are located in the root folder of each area. Cheers

    Read the article

  • DataGridView and the CellEndEdit Event

    - by Brandon
    I have a DataGridView, and would like to hook into the CellEndEdit event. I've been able to successfully hook into the CellContentClick event, but am having issues with CellEndEdit. I added the following code to my Form1.cs file: private void dataGridView1_CellEndEdit(object sender, DataGridViewCellCancelEventArgs e) { dataGridView1[0, 0].Value = "Changed"; } With that code, nothing happens when I am done editing a cell. Is there anything else that I need to do to successfully hook into this event? I see that CellContentClick has a this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); line of code in the Form1.Designer.cs file, but I tried to mimic this for CellEndEdit, and received a compile error (No overload for 'dataGridView1_CellEndEdit' matches delegate 'System.Windows.Forms.DataGridViewCellEventHandler')

    Read the article

  • As3 Communicate with C# or Asp.net

    - by brenjt
    I have been looking around for hours trying to find a clear simple solution to my question and have yet to find a good answer. I am trying to do a URL request in flash to my NOPCommerce site. I want to pass a GET value to the my .cs file which i'll then use that value to grab specific information and return it back to flash. How would I set up the C# or asp.net side of things? If anyone could give me an example of what I am looking for I would greatly appreciate it. I don't know if I am supposed to use a .aspx, .cs or .ascx file. Thanks, Brennan

    Read the article

  • If Else Conditionals within Function in JavaScript

    - by Antoine-Laurent Lavoisier
    I'm having issues with conditionals. I want to return the index where pattern starts in string (or -1 if not found). The search is to be case sensitive if the 3rd parameter is true otherwise it is case insensitive. Examples index("abAB12","AB",true) returns 2 but index("abAB12","AB",false) returns 0 index("abAB12","BA",true) returns -1 and index("abAB12","BA",false) returns 1 Any idea how I can accomplish this? This is my code so far var s = "abAB12" var p = "AB" var cs = true function index(string, pattern, caseSensitive) { if (pattern) { var found = false; if (caseSensitive = false) { if (string.indexOf(pattern.) >= 0) { found = true; } return (found); else { return (""); } } else if (caseSensitive = true) { if (string.toLowerCase().indexOf(pattern.toLowerCase()) >= 0) { found = true; } return (found); } else { return (""); } } } alert(index(s, p, cs)); Fiddle at http://jsfiddle.net/AfDFb/1/

    Read the article

  • C# ApplicationContext usage

    - by rd42
    Apologies if my terminology is off, I'm new to C#. I'm trying to use an ApplicationContext file to store mysql conn values, like dbname, username, password. The class with mysql conn string is "using" the namespace for the ApplicationContext, but when I print out the connection string, the values are making it. A friend said, "I'm not initializing it" but couldn't stay to expand on what "it" was. and the "Console.WriteLine("1");" in ApplicationContext.cs never shows up. Do I need to create an ApplicationContext object and the call Initialize() on that object? Thanks for any help. ApplicationContext.cs: namespace NewApplication.Context { class ApplicationContext { public static string serverName; public static string username; public static string password; public static void Initialize() { //need to read through config here try { Console.WriteLine("1"); XmlDocument xDoc = new XmlDocument(); xDoc.Load(".\\Settings.xml"); XmlNodeList serverNodeList = xDoc.GetElementsByTagName("DatabaseServer"); XmlNodeList usernameNodeList = xDoc.GetElementsByTagName("UserName"); XmlNodeList passwordNodeList = xDoc.GetElementsByTagName("Password"); } catch (Exception ex) { // MessageBox.Show(ex.ToString()); //TODO: Future write to log file username = "user"; password = "password"; serverName = "localhost"; } } } } MySQLManager.cs: note: dbname is the same as the username as you'll see in the code, I copied this from a friend who does that. using System; using System.Collections.Generic; using System.Linq; using System.Text; using MySql.Data; using MySql.Data.MySqlClient; using NewApplication.Context; namespace NewApplication.DAO { class MySQLManager { private static MySqlConnection conn; public static MySqlConnection getConnection() { if (conn == null || conn.State == System.Data.ConnectionState.Closed) { string connStr = "server=" + ApplicationContext.serverName + ";user=" + ApplicationContext.username + ";database=" + ApplicationContext.username + ";port=3306;password=" + ApplicationContext.password + ";"; conn = new MySqlConnection(connStr); try { Console.WriteLine("Connecting to MySQL... "); Console.WriteLine("Connection string: " + connStr + "\n"); conn.Open(); // Perform databse operations // conn.Close(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } return conn; } } } and, thanks for still reading, this is the code that uses the two previous files: class LogDAO { MySqlConnection conn; public LogDAO() { conn = MySQLManager.getConnection(); } Thank you, rd42

    Read the article

  • how to access android app's certificate from inside the app?

    - by Yan
    Hi All, Im trying to access the certificate/signature from inside an android app, so that I can do something with the certificate. I googled a bit and found the code below: Class c = getClass(); ProtectionDomain pd = c.getProtectionDomain(); CodeSource cs = pd.getCodeSource(); Certificate[] signingCertificates = cs.getCertificates(); String st = signingCertificates[0].toString(); but c.getProtectionDomain() returns null. anyone can help? many thanks.

    Read the article

  • Two floating div's, one underneath. works in every browser except IE

    - by Veltar
    So I have an html-structure that looks like this: <div id="contact-wrapper"> <div> <h4>België</h4> <p>Tuinwijklaan 79<br /> 9000 Gent<br /> Tel. 0468/115967<br /> [email protected]<br /> </p> </div> <div> <h4>Nederland</h4> <p>Kerkstraat 423-C<br /> 1017 HX Amsterdam<br /> Tel: +32 468 11 59 67<br /> [email protected] </p> </div><br /> <a id="link-contact" href="#">Contacteer ons</a> </div> The two div's are displayed next to each other, and the link under it, like this: But in ie9 it shows like this: This is my css for the divs: footer div#contact-wrapper, footer h1 { float: left; } footer div#contact-wrapper div { margin: 16px 0px 0px 45px; float: left; } footer div#contact-wrapper div:first-of-type { padding-right: 30px; margin-left: 60px; border-right: 1px dashed #a3b0b9; } footer div#contact-wrapper a#link-contact { display: inline-block; background: #ffffff url('../img/contact-arrow.gif') no-repeat 95% center; border: 4px solid #bbc2c7; font-size: 12px; color: #bbc2c7; margin: 5px 0px 0px 60px; padding: 3px 0px 3px 5px; width: 150px; }

    Read the article

  • Silverlight, MSBuild, VS and some shared files. How?

    - by asgerhallas
    I have a VS project used for my .NET WCF host with some simple DTOs in it. I then have another project targeted for Silverlight with links to the files from the .NET-project. What's the best way automate the build, so that all files from the .NET project are automatically built to a Silverlight assembly too? I have tried the following in the Silverlight-library project: <Compile Include="..\KSLog.Core.Services.Shared\**\*.cs" Exclude="..\KSLog.Core.Services.Shared\Properties\AssemblyInfo.cs"></Compile> But when I do a build or a rebuild of the solution new files in the .NET project are not automatically added to the Silverlight project, and if I have deleted files in the .NET project, I get a compile error, saying the file is not found in the Silverlight project. Can I make it automatically update it self in some way? Or am I doing it all wrong?

    Read the article

  • C#, cannot understand this error?

    - by 5YrsLaterDBA
    I am using VS2008. I have a project, SystemSoftware project, connect with a database and we are using L2E. I have a RuntimeInfo class which contains some shared information there. It looks like this: public class RuntimeInfo { public const int PWD_ExpireDays = 30; private static RuntimeInfo thisObj = new RuntimeInfo(); public static string AndeDBConnStr = ConfigurationManager.ConnectionStrings["AndeDBEntities"].ConnectionString; private RuntimeInfo() { } /// <summary> /// /// </summary> /// <returns>Return this singleton object</returns> public static RuntimeInfo getRuntimeInfo() { return thisObj; } } Now I added a helper project, AndeDataViewer, to the solution which creates a simple UI to display data from the database for testing/verification purpose. I don't want to create another set of Entity Data Model in the helper project. I just added all related files as a link in the new helper project. In the AndeDataViewer project, I get the connection string from above RuntimeInfo class which is a class from my SystemSoftware project as a linked file. The code in AndeDataViewer is like this: public class DbAccess : IDisposable { private String connStr = String.Empty; public DbAccess() { connStr = RuntimeInfo.AndeDBConnStr; } } My SystemSoftware works fine that means the RuntimeInfo class has no problem there. But when I run my AndeDataViewer, the statement inside above constructor, connStr = RuntimeInfo.AndeDBConnStr; , throws an exception. The exception is copied here: System.TypeInitializationException was unhandled Message="The type initializer for 'MyCompany.SystemSoftware.SystemInfo.RuntimeInfo' threw an exception." Source="AndeDataViewer" TypeName="MyCompany.SystemSoftware.SystemInfo.RuntimeInfo" StackTrace: at AndeDataViewer.DbAccess..ctor() in C:\workspace\SystemSoftware\Other\AndeDataViewer\AndeDataViewer\DbAccess.cs:line 17 at AndeDataViewer.Window1.rbRawData_Checked(Object sender, RoutedEventArgs e) in C:\workspace\SystemSoftware\Other\AndeDataViewer\AndeDataViewer\Window1.xaml.cs:line 69 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) .... InnerException: System.NullReferenceException Message="Object reference not set to an instance of an object." Source="AndeDataViewer" StackTrace: at MyCompany.SystemSoftware.SystemInfo.RuntimeInfo..cctor() in C:\workspace\SystemSoftware\SystemSoftware\src\systeminfo\RuntimeInfo.cs:line 24 InnerException: I cannot understand this because it looks fine to me but why there is an exception? we cannot access static variable when a class is a linked class? A linked class should be the same as the local class I think. "Linked" here means when I add file I use "Add As Link".

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >